diff --git a/binutils/aa_exec.c b/binutils/aa_exec.c index 85424c010..f85bba2f9 100644 --- a/binutils/aa_exec.c +++ b/binutils/aa_exec.c @@ -201,9 +201,12 @@ int main(int argc, char **argv) } if (rc) { - if (errno == ENOENT || errno == EACCES) { + if (errno == ENOENT) { error("%s '%s' does not exist", opt_profile ? "profile" : "namespace", name); + } else if (errno == EACCES) { + error("insufficient permissions to change to the %s '%s'", + opt_profile ? "profile" : "namespace", name); } else if (errno == EINVAL) { error("AppArmor interface not available"); } else {