2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 10:07:12 +00:00

parser: drop dead code in mount.cc

perms = 0, therefore perms & something is always false.

Fixes: coverity#320937 and coverity#320937
This commit is contained in:
Christian Boltz 2025-08-04 00:08:26 +02:00
parent 63b46dd3d7
commit 617d3021e8
No known key found for this signature in database
GPG Key ID: C6A682EA63C82F1C

View File

@ -1170,10 +1170,6 @@ void mnt_rule::post_parse_profile(Profile &prof)
exit(1);
}
if (perms & AA_USER_EXEC)
perms |= SHIFT_PERMS(n << 10, AA_USER_SHIFT);
if (perms & AA_OTHER_EXEC)
perms |= SHIFT_PERMS(n << 10, AA_OTHER_SHIFT);
perms = ((perms & ~AA_ALL_EXEC_MODIFIERS) |
(perms & AA_ALL_EXEC_MODIFIERS));