mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
pam_systemd: drop "pid" field from SessionContext
We never use the field and this is not going to change... This addresses a weird asymmetry, as create_session_message() always went to the process' own PID when doing pidfds but otherwise (i.e. without pidfds) would honour the PID specified as function parameter.
This commit is contained in:
parent
6082ccf792
commit
014d23c395
@ -847,7 +847,6 @@ static uint64_t pick_default_capability_ambient_set(
|
||||
|
||||
typedef struct SessionContext {
|
||||
const uid_t uid;
|
||||
const pid_t pid;
|
||||
const char *service;
|
||||
const char *type;
|
||||
const char *class;
|
||||
@ -895,7 +894,7 @@ static int create_session_message(
|
||||
r = sd_bus_message_append(m,
|
||||
pidfd >= 0 ? "uhsssssussbss" : "uusssssussbss",
|
||||
(uint32_t) context->uid,
|
||||
pidfd >= 0 ? pidfd : context->pid,
|
||||
pidfd >= 0 ? pidfd : 0,
|
||||
context->service,
|
||||
context->type,
|
||||
context->class,
|
||||
@ -1122,7 +1121,6 @@ _public_ PAM_EXTERN int pam_sm_open_session(
|
||||
|
||||
const SessionContext context = {
|
||||
.uid = ur->uid,
|
||||
.pid = 0,
|
||||
.service = service,
|
||||
.type = type,
|
||||
.class = class,
|
||||
|
Loading…
Reference in New Issue
Block a user