aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorTyler Hicks <tyhicks@canonical.com>2012-06-11 09:24:11 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 09:04:26 -0700
commit6dfa530c0b33f1ccd2d8b103a2dea6ec559de66c (patch)
treedf4f53ead7bb20b2ca77c173cd5ed8eb5d155762 /samples
parent6d442d8f7e1a6920aad3d3f3ea544f6f8e6898b8 (diff)
eCryptfs: Gracefully refuse miscdev file ops on inherited/passed files
commit 8dc6780587c99286c0d3de747a2946a76989414a upstream. File operations on /dev/ecryptfs would BUG() when the operations were performed by processes other than the process that originally opened the file. This could happen with open files inherited after fork() or file descriptors passed through IPC mechanisms. Rather than calling BUG(), an error code can be safely returned in most situations. In ecryptfs_miscdev_release(), eCryptfs still needs to handle the release even if the last file reference is being held by a process that didn't originally open the file. ecryptfs_find_daemon_by_euid() will not be successful, so a pointer to the daemon is stored in the file's private_data. The private_data pointer is initialized when the miscdev file is opened and only used when the file is released. https://launchpad.net/bugs/994247 Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Reported-by: Sasha Levin <levinsasha928@gmail.com> Tested-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions