]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mirror 1.1.x changes.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 8 Apr 2002 16:28:59 +0000 (16:28 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 8 Apr 2002 16:28:59 +0000 (16:28 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@2319 7a7537e8-13f0-0310-91df-b6672ffda945

cgi-bin/ipp-var.c
cgi-bin/printers.c
scheduler/client.c

index 60a7a5fd23c1d11b3003042cf48041af237fb344..35d017823d380f748d852c71fbf3d68d65c071d1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp-var.c,v 1.23.2.2 2002/03/28 13:48:10 mike Exp $"
+ * "$Id: ipp-var.c,v 1.23.2.3 2002/04/08 16:28:59 mike Exp $"
  *
  *   IPP variable routines for the Common UNIX Printing System (CUPS).
  *
@@ -239,11 +239,7 @@ ippSetCGIVars(ipp_t      *response,        /* I - Response data to be copied... */
                  * Map localhost access to localhost and local port...
                  */
 
-                 if ((strcasecmp(hostname, server) == 0 ||
-                      strcasecmp(hostname, "localhost") == 0) &&
-                     (strcmp(getenv("REMOTE_HOST"), "127.0.0.1") == 0 ||
-                      strcmp(getenv("REMOTE_HOST"), "localhost") == 0 ||
-                      strcmp(getenv("REMOTE_HOST"), server) == 0))
+                 if (strcasecmp(hostname, server) == 0)
                  {
                   /*
                    * Make URI relative to the current server...
@@ -302,5 +298,5 @@ ippSetCGIVars(ipp_t      *response, /* I - Response data to be copied... */
 
 
 /*
- * End of "$Id: ipp-var.c,v 1.23.2.2 2002/03/28 13:48:10 mike Exp $".
+ * End of "$Id: ipp-var.c,v 1.23.2.3 2002/04/08 16:28:59 mike Exp $".
  */
index 1b1f2e319048332d726d7db7ae2a5c3768b900d9..232bf38ff225abf67e749be01d91f8984eaf53e2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: printers.c,v 1.21.2.3 2002/03/22 15:47:18 mike Exp $"
+ * "$Id: printers.c,v 1.21.2.4 2002/04/08 16:28:59 mike Exp $"
  *
  *   Printer status CGI for the Common UNIX Printing System (CUPS).
  *
@@ -87,7 +87,7 @@ main(int  argc,                       /* I - Number of command-line arguments */
   ippSetServerVersion();
 
   printer = argv[0];
-  if (strcmp(printer, "/") == 0 || strcmp(printer, "printers.cgi") == 0)
+  if (strcmp(printer, "/") == 0 || strstr(printer, "printers.cgi") != NULL)
   {
     printer = NULL;
     cgiSetVariable("TITLE", cupsLangString(language, CUPS_MSG_PRINTER));
@@ -356,5 +356,5 @@ main(int  argc,                     /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: printers.c,v 1.21.2.3 2002/03/22 15:47:18 mike Exp $".
+ * End of "$Id: printers.c,v 1.21.2.4 2002/04/08 16:28:59 mike Exp $".
  */
index c718de923db5a08668672583f91a6eb428e7e4ab..5082157d9302f006e50c2c29b7da654b52763572 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: client.c,v 1.91.2.6 2002/01/23 17:32:12 mike Exp $"
+ * "$Id: client.c,v 1.91.2.7 2002/04/08 16:28:59 mike Exp $"
  *
  *   Client routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -2439,7 +2439,7 @@ pipe_command(client_t *con,       /* I - Client connection */
     setgroups(0, NULL);
 
    /*
-    * Update stdin/stdout...
+    * Update stdin/stdout/stderr...
     */
 
     if (infile)
@@ -2453,6 +2453,9 @@ pipe_command(client_t *con,       /* I - Client connection */
     if (dup(fds[1]) < 0)
       exit(errno);
 
+    close(2);
+    open("/dev/null", O_WRONLY);
+
    /*
     * Close extra file descriptors...
     */
@@ -2506,5 +2509,5 @@ pipe_command(client_t *con,       /* I - Client connection */
 
 
 /*
- * End of "$Id: client.c,v 1.91.2.6 2002/01/23 17:32:12 mike Exp $".
+ * End of "$Id: client.c,v 1.91.2.7 2002/04/08 16:28:59 mike Exp $".
  */