--- cupsys-1.1.14.orig/.cvsignore
+++ cupsys-1.1.14/.cvsignore
@@ -2,7 +2,6 @@
 config.h
 config.log
 config.status
-configure
 cups-config
 cups.list
 cups.sh
--- cupsys-1.1.14.orig/Makedefs.in
+++ cupsys-1.1.14/Makedefs.in
@@ -155,20 +155,27 @@
 # Rules...
 #
 
-.SILENT:
+# Debian: Substituting the "Compiling..." lines for the actual command
+# line sequences used to compile the program is IMHO a bad idea.  One
+# nasty bug was that much more hard to fix because it was caused by
+# improper gcc options, options we couldn't see in our build logs.
+# Therefore, I'm disabling .SILENT and the "Compiling..." lines.
+#                        Jeff Licquia <licquia@debian.org>
+
+# .SILENT:
 .SUFFIXES:	.a .c .cxx .h .man .o .0 .1 .1m .3 .5 .8 .z
 .c.o:
-	echo Compiling $<...
+#	echo Compiling $<...
 	$(CC) $(OPTIM) $(CFLAGS) -c $<
 .cxx.o:
-	echo Compiling $<...
+#	echo Compiling $<...
 	$(CXX) $(OPTIM) $(CXXFLAGS) -c $<
 .man.0 .man.1 .man.1m .man.3 .man.5 .man.8:
-	echo Formatting $<...
+#	echo Formatting $<...
 	$(RM) $@
 	$(NROFF) -man $< >$@
 .man.z:
-	echo Formatting $<...
+#	echo Formatting $<...
 	$(RM) $@ t.z
 	$(NROFF) -man $< >t
 	pack -f t
--- cupsys-1.1.14.orig/cgi-bin/admin.c
+++ cupsys-1.1.14/cgi-bin/admin.c
@@ -699,7 +699,8 @@
       char		filename[1024];		/* PPD filename */
       ppd_file_t	*ppd;			/* PPD information */
       char		buffer[1024];		/* Buffer */
-      int		bytes;			/* Number of bytes */
+      int		bytes;			/* Number of bytes read */
+      int		bytes_written;		/* Number of bytes written */
 
 
       snprintf(uri, sizeof(uri), "/printers/%s.ppd", name);
@@ -712,10 +713,24 @@
       if ((fd = cupsTempFd(filename, sizeof(filename))) >= 0)
       {
 	while ((bytes = httpRead(http, buffer, sizeof(buffer))) > 0)
-          write(fd, buffer, bytes);
+	{
+	  bytes_written = write(fd, buffer, bytes);
+	  if (bytes_written < bytes)
+	  {
+	    close(fd);
+	    unlink(filename);
+	    fd = -1;
+	    httpFlush(http);
+	  }
+	}
 
 	close(fd);
+      }
+      else
+        httpFlush(http);
 
+      if (fd <= 0)
+      {
         if ((ppd = ppdOpenFile(filename)) != NULL)
 	{
 	  if (ppd->manufacturer)
@@ -728,8 +743,6 @@
 
         unlink(filename);
       }
-      else
-        httpFlush(http);
     }
 
    /*
@@ -927,6 +940,7 @@
   FILE		*in,			/* Input file */
 		*out;			/* Output file */
   int		outfd;			/* Output file descriptor */
+  int		bytes_written;		/* Bytes written to output file */
   char		line[1024];		/* Line from PPD file */
   char		keyword[1024],		/* Keyword from Default line */
 		*keyptr;		/* Pointer into keyword... */
@@ -1120,10 +1134,30 @@
     */
 
     outfd = cupsTempFd(tempfile, sizeof(tempfile));
-    in    = fopen(filename, "rb");
-    out   = fdopen(outfd, "wb");
 
-    if (outfd < 0 || in == NULL || out == NULL)
+    if (outfd >= 0)
+    {
+      out = fdopen(outfd, "wb");
+      if (out == NULL)
+      {
+        close(outfd);
+        unlink(tempfile);
+        outfd = -1;
+      }
+    }
+
+    if (outfd >= 0)
+    {
+      in = fopen(filename, "rb");
+      if (in == NULL)
+      {
+        fclose(out);
+        unlink(tempfile);
+        outfd = -1;
+      }
+    }
+
+    if (outfd < 0)
     {
       cgiSetVariable("ERROR", strerror(errno));
       cgiCopyTemplateLang(stdout, TEMPLATES, "error.tmpl", getenv("LANG"));
@@ -1134,7 +1168,7 @@
     while (get_line(line, sizeof(line), in) != NULL)
     {
       if (strncmp(line, "*Default", 8) != 0)
-        fprintf(out, "%s\n", line);
+        bytes_written = fprintf(out, "%s\n", line);
       else
       {
        /*
@@ -1156,15 +1190,27 @@
 	  var = cgiGetVariable(keyword);
 
         if (var != NULL)
-	  fprintf(out, "*Default%s: %s\n", keyword, var);
+	  bytes_written = fprintf(out, "*Default%s: %s\n", keyword, var);
 	else
-	  fprintf(out, "%s\n", line);
+	  bytes_written = fprintf(out, "%s\n", line);
       }
+
+      if (bytes_written < 0)
+        break;
     }
 
     fclose(in);
     fclose(out);
     close(outfd);
+
+    if (bytes_written < 0)
+    {
+      unlink(tempfile);
+      unlink(filename);
+      cgiSetVariable("ERROR", strerror(errno));
+      cgiCopyTemplateLang(stdout, TEMPLATES, "error.tmpl", getenv("LANG"));
+      return;
+    }
 
    /*
     * Build a CUPS_ADD_PRINTER request, which requires the following
--- cupsys-1.1.14.orig/cgi-bin/ipp-var.c
+++ cupsys-1.1.14/cgi-bin/ipp-var.c
@@ -184,7 +184,7 @@
       for (i = 0; i < attr->num_values; i ++)
       {
 	if (i)
-	  strncat(valptr, ",", sizeof(value) - (valptr - value) - 1);
+	  strncat(valptr, ",", sizeof(value) - strlen(value) - 1);
 
 	valptr += strlen(valptr);
 
@@ -209,7 +209,7 @@
 	      break;
 
 	  case IPP_TAG_NOVALUE :
-	      strncat(valptr, "novalue", sizeof(value) - (valptr - value) - 1);
+	      strncat(valptr, "novalue", sizeof(value) - strlen(value) - 1);
 	      break;
 
 	  case IPP_TAG_RANGE :
@@ -261,7 +261,7 @@
 		             ishttps ? "https" : "http",
 			     hostname, port, resource);
 
-		  strncat(valptr, uri, sizeof(value) - (valptr - value) - 1);
+		  strncat(valptr, uri, sizeof(value) - strlen(value) - 1);
         	  break;
         	}
               }
@@ -273,7 +273,7 @@
 	  case IPP_TAG_CHARSET :
 	  case IPP_TAG_LANGUAGE :
 	      strncat(valptr, attr->values[i].string.text,
-	              sizeof(value) - (valptr - value) - 1);
+	              sizeof(value) - strlen(value) - 1);
 	      break;
 
           default :
--- cupsys-1.1.14.orig/cgi-bin/var.c
+++ cupsys-1.1.14/cgi-bin/var.c
@@ -242,7 +242,7 @@
   var_t	*var;	/* Returned variable */
 
 
-  if (name == NULL || value == NULL || element < 0)
+  if (name == NULL || value == NULL || element < 0 || element > 100000)
     return;
 
   if ((var = cgi_find_variable(name)) == NULL)
@@ -286,7 +286,7 @@
   var_t	*var;	/* Returned variable */
 
 
-  if (name == NULL || size < 0)
+  if (name == NULL || size < 0 || size > 100000)
     return;
 
   if ((var = cgi_find_variable(name)) == NULL)
@@ -361,7 +361,7 @@
   var_t	*var;				/* New variable */
 
 
-  if (name == NULL || value == NULL)
+  if (name == NULL || value == NULL || element < 0 || element > 100000)
     return;
 
 #ifdef DEBUG
--- cupsys-1.1.14.orig/conf/cupsd.conf.in
+++ cupsys-1.1.14/conf/cupsd.conf.in
@@ -69,7 +69,7 @@
 # syslog file or daemon.
 #
 
-#AccessLog @CUPS_LOGDIR@/access_log
+AccessLog /var/log/cups/access_log
 
 #
 # Classification: the classification level of the server.  If set, this
@@ -132,7 +132,7 @@
 # syslog file or daemon.
 #
 
-#ErrorLog @CUPS_LOGDIR@/error_log
+ErrorLog /var/log/cups/error_log
 
 #
 # FontPath: the path to locate all font files (currently only for pstoraster)
@@ -171,7 +171,7 @@
 # syslog file or daemon.
 #
 
-#PageLog @CUPS_LOGDIR@/page_log
+PageLog /var/log/cups/page_log
 
 #
 # PreserveJobHistory: whether or not to preserve the job history after a
@@ -206,7 +206,7 @@
 # Leave blank to disable printcap file generation.
 #
 
-#Printcap /etc/printcap
+Printcap /etc/printcap.cups
 
 #
 # PrintcapFormat: the format of the printcap file, currently either
@@ -290,8 +290,8 @@
 # program is run, or if the RunAsUser directive is specified...
 #
 
-#User @CUPS_USER@
-#Group @CUPS_GROUP@
+User lp
+Group sys
 
 #
 # RIPCache: the amount of memory that each RIP should use to cache
@@ -400,7 +400,7 @@
 # information on the network.  Enabled by default.
 #
 
-#Browsing On
+Browsing Off
 
 #
 # BrowseProtocols: which protocols to use for browsing.  Can be
@@ -586,7 +586,7 @@
 # will be "sys", "system", or "root" (checked for in that order.)
 #
 
-#SystemGroup sys
+SystemGroup lpadmin
 
 #
 # Access permissions for each directory served by the scheduler.
--- cupsys-1.1.14.orig/config-scripts/cups-compiler.m4
+++ cupsys-1.1.14/config-scripts/cups-compiler.m4
@@ -48,19 +48,23 @@
 	#
 	# Previous versions of GCC do not have the reliance on the stdc++
 	# or g++ libraries, so the extra supc++ library is not needed.
+	#
+	# Debian: We don't care about portability between dists, and
+	# hppa (at least) won't compile with this.  So, it's turned off.
+	# Jeff Licquia <licquia@debian.org>
 
-	AC_MSG_CHECKING(if libsupc++ is required)
+#	AC_MSG_CHECKING(if libsupc++ is required)
 
- 	SUPC="`$CXX -print-file-name=libsupc++.a 2>/dev/null`"
- 	if test -n "$SUPC" -a "$SUPC" != "libsupc++.a"; then
+# 	SUPC="`$CXX -print-file-name=libsupc++.a 2>/dev/null`"
+# 	if test -n "$SUPC" -a "$SUPC" != "libsupc++.a"; then
  		# This is gcc 3.x, and it knows of libsupc++, so we need it
- 		LIBS="$LIBS -lsupc++"
-		AC_MSG_RESULT(yes)
-	else
-		AC_MSG_RESULT(no)
- 	fi
+# 		LIBS="$LIBS -lsupc++"
+#		AC_MSG_RESULT(yes)
+#	else
+#		AC_MSG_RESULT(no)
+# 	fi
 
-	CXX="$CC"
+#	CXX="$CC"
 
 	if test -z "$OPTIM"; then
 		if test "x$with_optim" = x; then
--- cupsys-1.1.14.orig/config-scripts/cups-sharedlibs.m4
+++ cupsys-1.1.14/config-scripts/cups-sharedlibs.m4
@@ -133,8 +133,8 @@
                         ;;
                 Linux*)
                         # Linux
-                	DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
-                        LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir"
+                	# DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
+                        # LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir"
                         ;;
 	esac
 else
--- cupsys-1.1.14.orig/cups/http.c
+++ cupsys-1.1.14/cups/http.c
@@ -27,6 +27,7 @@
  *                          default HTTP proxy (if any).
  *   httpCheck()          - Check to see if there is a pending response from
  *                          the server.
+ *   httpWait()           - Wait for data available on a connection.
  *   httpClose()          - Close an HTTP connection...
  *   httpConnect()        - Connect to a HTTP server.
  *   httpConnectEncrypt() - Connect to a HTTP server using encryption.
@@ -239,6 +240,18 @@
 int				/* O - 0 = no data, 1 = data available */
 httpCheck(http_t *http)		/* I - HTTP connection */
 {
+  return (httpWait(http, 0));
+}
+
+
+/*
+ * 'httpWait()' - Wait for data available on a connection.
+ */
+
+int				/* O - 0 = no data, 1 = data available */
+httpWait(http_t *http,		/* I - HTTP connection */
+         int    msec)		/* I - Milliseconds to wait */
+{
   fd_set	input;		/* Input set for select() */
   struct timeval timeout;	/* Timeout */
 
@@ -253,6 +266,14 @@
   if (http->used)
     return (1);
 
+#ifdef HAVE_LIBSSL
+  if (http->tls)
+  {
+    if (SSL_pending((SSL *)(http->tls)))
+      return (1);
+  }
+#endif /* HAVE_LIBSSL */
+
  /*
   * Then try doing a select() to poll the socket...
   */
@@ -260,10 +281,15 @@
   FD_ZERO(&input);
   FD_SET(http->fd, &input);
 
-  timeout.tv_sec  = 0;
-  timeout.tv_usec = 0;
+  if (msec >= 0)
+  {
+    timeout.tv_sec  = msec / 1000;
+    timeout.tv_usec = (msec % 1000) * 1000;
 
-  return (select(http->fd + 1, &input, NULL, NULL, &timeout) > 0);
+    return (select(http->fd + 1, &input, NULL, NULL, &timeout) > 0);
+  }
+  else
+    return (select(http->fd + 1, &input, NULL, NULL, NULL) > 0);
 }
 
 
@@ -1133,7 +1159,10 @@
   char	buffer[8192];	/* Junk buffer */
 
 
-  while (httpRead(http, buffer, sizeof(buffer)) > 0);
+  if (http->state != HTTP_WAITING)
+  {
+    while (httpRead(http, buffer, sizeof(buffer)) > 0);
+  }
 }
 
 
@@ -1172,11 +1201,16 @@
     }
 
     http->data_remaining = strtol(len, NULL, 16);
+    if (http->data_remaining < 0)
+    {
+      DEBUG_puts("httpRead: Negative chunk length!");
+      return (0);
+    }
   }
 
   DEBUG_printf(("httpRead: data_remaining = %d\n", http->data_remaining));
 
-  if (http->data_remaining == 0)
+  if (http->data_remaining <= 0)
   {
    /*
     * A zero-length chunk ends a transfer; unless we are reading POST
@@ -1202,6 +1236,9 @@
     * Buffer small reads for better performance...
     */
 
+    if (!http->blocking && !httpWait(http, 1000))
+      return (0);
+
     if (http->data_remaining > sizeof(http->buffer))
       bytes = sizeof(http->buffer);
     else
@@ -1234,7 +1271,10 @@
       return (-1);
     }
     else
+    {
+      http->error = EPIPE;
       return (0);
+    }
   }
 
   if (http->used > 0)
@@ -1254,10 +1294,18 @@
   }
 #ifdef HAVE_LIBSSL
   else if (http->tls)
+  {
+    if (!http->blocking && !httpWait(http, 1000))
+      return (0);
+
     bytes = SSL_read((SSL *)(http->tls), buffer, length);
+  }
 #endif /* HAVE_LIBSSL */
   else
   {
+    if (!http->blocking && !httpWait(http, 1000))
+      return (0);
+
     DEBUG_printf(("httpRead: reading %d bytes from socket...\n", length));
     bytes = recv(http->fd, buffer, length, 0);
     DEBUG_printf(("httpRead: read %d bytes from socket...\n", bytes));
@@ -1271,6 +1319,11 @@
 #else
     http->error = errno;
 #endif /* WIN32 */
+  else
+  {
+    http->error = EPIPE;
+    return (0);
+  }
 
   if (http->data_remaining == 0)
   {
@@ -1432,13 +1485,16 @@
       * No newline; see if there is more data to be read...
       */
 
+      if (!http->blocking && !httpWait(http, 1000))
+        return (NULL);
+
 #ifdef HAVE_LIBSSL
       if (http->tls)
         bytes = SSL_read((SSL *)(http->tls), bufend,
 	                 HTTP_MAX_BUFFER - http->used);
       else
 #endif /* HAVE_LIBSSL */
-      bytes = recv(http->fd, bufend, HTTP_MAX_BUFFER - http->used, 0);
+        bytes = recv(http->fd, bufend, HTTP_MAX_BUFFER - http->used, 0);
 
       if (bytes < 0)
       {
@@ -1468,8 +1524,7 @@
       }
       else if (bytes == 0)
       {
-        if (http->blocking)
-	  http->error = EPIPE;
+        http->error = EPIPE;
 
         return (NULL);
       }
@@ -1763,6 +1818,7 @@
 	case HTTP_POST_RECV :
 	case HTTP_PUT :
 	    http->state ++;
+	case HTTP_POST_SEND :
 	    break;
 
 	default :
--- cupsys-1.1.14.orig/cups/http.h
+++ cupsys-1.1.14/cups/http.h
@@ -330,6 +330,9 @@
 			              char [33]);
 extern char		*httpMD5String(const md5_byte_t *, char [33]);
 
+/**** New in CUPS 1.1.19 ****/
+extern int		httpWait(http_t *http, int msec);
+
 
 /*
  * C++ magic...
--- cupsys-1.1.14.orig/cups/ipp.c
+++ cupsys-1.1.14/cups/ipp.c
@@ -2009,7 +2009,14 @@
       if (http->data_remaining == 0)
       {
 	if (http->data_encoding == HTTP_ENCODE_CHUNKED)
-	  httpGets(len, sizeof(len), http);
+	{
+	 /*
+	  * Get the trailing CR LF after the chunk...
+	  */
+
+	  if (!httpGets(len, sizeof(len), http))
+	    return (-1);
+	}
 
 	if (http->data_encoding != HTTP_ENCODE_CHUNKED)
 	{
--- cupsys-1.1.14.orig/cups/tempfile.c
+++ cupsys-1.1.14/cups/tempfile.c
@@ -55,6 +55,7 @@
            int  len)			/* I - Size of buffer */
 {
   int		fd;			/* File descriptor for temp file */
+  int		tryagain;		/* Flag - try again or continue? */
 #ifdef WIN32
   char		tmpdir[1024];		/* Windows temporary directory */
   DWORD		curtime;		/* Current time */
@@ -99,6 +100,7 @@
   * Make the temporary name using the specified directory...
   */
 
+  tryagain = 0;
   do
   {
 #ifdef WIN32
@@ -141,8 +143,11 @@
 
     if (fd < 0 && (errno == EPERM || errno == ENOENT))
       break; /* Stop immediately if permission denied or the dir doesn't exist! */
+
+    if (fd < 0 && errno == EEXIST)
+      tryagain = 1;
   }
-  while (fd < 0);
+  while (tryagain);
 
  /*
   * Return the file descriptor...
--- cupsys-1.1.14.orig/filter/image-bmp.c
+++ cupsys-1.1.14/filter/image-bmp.c
@@ -103,7 +103,14 @@
   read_word(fp);
   offset = read_dword(fp);
 
-  fprintf(stderr, "offset = %d\n", offset);
+  fprintf(stderr, "DEBUG: offset = %d\n", offset);
+
+  if (offset < 0)
+  {
+    fprintf(stderr, "ERROR: Bad BMP offset %d\n", offset);
+    fclose(fp);
+    return (1);
+  }
 
  /*
   * Then the bitmap information...
@@ -121,15 +128,34 @@
   colors_used      = read_dword(fp);
   colors_important = read_dword(fp);
 
+  if (img->xsize == 0 || img->xsize > IMAGE_MAX_WIDTH ||
+      img->ysize == 0 || img->ysize > IMAGE_MAX_HEIGHT ||
+      (depth != 1 && depth != 4 && depth != 8 && depth != 24))
+  {
+    fprintf(stderr, "ERROR: Bad BMP dimensions %ux%ux%d\n",
+            img->xsize, img->ysize, depth);
+    fclose(fp);
+    return (1);
+  }
+
+  if (colors_used < 0 || colors_used > 256)
+  {
+    fprintf(stderr, "ERROR: Bad BMP colormap size %d\n", colors_used);
+    fclose(fp);
+    return (1);
+  }
+
+  if (img->xppi == 0 || img->yppi == 0)
+  {
+    fprintf(stderr, "ERROR: Bad BMP resolution %dx%d PPI.\n",
+            img->xppi, img->yppi);
+    img->xppi = img->yppi = 128;
+  }
+
  /*
   * Make sure the resolution info is valid...
   */
 
-  if (img->xppi == 0)
-    img->xppi = 128;
-  if (img->yppi == 0)
-    img->yppi = 128;
-
   fprintf(stderr, "info_size = %d, xsize = %d, ysize = %d, planes = %d, depth = %d\n",
           info_size, img->xsize, img->ysize, planes, depth);
   fprintf(stderr, "compression = %d, image_size = %d, xppi = %d, yppi = %d\n",
@@ -148,7 +174,8 @@
   if (colors_used == 0 && depth <= 8)
     colors_used = 1 << depth;
 
-  fread(colormap, colors_used, 4, fp);
+  if (colors_used > 0)
+    fread(colormap, colors_used, 4, fp);
 
  /*
   * Setup image and buffers...
--- cupsys-1.1.14.orig/filter/image-gif.c
+++ cupsys-1.1.14/filter/image-gif.c
@@ -224,6 +224,19 @@
           img->xsize = (buf[5] << 8) | buf[4];
           img->ysize = (buf[7] << 8) | buf[6];
 
+         /*
+	  * Check the dimensions of the image; since the dimensions are
+	  * a 16-bit integer we just need to check for 0...
+	  */
+
+          if (img->xsize == 0 || img->ysize == 0)
+	  {
+	    fprintf(stderr, "ERROR: Bad GIF image dimensions: %dx%d\n",
+	            img->xsize, img->ysize);
+	    fclose(fp);
+	    return (1);
+	  }
+
 	  i = gif_read_image(fp, img, cmap, buf[8] & GIF_INTERLACE);
           fclose(fp);
           return (i);
--- cupsys-1.1.14.orig/filter/image-jpeg.c
+++ cupsys-1.1.14/filter/image-jpeg.c
@@ -79,6 +79,18 @@
 
   jpeg_calc_output_dimensions(&cinfo);
 
+  if (cinfo.output_width <= 0 || cinfo.output_width > IMAGE_MAX_WIDTH ||
+      cinfo.output_height <= 0 || cinfo.output_height > IMAGE_MAX_HEIGHT)
+  {
+    fprintf(stderr, "ERROR: Bad JPEG dimensions %dx%d!\n",
+            cinfo.output_width, cinfo.output_height);
+
+    jpeg_destroy_decompress(&cinfo);
+
+    fclose(fp);
+    return (1);
+  }
+
   img->xsize      = cinfo.output_width;
   img->ysize      = cinfo.output_height;
   img->colorspace = primary;
@@ -94,6 +106,13 @@
     {
       img->xppi = (int)((float)cinfo.X_density * 2.54);
       img->yppi = (int)((float)cinfo.Y_density * 2.54);
+    }
+
+    if (img->xppi == 0 || img->yppi == 0)
+    {
+      fprintf(stderr, "ERROR: Bad JPEG image resolution %dx%d PPI.\n",
+              img->xppi, img->yppi);
+      img->xppi = img->yppi = 128;
     }
   }
 
--- cupsys-1.1.14.orig/filter/image-pix.c
+++ cupsys-1.1.14/filter/image-pix.c
@@ -76,6 +76,21 @@
   read_short(fp);
   depth  = read_short(fp);
 
+ /*
+  * Check the dimensions of the image.  Since the short values used for the
+  * width and height cannot exceed IMAGE_MAX_WIDTH or IMAGE_MAX_HEIGHT, we
+  * just need to verify they are positive integers.
+  */
+
+  if (width <= 0 || height <= 0 ||
+      (depth != 8 && depth != 24))
+  {
+    fprintf(stderr, "ERROR: Bad PIX image dimensions %dx%dx%d\n",
+            width, height, depth);
+    fclose(fp);
+    return (1);
+  }
+
   if (depth == 8)
     img->colorspace = secondary;
   else
--- cupsys-1.1.14.orig/filter/image-png.c
+++ cupsys-1.1.14/filter/image-png.c
@@ -88,6 +88,15 @@
   else
     img->colorspace = primary;
 
+  if (info->width == 0 || info->width > IMAGE_MAX_WIDTH ||
+      info->height == 0 || info->height > IMAGE_MAX_HEIGHT)
+  {
+    fprintf(stderr, "ERROR: PNG image has invalid dimensions %ux%u!\n",
+            (unsigned)info->width, (unsigned)info->height);
+    fclose(fp);
+    return (1);
+  }
+
   img->xsize = info->width;
   img->ysize = info->height;
 
@@ -96,6 +105,14 @@
   {
     img->xppi = (int)((float)info->x_pixels_per_unit * 0.0254);
     img->yppi = (int)((float)info->y_pixels_per_unit * 0.0254);
+
+    if (img->xppi == 0 || img->yppi == 0)
+    {
+      fprintf(stderr, "ERROR: PNG image has invalid resolution %dx%d PPI\n",
+              img->xppi, img->yppi);
+
+      img->xppi = img->yppi = 128;
+    }
   }
 
   ImageSetMaxTiles(img, 0);
--- cupsys-1.1.14.orig/filter/image-pnm.c
+++ cupsys-1.1.14/filter/image-pnm.c
@@ -130,6 +130,22 @@
   else
     maxval = 1;
 
+  if (img->xsize == 0 || img->xsize > IMAGE_MAX_WIDTH ||
+      img->ysize == 0 || img->ysize > IMAGE_MAX_HEIGHT)
+  {
+    fprintf(stderr, "ERROR: Bad PNM dimensions %dx%d!\n",
+            img->xsize, img->ysize);
+    fclose(fp);
+    return (1);
+  }
+
+  if (maxval == 0)
+  {
+    fprintf(stderr, "ERROR: Bad PNM max value %d!\n", maxval);
+    fclose(fp);
+    return (1);
+  }
+
   if (format == 1 || format == 2 || format == 4 || format == 5)
     img->colorspace = secondary;
   else
--- cupsys-1.1.14.orig/filter/image-sgi.c
+++ cupsys-1.1.14/filter/image-sgi.c
@@ -71,6 +71,22 @@
   * Get the image dimensions and load the output image...
   */
 
+ /*
+  * Check the image dimensions; since xsize and ysize are unsigned shorts,
+  * just check if they are 0 since they can't exceed IMAGE_MAX_WIDTH or
+  * IMAGE_MAX_HEIGHT...
+  */
+
+  if (sgip->xsize == 0 || sgip->ysize == 0 ||
+      sgip->zsize == 0 || sgip->zsize > 4)
+  {
+    fprintf(stderr, "ERROR: Bad SGI image dimensions %ux%ux%u!\n",
+            sgip->xsize, sgip->ysize, sgip->zsize);
+    sgiClose(sgip);
+    fclose(fp);
+    return (1);
+  }
+
   if (sgip->zsize < 3)
     img->colorspace = secondary;
   else
--- cupsys-1.1.14.orig/filter/image-sun.c
+++ cupsys-1.1.14/filter/image-sun.c
@@ -114,6 +114,15 @@
   /* ras_maptype*/read_unsigned(fp);
   ras_maplength = read_unsigned(fp);
 
+  if (ras_maplength > 768 ||
+      img->xsize == 0 || img->xsize > IMAGE_MAX_WIDTH ||
+      img->ysize == 0 || img->ysize > IMAGE_MAX_HEIGHT ||
+      ras_depth == 0 || ras_depth > 32)
+  {
+    fputs("ERROR: Raster image cannot be loaded!\n", stderr);
+    return (1);
+  }
+
   if (ras_maplength > 0)
   {
     fread(cmap[0], 1, ras_maplength / 3, fp);
--- cupsys-1.1.14.orig/filter/image-tiff.c
+++ cupsys-1.1.14/filter/image-tiff.c
@@ -171,6 +171,12 @@
       img->yppi = 128;
     }
 
+    if (img->xppi == 0 || img->yppi == 0)
+    {
+      fputs("ERROR: Bad TIFF resolution.\n", stderr);
+      img->xppi = img->yppi = 128;
+    }
+
     fprintf(stderr, "DEBUG: TIFF resolution = %fx%f, units=%d\n",
             xres, yres, resunit);
     fprintf(stderr, "DEBUG: Stored resolution = %dx%d PPI\n",
@@ -185,6 +191,23 @@
     alpha = 1;
   else
     alpha = 0;
+
+ /*
+  * Check the size of the image...
+  */
+
+  if (width == 0 || width > IMAGE_MAX_WIDTH ||
+      height == 0 || height > IMAGE_MAX_HEIGHT ||
+      (bits != 1 && bits != 2 && bits != 4 && bits != 8) ||
+      samples < 1 || samples > 4)
+  {
+    fprintf(stderr, "ERROR: Bad TIFF dimensions %ux%ux%ux%u!\n",
+            (unsigned)width, (unsigned)height, (unsigned)bits,
+	    (unsigned)samples);
+    TIFFClose(tif);
+    fclose(fp);
+    return (1);
+  }
 
  /*
   * Setup the image size and colorspace...
--- cupsys-1.1.14.orig/filter/image-zoom.c
+++ cupsys-1.1.14/filter/image-zoom.c
@@ -55,6 +55,12 @@
   izoom_t	*z;		/* New zoom record */
 
 
+  if (xsize > IMAGE_MAX_WIDTH ||
+      ysize > IMAGE_MAX_HEIGHT ||
+      (x1 - x0) > IMAGE_MAX_WIDTH ||
+      (y1 - y0) > IMAGE_MAX_HEIGHT)
+    return (NULL);		/* Protect against integer overflow */
+
   if ((z = (izoom_t *)calloc(1, sizeof(izoom_t))) == NULL)
     return (NULL);
 
--- cupsys-1.1.14.orig/filter/image.h
+++ cupsys-1.1.14/filter/image.h
@@ -37,6 +37,13 @@
 
 
 /*
+ * Maximum image dimensions that we can handle...
+ */
+
+#  define IMAGE_MAX_WIDTH	0x07ffffff	/* 2^27-1 to allow for 15-channel data */
+#  define IMAGE_MAX_HEIGHT	0x7fffffff	/* 2^31-1 */
+
+/*
  * Colorspaces...
  */
 
--- cupsys-1.1.14.orig/filter/pstops.c
+++ cupsys-1.1.14/filter/pstops.c
@@ -237,7 +237,13 @@
   if (sloworder || slowcollate)
   {
     tempfd = cupsTempFd(tempfile, sizeof(tempfile));
-    temp   = fdopen(tempfd, "wb+");
+    if (tempfd < 0)
+    {
+      perror("ERROR: Unable to open temp file");
+      temp = NULL;
+    }
+    else
+      temp = fdopen(tempfd, "wb+");
 
     if (temp == NULL)
       slowcollate = sloworder = 0;
--- cupsys-1.1.14.orig/man/backend.man
+++ cupsys-1.1.14/man/backend.man
@@ -21,9 +21,9 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH backend 1 "Common UNIX Printing System" "22 June 2000" "Easy Software Products"
+.TH cups-backend 1 "Common UNIX Printing System" "22 June 2000" "Easy Software Products"
 .SH NAME
-backend \- cups backend transmission interfaces
+cups-backend \- cups backend transmission interfaces
 .SH SYNOPSIS
 .B backend
 job user title num-copies options [
@@ -97,7 +97,7 @@
 .br
 The user executing the backend (typically lp).
 .SH SEE ALSO
-cupsd(8), filter(1)
+cupsd(8), cups-filter(1)
 CUPS Interface Design Description,
 CUPS Software Administrators Manual,
 CUPS Software Programmers Manual,
--- cupsys-1.1.14.orig/man/cupsd.man
+++ cupsys-1.1.14/man/cupsd.man
@@ -43,7 +43,7 @@
 operations. It also implements several CUPS-specific administation
 operations.
 .SH SEE ALSO
-backend(1), classes.conf(5), cupsd.conf(5), filter(1), mime.convs(5),
+cups-backend(1), classes.conf(5), cupsd.conf(5), cups-filter(1), mime.convs(5),
 mime.types(5), printers.conf(5),
 CUPS Implementation of IPP,
 CUPS Interface Design Description,
--- cupsys-1.1.14.orig/man/filter.man
+++ cupsys-1.1.14/man/filter.man
@@ -21,9 +21,9 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH filter 1 "Common UNIX Printing System" "22 June 2000" "Easy Software Products"
+.TH cups-filter 1 "Common UNIX Printing System" "22 June 2000" "Easy Software Products"
 .SH NAME
-filter \- cups file conversion filter interfaces
+cups-filter \- cups file conversion filter interfaces
 .SH SYNOPSIS
 .B filter
 job user title num-copies options [
@@ -104,7 +104,7 @@
 only filter.  Typically the interface script will be provided via the
 \fBlpadmin(8)\fR command using the \fI-i\fR option.
 .SH SEE ALSO
-backend(1), cupsd(8),
+cups-backend(1), cupsd(8),
 CUPS Interface Design Description,
 CUPS Software Administrators Manual,
 CUPS Software Programmers Manual,
--- cupsys-1.1.14.orig/man/lpadmin.man
+++ cupsys-1.1.14/man/lpadmin.man
@@ -115,8 +115,7 @@
 .TP 5
 \-v \fIdevice-uri\fR
 .br
-Sets the \fIdevice-uri\fR attribute of the printer queue.  If \fIdevice-uri\fR
-is a filename it is automatically converted to the form \fBfile:/file/name\fR.
+Sets the \fIdevice-uri\fR attribute of the printer queue.  
 .TP 5
 \-D \fIinfo\fR
 .br
--- cupsys-1.1.14.orig/pdftops/GfxState.cxx
+++ cupsys-1.1.14/pdftops/GfxState.cxx
@@ -774,9 +774,19 @@
   obj1.free();
   if (!arr->get(2, &obj1)->isInt()) {
     error(-1, "Bad Indexed color space (hival)");
+    delete baseA;
     goto err2;
   }
   indexHighA = obj1.getInt();
+  if (indexHighA < 0 || indexHighA > 255) {
+    // the PDF spec requires indexHigh to be in [0,255] -- allowing
+    // values larger than 255 creates a security hole: if nComps *
+    // indexHigh is greater than 2^31, the loop below may overwrite
+    // past the end of the array
+    error(-1, "Bad Indexed color space (invalid indexHigh value)");
+    delete baseA;
+    goto err2;
+  }
   obj1.free();
   cs = new GfxIndexedColorSpace(baseA, indexHighA);
   arr->get(3, &obj1);
--- cupsys-1.1.14.orig/scheduler/auth.c
+++ cupsys-1.1.14/scheduler/auth.c
@@ -848,7 +848,7 @@
 
 	  DEBUG_printf(("IsAuthorized: Setting appdata_ptr = %p\n", con));
 
-	  pamerr = pam_start("cups", con->username, &pamdata, &pamh);
+	  pamerr = pam_start("cupsys", con->username, &pamdata, &pamh);
 	  if (pamerr != PAM_SUCCESS)
 	  {
 	    LogMessage(L_ERROR, "IsAuthorized: pam_start() returned %d (%s)!\n",
--- cupsys-1.1.14.orig/scheduler/cert.c
+++ cupsys-1.1.14/scheduler/cert.c
@@ -50,7 +50,7 @@
 {
   int		i;			/* Looping var */
   cert_t	*cert;			/* Current certificate */
-  FILE		*fp;			/* Certificate file */
+  int		fd;			/* Certificate file */
   char		filename[1024];		/* Certificate filename */
   struct group	*grp;			/* System group */
   static const char *hex = "0123456789ABCDEF";
@@ -80,9 +80,12 @@
   */
 
   snprintf(filename, sizeof(filename), "%s/certs/%d", ServerRoot, pid);
+  unlink(filename);
 
-  if ((fp = fopen(filename, "w")) == NULL)
+  if ((fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0400)) < 0)
   {
+    LogMessage(L_ERROR, "AddCert: Unable to create certificate file %s - %s",
+               filename, strerror(errno));
     free(cert);
     return;
   }
@@ -93,12 +96,12 @@
     * Root certificate...
     */
 
-    fchmod(fileno(fp), 0440);
+    fchmod(fd, 0440);
 
     if ((grp = getgrnam(SystemGroups[0])) == NULL)
-      fchown(fileno(fp), getuid(), 0);
+      fchown(fd, getuid(), 0);
     else
-      fchown(fileno(fp), getuid(), grp->gr_gid);
+      fchown(fd, getuid(), grp->gr_gid);
 
     endgrent();
 
@@ -110,12 +113,12 @@
     * CGI certificate...
     */
 
-    fchmod(fileno(fp), 0400);
-    fchown(fileno(fp), User, Group);
+    fchmod(fd, 0400);
+    fchown(fd, User, Group);
   }
 
-  fputs(cert->certificate, fp);
-  fclose(fp);
+  write(fd, cert->certificate, strlen(cert->certificate));
+  close(fd);
 
  /*
   * Insert the certificate at the front of the list...
@@ -157,7 +160,8 @@
       */
 
       snprintf(filename, sizeof(filename), "%s/certs/%d", ServerRoot, pid);
-      unlink(filename);
+      if (unlink(filename))
+       LogMessage(L_ERROR, "DeleteCert: Unable to remove %s!\n", filename);
       return;
     }
 }
@@ -186,7 +190,8 @@
     */
 
     snprintf(filename, sizeof(filename), "%s/certs/%d", ServerRoot, cert->pid);
-    unlink(filename);
+    if (unlink(filename))
+      LogMessage(L_ERROR, "DeleteAllCerts: Unable to remove %s!\n", filename);
 
    /*
     * Free memory...
--- cupsys-1.1.14.orig/scheduler/client.c
+++ cupsys-1.1.14/scheduler/client.c
@@ -32,6 +32,7 @@
  *   SendError()           - Send an error message via HTTP.
  *   SendFile()            - Send a file via HTTP.
  *   SendHeader()          - Send an HTTP request.
+ *   ShutdownClient()      - Shutdown the receiving end of a connection.
  *   WriteClient()         - Write data to a client as needed.
  *   check_if_modified()   - Decode an "If-Modified-Since" line.
  *   decode_auth()         - Decode an authorization string.
@@ -80,6 +81,8 @@
   client_t		*con;	/* New client pointer */
   unsigned		address;/* Address of client */
   struct hostent	*host;	/* Host entry for address */
+  static time_t		last_dos = 0;
+				/* Time of last DoS attack */
 
 
   LogMessage(L_DEBUG2, "AcceptClient(%08x) %d NumClients = %d",
@@ -141,6 +144,7 @@
     */
 
     strncpy(con->http.hostname, ServerName, sizeof(con->http.hostname) - 1);
+    con->http.hostname[sizeof(con->http.hostname) - 1] = '\0';
   }
   else if (host == NULL)
   {
@@ -165,7 +169,10 @@
     }
   }
   else
+  {
     strncpy(con->http.hostname, host->h_name, sizeof(con->http.hostname) - 1);
+    con->http.hostname[sizeof(con->http.hostname) - 1] = '\0';
+  }
 
   if (HostNameLookups == 2)
   {
@@ -235,7 +242,7 @@
   setsockopt(con->http.fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val)); 
 
  /*
-  * Add the socket to the select() input mask.
+  * Close this file on all execs...
   */
 
   fcntl(con->http.fd, F_SETFD, fcntl(con->http.fd, F_GETFD) | FD_CLOEXEC);
@@ -465,6 +472,15 @@
 
   status = HTTP_CONTINUE;
 
+  LogMessage(L_DEBUG2, "ReadClient() %d, used=%d", con->http.fd,
+             con->http.used);
+
+  if (con->http.error)
+  {
+    CloseClient(con);
+    return (0);
+  }
+
   switch (con->http.state)
   {
     case HTTP_WAITING :
@@ -518,18 +534,20 @@
         switch (sscanf(line, "%63s%1023s%63s", operation, con->uri, version))
 	{
 	  case 1 :
+	      LogMessage(L_ERROR, "Bad request line \"%s\"!", line);
 	      SendError(con, HTTP_BAD_REQUEST);
-	      CloseClient(con);
-	      return (0);
+	      ShutdownClient(con);
+	      return (1);
 	  case 2 :
 	      con->http.version = HTTP_0_9;
 	      break;
 	  case 3 :
 	      if (sscanf(version, "HTTP/%d.%d", &major, &minor) != 2)
 	      {
+		LogMessage(L_ERROR, "Bad request line \"%s\"!", line);
 		SendError(con, HTTP_BAD_REQUEST);
-		CloseClient(con);
-		return (0);
+		ShutdownClient(con);
+		return (1);
 	      }
 
 	      if (major < 2)
@@ -543,8 +561,8 @@
 	      else
 	      {
 	        SendError(con, HTTP_NOT_SUPPORTED);
-	        CloseClient(con);
-	        return (0);
+	        ShutdownClient(con);
+	        return (1);
 	      }
 	      break;
 	}
@@ -569,9 +587,10 @@
 	  con->http.state = HTTP_HEAD;
 	else
 	{
+	  LogMessage(L_ERROR, "Bad operation \"%s\"!", operation);
 	  SendError(con, HTTP_BAD_REQUEST);
-	  CloseClient(con);
-	  return (0);
+	  ShutdownClient(con);
+	  return (1);
 	}
 
         con->start     = time(NULL);
@@ -599,8 +618,8 @@
 	if (status != HTTP_OK && status != HTTP_CONTINUE)
 	{
 	  SendError(con, HTTP_BAD_REQUEST);
-	  CloseClient(con);
-	  return (0);
+	  ShutdownClient(con);
+	  return (1);
 	}
 	break;
 
@@ -747,9 +766,11 @@
 
       if ((status = IsAuthorized(con)) != HTTP_OK)
       {
+        LogMessage(L_DEBUG2, "ReadClient: Unauthorized request for %s...\n",
+	           con->uri);
 	SendError(con, status);
-	CloseClient(con);
-	return (0);
+        ShutdownClient(con);
+	return (1);
       }
 
       switch (con->http.state)
@@ -912,6 +933,20 @@
 
 	      break;
             }
+	    else if (atoi(con->http.fields[HTTP_FIELD_CONTENT_LENGTH]) < 0)
+	    {
+	     /*
+	      * Negative content lengths are invalid!
+	      */
+
+              if (!SendError(con, HTTP_BAD_REQUEST))
+	      {
+		CloseClient(con);
+		return (0);
+	      }
+
+	      break;
+	    }
 
            /*
 	    * See what kind of POST request this is; for IPP requests the
@@ -1045,8 +1080,8 @@
 	case HTTP_DELETE :
 	case HTTP_TRACE :
             SendError(con, HTTP_NOT_IMPLEMENTED);
-            CloseClient(con);
-	    return (0);
+            ShutdownClient(con);
+	    return (1);
 
 	case HTTP_HEAD :
             if (strncmp(con->uri, "/printers/", 10) == 0 &&
@@ -1358,6 +1393,10 @@
 	      }
 	    }
 	  }
+	  else if (con->http.state == HTTP_POST_RECV)
+	  {
+            return (0);
+	  }
 	  else if (con->http.state != HTTP_POST_SEND)
 	  {
 	    CloseClient(con);
@@ -1422,7 +1461,7 @@
 	  }
 
           if (con->request)
-            ProcessIPPRequest(con);
+            return (ProcessIPPRequest(con));
 	}
         break;
 
@@ -1688,6 +1727,28 @@
 
 
 /*
+ * 'ShutdownClient()' - Shutdown the receiving end of a connection.
+ */
+
+void
+ShutdownClient(client_t *con)		/* I - Client connection */
+{
+ /*
+  * Shutdown the receiving end of the socket, since the client
+  * still needs to read the error message...
+  */
+
+  shutdown(con->http.fd, 0);
+  con->http.used = 0;
+
+  LogMessage(L_DEBUG2, "ShutdownClient: Removing fd %d from InputSet...",
+             con->http.fd);
+
+  FD_CLR(con->http.fd, &InputSet);
+}
+
+
+/*
  * 'WriteClient()' - Write data to a client as needed.
  */
 
@@ -2049,9 +2110,9 @@
   if (!status && S_ISDIR(filestats->st_mode))
   {
     if (filename[strlen(filename) - 1] == '/')
-      strncat(filename, "index.html", sizeof(filename));
+      strncat(filename, "index.html", sizeof(filename) - strlen(filename) - 1);
     else
-      strncat(filename, "/index.html", sizeof(filename));
+      strncat(filename, "/index.html", sizeof(filename) - strlen(filename) - 1);
 
     filename[sizeof(filename) - 1] = '\0';
 
--- cupsys-1.1.14.orig/scheduler/client.h
+++ cupsys-1.1.14/scheduler/client.h
@@ -87,7 +87,7 @@
 extern void	CloseClient(client_t *con);
 extern int	EncryptClient(client_t *con);
 extern void	PauseListening(void);
-extern void	ProcessIPPRequest(client_t *con);
+extern int	ProcessIPPRequest(client_t *con);
 extern int	ReadClient(client_t *con);
 extern void	ResumeListening(void);
 extern int	SendCommand(client_t *con, char *command, char *options);
@@ -95,6 +95,7 @@
 extern int	SendFile(client_t *con, http_status_t code, char *filename,
 		         char *type, struct stat *filestats);
 extern int	SendHeader(client_t *con, http_status_t code, char *type);
+extern void	ShutdownClient(client_t *con);
 extern void	StartListening(void);
 extern void	StopListening(void);
 extern int	WriteClient(client_t *con);
--- cupsys-1.1.14.orig/scheduler/dirsvc.c
+++ cupsys-1.1.14/scheduler/dirsvc.c
@@ -88,6 +88,31 @@
   httpSeparate(uri, method, username, host, &port, resource);
 
  /*
+  * Determine if the URI contains any illegal characters in it...
+  */
+
+  if (strncmp(uri, "ipp://", 6) != 0 ||
+      !host[0] ||
+      (strncmp(resource, "/printers/", 10) != 0 &&
+       strncmp(resource, "/classes/", 9) != 0))
+  {
+    LogMessage(L_ERROR, "ProcessBrowseData: Bad printer URI in browse data: %s",
+               uri);
+    return;
+  }
+
+  if (strchr(resource, '?') != NULL ||
+      (strncmp(resource, "/printers/", 10) == 0 &&
+       strchr(resource + 10, '/') != NULL) ||
+      (strncmp(resource, "/classes/", 9) == 0 &&
+       strchr(resource + 9, '/') != NULL))
+  {
+    LogMessage(L_ERROR, "ProcessBrowseData: Bad resource in browse data: %s",
+               resource);
+    return;
+  }
+    
+ /*
   * OK, this isn't a local printer; see if we already have it listed in
   * the Printers list, and add it if not...
   */
@@ -140,8 +165,8 @@
 	  if (p->type & CUPS_PRINTER_REMOTE)
 	  {
 	    /* No "p->var[sizeof(p->var) - 1] = '\0';" because p is zeroed */
-            strncat(p->name, "@", sizeof(p->name) - 1);
-	    strncat(p->name, p->hostname, sizeof(p->name) - 1);
+            strncat(p->name, "@", sizeof(p->name) - strlen(p->name) - 1);
+	    strncat(p->name, p->hostname, sizeof(p->name) - strlen(p->name) - 1);
 	    SetPrinterAttrs(p);
 	    SortPrinters();
 	  }
@@ -221,8 +246,8 @@
 	  if (p->type & CUPS_PRINTER_REMOTE)
 	  {
 	    /* No "p->var[sizeof(p->var) - 1] = '\0';" because p is zeroed */
-            strncat(p->name, "@", sizeof(p->name) - 1);
-	    strncat(p->name, p->hostname, sizeof(p->name) - 1);
+            strncat(p->name, "@", sizeof(p->name) - strlen(p->name) - 1);
+	    strncat(p->name, p->hostname, sizeof(p->name) - strlen(p->name) - 1);
 	    SetPrinterAttrs(p);
 	    SortPrinters();
 	  }
@@ -1297,7 +1322,7 @@
   if (p->type & CUPS_PRINTER_BIND)
   {
     if (finishings[0])
-      strncat(finishings, ",bind", sizeof(finishings) - 1);
+      strncat(finishings, ",bind", sizeof(finishings) - strlen(finishings) - 1);
     else
       strcpy(finishings, "bind");
   }
@@ -1305,7 +1330,7 @@
   if (p->type & CUPS_PRINTER_PUNCH)
   {
     if (finishings[0])
-      strncat(finishings, ",punch", sizeof(finishings) - 1);
+      strncat(finishings, ",punch", sizeof(finishings) - strlen(finishings) - 1);
     else
       strcpy(finishings, "punch");
   }
@@ -1313,7 +1338,7 @@
   if (p->type & CUPS_PRINTER_COVER)
   {
     if (finishings[0])
-      strncat(finishings, ",cover", sizeof(finishings) - 1);
+      strncat(finishings, ",cover", sizeof(finishings) - strlen(finishings) - 1);
     else
       strcpy(finishings, "cover");
   }
@@ -1321,7 +1346,7 @@
   if (p->type & CUPS_PRINTER_SORT)
   {
     if (finishings[0])
-      strncat(finishings, ",sort", sizeof(finishings) - 1);
+      strncat(finishings, ",sort", sizeof(finishings) - strlen(finishings) - 1);
     else
       strcpy(finishings, "sort");
   }
--- cupsys-1.1.14.orig/scheduler/ipp.c
+++ cupsys-1.1.14/scheduler/ipp.c
@@ -130,7 +130,7 @@
  * 'ProcessIPPRequest()' - Process an incoming IPP request...
  */
 
-void
+int					/* O - 1 on success, 0 on failure */
 ProcessIPPRequest(client_t *con)	/* I - Client connection */
 {
   ipp_tag_t		group;		/* Current group tag */
@@ -432,15 +432,31 @@
     }
   }
 
-  SendHeader(con, HTTP_OK, "application/ipp");
+  if (SendHeader(con, HTTP_OK, "application/ipp"))
+  {
+    con->http.data_encoding = HTTP_ENCODE_LENGTH;
+    con->http.data_remaining = ippLength(con->response);
+
+    httpPrintf(HTTP(con), "Content-Length: %d\r\n\r\n",
+	       con->http.data_remaining);
+
+    FD_SET(con->http.fd, &OutputSet);
 
-  con->http.data_encoding = HTTP_ENCODE_LENGTH;
-  con->http.data_remaining = ippLength(con->response);
+   /*
+    * Tell the caller the response header was sent successfully...
+    */
 
-  httpPrintf(HTTP(con), "Content-Length: %d\r\n\r\n",
-             con->http.data_remaining);
+    return (1);
+  }
+  else
+  {
+   /*
+    * Tell the caller the response header could not be sent...
+    */
 
-  FD_SET(con->http.fd, &OutputSet);
+    CloseClient(con);
+    return (0);
+  }
 }
 
 
@@ -1105,8 +1121,23 @@
     httpSeparate(attr->values[0].string.text, method, username, host,
                  &port, resource);
     methodlen = strlen(method);
+    LogMessage(L_DEBUG2, "add_printer: method = \"%s\"", method);
+
+    if ((strcmp(method, "http") == 0) && 
+	(strncmp(attr->values[0].string.text, "http:", 5) != 0))
+    {
+     /*
+      * No method specified in device URI; httpSeparate puts "http"
+      * as the method for a default.
+      */
+
+      LogMessage(L_ERROR, "add_printer: bad device-uri attribute \'%s\'!",
+		 attr->values[0].string.text);
+      send_ipp_error(con, IPP_NOT_POSSIBLE);
+      return;
+    }
 
-    if (strcmp(method, "file") != 0)
+    if (strcmp(method, "test") != 0)
     {
      /*
       * See if the backend is listed as a device...
@@ -1232,7 +1263,7 @@
   */
 
   if (printer->device_uri[0] == '\0')
-    strcpy(printer->device_uri, "file:/dev/null");
+    strcpy(printer->device_uri, "test:/dev/null");
 
  /*
   * See if we have an interface script or PPD file attached to the request...
--- cupsys-1.1.14.orig/scheduler/job.c
+++ cupsys-1.1.14/scheduler/job.c
@@ -1290,18 +1290,18 @@
       */
 
       if (optptr > options)
-	strncat(optptr, " ", sizeof(options) - (optptr - options) - 1);
+	strncat(optptr, " ", sizeof(options) - strlen(options) - 1);
 
       if (attr->value_tag != IPP_TAG_BOOLEAN)
       {
 	strncat(optptr, attr->name, sizeof(options) - (optptr - options) - 1);
-	strncat(optptr, "=", sizeof(options) - (optptr - options) - 1);
+	strncat(optptr, "=", sizeof(options) - strlen(options) - 1);
       }
 
       for (i = 0; i < attr->num_values; i ++)
       {
 	if (i)
-	  strncat(optptr, ",", sizeof(options) - (optptr - options) - 1);
+	  strncat(optptr, ",", sizeof(options) - strlen(options) - 1);
 
 	optptr += strlen(optptr);
 
@@ -1309,27 +1309,27 @@
 	{
 	  case IPP_TAG_INTEGER :
 	  case IPP_TAG_ENUM :
-	      snprintf(optptr, sizeof(options) - (optptr - options) - 1,
+	      snprintf(optptr, sizeof(options) - strlen(options) - 1,
 	               "%d", attr->values[i].integer);
 	      break;
 
 	  case IPP_TAG_BOOLEAN :
 	      if (!attr->values[i].boolean)
-		strncat(optptr, "no", sizeof(options) - (optptr - options) - 1);
+		strncat(optptr, "no", sizeof(options) - strlen(options) - 1);
 
 	  case IPP_TAG_NOVALUE :
 	      strncat(optptr, attr->name,
-	              sizeof(options) - (optptr - options) - 1);
+	              sizeof(options) - strlen(options) - 1);
 	      break;
 
 	  case IPP_TAG_RANGE :
-	      snprintf(optptr, sizeof(options) - (optptr - options) - 1,
+	      snprintf(optptr, sizeof(options) - strlen(options) - 1,
 	               "%d-%d", attr->values[i].range.lower,
 		       attr->values[i].range.upper);
 	      break;
 
 	  case IPP_TAG_RESOLUTION :
-	      snprintf(optptr, sizeof(options) - (optptr - options) - 1,
+	      snprintf(optptr, sizeof(options) - strlen(options) - 1,
 	               "%dx%d%s", attr->values[i].resolution.xres,
 		       attr->values[i].resolution.yres,
 		       attr->values[i].resolution.units == IPP_RES_PER_INCH ?
@@ -1346,14 +1346,14 @@
 		  strchr(attr->values[i].string.text, '\t') != NULL ||
 		  strchr(attr->values[i].string.text, '\n') != NULL)
 	      {
-		strncat(optptr, "\'", sizeof(options) - (optptr - options) - 1);
+		strncat(optptr, "\'", sizeof(options) - strlen(options) - 1);
 		strncat(optptr, attr->values[i].string.text,
 		        sizeof(options) - (optptr - options) - 1);
-		strncat(optptr, "\'", sizeof(options) - (optptr - options) - 1);
+		strncat(optptr, "\'", sizeof(options) - strlen(options) - 1);
 	      }
 	      else
 		strncat(optptr, attr->values[i].string.text,
-		        sizeof(options) - (optptr - options) - 1);
+		        sizeof(options) - strlen(options) - 1);
 	      break;
 
           default :
@@ -1486,7 +1486,7 @@
 
   if (current->buffer == NULL)
   {
-    LogMessage(L_DEBUG2, "UpdateJob: Allocating status buffer...");
+    LogMessage(L_DEBUG2, "StartJob: Allocating status buffer...");
 
     if ((current->buffer = malloc(JOB_BUFFER_SIZE)) == NULL)
     {
@@ -1537,12 +1537,12 @@
     }
 
     if (i < (num_filters - 1) ||
-	strncmp(printer->device_uri, "file:", 5) != 0)
+	strncmp(printer->device_uri, "test:", 5) != 0)
       pipe(filterfds[slot]);
     else
     {
       filterfds[slot][0] = -1;
-      if (strncmp(printer->device_uri, "file:/dev/", 10) == 0)
+      if (strncmp(printer->device_uri, "test:/dev/", 10) == 0)
 	filterfds[slot][1] = open(printer->device_uri + 5,
 	                          O_WRONLY | O_EXCL);
       else
@@ -1586,7 +1586,7 @@
   * Finally, pipe the final output into a backend process if needed...
   */
 
-  if (strncmp(printer->device_uri, "file:", 5) != 0)
+  if (strncmp(printer->device_uri, "test:", 5) != 0)
   {
     sscanf(printer->device_uri, "%254[^:]", method);
     snprintf(command, sizeof(command), "%s/backend/%s", ServerBin, method);
--- cupsys-1.1.14.orig/scheduler/log.c
+++ cupsys-1.1.14/scheduler/log.c
@@ -355,7 +355,7 @@
     if (logname[0] != '/')
     {
       strncpy(filename, ServerRoot, sizeof(filename) - 1);
-      strncat(filename, "/", sizeof(filename) - 1);
+      strncat(filename, "/", sizeof(filename) - strlen(filename) - 1);
     }
     else
       filename[0] = '\0';
@@ -421,7 +421,7 @@
     fclose(*log);
 
     strcpy(backname, filename);
-    strncat(backname, ".O", sizeof(backname) - 1);
+    strncat(backname, ".O", sizeof(backname) - strlen(backname) - 1);
     backname[sizeof(backname) - 1] = '\0';
 
     unlink(backname);
--- cupsys-1.1.14.orig/scheduler/main.c
+++ cupsys-1.1.14/scheduler/main.c
@@ -124,8 +124,8 @@
 		*/
 
                 getcwd(ConfigurationFile, sizeof(ConfigurationFile));
-		strncat(ConfigurationFile, "/", sizeof(ConfigurationFile) - 1);
-		strncat(ConfigurationFile, argv[i], sizeof(ConfigurationFile) - 1);
+		strncat(ConfigurationFile, "/", sizeof(ConfigurationFile) - strlen(ConfigurationFile) - 1);
+		strncat(ConfigurationFile, argv[i], sizeof(ConfigurationFile) - strlen(ConfigurationFile) - 1);
 		ConfigurationFile[sizeof(ConfigurationFile) - 1] = '\0';
               }
 	      break;
--- cupsys-1.1.14.orig/systemv/accept.c
+++ cupsys-1.1.14/systemv/accept.c
@@ -76,6 +76,9 @@
   else
     command = argv[0];
 
+  if (strncmp(command, "cups", 4) == 0)
+    command += 4;
+
   cancel = 0;
 
   if (strcmp(command, "accept") == 0)
--- cupsys-1.1.14.orig/systemv/cupsaddsmb.c
+++ cupsys-1.1.14/systemv/cupsaddsmb.c
@@ -147,7 +147,7 @@
       printf("Running command: %s\n", temp);
     else
     {
-      strncat(temp, " </dev/null >/dev/null 2>/dev/null", sizeof(temp) - 1);
+      strncat(temp, " </dev/null >/dev/null 2>/dev/null", sizeof(temp) - strlen(temp) - 1);
       temp[sizeof(temp) - 1] = '\0';
     }
 
--- cupsys-1.1.14.orig/systemv/lpadmin.c
+++ cupsys-1.1.14/systemv/lpadmin.c
@@ -1265,19 +1265,8 @@
   * Add the device URI...
   */
 
-  if (device[0] == '/')
-  {
-   /*
-    * Convert filename to URI...
-    */
-
-    snprintf(uri, sizeof(uri), "file:%s", device);
-    ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_URI, "device-uri", NULL,
-                 uri);
-  }
-  else
-    ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_URI, "device-uri", NULL,
-                 device);
+  ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_URI, "device-uri", NULL,
+	       device);
 
  /*
   * Do the request and get back a response...
--- cupsys-1.1.14.orig/templates/choose-uri.tmpl
+++ cupsys-1.1.14/templates/choose-uri.tmpl
@@ -23,11 +23,10 @@
 	<TD></TD>
 	<TD>Examples:
 	<PRE>
-    file:/path/to/filename.prn
-    http://hostname:631/ipp/
     http://hostname:631/ipp/port1
-    ipp://hostname/ipp/
+    http://hostname:631/printers/name
     ipp://hostname/ipp/port1
+    ipp://hostname/printers/name
     lpd://hostname/queue
     socket://hostname
     socket://hostname:9100
--- cupsys-1.1.14.orig/configure
+++ cupsys-1.1.14/configure
@@ -649,7 +649,7 @@
 CXXFLAGS="${CXXFLAGS:=}"
 LDFLAGS="${LDFLAGS:=}"
 
-for ac_prog in gawk mawk nawk awk
+for ac_prog in mawk gawk nawk awk
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -1048,59 +1048,8 @@
   fi
 fi
 
-for ac_declaration in \
-   ''\
-   '#include <stdlib.h>' \
-   'extern "C" void std::exit (int) throw (); using std::exit;' \
-   'extern "C" void std::exit (int); using std::exit;' \
-   'extern "C" void exit (int) throw ();' \
-   'extern "C" void exit (int);' \
-   'void exit (int);'
-do
-  cat > conftest.$ac_ext <<EOF
-#line 1062 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-$ac_declaration
-int main() {
-exit (42);
-; return 0; }
-EOF
-if { (eval echo configure:1070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  :
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  continue
-fi
-rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 1080 "configure"
-#include "confdefs.h"
-$ac_declaration
-int main() {
-exit (42);
-; return 0; }
-EOF
-if { (eval echo configure:1087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  break
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-if test -n "$ac_declaration"; then
-  echo '#ifdef __cplusplus' >>confdefs.h
-  echo $ac_declaration      >>confdefs.h
-  echo '#endif'             >>confdefs.h
-fi
-
-
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1104: checking how to run the C preprocessor" >&5
+echo "configure:1053: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1115,13 +1064,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1119 "configure"
+#line 1068 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1132,13 +1081,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1136 "configure"
+#line 1085 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1149,13 +1098,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1153 "configure"
+#line 1102 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1210,7 +1159,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1214: checking for a BSD compatible install" >&5
+echo "configure:1163: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1269,7 +1218,7 @@
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1273: checking for $ac_word" >&5
+echo "configure:1222: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1299,7 +1248,7 @@
 # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1303: checking for $ac_word" >&5
+echo "configure:1252: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1334,7 +1283,7 @@
 # Extract the first word of "htmldoc", so it can be a program name with args.
 set dummy htmldoc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1338: checking for $ac_word" >&5
+echo "configure:1287: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_HTMLDOC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1369,7 +1318,7 @@
 # Extract the first word of "mv", so it can be a program name with args.
 set dummy mv; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1373: checking for $ac_word" >&5
+echo "configure:1322: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1404,7 +1353,7 @@
 # Extract the first word of "nroff", so it can be a program name with args.
 set dummy nroff; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1408: checking for $ac_word" >&5
+echo "configure:1357: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_NROFF'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1440,7 +1389,7 @@
 	# Extract the first word of "groff", so it can be a program name with args.
 set dummy groff; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1444: checking for $ac_word" >&5
+echo "configure:1393: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GROFF'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1481,7 +1430,7 @@
 # Extract the first word of "rm", so it can be a program name with args.
 set dummy rm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1485: checking for $ac_word" >&5
+echo "configure:1434: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1516,7 +1465,7 @@
 # Extract the first word of "sed", so it can be a program name with args.
 set dummy sed; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1520: checking for $ac_word" >&5
+echo "configure:1469: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1550,14 +1499,14 @@
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:1554: checking whether byte ordering is bigendian" >&5
+echo "configure:1503: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 1561 "configure"
+#line 1510 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1568,11 +1517,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 1576 "configure"
+#line 1525 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1583,7 +1532,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -1603,7 +1552,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 1607 "configure"
+#line 1556 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -1616,7 +1565,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:1620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -1642,14 +1591,14 @@
 
 
 echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6
-echo "configure:1646: checking for library containing crypt" >&5
+echo "configure:1595: checking for library containing crypt" >&5
 if eval "test \"`echo '$''{'ac_cv_search_crypt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_func_search_save_LIBS="$LIBS"
 ac_cv_search_crypt="no"
 cat > conftest.$ac_ext <<EOF
-#line 1653 "configure"
+#line 1602 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1660,7 +1609,7 @@
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_crypt="none required"
 else
@@ -1671,7 +1620,7 @@
 test "$ac_cv_search_crypt" = "no" && for i in crypt; do
 LIBS="-l$i  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1675 "configure"
+#line 1624 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1682,7 +1631,7 @@
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_crypt="-l$i"
 break
@@ -1704,14 +1653,14 @@
 fi
 
 echo $ac_n "checking for library containing getspent""... $ac_c" 1>&6
-echo "configure:1708: checking for library containing getspent" >&5
+echo "configure:1657: checking for library containing getspent" >&5
 if eval "test \"`echo '$''{'ac_cv_search_getspent'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_func_search_save_LIBS="$LIBS"
 ac_cv_search_getspent="no"
 cat > conftest.$ac_ext <<EOF
-#line 1715 "configure"
+#line 1664 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1722,7 +1671,7 @@
 getspent()
 ; return 0; }
 EOF
-if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_getspent="none required"
 else
@@ -1733,7 +1682,7 @@
 test "$ac_cv_search_getspent" = "no" && for i in sec gen; do
 LIBS="-l$i  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1737 "configure"
+#line 1686 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1744,7 +1693,7 @@
 getspent()
 ; return 0; }
 EOF
-if { (eval echo configure:1748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_getspent="-l$i"
 break
@@ -1767,7 +1716,7 @@
 
 LIBMALLOC=""
 echo $ac_n "checking for mallinfo in -lc""... $ac_c" 1>&6
-echo "configure:1771: checking for mallinfo in -lc" >&5
+echo "configure:1720: checking for mallinfo in -lc" >&5
 ac_lib_var=`echo c'_'mallinfo | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1775,7 +1724,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1779 "configure"
+#line 1728 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1786,7 +1735,7 @@
 mallinfo()
 ; return 0; }
 EOF
-if { (eval echo configure:1790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1812,7 +1761,7 @@
 
 if test "$ac_cv_lib_c_mallinfo" = "no"; then
 	echo $ac_n "checking for mallinfo in -lmalloc""... $ac_c" 1>&6
-echo "configure:1816: checking for mallinfo in -lmalloc" >&5
+echo "configure:1765: checking for mallinfo in -lmalloc" >&5
 ac_lib_var=`echo malloc'_'mallinfo | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1820,7 +1769,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lmalloc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1824 "configure"
+#line 1773 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1831,7 +1780,7 @@
 mallinfo()
 ; return 0; }
 EOF
-if { (eval echo configure:1835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1861,12 +1810,12 @@
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1865: checking for ANSI C header files" >&5
+echo "configure:1814: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1870 "configure"
+#line 1819 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1874,7 +1823,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1891,7 +1840,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1895 "configure"
+#line 1844 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1909,7 +1858,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1913 "configure"
+#line 1862 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1930,7 +1879,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1934 "configure"
+#line 1883 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1941,7 +1890,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:1945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1969,12 +1918,12 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1973: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1922: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1978 "configure"
+#line 1927 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -1982,7 +1931,7 @@
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:1986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -2007,7 +1956,7 @@
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:2011: checking for opendir in -ldir" >&5
+echo "configure:1960: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2015,7 +1964,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2019 "configure"
+#line 1968 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2026,7 +1975,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:2030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2048,7 +1997,7 @@
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:2052: checking for opendir in -lx" >&5
+echo "configure:2001: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2056,7 +2005,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2060 "configure"
+#line 2009 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2067,7 +2016,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2091,17 +2040,17 @@
 
 ac_safe=`echo "crypt.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for crypt.h""... $ac_c" 1>&6
-echo "configure:2095: checking for crypt.h" >&5
+echo "configure:2044: checking for crypt.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2100 "configure"
+#line 2049 "configure"
 #include "confdefs.h"
 #include <crypt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2127,17 +2076,17 @@
 
 ac_safe=`echo "malloc.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for malloc.h""... $ac_c" 1>&6
-echo "configure:2131: checking for malloc.h" >&5
+echo "configure:2080: checking for malloc.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2136 "configure"
+#line 2085 "configure"
 #include "confdefs.h"
 #include <malloc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2163,17 +2112,17 @@
 
 ac_safe=`echo "shadow.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for shadow.h""... $ac_c" 1>&6
-echo "configure:2167: checking for shadow.h" >&5
+echo "configure:2116: checking for shadow.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2172 "configure"
+#line 2121 "configure"
 #include "confdefs.h"
 #include <shadow.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2199,17 +2148,17 @@
 
 ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2203: checking for string.h" >&5
+echo "configure:2152: checking for string.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2208 "configure"
+#line 2157 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2235,17 +2184,17 @@
 
 ac_safe=`echo "strings.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for strings.h""... $ac_c" 1>&6
-echo "configure:2239: checking for strings.h" >&5
+echo "configure:2188: checking for strings.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2244 "configure"
+#line 2193 "configure"
 #include "confdefs.h"
 #include <strings.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2271,17 +2220,17 @@
 
 ac_safe=`echo "usersec.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for usersec.h""... $ac_c" 1>&6
-echo "configure:2275: checking for usersec.h" >&5
+echo "configure:2224: checking for usersec.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2280 "configure"
+#line 2229 "configure"
 #include "confdefs.h"
 #include <usersec.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2307,17 +2256,17 @@
 
 ac_safe=`echo "sys/ioctl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/ioctl.h""... $ac_c" 1>&6
-echo "configure:2311: checking for sys/ioctl.h" >&5
+echo "configure:2260: checking for sys/ioctl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2316 "configure"
+#line 2265 "configure"
 #include "confdefs.h"
 #include <sys/ioctl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2345,12 +2294,12 @@
 for ac_func in strdup strcasecmp strncasecmp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_func" >&5
+echo "configure:2298: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2354 "configure"
+#line 2303 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2373,7 +2322,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2403,12 +2352,12 @@
 	for ac_func in snprintf vsnprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2407: checking for $ac_func" >&5
+echo "configure:2356: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2412 "configure"
+#line 2361 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2431,7 +2380,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2458,7 +2407,7 @@
 fi
 
 echo $ac_n "checking for correct format string to use with strftime""... $ac_c" 1>&6
-echo "configure:2462: checking for correct format string to use with strftime" >&5
+echo "configure:2411: checking for correct format string to use with strftime" >&5
 
 case "$uname" in
 	IRIX* | SunOS*)
@@ -2482,12 +2431,12 @@
 for ac_func in mkstemp mkstemps
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2486: checking for $ac_func" >&5
+echo "configure:2435: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2491 "configure"
+#line 2440 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2510,7 +2459,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2538,12 +2487,12 @@
 for ac_func in vsyslog
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2542: checking for $ac_func" >&5
+echo "configure:2491: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2547 "configure"
+#line 2496 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2566,7 +2515,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2595,12 +2544,12 @@
 	for ac_func in sigset
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2599: checking for $ac_func" >&5
+echo "configure:2548: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2604 "configure"
+#line 2553 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2623,7 +2572,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2652,12 +2601,12 @@
 for ac_func in sigaction
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2656: checking for $ac_func" >&5
+echo "configure:2605: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2661 "configure"
+#line 2610 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2680,7 +2629,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2708,12 +2657,12 @@
 for ac_func in waitpid
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2712: checking for $ac_func" >&5
+echo "configure:2661: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2717 "configure"
+#line 2666 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2736,7 +2685,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2763,12 +2712,12 @@
 for ac_func in wait3
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2767: checking for $ac_func" >&5
+echo "configure:2716: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2772 "configure"
+#line 2721 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2791,7 +2740,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2817,9 +2766,9 @@
 
 
 echo $ac_n "checking for tm_gmtoff member in tm structure""... $ac_c" 1>&6
-echo "configure:2821: checking for tm_gmtoff member in tm structure" >&5
+echo "configure:2770: checking for tm_gmtoff member in tm structure" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2823 "configure"
+#line 2772 "configure"
 #include "confdefs.h"
 #include <time.h>
 int main() {
@@ -2827,7 +2776,7 @@
 	int o = t.tm_gmtoff;
 ; return 0; }
 EOF
-if { (eval echo configure:2831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 	cat >> confdefs.h <<\EOF
@@ -2957,9 +2906,9 @@
 			;;
 
 		Darwin*)
-			# Darwin and MacOS X...
+			# Darwin and MacOS X - this is just strange...
 			INITDIR=""
-			INITDDIR="/System/Library/StartupItems/PrintingServices"
+			INITDDIR="/System/Library/StartupItems/CUPS"
 			;;
 
 		Linux*)
@@ -3302,15 +3251,15 @@
                 	DSOFLAGS="-R$libdir $DSOFLAGS"
                 	LDFLAGS="$LDFLAGS -R$libdir"
                 	;;
-                *BSD*)
+                *BSD* | Darwin*)
                         # *BSD
                 	DSOFLAGS="-Wl,-R$libdir $DSOFLAGS"
                         LDFLAGS="$LDFLAGS -Wl,-R$libdir"
                         ;;
                 Linux*)
                         # Linux
-                	DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
-                        LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir"
+                	# DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
+                        # LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir"
                         ;;
 	esac
 else
@@ -3382,20 +3331,23 @@
 	#
 	# Previous versions of GCC do not have the reliance on the stdc++
 	# or g++ libraries, so the extra supc++ library is not needed.
+	#
+	# Debian: We don't care about portability between dists, and
+	# hppa (at least) won't compile with this.  So, it's turned off.
+	# Jeff Licquia <licquia@debian.org>
 
-	echo $ac_n "checking if libsupc++ is required""... $ac_c" 1>&6
-echo "configure:3388: checking if libsupc++ is required" >&5
+#	AC_MSG_CHECKING(if libsupc++ is required)
 
- 	SUPC="`$CXX -print-file-name=libsupc++.a 2>/dev/null`"
- 	if test -n "$SUPC" -a "$SUPC" != "libsupc++.a"; then
+# 	SUPC="`$CXX -print-file-name=libsupc++.a 2>/dev/null`"
+# 	if test -n "$SUPC" -a "$SUPC" != "libsupc++.a"; then
  		# This is gcc 3.x, and it knows of libsupc++, so we need it
- 		LIBS="$LIBS -lsupc++"
-		echo "$ac_t""yes" 1>&6
-	else
-		echo "$ac_t""no" 1>&6
- 	fi
+# 		LIBS="$LIBS -lsupc++"
+#		AC_MSG_RESULT(yes)
+#	else
+#		AC_MSG_RESULT(no)
+# 	fi
 
-	CXX="$CC"
+#	CXX="$CC"
 
 	if test -z "$OPTIM"; then
 		if test "x$with_optim" = x; then
@@ -3534,17 +3486,17 @@
 
 ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
-echo "configure:3538: checking for jpeglib.h" >&5
+echo "configure:3490: checking for jpeglib.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3543 "configure"
+#line 3495 "configure"
 #include "confdefs.h"
 #include <jpeglib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3561,7 +3513,7 @@
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
-echo "configure:3565: checking for jpeg_destroy_decompress in -ljpeg" >&5
+echo "configure:3517: checking for jpeg_destroy_decompress in -ljpeg" >&5
 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3569,7 +3521,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ljpeg  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3573 "configure"
+#line 3525 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3580,7 +3532,7 @@
 jpeg_destroy_decompress()
 ; return 0; }
 EOF
-if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3612,17 +3564,17 @@
 
 ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
-echo "configure:3616: checking for zlib.h" >&5
+echo "configure:3568: checking for zlib.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3621 "configure"
+#line 3573 "configure"
 #include "confdefs.h"
 #include <zlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3639,7 +3591,7 @@
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gzgets in -lz""... $ac_c" 1>&6
-echo "configure:3643: checking for gzgets in -lz" >&5
+echo "configure:3595: checking for gzgets in -lz" >&5
 ac_lib_var=`echo z'_'gzgets | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3647,7 +3599,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lz  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3651 "configure"
+#line 3603 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3658,7 +3610,7 @@
 gzgets()
 ; return 0; }
 EOF
-if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3689,7 +3641,7 @@
 
 
 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
-echo "configure:3693: checking for pow in -lm" >&5
+echo "configure:3645: checking for pow in -lm" >&5
 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3697,7 +3649,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3701 "configure"
+#line 3653 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3708,7 +3660,7 @@
 pow()
 ; return 0; }
 EOF
-if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3738,17 +3690,17 @@
 
 ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for png.h""... $ac_c" 1>&6
-echo "configure:3742: checking for png.h" >&5
+echo "configure:3694: checking for png.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3747 "configure"
+#line 3699 "configure"
 #include "confdefs.h"
 #include <png.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3765,7 +3717,7 @@
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for png_set_tRNS_to_alpha in -lpng""... $ac_c" 1>&6
-echo "configure:3769: checking for png_set_tRNS_to_alpha in -lpng" >&5
+echo "configure:3721: checking for png_set_tRNS_to_alpha in -lpng" >&5
 ac_lib_var=`echo png'_'png_set_tRNS_to_alpha | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3773,7 +3725,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lpng  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3777 "configure"
+#line 3729 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3784,7 +3736,7 @@
 png_set_tRNS_to_alpha()
 ; return 0; }
 EOF
-if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3815,17 +3767,17 @@
 
 ac_safe=`echo "tiff.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for tiff.h""... $ac_c" 1>&6
-echo "configure:3819: checking for tiff.h" >&5
+echo "configure:3771: checking for tiff.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3824 "configure"
+#line 3776 "configure"
 #include "confdefs.h"
 #include <tiff.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3842,7 +3794,7 @@
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for TIFFReadScanline in -ltiff""... $ac_c" 1>&6
-echo "configure:3846: checking for TIFFReadScanline in -ltiff" >&5
+echo "configure:3798: checking for TIFFReadScanline in -ltiff" >&5
 ac_lib_var=`echo tiff'_'TIFFReadScanline | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3850,7 +3802,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ltiff  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3854 "configure"
+#line 3806 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3861,7 +3813,7 @@
 TIFFReadScanline()
 ; return 0; }
 EOF
-if { (eval echo configure:3865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3894,17 +3846,17 @@
 
 ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:3898: checking for stdlib.h" >&5
+echo "configure:3850: checking for stdlib.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3903 "configure"
+#line 3855 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3935,7 +3887,7 @@
 
 if test "$uname" != "IRIX"; then
 	echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:3939: checking for socket in -lsocket" >&5
+echo "configure:3891: checking for socket in -lsocket" >&5
 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3943,7 +3895,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3947 "configure"
+#line 3899 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3954,7 +3906,7 @@
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:3958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3975,7 +3927,7 @@
 fi
 
 	echo $ac_n "checking for gethostbyaddr in -lnsl""... $ac_c" 1>&6
-echo "configure:3979: checking for gethostbyaddr in -lnsl" >&5
+echo "configure:3931: checking for gethostbyaddr in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyaddr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3983,7 +3935,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3987 "configure"
+#line 3939 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3994,7 +3946,7 @@
 gethostbyaddr()
 ; return 0; }
 EOF
-if { (eval echo configure:3998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4019,12 +3971,12 @@
 for ac_func in rresvport
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4023: checking for $ac_func" >&5
+echo "configure:3975: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4028 "configure"
+#line 3980 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4047,7 +3999,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4102,17 +4054,17 @@
 if test x$enable_slp != xno; then
     ac_safe=`echo "slp.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for slp.h""... $ac_c" 1>&6
-echo "configure:4106: checking for slp.h" >&5
+echo "configure:4058: checking for slp.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4111 "configure"
+#line 4063 "configure"
 #include "confdefs.h"
 #include <slp.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4129,7 +4081,7 @@
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
-echo "configure:4133: checking for SLPOpen in -lslp" >&5
+echo "configure:4085: checking for SLPOpen in -lslp" >&5
 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4137,7 +4089,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lslp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4141 "configure"
+#line 4093 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4148,7 +4100,7 @@
 SLPOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4209,17 +4161,17 @@
 if test x$enable_ssl != xno; then
     ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for openssl/ssl.h""... $ac_c" 1>&6
-echo "configure:4213: checking for openssl/ssl.h" >&5
+echo "configure:4165: checking for openssl/ssl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4218 "configure"
+#line 4170 "configure"
 #include "confdefs.h"
 #include <openssl/ssl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4244,7 +4196,7 @@
 	    "-lcrypto -lRSAglue -lrsaref"
 	do
 	    echo $ac_n "checking for SSL_new in -lssl""... $ac_c" 1>&6
-echo "configure:4248: checking for SSL_new in -lssl" >&5
+echo "configure:4200: checking for SSL_new in -lssl" >&5
 ac_lib_var=`echo ssl'_'SSL_new | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4252,7 +4204,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lssl $libcrypto $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4256 "configure"
+#line 4208 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4263,7 +4215,7 @@
 SSL_new()
 ; return 0; }
 EOF
-if { (eval echo configure:4267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4321,7 +4273,7 @@
 if test x$enable_pam != xno; then
 	SAVELIBS="$LIBS"
 	echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4325: checking for dlopen in -ldl" >&5
+echo "configure:4277: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4329,7 +4281,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4333 "configure"
+#line 4285 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4340,7 +4292,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:4344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4368,7 +4320,7 @@
 fi
 
 	echo $ac_n "checking for pam_start in -lpam""... $ac_c" 1>&6
-echo "configure:4372: checking for pam_start in -lpam" >&5
+echo "configure:4324: checking for pam_start in -lpam" >&5
 ac_lib_var=`echo pam'_'pam_start | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4376,7 +4328,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lpam  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4380 "configure"
+#line 4332 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4387,7 +4339,7 @@
 pam_start()
 ; return 0; }
 EOF
-if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
--- cupsys-1.1.14.orig/debian/cupsys-pstoraster.files
+++ cupsys-1.1.14/debian/cupsys-pstoraster.files
@@ -0,0 +1,3 @@
+usr/lib/cups/filter/pstoraster
+usr/share/cups/fonts
+usr/share/cups/pstoraster
--- cupsys-1.1.14.orig/debian/changelog
+++ cupsys-1.1.14/debian/changelog
@@ -0,0 +1,501 @@
+cupsys (1.1.14-5) stable-security; urgency=high
+
+  * Security fix: prevent denial of service by not freezing when an
+    HTTP transaction is improperly terminated.
+  * Fix Build-Depends to make sure that PAM support is always available.
+  * CAN-2003-0195
+
+ -- Jeff Licquia <licquia@debian.org>  Mon, 26 May 2003 22:45:53 -0500
+
+cupsys (1.1.14-4.4) stable-security; urgency=medium
+
+  * Non-maintainer upload by the Security Team
+  * Limited libpng-dev dependency to libpng2 so no libpng3 can sneak in
+    anymore.
+
+ -- Martin Schulze <joey@infodrom.org>  Sat, 15 Feb 2003 20:53:30 +0100
+
+cupsys (1.1.14-4.3) stable-security; urgency=low
+
+  * Security team NMU
+  * Fix from upstream to return status indicating whether
+    CloseClient was called, to prevent further processing
+  * Jeff Licquia <licquia@debian.org>
+    - add missing CloseClient call which caused DoS to be
+      re-introduced by above patch
+
+ -- Matt Zimmerman <mdz@debian.org>  Sat,  4 Jan 2003 16:00:12 -0500
+
+cupsys (1.1.14-4.2) stable-security; urgency=high
+
+  * Security team NMU
+  * Include additional fixes from Debian maintainer, Jeff Licquia
+    <licquia@debian.org>
+    - Recover from file descriptor DoS more gracefully
+    - Patch pdftops to fix integer overflow, as in xpdf
+
+ -- Matt Zimmerman <mdz@debian.org>  Thu,  2 Jan 2003 17:49:38 -0500
+
+cupsys (1.1.14-4.1) stable-security; urgency=high
+
+  * Security team NMU
+  * Increment version to skip unwanted upload to stable
+  * Apply upstream's patches for bugs reported in iDEFENSE advisory
+    http://www.idefense.com/advisory/12.19.02.txt
+    - [issue 1] patch integer overflows in HTTP interface and
+      image handling code
+      (cgi-bin/var.c, filter/image-*.c)
+    - [issue 2] use O_EXCL to prevent race (scheduler/cert.c)
+    - [issue 3] check for invalid URIs in browse packets
+      (scheduler/dirsvc.c)
+    - [issue 4] protect against negative length memcpy calls
+      (scheduler/client.c, cups/http.c)
+    - [issue 5] fix unsafe strncat calls
+      (scheduler/job.c)
+    - [issue 6] add check for zero-{width,height} GIF image
+      (filter/image-gif.c)
+    - [issue 7] detect errors and close file descriptors appropriately
+      (scheduler/client.c)
+  * Fix other instances of incorrect strncat usage
+    (scheduler/client.c, cgi-bin/ipp-var.c, scheduler/dirsvc.c,
+     scheduler/log.c, systemv/cupsaddsmb.c)
+  * Correct build-dependencies, s/libgnutls-dev/gnutls-dev/
+
+ -- Matt Zimmerman <mdz@debian.org>  Fri, 20 Dec 2002 15:01:27 -0500
+
+cupsys (1.1.14-3) unstable; urgency=low
+
+  * Changed libpng dependency to "libpng2 | libpng" to accomodate the
+    current libpng policy.
+  * Changed adduser dep so that the proper adduser (that does root) is
+    available for the postinst.  Closes: #133709.
+  * Removed spaces from init script output.  Closes: #133262.
+  * Set TZ in init script to REALLY fix timezone problem.  
+    Closes: #130676.
+
+ -- Jeff Licquia <licquia@debian.org>  Sat,  9 Mar 2002 23:48:41 -0500
+
+cupsys (1.1.14-2) unstable; urgency=high
+
+  * Remove all the stuff about setting the lpd backend setuid; per
+    upstream, we don't need it anymore, and it's a security hole.
+
+ -- Jeff Licquia <licquia@debian.org>  Sun, 17 Feb 2002 18:52:45 -0500
+
+cupsys (1.1.14-1) unstable; urgency=high
+
+  * New upstream version.
+  * Fixes more buffer overflows not covered in the previous patch;
+    thus the urgency.
+
+ -- Jeff Licquia <licquia@debian.org>  Wed, 13 Feb 2002 22:40:50 -0500
+
+cupsys (1.1.13-2) unstable; urgency=high
+
+  * Fix potentially exploitable buffer overflow in cups/ipp.c.
+
+ -- Jeff Licquia <licquia@debian.org>  Sat,  9 Feb 2002 21:27:41 -0500
+
+cupsys (1.1.13-1) unstable; urgency=low
+
+  * New upstream version.
+  * Silly me.  fopen() returns NULL, not non-NULL, when it fails. :-)
+    Closes: #130532, #131433.
+
+ -- Jeff Licquia <licquia@debian.org>  Sat,  2 Feb 2002 16:10:20 -0500
+
+cupsys (1.1.12-5) unstable; urgency=low
+
+  * Fix man page references so, e.g., references go from backend(1) to
+    cups-backend(1).  Closes: #126811.
+  * Oops!  Debian has time_t->tm_gmtoff, which is defined to have the
+    opposite sign of timezone.  Is it that way on BSD?  Anyway,
+    reverse the sense of the sign for time_t->tm_gmtoff if we use
+    that.  Closes: #126195.
+  * Add header for gs_malloc to pstoraster/gscrdp.c, to prevent
+    problems with implicit declaration on 64-bit systems.
+    Closes: #126002.
+  * cgi-bin/admin.c: Be a little bit more paranoid about one's ability
+    to write to tempfiles.  Closes: #122324.
+  * Enabled OpenSLP support.
+  * Cleaned up Priorities and Sections.
+
+ -- Jeff Licquia <licquia@debian.org>  Sun, 20 Jan 2002 02:14:35 -0500
+
+cupsys (1.1.12-4) unstable; urgency=low
+
+  * Move cups-lpd man page to cupsys-bsd.  Closes: #122311.
+  * Oops!  Lost the patch to allow "cupsaccept", etc. commands.
+    Closes: #123280.
+  * Minor change to the init script output.  Closes: #121938.
+  * Changed choose-uri.tmpl to be a little more clear.
+    Closes: #117376.
+  * Moved CUPS document root from /usr/share/doc/cupsys to
+    /usr/share/cups/doc-root, and created a symlink from
+    /u/s/d/cupsys/online-docs to it.  It turns out that serving
+    files via CUPS from /usr/share/doc is a policy violation.
+    Closes: #120923.
+  * Fixed a small problem when upgrading from potato libcupsys1-dev
+    to current libcupsys2-dev.
+
+ -- Jeff Licquia <licquia@debian.org>  Mon, 17 Dec 2001 00:58:41 -0500
+
+cupsys (1.1.12-3) unstable; urgency=low
+
+  * Fix libcupsys2 shlibs file to provide the proper dependency
+    information.  Closes: #121405.
+  * Oops!  Make sure SSL support isn't built yet.
+
+ -- Jeff Licquia <licquia@debian.org>  Wed, 28 Nov 2001 11:41:17 -0500
+
+cupsys (1.1.12-2) unstable; urgency=low
+
+  * It helps to run autoconf after making a change to the configure
+    script. :-)  CXX=$CC change wasn't propagated, making the build
+    fail on hppa.
+
+ -- Jeff Licquia <licquia@debian.org>  Mon, 26 Nov 2001 12:01:58 -0500
+
+cupsys (1.1.12-1) unstable; urgency=low
+
+  * New upstream version.  Closes: #119162.
+  * Updated Standards-Version.
+  * Made cupsys depend on debconf.
+  * Removed -Wl,rpath from config-scripts/cups-sharedlibs.m4.
+  * Removed explicit libcupsys dep from cupsys.
+  * Removed "CXX=$CC" from config-scripts/cups-compiler.m4.
+  * Removed .SILENT from Makedefs so the build isn't silent anymore.
+  * On devfs, look in /dev/printers as well as /dev/parallel.
+    (Do we still need /dev/parallel?)  Closes: #114063.
+  * Changed internal file: device URI type to test:, since (per
+    upstream) it's not intended for anything other than to test
+    filters.  See bug #115252 or README.Debian for more info.
+
+ -- Jeff Licquia <licquia@debian.org>  Sun, 25 Nov 2001 11:21:32 -0500
+
+cupsys (1.1.10-4) unstable; urgency=low
+
+  * Switched cupsenable and cupsdisable symlinks to always point to
+    /usr/sbin/accept to prevent them from breaking when files move
+    around (as they did recently).  Closes: #114006.
+  * It turns out that libcupsys needs to make temp files in
+    /var/spool/cups/tmp, so that dir needs to be in the package.
+    Closes: #115154.
+  * Related to the above, when creating temp files, don't loop when
+    the open fails unless the return value is EEXIST.  Thanks to Brian
+    Ristuccia for the suggestion.
+  * Honor the DEB_BUILD_OPTTIONS "debug" setting.
+  * Per policy, make sure we build with -D_REENTRANT.
+  * Don't remove /var/spool/cups in the cupsys postrm when purging.
+  * Added German description to template.  Closes: #113604.
+  * Added Portuguese description to cupsys-bsd template.  
+    Closes: #106131.
+
+ -- Jeff Licquia <licquia@debian.org>  Thu, 18 Oct 2001 23:07:34 -0500
+
+cupsys (1.1.10-3) unstable; urgency=low
+
+  * Scale back a bit on aggressiveness on purging cupsys, as it can
+    cause us to remove the cupsys-client conffile.
+  * It turns out that client.conf is parsed by libcupsys2, not
+    cupsys-client, so it needs to switch packages.
+  * Changed PAM code so it attempts to open the "cupsys" PAM config
+    file, instead of the "cups" one.  Not sure how this broke again.
+    Closes: #110651.
+  * Per request, implemented the "reload" option in the init script.
+
+ -- Jeff Licquia <licquia@debian.org>  Wed, 19 Sep 2001 21:53:48 -0500
+
+cupsys (1.1.10-2) unstable; urgency=low
+
+  * Added Conflicts: on cupsys-pstoraster with older cupsys packages
+    because of moved files.  Closes: #106107.
+  * Fixed bug concerning update-inetd handling; it was removing the
+    inetd entry for the lpd server in cupsys-bsd with every upgrade.
+    Closes: #109298.
+
+ -- Jeff Licquia <licquia@debian.org>  Thu, 30 Aug 2001 23:14:08 -0500
+
+cupsys (1.1.10-1) unstable; urgency=low
+
+  * New upstream version - with Makefile oops fixed (1.1.10-1
+    upstream).
+  * Fixed lpadmin group creation so NIS-style lpadmin group is
+    recognized.  Closes: #78895, #107744.
+  * Replaced kups with kdelibs3-cups in Suggests: lines, and
+    reorganized Suggests line.  Closes: #109695.
+  * Moved Suggests for all add-on clients to cupsys-client.
+  * Fixed purge so /etc/cups is completely cleaned out.
+    Closes: #108488.
+  * Moved filter and backend man pages to cups-filter and
+    cups-backend to avoid conflicts with other packages.
+    Closes: #107629.
+  * Made the lpd backend non-setuid, and created a low-priority
+    debconf question to handle the few who really need it setuid.
+    Closes: #77617.
+  * Altered cupsys-bsd postinst; always remove any inetd lines when
+    removing the package (we'll put it back later if we're just
+    upgrading).
+
+ -- Jeff Licquia <licquia@debian.org>  Tue, 28 Aug 2001 00:43:36 -0500
+
+cupsys (1.1.9-1.1) unstable; urgency=low
+
+  * NMU
+  * Fix gcc 3.0/hppa build problems.  Closes: #104620, #105308.
+
+ -- LaMont Jones <lamont@debian.org>  Wed, 15 Aug 2001 19:28:23 -0600
+
+cupsys (1.1.9-1) unstable; urgency=low
+
+  * Return of the Maintainer. :-)
+  * New upstream version.
+  * Added dep on adduser (fixed bug #105382).
+
+ -- Jeff Licquia <licquia@debian.org>  Mon, 30 Jul 2001 00:28:47 -0500
+
+cupsys (1.1.8-0.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * i think anyone who wants cupsys in woody will be happy by this nmu
+  * New upstream release (Closes: #80895, #100156, #94364)
+  * With the new upstream release the problem with cgi-bin
+    has been fixed
+    (Closes: #96055, #98264, #96530, #96055, #99914, #100707, #103095)
+  * Added cupsys-pstoraster package.
+  * Added the LOGDIR option to install rule (Closes: #94502)
+  * Suggests cupsys-driver-gimpprint | cupsomatic-ppd (Closes: #99146)
+  * Moved to DH_COMPAT=2
+  * Added a pointer to http://localhost:631/admin to README.Debian
+    (Closes: #97964)
+  * Removed the extra </Location> from cupsd.conf (Closes: #96012)
+  * Not installing copyright for libcupsys2-dev, it will have a link
+    pointing to libcupsys2 anyways (Closes: #94504)
+  * Removed maintainer postinst and prerm scripts from cupsys-client
+    and libcupsys2-dev, by purging either of them you would have
+    removed your cups documentation.
+  * added German translation of debconf template to cupsys-bsd
+    by Sebastian Feltel (Closes: #101467, #100901)
+  * changed rm -f to rm -rf from cupsys-bsd prerm, and removed the link
+    handling for /usr/doc, let debhelper worry about that.
+    (Closes: #94539, #100501, #102669)
+
+ -- Sami Haahtinen <ressu@debian.org>  Thu,  5 Jul 2001 16:04:42 +0300
+
+cupsys (1.1.6-0.1) unstable; urgency=low
+
+  * Non-maintainer upload
+  * New upstream release, fixing multiple vulnerabilities (Closes: Bug#88932)
+  * cupsys removes only its own configuration files upon purge (Closes: Bug#84341)
+  * fixed postinst, so it does not fail when the lpadmin group
+  already exists (Closes: Bug#84443)
+  * added a helpful URL to README.Debian (Closes: Bug#63590)
+  * Suggests gtklp | kups | qtcups (Closes: Bug#82974)
+
+ -- Gergely Nagy <8@free.bsd.hu>  Sat, 14 Apr 2001 18:05:23 +0200
+
+cupsys (1.1.4-3) unstable; urgency=low
+
+  * Fixed PAM module name confusion (closes bugs #76457, #77114).
+  * Fixed broken deps w.r.t. cupsys-client Replacing older cupsys
+    versions (closes bug #75241).
+  * Fixed broken deps surrounding cupsys-dev (closes bug #75242).
+  * My shlibs file was badly broken; it referred to the cupsys package
+    instead of the libcupsys2 package (closes bug #78485).
+  * Fixed problem with upgrading; --oknodo wasn't passed to
+    start-stop-daemon, causing the prerm to fail if cupsd wasn't running
+    (closes bug #70698).
+
+ -- Jeff Licquia <licquia@debian.org>  Sun,  3 Dec 2000 22:45:29 -0500
+
+cupsys (1.1.4-2) unstable; urgency=high
+
+  * Fix misconfiguration in default config; cupsd now refuses connections
+    to printers and printer classes from all hosts except localhost by
+    default.  The previous default was to allow all hosts to connect to
+    all printers - not a terribly secure default. :-)
+
+ -- Jeff Licquia <licquia@debian.org>  Sat, 18 Nov 2000 00:55:48 -0500
+
+cupsys (1.0.4-8) stable; urgency=high
+
+  * Security fix: the default configuration now no longer allows people
+    to connect to printers except from localhost.  The previous default
+    configuration allowed anyone to connect to any printer from any
+    location; not a smart security move.
+
+ -- Jeff Licquia <licquia@debian.org>  Sat, 18 Nov 2000 00:37:06 -0500
+
+cupsys (1.1.4-1) unstable; urgency=low
+
+  * New upstream version.
+  * Fixed SystemGroup to point to lpadmin again (closes bug #72155).
+
+ -- Jeff Licquia <licquia@debian.org>  Sun, 15 Oct 2000 20:36:01 -0500
+
+cupsys (1.1.2-4) unstable; urgency=low
+
+  * The scheduler will now accept up to 128 characters for a password
+    (closes bug #70946).
+
+ -- Jeff Licquia <licquia@debian.org>  Sun, 15 Oct 2000 14:54:31 -0500
+
+cupsys (1.1.2-3) unstable; urgency=low
+
+  * Re-add ppd directory to build (when did it drop out?) (closes bug
+    #70448).
+
+ -- Jeff Licquia <licquia@debian.org>  Mon, 28 Aug 2000 20:14:51 -0500
+
+cupsys (1.1.2-2) unstable; urgency=low
+
+  * Added debhelper to build deps (closes bug #69677).
+  * Fixed PAM configuration file (closes bug #69787).
+
+ -- Jeff Licquia <licquia@debian.org>  Thu, 24 Aug 2000 11:40:56 -0500
+
+cupsys (1.1.2-1) unstable; urgency=low
+
+  * Another new upstream version.
+  * More build fixes.
+
+ -- Jeff Licquia <licquia@debian.org>  Sat, 19 Aug 2000 17:15:34 -0500
+
+cupsys (1.1.1-1) unstable; urgency=low
+
+  * New upstream version - non-beta this time.
+  * Fixed up build process to reflect upstream changes.
+  * Removed lots of Debian-specific stuff that isn't needed anymore.
+
+ -- Jeff Licquia <licquia@debian.org>  Mon,  7 Aug 2000 20:27:29 -0500
+
+cupsys (1.1.0-0b3d1) unstable; urgency=low
+
+  * New upstream version.
+  * Daemon 'cups-lpd' (new to this version) added to cupsys-bsd, with
+    appropriate update-inetd calls, so cupsys-bsd is now a complete
+    replacement for lpr.
+
+ -- Jeff Licquia <licquia@debian.org>  Sun, 14 May 2000 00:08:23 -0500
+
+cupsys (1.0.4-7) frozen unstable; urgency=high
+
+  * Additional DoS fixes, included in Easy Software Products' patch for
+    the bug below.  As these are DoS bugs, I HIGHLY recommend including
+    this in potato.
+
+ -- Jeff Licquia <licquia@debian.org>  Sun, 18 Jun 2000 22:39:01 -0500
+
+cupsys (1.0.4-6) frozen unstable; urgency=high
+
+  * Fixed denial-of-service bug; POSTing non-IPP data would cause the
+    server to crash.  Closes bug #65576 (severity: critical).
+
+ -- Jeff Licquia <licquia@debian.org>  Tue, 13 Jun 2000 22:04:40 -0500
+
+cupsys (1.0.4-5) frozen unstable; urgency=low
+
+  * Backported 1.0.5 bugfix: adding a printer would fail if
+    /usr/share/cups were mounted on a different partition than /etc/cups.
+    Closes bug #62267 (severity: grave).
+
+ -- Jeff Licquia <licquia@debian.org>  Thu, 13 Apr 2000 23:09:40 -0500
+
+cupsys (1.0.4-4) frozen unstable; urgency=low
+
+  * Makefile in conf was attempting to remove /etc/printcap during build, and
+    fails to build if this fails (which it will under fakeroot); disabled
+    this.  Closes bug #60455 (severity: important).
+
+ -- Jeff Licquia <licquia@debian.org>  Wed, 15 Mar 2000 12:34:20 -0600
+
+cupsys (1.0.4-3) frozen unstable; urgency=low
+
+  * Oops - ppd directory move fails in preinst if /var/lib/cups/ppd is
+    empty.  Reported as bug #59993, fixed.
+  * Missed the library Build-Depends.  Closes bug #60090.
+  * Postrm during purge now removes /etc/cups properly.
+  * Documentation updates.
+
+ -- Jeff Licquia <licquia@debian.org>  Fri, 10 Mar 2000 22:59:07 -0600
+
+cupsys (1.0.4-2) frozen unstable; urgency=low
+
+  * Fixed documentation corruption in HTML docs (closes bug #59063).
+  * Moved /var/lib/cups/ppd/* config files (printer definitions) to
+    /etc/cups/ppd (closes bug #59263).
+  * Fixed shlibs for libcupsys1 (erroneous information) preventing
+    packages that link to it from depending properly.
+  * Changed default for browsing to Off to keep cupsd from probing the
+    local network continuously (closes bug #59277).
+
+ -- Jeff Licquia <licquia@debian.org>  Sat,  4 Mar 2000 18:23:01 -0600
+
+cupsys (1.0.4-1) unstable; urgency=low
+
+  * New upstream version.
+  * Changed policy version & tweaked for conformance.
+  * Fixed symlinks for cupsys-bsd, including /usr/doc symlinks.
+  * Reverted lp -h hack in favor of upstream fix.
+
+ -- Jeff Licquia <licquia@debian.org>  Sun,  9 Jan 2000 23:25:06 -0600
+
+cupsys (1.0.2-2) unstable; urgency=low
+
+  * Added quick hack to allow for -h option to lp (closes bug #52050).
+  * Set the lpd backend suid after quick audit; it doesn't appear to have
+    any egregious errors (closes part of bug #52381).
+  * Move /var/lib/cups/conf files to /etc/cups, with a symlink in place of
+    the old location (closes bug #52318).
+  * Added "Authentication failed" message when authorizing after the first
+    auth failure (which is likely before the first password request)
+    (closes rest of bug #50264).
+  * Made cupsys-bsd doc dir a symlink to the cupsys doc files, per policy
+    section 6.6 (closes bug #51958).
+  * Symlinked /var/lib/cups/logs to /var/log/cups (closes bug #51957).
+
+ -- Jeff Licquia <licquia@debian.org>  Mon, 13 Dec 1999 02:12:40 -0600
+
+cupsys (1.0.2-1) unstable; urgency=low
+
+  * New upstream version.
+  * Conflict with lprng, since lprng includes some SysV printing commands
+    (closes bug #50539).
+  * Added "cupsenable", "cupsdisable", "cupsaccept", and "cupsreject"
+    commands as part of an ongoing effort to reduce namespace pollution.
+    (addresses part of bug #50661 and #50384)
+  * Set both the default user and group to "lp" (for permissions fixes).
+  * Created "lpadmin" group and set SystemGroup to this.  This will
+    fix problems with CUPS not being usable initially.  As soon as
+    bug #50620 gets fixed, I'll set up to add root to the group, which
+    will make root able to configure CUPS immediately after installation.
+
+ -- Jeff Licquia <licquia@debian.org>  Mon, 29 Nov 1999 00:16:44 -0600
+
+cupsys (1.0.1-3) unstable; urgency=low
+
+  * Fixed wrong symlinks. (closes bug #50279)
+  * Stopped compression of .pdf files; they didn't gain much, broke
+    the links in the HTML, and generally caused confusion. (closes
+    part of bug #50264)
+
+ -- Jeff Licquia <licquia@debian.org>  Mon, 15 Nov 1999 22:28:56 -0600
+
+cupsys (1.0.1-2) unstable; urgency=low
+
+  * cupsys-bsd should conflict with lpr, not "lpd" (whatever that is) 
+  (closes #50047)
+  
+  * Changed priority to "extra".
+
+ -- Jeff Licquia <licquia@debian.org>  Fri, 12 Nov 1999 22:24:15 -0600
+
+cupsys (1.0.1-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Jeff Licquia <licquia@debian.org>  Sun,  6 Nov 1999 20:58:02 -0500
+
+Local variables:
+mode: debian-changelog
+End:
--- cupsys-1.1.14.orig/debian/cupsys-bsd.postrm
+++ cupsys-1.1.14/debian/cupsys-bsd.postrm
@@ -0,0 +1,41 @@
+#! /bin/sh
+# postrm script for cupsys-bsd
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see /usr/doc/packaging-manual/
+
+case "$1" in
+    purge)
+        # Remove inetd entry
+        update-inetd --pattern cups-lpd --remove printer 2>/dev/null || true
+
+        ;;
+
+    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+
--- cupsys-1.1.14.orig/debian/cupsys-bsd.preinst
+++ cupsys-1.1.14/debian/cupsys-bsd.preinst
@@ -0,0 +1,40 @@
+#! /bin/sh
+# preinst script for cupsys-bsd
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+
+case "$1" in
+    install)
+    ;;
+
+    upgrade)
+	if [ ! -L /usr/share/doc/cupsys-bsd ]; then
+	    rm -rf /usr/share/doc/cupsys-bsd
+	fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.1.14.orig/debian/cupsys-bsd.prerm
+++ cupsys-1.1.14/debian/cupsys-bsd.prerm
@@ -0,0 +1,41 @@
+#! /bin/sh
+# prerm script for cupsys-bsd
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/doc/packaging-manual/
+
+case "$1" in
+    remove|upgrade|deconfigure)
+	# Remove documentation links
+	rm -rf /usr/share/doc/cupsys-bsd
+
+	# Disable inetd entry
+	update-inetd --pattern cups-lpd --disable printer
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.1.14.orig/debian/control
+++ cupsys-1.1.14/debian/control
@@ -0,0 +1,125 @@
+Source: cupsys
+Priority: optional
+Section: net
+Maintainer: Jeff Licquia <licquia@debian.org>
+Standards-Version: 3.5.6
+Build-Depends: libtiff-dev, libjpeg-dev, libz-dev, libpng2-dev, libslp-dev, libpam-dev, debhelper
+
+Package: cupsys
+Priority: optional
+Section: net
+Architecture: any
+Depends: ${shlibs:Depends}, cupsys-pstoraster, adduser (>= 3.12), debconf
+Suggests: cupsys-client, cupsys-bsd, cupsys-driver-gimpprint | cupsomatic-ppd
+Description: Common UNIX Printing System(tm) - server
+ The Common UNIX Printing System (or CUPS(tm)) is a printing system and 
+ general replacement for lpd and the like.  It supports the Internet 
+ Printing Protocol (IPP), and has its own filtering driver model for 
+ handling various document types.
+ .
+ This package provides the CUPS scheduler/daemon and related files.
+ .
+ The terms "Common UNIX Printing System" and "CUPS" are trademarks of
+ Easy Software Products (www.easysw.com), and refer to the original
+ source packages from which these packages are made.
+
+Package: cupsys-client
+Priority: optional
+Section: net
+Architecture: any
+Depends: ${shlibs:Depends}
+Conflicts: lprng
+Suggests: cupsys, kdelibs3-cups, gtklp | qtcups
+Replaces: cupsys (<< 1.1.2)
+Description: Common UNIX Printing System(tm) - client programs (SysV)
+ The Common UNIX Printing System (or CUPS(tm)) is a printing system and 
+ general replacement for lpd and the like.  It supports the Internet 
+ Printing Protocol (IPP), and has its own filtering driver model for 
+ handling various document types.
+ .
+ This package provides the System V style print client programs.
+ .
+ The terms "Common UNIX Printing System" and "CUPS" are trademarks of
+ Easy Software Products (www.easysw.com), and refer to the original
+ source packages from which these packages are made.
+
+Package: libcupsys2
+Priority: optional
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Replaces: cupsys-client (<= 1.1.10-2)
+Description: Common UNIX Printing System(tm) - libs
+ The Common UNIX Printing System (or CUPS(tm)) is a printing system and 
+ general replacement for lpd and the like.  It supports the Internet 
+ Printing Protocol (IPP), and has its own filtering driver model for 
+ handling various document types.
+ .
+ This package provides the base shared libraries for CUPS.
+ .
+ The terms "Common UNIX Printing System" and "CUPS" are trademarks of
+ Easy Software Products (www.easysw.com), and refer to the original
+ source packages from which these packages are made.
+
+Package: libcupsys2-dev
+Priority: optional
+Section: devel
+Architecture: any
+Depends: libcupsys2 (= ${Source-Version}), libc6-dev
+Provides: libcupsys-dev
+Conflicts: libcupsys1-dev, libcupsys-dev
+Replaces: libcupsys1-dev, libcupsys-dev
+Description: Common UNIX Printing System(tm) - development files
+ The Common UNIX Printing System (or CUPS(tm)) is a printing system and 
+ general replacement for lpd and the like.  It supports the Internet 
+ Printing Protocol (IPP), and has its own filtering driver model for 
+ handling various document types.
+ .
+ This package provides the files necessary for developing CUPS-aware
+ applications and CUPS drivers.
+ .
+ The terms "Common UNIX Printing System" and "CUPS" are trademarks of
+ Easy Software Products (www.easysw.com), and refer to the original
+ source packages from which these packages are made.
+
+Package: cupsys-bsd
+Priority: extra
+Section: net
+Architecture: any
+Depends: ${shlibs:Depends}, cupsys-client (= ${Source-Version}), debconf
+Conflicts: lpr, lprng
+Provides: lpr
+Replaces: lpr
+Description: Common UNIX Printing System(tm) - BSD commands
+ The Common UNIX Printing System (or CUPS(tm)) is a printing system and 
+ general replacement for lpd and the like.  It supports the Internet 
+ Printing Protocol (IPP), and has its own filtering driver model for 
+ handling various document types.
+ .
+ This package provides the BSD commands for interacting with CUPS.  It
+ is provides separately to allow CUPS to coexist with other printing
+ systems (to a small degree).
+ .
+ The terms "Common UNIX Printing System" and "CUPS" are trademarks of
+ Easy Software Products (www.easysw.com), and refer to the original
+ source packages from which these packages are made.
+
+Package: cupsys-pstoraster
+Priority: optional
+Section: net
+Architecture: any
+Depends: ${shlibs:Depends}
+Replaces: cupsys (<= 1.1.4-3)
+Conflicts: cupsys (<= 1.1.4-3)
+Description: Common UNIX Printing System(tm) - pstoraster
+ The Common UNIX Printing System (or CUPS(tm)) is a printing system and 
+ general replacement for lpd and the like.  It supports the Internet 
+ Printing Protocol (IPP), and has its own filtering driver model for 
+ handling various document types.
+ .
+ This package provides the pstoraster facility, which allows CUPS(tm) to
+ convert PostScript data into CUPS raster data.
+ .
+ The terms "Common UNIX Printing System" and "CUPS" are trademarks of
+ Easy Software Products (www.easysw.com), and refer to the original
+ source packages from which these packages are made.
--- cupsys-1.1.14.orig/debian/cupsys-client.links
+++ cupsys-1.1.14/debian/cupsys-client.links
@@ -0,0 +1,8 @@
+usr/sbin/accept usr/sbin/cupsaccept
+usr/sbin/accept usr/sbin/cupsreject
+usr/sbin/accept usr/bin/cupsenable
+usr/sbin/accept usr/bin/cupsdisable
+usr/share/man/man8/accept.8.gz usr/share/man/man8/cupsaccept.8.gz
+usr/share/man/man8/accept.8.gz usr/share/man/man8/cupsreject.8.gz
+usr/share/man/man8/enable.8.gz usr/share/man/man8/cupsenable.8.gz
+usr/share/man/man8/enable.8.gz usr/share/man/man8/cupsdisable.8.gz
--- cupsys-1.1.14.orig/debian/libcupsys2.postinst
+++ cupsys-1.1.14/debian/libcupsys2.postinst
@@ -0,0 +1,46 @@
+#! /bin/sh
+# postinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+    configure)
+        ldconfig
+        ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+        ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+        ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.1.14.orig/debian/libcupsys2.shlibs
+++ cupsys-1.1.14/debian/libcupsys2.shlibs
@@ -0,0 +1,2 @@
+libcups 2 libcupsys2 (>= 1.1.13-1)
+libcupsimage 2 libcupsys2 (>= 1.1.13-1)
--- cupsys-1.1.14.orig/debian/cupsys.files
+++ cupsys-1.1.14/debian/cupsys.files
@@ -0,0 +1,26 @@
+etc/cups/*.conf
+etc/cups/mime.*
+usr/lib/cups/backend
+usr/lib/cups/cgi-bin
+usr/lib/cups/daemon/cups-polld
+usr/lib/cups/filter/hpgltops
+usr/lib/cups/filter/imagetops
+usr/lib/cups/filter/imagetoraster
+usr/lib/cups/filter/pdftops
+usr/lib/cups/filter/pstops
+usr/lib/cups/filter/rastertodymo
+usr/lib/cups/filter/rastertoepson
+usr/lib/cups/filter/rastertohp
+usr/lib/cups/filter/texttops
+usr/sbin/cupsd
+usr/sbin/lpinfo
+usr/sbin/lpmove
+usr/share/cups/banners
+usr/share/cups/charsets
+usr/share/cups/data
+usr/share/cups/doc-root
+usr/share/cups/model
+usr/share/cups/templates
+usr/share/doc/cupsys
+usr/share/locale
+usr/share/man
--- cupsys-1.1.14.orig/debian/cupsys-bsd.templates
+++ cupsys-1.1.14/debian/cupsys-bsd.templates
@@ -0,0 +1,20 @@
+Template: cupsys-bsd/setuplpd
+Type: boolean
+Default: false
+Description: Do you want to set up the BSD lpd compatibility server?
+ This package contains a server that can accept BSD-style print jobs and
+ submit them to CUPS. It should only be set up if you have other computers
+ that submit jobs over the network via "BSD" or "LPR" services, and these
+ computers cannot be converted to use the IPP protocol that CUPS uses.
+Description-de: Wollen Sie den BSD-lpd Kompatibilitäts-Server einsetzen?
+ Dieses Paket enthält einen Server, der BSD-artige Druckjobs entgegennimmt
+ und diese an CUPS weiterleitet. Sie sollten diesen Server nur einsetzen,
+ wenn andere Rechner über Ihren Rechner Druckjobs via "bsd" oder "lpr"
+ absetzen und diese Rechner nicht auf das von CUPS verwendete IPP-Protokoll
+ umgestellt werden können.
+Description-pt_BR: Você quer configurar o servidor de compatibilidade lpd BSD ?
+ Este pacote contém um servidor que pode aceitar trabalhos de impressão
+ no estilo BSD e enviá-los ao CUPS. Isto deverá ser configurado somente se
+ você possui outros computadores, envia trabalhos de impressão pela rede
+ via serviços "BSD" ou "LPR" e estes computadores não podem ser
+ convertidos para usar o protocolo IPP que o CUPS utitliza.
--- cupsys-1.1.14.orig/debian/rules
+++ cupsys-1.1.14/debian/rules
@@ -0,0 +1,204 @@
+#!/usr/bin/make -f
+#-*- makefile -*-
+# Made with the aid of dh_make, by Craig Small
+# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+# This version is for a hypothetical package that builds an
+# architecture-dependant package, as well as an architecture-independant
+# package.
+
+package=cupsys
+
+version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
+version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')
+
+# Uncomment this to turn on verbose mode. 
+# export DH_VERBOSE=1
+
+# This is the debhelper compatability version to use.
+export DH_COMPAT=2
+
+# Do a debug build?
+ifdef DEB_BUILD_OPTIONS
+DEB_DEBUG=$(shell echo $(DEB_BUILD_OPTIONS) | grep debug)
+else
+DEB_DEBUG=
+endif
+
+ifdef DEB_DEBUG
+DEB_OPTFLAGS=-g
+else
+DEB_OPTFLAGS=-O2
+endif
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+
+	CFLAGS="$(DEB_OPTFLAGS) -D_REENTRANT" ./configure --mandir=/usr/share/man --with-docdir=/usr/share/cups/doc-root --disable-ssl --enable-slp
+
+	# First, build the shared and static libs properly
+	cd cups ; \
+	  $(MAKE) libcups.a ; \
+	  rm *.o ; \
+	  $(MAKE) OPTIM="-fPIC -O2 -g" libcups.so.2 ; \
+	  touch libcups.a
+
+	cd filter ; \
+	  $(MAKE) libcupsimage.a ; \
+	  rm *.o ; \
+	  $(MAKE) OPTIM="-fPIC -O2 -g" libcupsimage.so.2 ; \
+	  touch libcupsimage.a
+
+	$(MAKE)
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp install-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) clean
+	-rm man/*.gz man/*.z man/*.1 man/*.5 man/*.8
+	-rm cups/libcups.so
+	-rm cups/libcups.a
+	-rm filter/libcupsimage.so
+	-rm filter/libcupsimage.a
+	-rm pdftops/libxpdf.a
+	-rm backend/http
+	-rm systemv/disable systemv/enable systemv/reject
+	-rm config.log config.h config.cache config.status Makedefs cups.sh
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/tmp.
+	$(MAKE) install prefix=`pwd`/debian/tmp \
+	  BUILDROOT=`pwd`/debian/tmp \
+	  SERVERROOT=`pwd`/debian/tmp/etc/cups \
+	  MANDIR=`pwd`/debian/tmp/usr/share/man \
+	  AMANDIR=`pwd`/debian/tmp/usr/share/man \
+	  PMANDIR=`pwd`/debian/tmp/usr/share/man \
+	  CATDIR=`pwd`/debian/tmp/usr/share/man \
+	  PAMDIR=`pwd`/debian/tmp/etc/pam.d \
+	  REQUESTS=`pwd`/debian/cupsys/var/spool/cups \
+	  BINDIR=`pwd`/debian/tmp/usr/bin \
+	  SBINDIR=`pwd`/debian/tmp/usr/sbin \
+	  INCLUDEDIR=`pwd`/debian/tmp/usr/include \
+	  LIBDIR=`pwd`/debian/tmp/usr/lib \
+	  SERVERBIN=`pwd`/debian/tmp/usr/lib/cups \
+	  DOCDIR=`pwd`/debian/tmp/usr/share/cups/doc-root \
+	  DATADIR=`pwd`/debian/tmp/usr/share/cups \
+	  LOCALEDIR=`pwd`/debian/tmp/usr/share/locale\
+	  LOGDIR=`pwd`/debian/cupsys/var/log/cups
+
+	# reconstruct the config structure.
+	install -d `pwd`/debian/cupsys/etc/cups/interfaces
+	install -d `pwd`/debian/cupsys/etc/cups/ppd
+	install -d -m 711 `pwd`/debian/cupsys/etc/cups/certs
+
+	# Get configuration files right
+	-rm -f debian/tmp/etc/cups/printers.conf 
+	-rm -f debian/tmp/etc/cups/classes.conf
+	-rm -f debian/tmp/etc/pam.d/cups
+
+	# Kill off the catx stuff
+	-rm -rf `pwd`/debian/tmp/usr/share/man/cat1
+	-rm -rf `pwd`/debian/tmp/usr/share/man/cat3
+	-rm -rf `pwd`/debian/tmp/usr/share/man/cat5
+	-rm -rf `pwd`/debian/tmp/usr/share/man/cat8
+
+	# filter(1) and backend(1) are too general; rename them
+	# to cups-filter(1) and cups-backend(1).
+	mv -f debian/tmp/usr/share/man/man1/filter.1 \
+		debian/tmp/usr/share/man/man1/cups-filter.1
+	mv -f debian/tmp/usr/share/man/man1/backend.1 \
+		debian/tmp/usr/share/man/man1/cups-backend.1
+
+	# Add any necessary copies and symlinks for ld.so/dev needs
+	cp cups/*.a `pwd`/debian/tmp/usr/lib
+	cp filter/*.a `pwd`/debian/tmp/usr/lib
+	ln -sf libcups.so.2 `pwd`/debian/tmp/usr/lib/libcups.so
+	ln -sf libcupsimage.so.2 `pwd`/debian/tmp/usr/lib/libcupsimage.so
+
+	# Create a symlink for the documentation dir
+	-mkdir -p `pwd`/debian/tmp/usr/share/doc/cupsys
+	ln -sf ../../cups/doc-root `pwd`/debian/tmp/usr/share/doc/cupsys/online-docs
+
+	# Lets make sure cupsys is packaged last
+	dh_movefiles -a -Ncupsys
+	dh_movefiles -pcupsys
+	touch install-stamp
+
+# Build architecture-independent files here.
+binary-indep: build install
+#	dh_testversion
+#	dh_testdir -i
+#	dh_testroot -i
+#	dh_installdocs -i
+#	dh_installexamples -i
+#	dh_installmenu -i
+#	dh_installemacsen -i
+#	dh_installpam -i
+#	dh_installinit -i
+#	dh_installcron -i
+#	dh_installmanpages -i
+#	dh_installinfo -i
+#	dh_undocumented
+#	dh_installchangelogs -i 
+#	dh_link -i
+#	dh_compress -i
+#	dh_fixperms -i
+	# You may want to make some executables suid here.
+#	dh_suidregister -i
+#	dh_installdeb -i
+#	dh_perl -i
+#	dh_gencontrol -i
+#	dh_md5sums -i
+#	dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: build install
+#	dh_testversion
+	dh_testdir -a
+	dh_testroot -a
+	dh_installdebconf -a
+	# The dev package will have a link pointing to libcupsys2
+	# we don't need to install docs for it.
+	dh_installdocs -a 
+	dh_installexamples -pcupsys
+	dh_installmenu -a
+#	dh_installemacsen -a
+	dh_installpam -a
+	dh_installinit -a
+	dh_installcron -a
+#	dh_installmanpages -a
+	dh_installinfo -a
+#	dh_undocumented -pcupsys-client lppasswd.1
+	dh_installchangelogs -a CHANGES.txt
+	dh_strip -a
+	dh_link -a
+	dh_compress -a -X.pdf
+	dh_fixperms -a
+#	# You may want to make some executables suid here.
+#	chmod u+s debian/cupsys/usr/lib/cups/backend/lpd
+#	dh_suidregister -a
+	dh_makeshlibs -plibcupsys2
+	dh_installdeb -a
+#	dh_perl -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+source diff:                                                                  
+	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- cupsys-1.1.14.orig/debian/cupsys-bsd.config
+++ cupsys-1.1.14/debian/cupsys-bsd.config
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+# Debconf library
+. /usr/share/debconf/confmodule
+
+db_input medium cupsys-bsd/setuplpd || true
+db_go
--- cupsys-1.1.14.orig/debian/cupsys.conffiles
+++ cupsys-1.1.14/debian/cupsys.conffiles
@@ -0,0 +1,5 @@
+/etc/cups/cupsd.conf
+/etc/cups/mime.convs
+/etc/cups/mime.types
+/etc/init.d/cupsys
+/etc/pam.d/cupsys
--- cupsys-1.1.14.orig/debian/cupsys-bsd.files
+++ cupsys-1.1.14/debian/cupsys-bsd.files
@@ -0,0 +1,10 @@
+usr/sbin/lpc
+usr/bin/lpq
+usr/bin/lpr
+usr/bin/lprm
+usr/lib/cups/daemon/cups-lpd
+usr/share/man/man1/lpr.1
+usr/share/man/man1/lprm.1
+usr/share/man/man1/lpq.1
+usr/share/man/man8/cups-lpd.8
+usr/share/man/man8/lpc.8
--- cupsys-1.1.14.orig/debian/libcupsys2.dirs
+++ cupsys-1.1.14/debian/libcupsys2.dirs
@@ -0,0 +1 @@
+/var/spool/cups/tmp
--- cupsys-1.1.14.orig/debian/cupsys-client.files
+++ cupsys-1.1.14/debian/cupsys-client.files
@@ -0,0 +1,22 @@
+usr/bin/cancel
+usr/bin/lp
+usr/bin/lpoptions
+usr/bin/lppasswd
+usr/bin/lpstat
+usr/bin/disable
+usr/bin/enable
+usr/sbin/cupsaddsmb
+usr/sbin/accept
+usr/sbin/lpadmin
+usr/sbin/reject
+usr/share/man/man1/lp.1
+usr/share/man/man1/lpoptions.1
+usr/share/man/man1/lppasswd.1
+usr/share/man/man1/lpstat.1
+usr/share/man/man1/cancel.1
+usr/share/man/man8/cupsaddsmb.8
+usr/share/man/man8/enable.8
+usr/share/man/man8/lpadmin.8
+usr/share/man/man8/reject.8
+usr/share/man/man8/disable.8
+usr/share/man/man8/accept.8
--- cupsys-1.1.14.orig/debian/libcupsys2.files
+++ cupsys-1.1.14/debian/libcupsys2.files
@@ -0,0 +1,2 @@
+usr/lib/*.so.*
+etc/cups/client.conf
--- cupsys-1.1.14.orig/debian/suid
+++ cupsys-1.1.14/debian/suid
@@ -0,0 +1 @@
+usr/lib/cups/backend/lpd
--- cupsys-1.1.14.orig/debian/cupsys.examples
+++ cupsys-1.1.14/debian/cupsys.examples
@@ -0,0 +1,3 @@
+conf/printers.conf
+conf/classes.conf
+conf/printcap
--- cupsys-1.1.14.orig/debian/pam
+++ cupsys-1.1.14/debian/pam
@@ -0,0 +1,2 @@
+auth	required	pam_unix.so 
+account	required	pam_unix.so
--- cupsys-1.1.14.orig/debian/libcupsys2.conffiles
+++ cupsys-1.1.14/debian/libcupsys2.conffiles
@@ -0,0 +1 @@
+/etc/cups/client.conf
--- cupsys-1.1.14.orig/debian/copyright
+++ cupsys-1.1.14/debian/copyright
@@ -0,0 +1,82 @@
+This package was debianized by Jeff Licquia <licquia@debian.org> on
+Sun,  3 Oct 1999 20:58:02 -0500.
+
+It was downloaded from:
+	ftp://ftp2.easysw.com/pub/cups/
+
+Upstream Author(s): Easy Software Products <cups-info@cups.org>
+                    Michael Sweet <mike@easysw.com>
+
+Copyright:
+
+[From the LICENSE.txt file.  GPL cut for brevity; for a copy, look in
+/usr/share/common-licenses/GPL.]
+
+                Common UNIX Printing System License Agreement
+
+                Copyright 1997-1999 by Easy Software Products
+                        44141 AIRPORT VIEW DR STE 204
+                     HOLLYWOOD, MARYLAND 20636-3111 USA
+
+                           Voice: +1.301.373.9603
+                          Email: cups-info@cups.org
+                          WWW: http://www.cups.org
+
+Introduction
+
+The Common UNIX Printing SystemTM, or CUPSTM, is provided under the GNU
+General Public License, Version 2. A copy of this license follows this
+introduction.
+
+For those not familiar with the GNU General Public License, the license
+basically allows you to:
+
+   * Use the CUPS software at no charge.
+   * Distribute verbatim copies of the software in source or binary form.
+   * Sell verbatim copies of the software for a media fee, or sell support
+     for the software.
+   * Distribute or sell printer drivers and filters that use the CUPS API so
+     long as source code is made available under the GPL.
+
+What this license does not allow you to do is make changes or add features
+to CUPS and then sell a binary distribution without source code. You have to
+provide source for any new drivers, changes, or additions to the software,
+and all code must be provided under the GPL.
+
+Also, since we have trademarked the Common UNIX Printing System, CUPS, and
+CUPS logo, you may not release a derivative product using those names
+without permission from Easy Software Products.
+
+Binary Distribution Rights
+
+Easy Software Products also sells rights to the CUPS source code under a
+binary distribution license for vendors that are unable to release source
+code for their drivers or additions and modifications to CUPS under the GPL.
+For pricing information please contact us at the address shown above.
+
+The Common UNIX Printing System utilizes GNU GhostScript 4.03 to convert
+PostScript files into a stream of raster images. For binary distribution
+licensing of this software, please contact:
+
+     Miles Jones
+     Director of Marketing
+     Artifex Software Inc.
+     454 Las Gallinas Ave., Suite 108
+     San Rafael, CA 94903 USA
+     Voice: +1.415.492.9861
+     Fax: +1.415.492.9862
+     EMail: info@arsoft.com
+
+Support
+
+Easy Software Products sells software support for distributors and resellers
+of CUPS. Support for users of CUPS is available from Easy Software Products
+through our ESP Print software.
+
+Trademarks
+
+The Common UNIX Printing System, CUPS, and the CUPS logo are the trademark
+property of Easy Software Products. Any derivative of this software may not
+use any of these trademarks without the expressed written consent of Easy
+Software Products.
+
--- cupsys-1.1.14.orig/debian/cupsys.postinst
+++ cupsys-1.1.14/debian/cupsys.postinst
@@ -0,0 +1,55 @@
+#! /bin/sh
+# postinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+# Debconf
+. /usr/share/debconf/confmodule
+
+case "$1" in
+    configure)
+	# Set up lpadmin group.
+	if [ -z "`getent group lpadmin`" ]; then 
+	    addgroup lpadmin && adduser root lpadmin
+	fi
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+db_stop
+exit 0
+
+
--- cupsys-1.1.14.orig/debian/cupsys.postrm
+++ cupsys-1.1.14/debian/cupsys.postrm
@@ -0,0 +1,44 @@
+#! /bin/sh
+# postrm script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see /usr/doc/packaging-manual/
+
+case "$1" in
+    purge)
+	rm -rf /var/lib/cups
+	rm -rf /var/log/cups
+	rm -rf /etc/cups/certs
+	rm -rf /etc/cups/interfaces
+	rm -rf /etc/cups/ppd
+	rm -f /etc/cups/printers.conf /etc/init.d/cupsys /etc/pam.d/cupsys \
+		/etc/cups/ppds.dat
+	rmdir /etc/cups 2>/dev/null || true
+	;;
+    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+
--- cupsys-1.1.14.orig/debian/cupsys.preinst
+++ cupsys-1.1.14/debian/cupsys.preinst
@@ -0,0 +1,60 @@
+#! /bin/sh
+# preinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+
+case "$1" in
+    install)
+    ;;
+
+    upgrade)
+	if [ -e /var/lib/cups/conf -a ! -L /var/lib/cups/conf -a ! -e /etc/cups ]; then
+	    echo -n "Moving configuration files..."
+	    mkdir -p /etc/cups || true
+	    if [ `ls /var/lib/cups/conf | wc -l` -ne "     0" ]; then
+		cp -a /var/lib/cups/conf/* /etc/cups
+	    fi
+	    rm -rf /var/lib/cups/conf
+	    echo "done."
+	fi
+
+	if [ -e /var/lib/cups/ppd -a ! -L /var/lib/cups/ppd -a ! -e /etc/cups/ppd ]; then
+	    echo -n "Moving printer definition files..."
+	    mkdir -p /etc/cups/ppd || true
+	    if [ `ls /var/lib/cups/ppd | wc -l` -ne "     0" ]; then
+		cp -a /var/lib/cups/ppd/* /etc/cups/ppd
+	    fi
+	    rm -rf /var/lib/cups/ppd
+	    echo "done."
+	fi
+
+	if [ -e /var/lib/cups/logs -a ! -L /var/lib/cups/logs ]; then
+	    rmdir /var/lib/cups/logs || true;
+	fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.1.14.orig/debian/cupsys.init.d
+++ cupsys-1.1.14/debian/cupsys.init.d
@@ -0,0 +1,60 @@
+#! /bin/sh
+#
+# cupsys	example file to build /etc/init.d/ scripts.
+#		This file should be used to construct scripts for /etc/init.d.
+#
+#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+#		Modified for Debian GNU/Linux
+#		by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#
+# Version:	@(#)skeleton  1.8  03-Mar-1998  miquels@cistron.nl
+#
+# This file was automatically customized by dh-make on Sun,  3 Oct 1999 20:58:02 -0500
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/cupsd
+NAME=cupsd
+DESC=CUPSys
+
+test -f $DAEMON || exit 0
+
+set -e
+
+# Get the timezone set.
+if [ -e /etc/timezone ]; then
+    TZ=`cat /etc/timezone`
+    export TZ
+fi
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: $NAME"
+	start-stop-daemon --start --quiet --exec $DAEMON &
+	echo "."
+	;;
+  stop)
+	echo -n "Stopping $DESC: $NAME"
+	start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
+	echo "."
+	;;
+  reload)
+	echo -n "Reloading $DESC: $NAME"
+	start-stop-daemon --stop --quiet --oknodo --signal 1 --exec $DAEMON
+	echo "."
+	;;
+  restart|force-reload)
+	echo -n "Restarting $DESC: $NAME"
+	start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
+	sleep 1
+	start-stop-daemon --start --quiet --exec $DAEMON &
+	echo "."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
--- cupsys-1.1.14.orig/debian/libcupsys2-dev.files
+++ cupsys-1.1.14/debian/libcupsys2-dev.files
@@ -0,0 +1,5 @@
+usr/bin/cups-config
+usr/lib/*.a
+usr/lib/*.so
+usr/include
+usr/share/man/man3/cups-config.3
--- cupsys-1.1.14.orig/debian/cupsys.docs
+++ cupsys-1.1.14/debian/cupsys.docs
@@ -0,0 +1,2 @@
+CREDITS.txt
+README.txt
--- cupsys-1.1.14.orig/debian/cupsys-bsd.postinst
+++ cupsys-1.1.14/debian/cupsys-bsd.postinst
@@ -0,0 +1,62 @@
+#! /bin/sh
+# postinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+# Debconf
+. /usr/share/debconf/confmodule
+
+case "$1" in
+    configure)
+
+	# Set documentation symlinks
+	if [ -d /usr/share/doc/cupsys ]; then
+	    if [ ! -e /usr/share/doc/cupsys-bsd ]; then
+		ln -sf cupsys /usr/share/doc/cupsys-bsd
+	    fi
+	fi
+
+	# Add cups-lpd to inetd.conf
+	db_get cupsys-bsd/setuplpd
+	if [ "$RET" = "true" ]; then
+	    update-inetd --add 'printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd'
+	fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.1.14.orig/debian/README.Debian
+++ cupsys-1.1.14/debian/README.Debian
@@ -0,0 +1,157 @@
+cupsys for Debian
+----------------------
+
+This package contains the Common UNIX Printing System(tm), or CUPS(tm) 
+for short.  CUPS is a new printing system for Unix that acts as a
+substitute for System V or BSD printing systems; it supports a more
+comprehensive driver model, more protocols, and Web administration,
+among other things.  Internally, CUPS uses the new Internet Printing
+Protocol (IPP) described in RFCs 2565 through 2569.
+
+The terms "CUPS" and "Common UNIX Printing System" are trademarks of
+Easy Software Products, the author of the system.  This package is a
+derivative of the CUPS system, modified for Debian and possibly
+containing modifications and fixes that are not present in the
+standard CUPS package.  For a comprehensive list of changes from the
+original source, see the diff file from the source package.  For more
+information about the legal stuff surrounding this package, see the
+Debian copyright file or the CUPS Web site (www.cups.org).
+
+After installation, CUPS is pretty close to being ready to go.  The
+last step is to add administrative access; the "lpadmin" group has
+been created and granted administrative rights to CUPS.  You may need
+to add users to this group in order to add printers, modify settings,
+etc.
+
+The printers can be added with either the lpadmin program or the web 
+interface, which is located at http://localhost:631/admin by default.
+
+Important Security Notes
+------------------------
+
+ - By default, cupsys is configured to only allow connections to
+   printers from localhost, effectively disabling network printing.
+   The previous default was to allow anyone to connect to printers
+   from any location - definitely not a smart move.  You can change
+   these defaults by editing /etc/cups/cupsd.conf; the access controls
+   are at the end of the file.  Be sure you only allow access from the
+   locations you trust, or require authentication.
+
+ - CUPS used to support a file backend that was handled internally by
+   cupsd.  This was only intended to be used for testing filters, and
+   not in production use, as it can be a security risk and will drop
+   jobs under certain circumstances.  In keeping with that, the file
+   "backend" has been renamed to "test", and the lpadmin command no
+   longer rewrites bare path URIs (either to "file:" or "test:").  If
+   you need a backend that dumps a completed job to a file on the
+   filesystem, you should write a separate backend and put it in
+   /usr/lib/cups/backend.  See the CUPS documentation for information
+   on how to do this.
+
+Drivers
+-------
+
+The CUPS software includes generic drivers for several brands of
+printers.  At the moment, this includes HP LaserJets and DeskJets,
+various Epson and Okidata printers, and Dymo label printers.
+
+There are also other packages containing CUPS printer drivers.  If any
+of those were written explicitly for your printer, chances are that it
+will support your printer better than the generic drivers that ship
+with CUPS.
+
+PostScript printers often ship with PPD files supplied by the printer
+manufacturer.  Any valid PPD for a PostScript printer is a valid CUPS
+driver.  To enable them for use with CUPS, copy the PPDs into
+/usr/share/cups/model; they should then be available for use with
+lpadmin -m and the Web interface for adding printers.
+
+If you find a CUPS driver that isn't packaged for Debian and you'd
+like it to be, you can contact me and let me know where the driver is,
+and I'll get to it as soon as I can.
+
+Or, you can package them yourself.  See below for details.
+
+Packaging
+---------
+
+There are six packages provided by CUPS: the server, the
+GhostScript-based PostScript translator included with CUPS, the
+primary command-line client programs, the BSD client and server
+compatibility programs, and the library and development packages.
+
+The CUPS BSD commands and cups-lpd daemon are separated into their own
+package (cupsys-bsd); the hope is to make it possible to run CUPS and
+some other BSD-style printing system (such as lpr) side-by-side for
+testing purposes.  If you encounter any trouble doing this, file a
+bug.  It's known that CUPS conflicts with LPRng, since LPRng provides
+some System V printing commands as well; this problem will (hopefully)
+be dealt with in time.
+
+Add-ons for CUPS (such as drivers, backends, clients, etc.) should
+depend on the proper packages.  If your package is CUPS-specific, you
+should name it so it can be easily identified as a CUPS package, with
+names such as:
+
+  cupsys-driver-foo	(for a driver for Foo printers)
+  cupsys-backend-bar	(for a backend to print to Bar printers)
+  cupsys-client-baz	(for a client module to hook Baz into CUPS)
+
+Integration with Samba
+----------------------
+
+It is possible to configure Samba to share CUPS printers to Microsoft
+clients.  There are two ways to do this:
+
+1.  Configure Samba to use System V printing.  This can be done by
+adding the following information to Samba's smb.conf
+(/etc/samba/smb.conf on Debian):
+
+[global]
+  printing = sysv
+  printcap name = lpstat
+
+[printers]
+  lpq command = /usr/bin/lpstat %p
+  lprm command = /usr/bin/cancel %p-%j
+  print command = /usr/bin/lp -d%p -oraw %s ; /bin/rm -f %s
+
+This method will require installation of the cupsys-client package.
+
+2.  Recent versions of Samba have direct CUPS support.  Check the
+Samba documentation for the status of this support in Debian's
+packages.  If this is present, you can configure Samba as follows:
+
+[global]
+  printing = cups
+  printcap name = cups
+
+For more tips on integration with Samba, check out the man page for
+cupsaddsmb, which is part of the cupsys-client package.
+
+Miscellaneous Tips
+------------------
+
+ - CUPS has support for browsing, which uses broadcast traffic to
+   auto-discover other CUPS servers and printers and make them
+   available to clients.  This is turned off in the default
+   configuration.  If it is turned on, it may trigger demand dialers
+   and increase traffic on the network.  To help prevent this, set the
+   BrowseAddress parameter to only advertise CUPS printers on specific
+   interfaces.  As a potentially more robust option, CUPS also
+   supports SLP (Service Location Protocol).
+
+ - You may encounter some problems using the "enable" command under
+   bash, as "enable" is a builtin there.  As a workaround, I've
+   created the "cupsenable" command, which acts exactly as "enable"
+   does.  There are also "cupsdisable", "cupsaccept", and "cupsreject"
+   commands for consistency.
+
+ - There is an online database with PPDs for lots of different
+   printers at http://www.linuxprinting.org/.  These will often
+   require the "cupsomatic" utility; this can be found in the
+   foomatic-bin package.
+
+Enjoy!
+
+ -- Jeff Licquia <licquia@debian.org>
