This patch modifies the changehat interface to return EPERM instead

of EACCESS when an unconfined process calls changehat.  This enables
applications using the changehat api to detect that the application
is not confined so probing for a matching hat can be aborted.
This commit is contained in:
John Johansen 2006-10-24 22:24:44 +00:00
parent ddfbd98849
commit 8c1bf90305

View file

@ -1594,7 +1594,7 @@ int aa_change_hat(const char *hat_name, u32 hat_magic)
/* check to see if an unconfined process is doing a changehat. */
if (!__aa_is_confined(sd)) {
error = -EACCES;
error = -EPERM;
goto out;
}