]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fixed PAM code.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 18 Oct 1999 15:47:23 +0000 (15:47 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 18 Oct 1999 15:47:23 +0000 (15:47 +0000)
Added configure checks for PAM.

Fixed typo in LaserJet driver info file.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@735 7a7537e8-13f0-0310-91df-b6672ffda945

scheduler/auth.c

index 455942b2083b4e96e7da76f43634340c156e20cf..395d2567825f3f1222b42fd35082f160d64c00a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: auth.c,v 1.15 1999/10/15 20:41:42 mike Exp $"
+ * "$Id: auth.c,v 1.16 1999/10/18 15:47:23 mike Exp $"
  *
  *   Authorization routines for the Common UNIX Printing System (CUPS).
  *
@@ -36,6 +36,7 @@
  *   IsAuthorized()       - Check to see if the user is authorized...
  *   add_allow()          - Add an allow mask to the location.
  *   add_deny()           - Add a deny mask to the location.
+ *   pam_func()           - PAM conversation function.
  */
 
 /*
@@ -389,26 +390,26 @@ IsAuthorized(client_t *con)       /* I - Connection */
   pamerr = pam_start("cups", con->username, &pamdata, &pamh);
   if (pamerr != PAM_SUCCESS)
   {
-    LogMessage(LOG_ERROR, "IsAuthorized: pam_start() returned %d (%s)!\n",
-               pamerr, pam_strerror(pamerr));
+    LogMessage(LOG_ERROR, "IsAuthorized: pam_start() returned %d!\n",
+               pamerr);
     pam_end(pamh, 0);
     return (HTTP_UNAUTHORIZED);
   }
 
-  pam_error = pam_authenticate(pamh, PAM_SILENT);
+  pamerr = pam_authenticate(pamh, PAM_SILENT);
   if (pamerr != PAM_SUCCESS)
   {
-    LogMessage(LOG_ERROR, "IsAuthorized: pam_authenticate() returned %d (%s)!\n",
-               pamerr, pam_strerror(pamerr));
+    LogMessage(LOG_ERROR, "IsAuthorized: pam_authenticate() returned %d!\n",
+               pamerr);
     pam_end(pamh, 0);
     return (HTTP_UNAUTHORIZED);
   }
 
-  pam_error = pam_acct_mgmt(pamh, PAM_SILENT);
+  pamerr = pam_acct_mgmt(pamh, PAM_SILENT);
   if (pamerr != PAM_SUCCESS)
   {
-    LogMessage(LOG_ERROR, "IsAuthorized: pam_acct_mgmt() returned %d (%s)!\n",
-               pamerr, pam_strerror(pamerr));
+    LogMessage(LOG_ERROR, "IsAuthorized: pam_acct_mgmt() returned %d!\n",
+               pamerr);
     pam_end(pamh, 0);
     return (HTTP_UNAUTHORIZED);
   }
@@ -648,7 +649,7 @@ check_auth(unsigned   ip,   /* I - Client address */
  */
 
 static int                                     /* O - Success or failure */
-PAM_conv(int                      num_msg,     /* I - Number of messages */
+pam_func(int                      num_msg,     /* I - Number of messages */
          const struct pam_message **msg,       /* I - Messages */
          struct pam_response      **resp,      /* O - Responses */
          void                     *appdata_ptr)        /* I - Pointer to connection */
@@ -707,5 +708,5 @@ PAM_conv(int                      num_msg,  /* I - Number of messages */
 
 
 /*
- * End of "$Id: auth.c,v 1.15 1999/10/15 20:41:42 mike Exp $".
+ * End of "$Id: auth.c,v 1.16 1999/10/18 15:47:23 mike Exp $".
  */