From 0ee66b27fa342dd043bfa403d2957ecd52895150 Mon Sep 17 00:00:00 2001 From: Djalal Harouni Date: Wed, 22 Oct 2014 15:45:04 +0100 Subject: [PATCH] message: switch to fget_raw() to allow passing O_PATH file descriptors Signed-off-by: Djalal Harouni --- message.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/message.c b/message.c index cb45bc6..579ad76 100644 --- a/message.c +++ b/message.c @@ -232,9 +232,10 @@ static int kdbus_msg_scan_items(struct kdbus_conn *conn, /* * Verify the fd and increment the - * usage count + * usage count. Use fget_raw() to allow + * passing O_PATH fds */ - if (fd < 0 || !(f = fget(fd))) + if (fd < 0 || !(f = fget_raw(fd))) return -EBADF; kmsg->fds[i] = f; -- 2.34.1