2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

Fix bnc#430358 where the utils make an invalid profile, by outputting

other rules with no permissions.

Since other rules are not currently supported, remove them.
This commit is contained in:
John Johansen
2008-11-21 12:58:48 +00:00
parent 4c3df3ae53
commit 7fdf8d9925

View File

@@ -5642,27 +5642,30 @@ sub writepath_rules ($$$) {
$tmpmode = $user & ~$other;
$tmpaudit = $user_audit;
$user &= ~$tmpmode;
} elsif ($other & ~$user) {
$ownerstr = "other ";
$tmpmode = $other & ~$user;
$tmpaudit = $other_audit;
$other &= ~$tmpmode;
# } elsif ($other & ~$user) {
# $ownerstr = "other ";
# $tmpmode = $other & ~$user;
# $tmpaudit = $other_audit;
# $other &= ~$tmpmode;
} else {
if ($user_audit & ~$other_audit & $user) {
$ownerstr = "owner ";
$tmpaudit = $user_audit & ~$other_audit & $user;
$tmpmode = $user & $tmpaudit;
$user &= ~$tmpmode;
} elsif ($other_audit & ~$user_audit & $other) {
$ownerstr = "other ";
$tmpaudit = $other_audit & ~$user_audit & $other;
$tmpmode = $other & $tmpaudit;
$other &= ~$tmpmode;
# } elsif ($other_audit & ~$user_audit & $other) {
# $ownerstr = "other ";
# $tmpaudit = $other_audit & ~$user_audit & $other;
# $tmpmode = $other & $tmpaudit;
# $other &= ~$tmpmode;
} else {
# user == other && user_audit == other_audit
$ownerstr = "";
$tmpmode = $user;
$tmpaudit = $user_audit;
#include exclusive other for now
# $tmpmode = $user;
# $tmpaudit = $user_audit;
$tmpmode = $user | $other;
$tmpaudit = $user_audit | $other_audit;
$user &= ~$tmpmode;
$other &= ~$tmpmode;
}