]> git.baikalelectronics.ru Git - kernel.git/commit
apparmor: fix long path failure due to disconnected path
authorJohn Johansen <john.johansen@canonical.com>
Wed, 16 May 2012 18:01:05 +0000 (11:01 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Fri, 18 May 2012 18:09:52 +0000 (11:09 -0700)
commit2a50316d72157d45fe28e531673d413388a50ed9
treef71adb789f6d850367d35b34955f038239f739b3
parent38b7ff5b3a6eb4b6954ce3e0e4a705c315c706da
apparmor: fix long path failure due to disconnected path

BugLink: http://bugs.launchpad.net/bugs/955892
All failures from __d_path where being treated as disconnected paths,
however __d_path can also fail when the generated pathname is too long.

The initial ENAMETOOLONG error was being lost, and ENAMETOOLONG was only
returned if the subsequent dentry_path call resulted in that error.  Other
wise if the path was split across a mount point such that the dentry_path
fit within the buffer when the __d_path did not the failure was treated
as a disconnected path.

Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/path.c