Skip to content

Commit 83ecef0

Browse files
valentindavidkeszybz
authored andcommitted
pam: fix cache id
Something went wrong in the cherry-picking for 3fc9c41. Bus is not stored correctly in the cache. Because authentication calls `pam_acquire_bus_connection` twice, and the first created bus is used after the second one is created, `pam_set_data` disconnects the first one. This results in the following error: ``` Failed to acquire home for user test-user: Transport endpoint is not connected ```
1 parent 641103a commit 83ecef0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shared/pam-util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ int pam_acquire_bus_connection(pam_handle_t *handle, const char *module_name, sd
6262
return PAM_SERVICE_ERR;
6363
}
6464

65-
r = pam_set_data(handle, "systemd-system-bus", bus, cleanup_system_bus);
65+
r = pam_set_data(handle, cache_id, bus, cleanup_system_bus);
6666
if (r != PAM_SUCCESS) {
6767
pam_syslog(handle, LOG_ERR, "Failed to set PAM bus data: %s", pam_strerror(handle, r));
6868
return r;

0 commit comments

Comments
 (0)