On Wed, Apr 20, 2016 at 11:52:48PM -0700, John Johansen wrote:
> Bind mounts can fail to be properly reconnected when PATH_CONNECT is
> specified. Ensure that when PATH_CONNECT is specified the path has
> a root.
> 
> BugLink: http://bugs.launchpad.net/bugs/1319984
> 
> Signed-off-by: John Johansen <[email protected]>

Acked-by: Seth Arnold <[email protected]>

Thanks

> ---
>  security/apparmor/path.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/security/apparmor/path.c b/security/apparmor/path.c
> index 71e0e3a..bb2f2c6 100644
> --- a/security/apparmor/path.c
> +++ b/security/apparmor/path.c
> @@ -141,7 +141,10 @@ static int d_namespace_path(struct path *path, char 
> *buf, int buflen,
>                       error = -EACCES;
>                       if (*res == '/')
>                               *name = res + 1;
> -             }
> +             } else if (*res != '/')
> +                     /* CONNECT_PATH with missing root */
> +                     error = prepend(name, *name - buf, "/", 1);
> +
>       }
>  
>  out:

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to