diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-03-13 22:08:22 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-03-15 07:21:45 +0100 |
commit | 326be7b484843988afe57566b627fb7a70beac56 (patch) | |
tree | 04a15bfdb681ad09444cf2f3d72ae0d38fb0432b /net/unix/garbage.c | |
parent | readlinkat(), fchownat() and fstatat() with empty relative pathnames (diff) | |
download | linux-326be7b484843988afe57566b627fb7a70beac56.tar.xz linux-326be7b484843988afe57566b627fb7a70beac56.zip |
Allow passing O_PATH descriptors via SCM_RIGHTS datagrams
Just need to make sure that AF_UNIX garbage collector won't
confuse O_PATHed socket on filesystem for real AF_UNIX opened
socket.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-rw-r--r-- | net/unix/garbage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/unix/garbage.c b/net/unix/garbage.c index f89f83bf828e..b6f4b994eb35 100644 --- a/net/unix/garbage.c +++ b/net/unix/garbage.c @@ -104,7 +104,7 @@ struct sock *unix_get_socket(struct file *filp) /* * Socket ? */ - if (S_ISSOCK(inode->i_mode)) { + if (S_ISSOCK(inode->i_mode) && !(filp->f_mode & FMODE_PATH)) { struct socket *sock = SOCKET_I(inode); struct sock *s = sock->sk; |