[cups.development] [RFE] STR #2637: adding remote host information to pam

Sebastian Haempel haempel at rz.uni-karlsruhe.de
Wed Dec 19 09:37:36 PST 2007


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

I wrote a pam modul and need the remotehost information to authenticate,
but cups only sends user/password to pam.

the patch adds the remote host information to pam.

sebastian haempel

--- cups-1.3.5/scheduler/auth.c 2007-10-22 22:27:22.000000000 +0200
+++ cups-1.3.5-patched/scheduler/auth.c 2007-12-19 14:29:28.000000000
+0100
@@ -657,6 +657,23 @@
              return;
            }
 
+        /*
+         * Adding rhost to pam
+         */
+
+         const char *pam_rhost;
+         pam_rhost = con->http.hostname;
+         pamerr = pam_set_item(pamh, PAM_RHOST, pam_rhost);
+         if (pamerr != PAM_SUCCESS)
+         {
+            cupsdLogMessage(CUPSD_LOG_ERROR,
+                            "cupsdAuthorize: pam_set_item() returned %d "
+                         "(%s)!\n",
+                             pamerr, pam_strerror(pamh, pamerr));
+            pam_end(pamh, 0);
+            return;
+         }
+
            pamerr = pam_authenticate(pamh, PAM_SILENT);
            if (pamerr != PAM_SUCCESS)
            {

Link: http://www.cups.org/str.php?L2637
Version:  -feature





More information about the cups-devel mailing list