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

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
141141 error = -EACCES;
142142 if (*res == '/')
143143 *name = res + 1;
144− }
144+ } else if (*res != '/')
145+ /* CONNECT_PATH with missing root */
146+ error = prepend(name, *name - buf, "/", 1);
147+
145148 }
146149
147150 out: