Commit c7eb663c authored by Stefan Bader's avatar Stefan Bader

Revert "UBUNTU: SAUCE: fix regression with domain change in complain mode"

This reverts commit efe57ae3.

BugLink: https://bugs.launchpad.net/bugs/1666897Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent d8bcdd37
......@@ -496,7 +496,6 @@ static struct aa_label *profile_transition(struct aa_profile *profile,
const char *info = NULL, *name = NULL, *target = NULL;
unsigned int state = profile->file.start;
struct aa_perms perms = {};
bool nonewprivs = false;
int error = 0;
AA_BUG(!profile);
......@@ -572,7 +571,8 @@ static struct aa_label *profile_transition(struct aa_profile *profile,
!aa_label_is_subset(new, &profile->label)) {
error = -EPERM;
info = "no new privs";
nonewprivs = true;
aa_put_label(new);
new = NULL;
goto audit;
}
......@@ -589,8 +589,9 @@ static struct aa_label *profile_transition(struct aa_profile *profile,
audit:
aa_audit_file(profile, &perms, OP_EXEC, MAY_EXEC, name, target, new,
cond->uid, info, error);
if (!new || nonewprivs) {
aa_put_label(new);
if (error) {
if (new)
aa_put_label(new);
return ERR_PTR(error);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment