diff --git a/security/apparmor/path.c b/security/apparmor/path.c index edddc026406b4ef47b53e163e039d1d83f741fe2..f2616780065acabc38e3afdb0e56f6cd38b7cccd 100644 --- a/security/apparmor/path.c +++ b/security/apparmor/path.c @@ -141,7 +141,10 @@ static int d_namespace_path(const 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: