]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/adminutil.c
Merge changes from CUPS 1.4svn-r7199.
[thirdparty/cups.git] / cups / adminutil.c
index 449feb9f55eccd1131db8f9e4f421944d81fbc44..3eda26dba8823cd0c80fcf7b9f95084ae93a8297 100644 (file)
@@ -4,7 +4,7 @@
  *   Administration utility API definitions for the Common UNIX Printing
  *   System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 2001-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -1057,7 +1057,7 @@ _cupsAdminGetServerSettings(
        in_admin_location = 0;
        in_location       = 0;
       }
-      else if (!strcasecmp(line, "Allow") && in_admin_location &&
+      else if (!strcasecmp(line, "Allow") &&
                strcasecmp(value, "localhost") && strcasecmp(value, "127.0.0.1")
 #ifdef AF_LOCAL
               && *value != '/'
@@ -1067,9 +1067,9 @@ _cupsAdminGetServerSettings(
 #endif /* AF_INET6 */
               )
       {
-       remote_admin = 1;
-
-       if (!strcasecmp(value, "all"))
+        if (in_admin_location)
+         remote_admin = 1;
+        else if (!strcasecmp(value, "all"))
          remote_any = 1;
       }
       else if (line[0] != '<' && !in_location && !in_policy)