kernel-fxtec-pro1x/fs/ecryptfs
Tyler Hicks 8dc6780587 eCryptfs: Gracefully refuse miscdev file ops on inherited/passed files
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>
2012-07-06 15:51:12 -05:00
..
crypto.c
debug.c
dentry.c
ecryptfs_kernel.h
file.c
inode.c get rid of pointless allocations and copying in ecryptfs_follow_link() 2012-05-29 23:28:40 -04:00
Kconfig
keystore.c
kthread.c eCryptfs: Properly check for O_RDONLY flag before doing privileged open 2012-07-03 16:34:09 -07:00
main.c
Makefile
messaging.c
miscdev.c eCryptfs: Gracefully refuse miscdev file ops on inherited/passed files 2012-07-06 15:51:12 -05:00
mmap.c
read_write.c
super.c vfs: Rename end_writeback() to clear_inode() 2012-05-06 13:43:41 +08:00