History

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

John Johansen committed 12 years ago

Commit f2e561d1 parent d671e891 file · +4 −1Browse files

Showing the changes to security (1 of 1 file). Show all

Unified · Split

security/apparmor/path.c+4−1
@@ -141,7 +141,10 @@ static int d_namespace_path(const struct path *path, char *buf, int buflen, · 140 unmodified lines
141 error = -EACCES;141 error = -EACCES;
142 if (*res == '/')142 if (*res == '/')
143 *name = res + 1;143 *name = res + 1;
144 }144 } else if (*res != '/')
145 /* CONNECT_PATH with missing root */
146 error = prepend(name, *name - buf, "/", 1);
147
145 }148 }
146 149
147out:150out: