diff options
author | Benny Baumann <BenBE@geshi.org> | 2023-11-13 14:09:50 +0100 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2023-11-14 00:27:49 +0100 |
commit | b5931a0218d5f05480c2feb6c5baee93076aa703 (patch) | |
tree | 6da8fa859fa0c8ebb641bcab3dacd5e57e3bad82 /modules | |
parent | 085b6b2ec74ff10c8dcda63f4b9713885362a8a4 (diff) | |
download | pam-b5931a0218d5f05480c2feb6c5baee93076aa703.tar.gz pam-b5931a0218d5f05480c2feb6c5baee93076aa703.tar.bz2 pam-b5931a0218d5f05480c2feb6c5baee93076aa703.zip |
pam_selinux: take null contexts into account
As the context variables can be NULL at this point, this has to be
reflected when printing them for debug purposes.
Signed-off-by: Benny Baumann <BenBE@geshi.org>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/pam_selinux/pam_selinux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/pam_selinux/pam_selinux.c b/modules/pam_selinux/pam_selinux.c index 713b3f73..b0123c8f 100644 --- a/modules/pam_selinux/pam_selinux.c +++ b/modules/pam_selinux/pam_selinux.c @@ -114,7 +114,8 @@ send_audit_message(const pam_handle_t *pamh, int success, const char *default_co fallback: #endif /* HAVE_LIBAUDIT */ pam_syslog(pamh, LOG_NOTICE, "pam: default-context=%s selected-context=%s success %d", - default_context, selected_context, success); + default_context ? default_context : "(null)", + selected_context ? selected_context : "(null)", success); #ifdef HAVE_LIBAUDIT cleanup: |