Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2e561d1 authored by John Johansen's avatar John Johansen
Browse files

apparmor: fix disconnected bind mnts reconnection

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: default avatarJohn Johansen <john.johansen@canonical.com>
Acked-by: default avatarSeth Arnold <seth.arnold@canonical.com>
parent d671e890
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -141,7 +141,10 @@ static int d_namespace_path(const struct path *path, char *buf, int buflen,
			error = -EACCES;
			error = -EACCES;
			if (*res == '/')
			if (*res == '/')
				*name = res + 1;
				*name = res + 1;
		}
		} else if (*res != '/')
			/* CONNECT_PATH with missing root */
			error = prepend(name, *name - buf, "/", 1);

	}
	}


out:
out: