| |
@@ -8035,7 +8035,6 @@
|
| |
struct cm_tdbush_interface *iface;
|
| |
struct cm_tdbush_interface_item *item;
|
| |
struct cm_tdbush_method *meth;
|
| |
- struct cm_client_info self;
|
| |
unsigned int i;
|
| |
|
| |
memset(&pending, 0, sizeof(pending));
|
| |
@@ -8075,6 +8074,7 @@
|
| |
|
| |
/* "private": no bus daemon, so identify the client */
|
| |
if (bus == cm_tdbus_private) {
|
| |
+ struct cm_client_info self;
|
| |
/* just run the method */
|
| |
if (cm_tdbush_read_conn_id(conn,
|
| |
&pending.cm_uid,
|
| |
@@ -8089,6 +8089,8 @@
|
| |
"not the same as ours, "
|
| |
"ignoring.\n");
|
| |
} else {
|
| |
+ self.uid = pending.cm_uid;
|
| |
+ self.pid = pending.cm_pid;
|
| |
cm_log(4, "User ID %lu PID %lu "
|
| |
"called %s:%s.%s.\n",
|
| |
(unsigned long) pending.cm_uid,
|
| |
When using a private socket certmonger has to directly
read the UID and PID from the client rather than querying
the dbus connection.
The variable passed into the method calls was not being
initialized with these values. Confusingly the values that
the memory pointed to were the two reversed (uid=pid/pid=uid).
This broke the pre_certsave_uid and post_certsave_uid
options by saving invalid values therefore they could not
be triggered.
Fixes: https://pagure.io/certmonger/issue/298
Signed-off-by: Rob Crittenden rcritten@redhat.com