Skip to content

Commit 4ce7d3c

Browse files
rlee287jrjohansen
authored andcommitted
apparmor: remove redundant perms.allow MAY_EXEC bitflag set
This section of profile_transition that occurs after x_to_label only happens if perms.allow already has the MAY_EXEC bit set, so we don't need to set it again. Fixes: 16916b1 ("apparmor: force auditing of conflicting attachment execs from confined") Signed-off-by: Ryan Lee <[email protected]> Signed-off-by: John Johansen <[email protected]>
1 parent da0edab commit 4ce7d3c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

security/apparmor/domain.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -734,10 +734,8 @@ static struct aa_label *profile_transition(const struct cred *subj_cred,
734734
* we don't need to care about clobbering it
735735
*/
736736
if (info == CONFLICTING_ATTACH_STR_IX
737-
|| info == CONFLICTING_ATTACH_STR_UX) {
737+
|| info == CONFLICTING_ATTACH_STR_UX)
738738
perms.audit |= MAY_EXEC;
739-
perms.allow |= MAY_EXEC;
740-
}
741739
/* hack ix fallback - improve how this is detected */
742740
goto audit;
743741
} else if (!new) {

0 commit comments

Comments
 (0)