aboutsummaryrefslogtreecommitdiff
path: root/libpam/pam_item.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@stoeckmann.org>2023-11-11 12:02:04 +0100
committerDmitry V. Levin <ldv@strace.io>2023-11-12 19:20:21 +0000
commite3e3b06fbdb917eaff24e1a6860654b99b99faa0 (patch)
tree44fd0f521a029e3d794137f749f834c570e333f8 /libpam/pam_item.c
parent3f6189918f088e353119944e24fe1f725ee502a7 (diff)
downloadpam-e3e3b06fbdb917eaff24e1a6860654b99b99faa0.tar.gz
pam-e3e3b06fbdb917eaff24e1a6860654b99b99faa0.tar.bz2
pam-e3e3b06fbdb917eaff24e1a6860654b99b99faa0.zip
libpam: simplify IF_NO_PAMH
The first argument of IF_NO_PAMH is supposed to be the name of the function which was called with pamh being NULL. With __FUNCTION__ the name can be inserted automatically by the compiler which is also already done with D macro. Fixes a bug in which _pam_drop_env erroneously logs with the function name _pam_make_env. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Diffstat (limited to 'libpam/pam_item.c')
-rw-r--r--libpam/pam_item.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpam/pam_item.c b/libpam/pam_item.c
index dc085794..57327e1c 100644
--- a/libpam/pam_item.c
+++ b/libpam/pam_item.c
@@ -31,7 +31,7 @@ int pam_set_item (pam_handle_t *pamh, int item_type, const void *item)
D(("called"));
- IF_NO_PAMH("pam_set_item", pamh, PAM_SYSTEM_ERR);
+ IF_NO_PAMH(pamh, PAM_SYSTEM_ERR);
retval = PAM_SUCCESS;
@@ -177,7 +177,7 @@ int pam_get_item (const pam_handle_t *pamh, int item_type, const void **item)
int retval = PAM_SUCCESS;
D(("called."));
- IF_NO_PAMH("pam_get_item", pamh, PAM_SYSTEM_ERR);
+ IF_NO_PAMH(pamh, PAM_SYSTEM_ERR);
if (item == NULL) {
pam_syslog(pamh, LOG_ERR,
@@ -280,7 +280,7 @@ int pam_get_user(pam_handle_t *pamh, const char **user, const char *prompt)
D(("called."));
- IF_NO_PAMH("pam_get_user", pamh, PAM_SYSTEM_ERR);
+ IF_NO_PAMH(pamh, PAM_SYSTEM_ERR);
if (user == NULL) {
/* ensure that the module has supplied a destination */