[apparmor] [PATCH 04/27] apparmor: fix error code to failure message mapping for name lookup

Steve Beattie steve at nxnw.org
Wed Nov 21 14:54:02 UTC 2012


On Tue, Nov 20, 2012 at 08:39:44PM -0800, John Johansen wrote:
> -ESTALE used to be incorrectly used to indicate a disconnected path, when
> name lookup failed.  This was fixed in commit e1b0e444 to correctly return
> -EACCESS, but the error to failure message mapping was not correctly updated
> to reflect this change.
> 
> Signed-off-by: John Johansen <john.johansen at canonical.com>
Acked-by: Steve Beattie <sbeattie at ubuntu.com>

As an aside, I remembered asking a question about needing to keep
the reverse patch around for older kernels that returned -ESTALE, and
found it in the archives. Turned out I had already acked this patch
and patches 1 and 2 the prior time you sent them to the list. Any
chance you can hang on to the acked-by statements or is that not
possible in git?

> ---
>  security/apparmor/path.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/apparmor/path.c b/security/apparmor/path.c
> index e91ffee..35b394a 100644
> --- a/security/apparmor/path.c
> +++ b/security/apparmor/path.c
> @@ -174,7 +174,7 @@ static int get_name_to_buffer(struct path *path, int flags, char *buffer,
>  	if (info && error) {
>  		if (error == -ENOENT)
>  			*info = "Failed name lookup - deleted entry";
> -		else if (error == -ESTALE)
> +		else if (error == -EACCES)
>  			*info = "Failed name lookup - disconnected path";
>  		else if (error == -ENAMETOOLONG)
>  			*info = "Failed name lookup - name too long";

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20121121/63042014/attachment.pgp>


More information about the AppArmor mailing list