From 4a0e15b840d03ee2b7bfb2743215a42a9009e304 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 9 Aug 2000 15:49:51 +0000 Subject: Relevant BUGIDs: 111491 Purpose of commit: bugfix for pam_shells under Solaris Commit summary: --------------- Solaris' C compiler doesn't seem to respect concatenation of strings in a function argument list. Changed arguments to _pam_log() in the pam_shells command to get around this. --- modules/pam_shells/pam_shells.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/pam_shells/pam_shells.c b/modules/pam_shells/pam_shells.c index f460ee5f..36dd1a91 100644 --- a/modules/pam_shells/pam_shells.c +++ b/modules/pam_shells/pam_shells.c @@ -73,21 +73,21 @@ int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc userShell = pw->pw_shell; if(stat(SHELL_FILE,&sb)) { - _pam_log(LOG_ERR, SHELL_FILE, " cannot be stat'd (it probably does " - "not exist)"); + _pam_log(LOG_ERR, + "%s cannot be stat'd (it probably does not exist)", SHELL_FILE); return PAM_AUTH_ERR; /* must have /etc/shells */ } if((sb.st_mode & S_IWOTH) || !S_ISREG(sb.st_mode)) { - _pam_log(LOG_ERR, - SHELL_FILE " is either world writable or not a normal file"); - return PAM_AUTH_ERR; + _pam_log(LOG_ERR, + "%s is either world writable or not a normal file", SHELL_FILE); + return PAM_AUTH_ERR; } shellFile = fopen(SHELL_FILE,"r"); if(shellFile == NULL) { /* Check that we opened it successfully */ - _pam_log(LOG_ERR, - "Error opening " SHELL_FILE); + _pam_log(LOG_ERR, + "Error opening %s", SHELL_FILE); return PAM_SERVICE_ERR; } /* There should be no more errors from here on */ -- cgit v1.2.3