projects
/
platform
/
core
/
system
/
kdbus-bus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
847a7a0
)
connection: improve the connection do not accept fd passing check
author
Djalal Harouni
<tixxdz@opendz.org>
Tue, 28 Oct 2014 09:44:21 +0000
(10:44 +0100)
committer
Djalal Harouni
<tixxdz@opendz.org>
Tue, 28 Oct 2014 09:44:21 +0000
(10:44 +0100)
Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
connection.c
patch
|
blob
|
history
diff --git
a/connection.c
b/connection.c
index 898db9cbebae20c2b42458708ab7583876385e8c..cca14a49d4cc457239a89ee1fef0c65c16732f90 100644
(file)
--- a/
connection.c
+++ b/
connection.c
@@
-470,8
+470,9
@@
static int kdbus_conn_entry_insert(struct kdbus_conn *conn,
goto exit_unlock;
}
- if ((kmsg->fds && !(conn->flags & KDBUS_HELLO_ACCEPT_FD)) ||
- (kmsg->memfds_count && !(conn->flags & KDBUS_HELLO_ACCEPT_FD))) {
+ /* The connection does not accept file descriptors */
+ if (!(conn->flags & KDBUS_HELLO_ACCEPT_FD) &&
+ (kmsg->fds_count > 0 || kmsg->memfds_count > 0)) {
ret = -ECOMM;
goto exit_unlock;
}