]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mirror 1.1.x changes.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Sat, 19 Jul 2003 22:13:54 +0000 (22:13 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Sat, 19 Jul 2003 22:13:54 +0000 (22:13 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@3795 7a7537e8-13f0-0310-91df-b6672ffda945

scheduler/client.c
scheduler/dirsvc.c
scheduler/job.c

index 2502f774baf1a533d6c62d2a58b7347e3aa008de..a206aade06684f0bc4ef58ac3307fca5938614ad 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: client.c,v 1.91.2.61 2003/07/19 21:57:46 mike Exp $"
+ * "$Id: client.c,v 1.91.2.62 2003/07/19 22:13:52 mike Exp $"
  *
  *   Client routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -3201,12 +3201,14 @@ pipe_command(client_t *con,             /* I - Client connection */
       if (setuid(User))
         exit(errno);
     }
+    else
+    {
+     /*
+      * Reset group membership to just the main one we belong to.
+      */
 
-   /*
-    * Reset group membership to just the main one we belong to.
-    */
-
-    setgroups(0, NULL);
+      setgroups(0, NULL);
+    }
 
    /*
     * Update stdin/stdout/stderr...
@@ -3351,5 +3353,5 @@ CDSAWriteFunc(SSLConnectionRef connection,        /* I  - SSL/TLS connection */
 
 
 /*
- * End of "$Id: client.c,v 1.91.2.61 2003/07/19 21:57:46 mike Exp $".
+ * End of "$Id: client.c,v 1.91.2.62 2003/07/19 22:13:52 mike Exp $".
  */
index fdab5634eb38becb24805b22aec6b59342944535..4cb18375960ccb1a9398f5cc56af3b652d3950c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: dirsvc.c,v 1.73.2.33 2003/05/12 20:52:12 mike Exp $"
+ * "$Id: dirsvc.c,v 1.73.2.34 2003/07/19 22:13:53 mike Exp $"
  *
  *   Directory services routines for the Common UNIX Printing System (CUPS).
  *
@@ -920,15 +920,20 @@ StartPolling(void)
        if (setgid(Group))
           exit(errno);
 
+       if (setgroups(0, NULL))
+          exit(errno);
+
        if (setuid(User))
           exit(errno);
       }
+      else
+      {
+       /*
+       * Reset group membership to just the main one we belong to.
+       */
 
-     /*
-      * Reset group membership to just the main one we belong to.
-      */
-
-      setgroups(0, NULL);
+       setgroups(0, NULL);
+      }
 
      /*
       * Redirect stdin and stdout to /dev/null, and stderr to the
@@ -1937,5 +1942,5 @@ UpdateSLPBrowse(void)
 
 
 /*
- * End of "$Id: dirsvc.c,v 1.73.2.33 2003/05/12 20:52:12 mike Exp $".
+ * End of "$Id: dirsvc.c,v 1.73.2.34 2003/07/19 22:13:53 mike Exp $".
  */
index 7ca301ef1d9328ab773c4f1f6ad004b8da5b4025..a167065a0d9601e575171ed6422cf7d06baa4bc8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: job.c,v 1.124.2.73 2003/07/19 21:57:47 mike Exp $"
+ * "$Id: job.c,v 1.124.2.74 2003/07/19 22:13:54 mike Exp $"
  *
  *   Job management routines for the Common UNIX Printing System (CUPS).
  *
@@ -2709,12 +2709,14 @@ start_process(const char *command,      /* I - Full path to command */
       if (setuid(User))
         exit(errno);
     }
+    else
+    {
+     /*
+      * Reset group membership to just the main one we belong to.
+      */
 
-   /*
-    * Reset group membership to just the main one we belong to.
-    */
-
-    setgroups(0, NULL);
+      setgroups(0, NULL);
+    }
 
    /*
     * Change umask to restrict permissions on created files...
@@ -2773,5 +2775,5 @@ start_process(const char *command,        /* I - Full path to command */
 
 
 /*
- * End of "$Id: job.c,v 1.124.2.73 2003/07/19 21:57:47 mike Exp $".
+ * End of "$Id: job.c,v 1.124.2.74 2003/07/19 22:13:54 mike Exp $".
  */