]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: none
authorThorsten Kukuk <kukuk@thkukuk.de>
Sun, 4 Sep 2005 15:12:13 +0000 (15:12 +0000)
committerThorsten Kukuk <kukuk@thkukuk.de>
Sun, 4 Sep 2005 15:12:13 +0000 (15:12 +0000)
Purpose of commit: cleanup

Commit summary:
---------------

Apply cleanup from Dmitry V. Levin

libpam/pam_syslog.c

index 53ab7e28cbdb740d4cff0c7c38e0bc198aacc192..4d050af4e58583a79b99c609da625d88ce1ec364 100644 (file)
@@ -82,15 +82,6 @@ pam_vsyslog (pam_handle_t *pamh, int priority,
          return;
        }
     }
-  else
-    {
-      msgbuf1 = strdup (_PAM_SYSTEM_LOG_PREFIX);
-      if (msgbuf1 == NULL)
-       {
-         vsyslog (LOG_AUTHPRIV|priority, fmt, args);
-         return;
-       }
-    }
 
   if (vasprintf (&msgbuf2, fmt, args) < 0)
     {
@@ -100,7 +91,8 @@ pam_vsyslog (pam_handle_t *pamh, int priority,
     }
 
   errno = save_errno;
-  syslog (LOG_AUTHPRIV|priority, "%s %s", msgbuf1, msgbuf2);
+  syslog (LOG_AUTHPRIV|priority, "%s %s",
+         (msgbuf1 ? msgbuf1 : _PAM_SYSTEM_LOG_PREFIX), msgbuf2);
 
   _pam_drop (msgbuf1);
   _pam_drop (msgbuf2);