AppArmor patch for disconnected path reporting
Tim Gardner
tim.gardner at canonical.com
Thu Sep 27 02:11:01 UTC 2007
John Johansen wrote:
> kees,
>
> this little patch fixes the denied permissions and error code returned
> for the disconnected paths, unfortunately it won't fix the disconnected
> paths problem.
>
>
>
> ------------------------------------------------------------------------
>
> ---
> security/apparmor/main.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> --- a/security/apparmor/main.c
> +++ b/security/apparmor/main.c
> @@ -191,8 +191,10 @@ static int aa_perm_dentry(struct aa_prof
> */
> if (PTR_ERR(sa->name) == -ENOENT && (check & AA_CHECK_FD))
> sa->denied_mask = 0;
> - else
> - sa->denied_mask = PTR_ERR(sa->name);
> + else {
> + sa->denied_mask = sa->requested_mask;
> + sa->error_code = PTR_ERR(sa->name);
> + }
> sa->name = NULL;
> } else
> sa->denied_mask = aa_file_denied(profile, sa->name,
Kees,
Gutsy l-u-m commit 0e452e3755f61adc7d161f93e9ea1aa708a7be92
rtg
--
Tim Gardner tim.gardner at ubuntu.com
More information about the kernel-team
mailing list