kdbus: allow unix domain socket fd passing
authorKonrad Lipinski <konrad.l@samsung.com>
Fri, 15 Jul 2016 11:15:05 +0000 (13:15 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 9 Aug 2016 07:35:15 +0000 (16:35 +0900)
Change-Id: Ifafec44da924ec8ed677629606c92a45e7171636

ipc/kdbus/message.c

index 8096075..4b1487a 100644 (file)
@@ -169,9 +169,6 @@ exit:
 
 static int kdbus_handle_check_file(struct file *file)
 {
-       struct inode *inode = file_inode(file);
-       struct socket *sock;
-
        /*
         * Don't allow file descriptors in the transport that themselves allow
         * file descriptor queueing. This will eventually be allowed once both
@@ -181,16 +178,6 @@ static int kdbus_handle_check_file(struct file *file)
        if (file->f_op == &kdbus_handle_ops)
                return -EOPNOTSUPP;
 
-       if (!S_ISSOCK(inode->i_mode))
-               return 0;
-
-       if (file->f_mode & FMODE_PATH)
-               return 0;
-
-       sock = SOCKET_I(inode);
-       if (sock->sk && sock->ops && sock->ops->family == PF_UNIX)
-               return -EOPNOTSUPP;
-
        return 0;
 }