mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]>
This commit is contained in:
parent
65cfc67223
commit
326be7b484
3 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue