mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-14 10:05:02 +00:00
libselinux: do not check fcontext duplicates on use
Tools like restorecon or systemd, which load the fcontext database to make labeling decisions do not need to check for duplicate rules. Only the first rule will be used. Instead we should only check for duplicates when new rules are added to the database. And fail the transaction if we find one. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
874bac80bb
commit
4f621a1686
@ -485,7 +485,7 @@ static int init(struct selabel_handle *rec, struct selinux_opt *opts,
|
||||
pass, ++lineno) != 0)
|
||||
goto finish;
|
||||
}
|
||||
if (pass == 1) {
|
||||
if (pass == 1 && rec->validating) {
|
||||
status = nodups_specs(data, path);
|
||||
if (status)
|
||||
goto finish;
|
||||
|
Loading…
Reference in New Issue
Block a user