]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
System group fixes from 1.1 branch.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Sat, 29 Dec 2001 00:28:15 +0000 (00:28 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Sat, 29 Dec 2001 00:28:15 +0000 (00:28 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@1986 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES.txt
config-scripts/cups-opsys.m4
scheduler/conf.c

index e04f4cdff0282e866aeb47117e6c997f562e5e42..6a8ce709daa0b122067b456befd5cd3212f4f176 100644 (file)
@@ -9,6 +9,9 @@ CHANGES IN CUPS V1.2.0a1
 
 CHANGES IN CUPS V1.1.13
 
+       - Updated the default system group under MacOS X.
+       - If no SystemGroup was defined in cupsd.conf, the
+         system default group was not used.
        - The cups-lpd mini-daemon now supports LPD clients that
          send multiple control files.
        - httpConnectEncrypt() now always uses encryption for
index eef9c8157931b2a38adf80b93009aafedd94aebf..f818979cf4658ed4cbe165558670e0eecdd9dc2e 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-opsys.m4,v 1.5.2.1 2001/12/26 16:52:10 mike Exp $"
+dnl "$Id: cups-opsys.m4,v 1.5.2.2 2001/12/29 00:28:15 mike Exp $"
 dnl
 dnl   Operating system stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -55,23 +55,28 @@ AC_ARG_WITH(cups-user, [  --with-cups-user        set default user for CUPS],
 AC_ARG_WITH(cups-group, [  --with-cups-group       set default group for CUPS],
        CUPS_GROUP="$withval",
        AC_MSG_CHECKING(for default print group)
-       if test -f /etc/group; then
-               CUPS_GROUP=""
-               for group in sys system root; do
-                       if test "`grep \^${group}: /etc/group`" != ""; then
-                               CUPS_GROUP="$group"
-                               AC_MSG_RESULT($group)
-                               break;
-                       fi
-               done
+       if test x$uname = xDarwin; then
+               CUPS_GROUP="${GROUP:=admin}"
+               AC_MSG_RESULT(Darwin, using "$CUPS_GROUP")
+       else
+               if test -f /etc/group; then
+                       CUPS_GROUP=""
+                       for group in sys system root; do
+                               if test "`grep \^${group}: /etc/group`" != ""; then
+                                       CUPS_GROUP="$group"
+                                       AC_MSG_RESULT($group)
+                                       break;
+                               fi
+                       done
 
-               if test x$CUPS_GROUP = x; then
+                       if test x$CUPS_GROUP = x; then
+                               CUPS_GROUP="${GROUP:=nobody}"
+                               AC_MSG_RESULT(not found, using "$CUPS_GROUP")
+                       fi
+               else
                        CUPS_GROUP="${GROUP:=nobody}"
-                       AC_MSG_RESULT(not found, using "$CUPS_GROUP")
+                       AC_MSG_RESULT(no group file, using "$CUPS_GROUP")
                fi
-       else
-               CUPS_GROUP="${GROUP:=nobody}"
-               AC_MSG_RESULT(no group file, using "$CUPS_GROUP")
        fi)
 
 AC_SUBST(CUPS_USER)
@@ -81,5 +86,5 @@ AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USER, "$CUPS_USER")
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GROUP, "$CUPS_GROUP")
 
 dnl
-dnl "$Id: cups-opsys.m4,v 1.5.2.1 2001/12/26 16:52:10 mike Exp $"
+dnl "$Id: cups-opsys.m4,v 1.5.2.2 2001/12/29 00:28:15 mike Exp $"
 dnl
index 0d9e72ea95a299f481c889a50d557a6afc424018..9b17bcd2d18ce4ec728d0ac1d0870fd2730ce761 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: conf.c,v 1.77.2.3 2001/12/27 00:04:52 mike Exp $"
+ * "$Id: conf.c,v 1.77.2.4 2001/12/29 00:28:15 mike Exp $"
  *
  *   Configuration routines for the Common UNIX Printing System (CUPS).
  *
@@ -363,6 +363,13 @@ ReadConfiguration(void)
   if (!status)
     return (0);
 
+ /*
+  * Use the default system group if none was supplied in cupsd.conf...
+  */
+
+  if (NumSystemGroups == 0)
+    NumSystemGroups ++;
+
  /*
   * Get the access control list for browsing...
   */
@@ -1988,5 +1995,5 @@ get_addr_and_mask(const char *value,      /* I - String from config file */
 
 
 /*
- * End of "$Id: conf.c,v 1.77.2.3 2001/12/27 00:04:52 mike Exp $".
+ * End of "$Id: conf.c,v 1.77.2.4 2001/12/29 00:28:15 mike Exp $".
  */