mirror of
https://github.com/systemd/systemd.git
synced 2025-02-03 17:47:28 +03:00
Merge pull request #31032 from yuwata/pam-session-close
pam: fix warning "Attempted to close sd-bus after fork, this should not happen." on session close
This commit is contained in:
commit
2933881ea5
@ -5,6 +5,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bus-internal.h"
|
||||
#include "errno-util.h"
|
||||
#include "format-util.h"
|
||||
#include "macro.h"
|
||||
@ -88,8 +89,14 @@ static void pam_bus_data_destroy(pam_handle_t *handle, void *data, int error_sta
|
||||
* internally anyway. That said, we still generate a warning message, since this really shouldn't
|
||||
* happen. */
|
||||
|
||||
if (error_status & PAM_DATA_SILENT)
|
||||
pam_syslog(handle, LOG_DEBUG, "Attempted to close sd-bus after fork, this should not happen.");
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
PamBusData *d = data;
|
||||
if (FLAGS_SET(error_status, PAM_DATA_SILENT) &&
|
||||
d->bus && bus_origin_changed(d->bus))
|
||||
/* Please adjust test/units/end.sh when updating the log message. */
|
||||
pam_syslog(handle, LOG_DEBUG, "Attempted to close sd-bus after fork whose connection is opened before the fork, this should not happen.");
|
||||
|
||||
pam_bus_data_free(data);
|
||||
}
|
||||
|
@ -6,5 +6,8 @@ set -o pipefail
|
||||
|
||||
(! journalctl -q -o short-monotonic --grep "didn't pass validation" >>/failed)
|
||||
|
||||
# Here, the redundant '[.]' at the end is for making not the logged self command hit the grep.
|
||||
(! journalctl -q -o short-monotonic --grep 'Attempted to close sd-bus after fork whose connection is opened before the fork, this should not happen[.]' >>/failed)
|
||||
|
||||
systemctl poweroff --no-block
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user