]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/auth.c
Remove svn:keywords since they cause svn_load_dirs.pl to complain about every file.
[thirdparty/cups.git] / scheduler / auth.c
index e87f201e01f2f9d34ea07a1f1fdff7044dc775c9..da3c8347bf3c96fe363fc09c2325318f406a0d79 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: auth.c 5442 2006-04-20 14:00:02Z mike $"
+ * "$Id: auth.c 181 2006-06-22 20:01:18Z jlovell $"
  *
  *   Authorization routines for the Common UNIX Printing System (CUPS).
  *
@@ -119,7 +119,7 @@ typedef struct cupsd_authdata_s             /**** Authentication data ****/
  * Local globals...
  */
 
-#if defined(__hpux) && defined(HAVE_LIBPAM)
+#if defined(__hpux) && HAVE_LIBPAM
 static cupsd_authdata_t        *auth_data;     /* Current client being authenticated */
 #endif /* __hpux && HAVE_LIBPAM */
 
@@ -869,9 +869,12 @@ cupsdCheckAuth(
            */
 
            for (iface = (cupsd_netif_t *)cupsArrayFirst(NetIFList);
-                iface && !strcmp(masks->mask.name.name, iface->name);
+                iface;
                 iface = (cupsd_netif_t *)cupsArrayNext(NetIFList))
            {
+              if (strcmp(masks->mask.name.name, iface->name))
+                continue;
+
               if (iface->address.addr.sa_family == AF_INET)
              {
               /*
@@ -1497,7 +1500,8 @@ cupsdIsAuthorized(cupsd_client_t *con,    /* I - Connection */
 
   cupsdLogMessage(CUPSD_LOG_DEBUG2,
                   "cupsdIsAuthorized: con->uri=\"%s\", con->best=%p(%s)",
-                  con->uri, con->best, con->best ? con->best->location : "");
+                  con->uri, con->best, con->best ? con->best->location ?
+                                          con->best->location : "(null)" : "");
   if (owner)
     cupsdLogMessage(CUPSD_LOG_DEBUG2,
                     "cupsdIsAuthorized: owner=\"%s\"", owner);
@@ -1621,6 +1625,7 @@ cupsdIsAuthorized(cupsd_client_t *con,    /* I - Connection */
   */
 
   if (best->encryption >= HTTP_ENCRYPT_REQUIRED && !con->http.tls &&
+      strcasecmp(con->http.hostname, "localhost") &&
       best->satisfy == AUTH_SATISFY_ALL)
   {
     cupsdLogMessage(CUPSD_LOG_DEBUG2,
@@ -2166,5 +2171,5 @@ to64(char          *s,                    /* O - Output string */
 
 
 /*
- * End of "$Id: auth.c 5442 2006-04-20 14:00:02Z mike $".
+ * End of "$Id: auth.c 181 2006-06-22 20:01:18Z jlovell $".
  */