]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: 111491
authorSteve Langasek <vorlon@debian.org>
Wed, 9 Aug 2000 15:49:51 +0000 (15:49 +0000)
committerSteve Langasek <vorlon@debian.org>
Wed, 9 Aug 2000 15:49:51 +0000 (15:49 +0000)
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

index f460ee5fcaf9e6fc87400ce1efd13a7167be946d..36dd1a917e4e05ef61cbb07e48036bb2aa68f862 100644 (file)
@@ -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 */