mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
pam: quiet a spurious debug message
This singular debug message gets printed even if debug is not enabled.
Quiet this message when debug is not enabled for consistency.
(cherry picked from commit f4092cb974
)
This commit is contained in:
parent
aa0aa1093d
commit
c413c43c12
@ -149,7 +149,7 @@ static int acquire_user_record(
|
||||
_cleanup_free_ char *generic_field = NULL, *json_copy = NULL;
|
||||
_cleanup_(sd_bus_unrefp) sd_bus *bus = NULL;
|
||||
|
||||
r = pam_acquire_bus_connection(handle, "pam-systemd-home", &bus, bus_data);
|
||||
r = pam_acquire_bus_connection(handle, "pam-systemd-home", debug, &bus, bus_data);
|
||||
if (r != PAM_SUCCESS)
|
||||
return r;
|
||||
|
||||
@ -563,7 +563,7 @@ static int acquire_home(
|
||||
* request to collect one more password and pass the new and all previously used passwords again. */
|
||||
|
||||
_cleanup_(sd_bus_unrefp) sd_bus *bus = NULL;
|
||||
r = pam_acquire_bus_connection(handle, "pam-systemd-home", &bus, bus_data);
|
||||
r = pam_acquire_bus_connection(handle, "pam-systemd-home", debug, &bus, bus_data);
|
||||
if (r != PAM_SUCCESS)
|
||||
return r;
|
||||
|
||||
@ -892,7 +892,7 @@ _public_ PAM_EXTERN int pam_sm_close_session(
|
||||
return r;
|
||||
|
||||
_cleanup_(sd_bus_unrefp) sd_bus *bus = NULL;
|
||||
r = pam_acquire_bus_connection(handle, "pam-systemd-home", &bus, NULL);
|
||||
r = pam_acquire_bus_connection(handle, "pam-systemd-home", debug, &bus, NULL);
|
||||
if (r != PAM_SUCCESS)
|
||||
return r;
|
||||
|
||||
@ -1114,7 +1114,7 @@ _public_ PAM_EXTERN int pam_sm_chauthtok(
|
||||
return pam_syslog_errno(handle, LOG_ERR, r, "Failed to store new password: %m");
|
||||
|
||||
_cleanup_(sd_bus_unrefp) sd_bus *bus = NULL;
|
||||
r = pam_acquire_bus_connection(handle, "pam-systemd-home", &bus, NULL);
|
||||
r = pam_acquire_bus_connection(handle, "pam-systemd-home", debug, &bus, NULL);
|
||||
if (r != PAM_SUCCESS)
|
||||
return r;
|
||||
|
||||
|
@ -1061,7 +1061,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
|
||||
return pam_syslog_pam_error(handle, LOG_ERR, r, "Failed to get PAM systemd.runtime_max_sec data: @PAMERR@");
|
||||
|
||||
/* Talk to logind over the message bus */
|
||||
r = pam_acquire_bus_connection(handle, "pam-systemd", &bus, &d);
|
||||
r = pam_acquire_bus_connection(handle, "pam-systemd", debug, &bus, &d);
|
||||
if (r != PAM_SUCCESS)
|
||||
return r;
|
||||
|
||||
@ -1264,7 +1264,7 @@ _public_ PAM_EXTERN int pam_sm_close_session(
|
||||
/* Before we go and close the FIFO we need to tell logind that this is a clean session
|
||||
* shutdown, so that it doesn't just go and slaughter us immediately after closing the fd */
|
||||
|
||||
r = pam_acquire_bus_connection(handle, "pam-systemd", &bus, NULL);
|
||||
r = pam_acquire_bus_connection(handle, "pam-systemd", debug, &bus, NULL);
|
||||
if (r != PAM_SUCCESS)
|
||||
return r;
|
||||
|
||||
|
@ -148,6 +148,7 @@ void pam_bus_data_disconnectp(PamBusData **_d) {
|
||||
int pam_acquire_bus_connection(
|
||||
pam_handle_t *handle,
|
||||
const char *module_name,
|
||||
bool debug,
|
||||
sd_bus **ret_bus,
|
||||
PamBusData **ret_pam_bus_data) {
|
||||
|
||||
@ -187,7 +188,7 @@ int pam_acquire_bus_connection(
|
||||
if (r != PAM_SUCCESS)
|
||||
return pam_syslog_pam_error(handle, LOG_ERR, r, "Failed to set PAM bus data: @PAMERR@");
|
||||
|
||||
pam_syslog(handle, LOG_DEBUG, "New sd-bus connection (%s) opened.", d->cache_id);
|
||||
pam_debug_syslog(handle, debug, "New sd-bus connection (%s) opened.", d->cache_id);
|
||||
|
||||
success:
|
||||
*ret_bus = sd_bus_ref(d->bus);
|
||||
|
@ -37,7 +37,7 @@ void pam_bus_data_disconnectp(PamBusData **d);
|
||||
|
||||
/* Use a different module name per different PAM module. They are all loaded in the same namespace, and this
|
||||
* helps avoid a clash in the internal data structures of sd-bus. It will be used as key for cache items. */
|
||||
int pam_acquire_bus_connection(pam_handle_t *handle, const char *module_name, sd_bus **ret_bus, PamBusData **ret_bus_data);
|
||||
int pam_acquire_bus_connection(pam_handle_t *handle, const char *module_name, bool debug, sd_bus **ret_bus, PamBusData **ret_bus_data);
|
||||
int pam_release_bus_connection(pam_handle_t *handle, const char *module_name);
|
||||
int pam_get_bus_data(pam_handle_t *handle, const char *module_name, PamBusData **ret);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user