From 4fe147a9fa8c4385d7450532826e10aaec52d813 Mon Sep 17 00:00:00 2001 From: Radoslaw Pajak Date: Tue, 17 Dec 2013 14:43:50 +0100 Subject: [PATCH] [daemon-fix] Fixed getting connection info from kdbus Change-Id: Iacf7e52e799410b6ba4a939678b5880ebadf1667 Signed-off-by: Radoslaw Pajak --- bus/kdbus-d.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bus/kdbus-d.c b/bus/kdbus-d.c index bed707a..a9d0103 100644 --- a/bus/kdbus-d.c +++ b/bus/kdbus-d.c @@ -228,8 +228,7 @@ int kdbus_NameQuery(const char* name, DBusTransport* transport, struct nameInfo* uint64_t size; __u64 id = 0; - pInfo->sec_label_len = 0; - pInfo->sec_label = NULL; + memset(pInfo, 0, sizeof(struct nameInfo)); if(!_dbus_transport_get_socket_fd(transport, &fd)) return -EPERM; @@ -247,6 +246,7 @@ int kdbus_NameQuery(const char* name, DBusTransport* transport, struct nameInfo* return -errno; } + memset(cmd, 0, sizeof(struct kdbus_cmd_conn_info)); cmd->size = size; cmd->id = id; if(id == 0) @@ -275,7 +275,7 @@ int kdbus_NameQuery(const char* name, DBusTransport* transport, struct nameInfo* if(item->type == KDBUS_ITEM_CREDS) { pInfo->userId = item->creds.uid; - pInfo->processId = item->creds.uid; + pInfo->processId = item->creds.pid; } if(item->type == KDBUS_ITEM_SECLABEL) -- 2.7.4