summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorKonrad Lipinski <konrad.l@samsung.com>2016-07-15 13:15:05 +0200
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:53:39 +0900
commitc5de5a163ac8917dfdb8da86def70ede9058009f (patch)
treef765d8cae869c4ab7020293c4fe2ca43dcdc5525 /ipc
parentd8934e9b05b82e73a3c78421f372197801c1785e (diff)
kdbus: allow unix domain socket fd passing
[ This commit re-applies change Ifafec44da924ec8ed677629606c92a45e7171636 to new kdbus upstream version. ] Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com> Change-Id: Ib293d0d864a3a91cf8422bcccc1f7593285868a1
Diffstat (limited to 'ipc')
-rw-r--r--ipc/kdbus/message.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/ipc/kdbus/message.c b/ipc/kdbus/message.c
index ae565cd343f8..66b9325f03d0 100644
--- a/ipc/kdbus/message.c
+++ b/ipc/kdbus/message.c
@@ -229,8 +229,6 @@ exit:
static struct file *kdbus_get_fd(int fd)
{
struct file *f, *ret;
- struct inode *inode;
- struct socket *sock;
if (fd < 0)
return ERR_PTR(-EBADF);
@@ -239,15 +237,10 @@ static struct file *kdbus_get_fd(int fd)
if (!f)
return ERR_PTR(-EBADF);
- inode = file_inode(f);
- sock = S_ISSOCK(inode->i_mode) ? SOCKET_I(inode) : NULL;
-
if (f->f_mode & FMODE_PATH)
ret = f; /* O_PATH is always allowed */
else if (f->f_op == &kdbus_handle_ops)
ret = ERR_PTR(-EOPNOTSUPP); /* disallow kdbus-fd over kdbus */
- else if (sock && sock->sk && sock->ops && sock->ops->family == PF_UNIX)
- ret = ERR_PTR(-EOPNOTSUPP); /* disallow UDS over kdbus */
else
ret = f; /* all other are allowed */