mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-12 08:58:20 +03:00
pam: fix cache id
Something went wrong in the cherry-picking for 3fc9c413a9bd44b77c7ee8b5dc7decb05e9f2d43. 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 ```
This commit is contained in:
parent
641103ac9e
commit
83ecef0d76
@ -62,7 +62,7 @@ int pam_acquire_bus_connection(pam_handle_t *handle, const char *module_name, sd
|
||||
return PAM_SERVICE_ERR;
|
||||
}
|
||||
|
||||
r = pam_set_data(handle, "systemd-system-bus", bus, cleanup_system_bus);
|
||||
r = pam_set_data(handle, cache_id, bus, cleanup_system_bus);
|
||||
if (r != PAM_SUCCESS) {
|
||||
pam_syslog(handle, LOG_ERR, "Failed to set PAM bus data: %s", pam_strerror(handle, r));
|
||||
return r;
|
||||
|
Loading…
x
Reference in New Issue
Block a user