_cleanup_free_ int *fds = NULL;
struct bus_header *h = NULL;
size_t total, n_bytes = 0, idx = 0;
+ struct kdbus_creds *creds = NULL;
int r;
assert(bus);
fds = f;
memcpy(fds + n_fds, d->fds, j);
n_fds += j;
- }
+
+ } else if (d->type == KDBUS_MSG_SRC_CREDS)
+ creds = &d->creds;
}
if (!h)
idx += l;
}
+ if (creds) {
+ m->pid_starttime = creds->starttime / NSEC_PER_USEC;
+ m->uid = creds->uid;
+ m->gid = creds->gid;
+ m->pid = creds->pid;
+ m->tid = creds->tid;
+ m->uid_valid = m->gid_valid = true;
+ }
+
r = bus_message_parse_fields(m);
if (r < 0) {
sd_bus_message_unref(m);