diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-03-13 17:08:22 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-03-15 02:21:45 -0400 |
commit | 326be7b484843988afe57566b627fb7a70beac56 (patch) | |
tree | 04a15bfdb681ad09444cf2f3d72ae0d38fb0432b /net/core/scm.c | |
parent | 65cfc6722361570bfe255698d9cd4dccaf47570d (diff) | |
download | op-kernel-dev-326be7b484843988afe57566b627fb7a70beac56.zip op-kernel-dev-326be7b484843988afe57566b627fb7a70beac56.tar.gz |
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 'net/core/scm.c')
-rw-r--r-- | net/core/scm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/scm.c b/net/core/scm.c index bbe4544..4c1ef02 100644 --- a/net/core/scm.c +++ b/net/core/scm.c @@ -95,7 +95,7 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp) int fd = fdp[i]; struct file *file; - if (fd < 0 || !(file = fget(fd))) + if (fd < 0 || !(file = fget_raw(fd))) return -EBADF; *fpp++ = file; fpl->count++; |