summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-print/cups/files')
-rw-r--r--net-print/cups/files/cups-1.3.0-configure.patch18
-rw-r--r--net-print/cups/files/cups-1.3.10-str3178.patch19
-rw-r--r--net-print/cups/files/cups-1.3.11-pdf-m4.patch52
-rw-r--r--net-print/cups/files/cups-1.3.11-str3200.patch39
-rw-r--r--net-print/cups/files/cups-1.3.11-str3367-security-1.3v2.patch435
-rw-r--r--net-print/cups/files/cups-1.3.11-str3401-security-1.3v2-regression.patch27
-rw-r--r--net-print/cups/files/cups-1.3.7-backend-https.patch11
-rw-r--r--net-print/cups/files/cups-1.3.8-group_fix.patch67
-rw-r--r--net-print/cups/files/cups-1.4.6-web-hang.patch54
-rw-r--r--net-print/cups/files/cupsd.init.d2
10 files changed, 2 insertions, 722 deletions
diff --git a/net-print/cups/files/cups-1.3.0-configure.patch b/net-print/cups/files/cups-1.3.0-configure.patch
deleted file mode 100644
index f248dfe..0000000
--- a/net-print/cups/files/cups-1.3.0-configure.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff -Naur cups-1.3.3/config-scripts/cups-common.m4 cups-1.3.3.new/config-scripts/cups-common.m4
---- cups-1.3.3/config-scripts/cups-common.m4 2007-09-28 22:40:03.000000000 +0200
-+++ cups-1.3.3.new/config-scripts/cups-common.m4 2007-10-04 14:40:49.414154416 +0200
-@@ -270,7 +270,12 @@
- dnl See if we have POSIX ACL support...
- SAVELIBS="$LIBS"
- LIBS=""
--AC_SEARCH_LIBS(acl_init, acl, AC_DEFINE(HAVE_ACL_INIT))
-+
-+AC_ARG_ENABLE(acl, [ --enable-acl enable POSIX ACL support, default=auto])
-+if test "x$enable_acl" != xno; then
-+ AC_SEARCH_LIBS(acl_init, acl, AC_DEFINE(HAVE_ACL_INIT))
-+fi
-+
- CUPSDLIBS="$CUPSDLIBS $LIBS"
- LIBS="$SAVELIBS"
-
-
diff --git a/net-print/cups/files/cups-1.3.10-str3178.patch b/net-print/cups/files/cups-1.3.10-str3178.patch
deleted file mode 100644
index 5336e23..0000000
--- a/net-print/cups/files/cups-1.3.10-str3178.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -Naur cups-1.3.10/config-scripts/cups-ssl.m4 cups-1.3.10.new/config-scripts/cups-ssl.m4
---- cups-1.3.10/config-scripts/cups-ssl.m4 2007-07-11 23:46:42.000000000 +0200
-+++ cups-1.3.10.new/config-scripts/cups-ssl.m4 2009-05-29 02:38:27.444267250 +0200
-@@ -64,11 +64,11 @@
- fi
-
- dnl Then look for GNU TLS...
-- if test "x${SSLLIBS}" = "x" -a "x${enable_gnutls}" != "xno"; then
-+ if test "x${SSLLIBS}" = "x" -a "x${enable_gnutls}" != "xno" -a "x$PKGCONFIG" != x; then
- AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
-- if test "x$LIBGNUTLSCONFIG" != x; then
-- SSLLIBS=`$LIBGNUTLSCONFIG --libs`
-- SSLFLAGS=`$LIBGNUTLSCONFIG --cflags`
-+ if $PKGCONFIG --exists gnutls; then
-+ SSLLIBS=`$PKGCONFIG --libs gnutls`
-+ SSLFLAGS=`$PKGCONFIG --cflags gnutls`
- ENCRYPTION_REQUIRED=" Encryption Required"
- AC_DEFINE(HAVE_SSL)
- AC_DEFINE(HAVE_GNUTLS)
diff --git a/net-print/cups/files/cups-1.3.11-pdf-m4.patch b/net-print/cups/files/cups-1.3.11-pdf-m4.patch
deleted file mode 100644
index 830ecfb..0000000
--- a/net-print/cups/files/cups-1.3.11-pdf-m4.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-# This patch is taken from cups 1.4.5 and fixes annoying requirement to have poppler around during build-time
-
---- cups-1.3.11/config-scripts/cups-pdf.m4 2009-03-12 22:34:21.000000000 +0100
-+++ cups-1.4.5/config-scripts/cups-pdf.m4 2009-08-08 00:30:30.000000000 +0200
-@@ -13,12 +13,7 @@
- dnl file is missing or damaged, see the license at "http://www.cups.org/".
- dnl
-
--AC_ARG_ENABLE(pdftops, [ --enable-pdftops build pdftops filter, default=auto ])
--AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,pdftops,none), default=pdftops ])
--
--if test "x$enable_pdftops" = xno -a "x$with_pdftops" = x; then
-- with_pdftops=no
--fi
-+AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,/path/to/gs,pdftops,/path/to/pdftops,none), default=pdftops ])
-
- PDFTOPS=""
- CUPS_PDFTOPS=""
-@@ -52,6 +47,12 @@
- fi
- ;;
-
-+ x/*/gs) # Use /path/to/gs without any check:
-+ CUPS_GHOSTSCRIPT="$with_pdftops"
-+ AC_DEFINE(HAVE_GHOSTSCRIPT)
-+ PDFTOPS="pdftops"
-+ ;;
-+
- xpdftops)
- AC_PATH_PROG(CUPS_PDFTOPS, pdftops)
- if test "x$CUPS_PDFTOPS" != x; then
-@@ -62,6 +63,20 @@
- exit 1
- fi
- ;;
-+
-+ x/*/pdftops) # Use /path/to/pdftops without any check:
-+ CUPS_PDFTOPS="$with_pdftops"
-+ AC_DEFINE(HAVE_PDFTOPS)
-+ PDFTOPS="pdftops"
-+ ;;
-+
-+ xnone) # Make no pdftops filter if with_pdftops=none:
-+ ;;
-+
-+ *) # Invalid with_pdftops value:
-+ AC_MSG_ERROR(Invalid with_pdftops value!)
-+ exit 1
-+ ;;
- esac
-
- AC_DEFINE_UNQUOTED(CUPS_PDFTOPS, "$CUPS_PDFTOPS")
diff --git a/net-print/cups/files/cups-1.3.11-str3200.patch b/net-print/cups/files/cups-1.3.11-str3200.patch
deleted file mode 100644
index 84cdbd2..0000000
--- a/net-print/cups/files/cups-1.3.11-str3200.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff -up cups-1.3.7/scheduler/select.c.CVE-2009-3553 cups-1.3.7/scheduler/select.c
---- cups-1.3.7/scheduler/select.c.CVE-2009-3553 2007-11-30 19:29:50.000000000 +0000
-+++ cups-1.3.7/scheduler/select.c 2009-11-11 16:36:07.223893886 +0000
-@@ -477,7 +477,7 @@ cupsdDoSelect(long timeout) /* I - Time
- (*(fdptr->read_cb))(fdptr->data);
- }
-
-- if (fdptr->write_cb && event->filter == EVFILT_WRITE)
-+ if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE)
- {
- cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: Write on fd %d...",
- fdptr->fd);
-@@ -537,7 +537,7 @@ cupsdDoSelect(long timeout) /* I - Time
- (*(fdptr->read_cb))(fdptr->data);
- }
-
-- if (fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)))
-+ if (fdptr->use > 1 && fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)))
- {
- cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: Write on fd %d...",
- fdptr->fd);
-@@ -649,7 +649,7 @@ cupsdDoSelect(long timeout) /* I - Time
- (*(fdptr->read_cb))(fdptr->data);
- }
-
-- if (fdptr->write_cb && (pfd->revents & (POLLOUT | POLLERR | POLLHUP)))
-+ if (fdptr->use > 1 && fdptr->write_cb && (pfd->revents & (POLLOUT | POLLERR | POLLHUP)))
- {
- cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: Write on fd %d...",
- fdptr->fd);
-@@ -719,7 +719,7 @@ cupsdDoSelect(long timeout) /* I - Time
- (*(fdptr->read_cb))(fdptr->data);
- }
-
-- if (fdptr->write_cb && FD_ISSET(fdptr->fd, &cupsd_current_output))
-+ if (fdptr->use > 1 && fdptr->write_cb && FD_ISSET(fdptr->fd, &cupsd_current_output))
- {
- cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: Write on fd %d...",
- fdptr->fd);
diff --git a/net-print/cups/files/cups-1.3.11-str3367-security-1.3v2.patch b/net-print/cups/files/cups-1.3.11-str3367-security-1.3v2.patch
deleted file mode 100644
index 8fe6b17..0000000
--- a/net-print/cups/files/cups-1.3.11-str3367-security-1.3v2.patch
+++ /dev/null
@@ -1,435 +0,0 @@
-Index: cgi-bin/printers.c
-===================================================================
---- cgi-bin/printers.c (.../easysw/current-1.3.x) (revision 1707)
-+++ cgi-bin/printers.c (.../branches/leopard/cups) (revision 1707)
-@@ -72,6 +72,7 @@
- */
-
- cgiSetVariable("SECTION", "printers");
-+ cgiSetVariable("REFRESH_PAGE", "");
-
- /*
- * See if we are displaying a printer or all printers...
-Index: cgi-bin/cgi.h
-===================================================================
---- cgi-bin/cgi.h (.../easysw/current-1.3.x) (revision 1707)
-+++ cgi-bin/cgi.h (.../branches/leopard/cups) (revision 1707)
-@@ -54,6 +54,7 @@
- extern void cgiAbort(const char *title, const char *stylesheet,
- const char *format, ...);
- extern int cgiCheckVariables(const char *names);
-+extern void cgiClearVariables(void);
- extern void *cgiCompileSearch(const char *query);
- extern void cgiCopyTemplateFile(FILE *out, const char *tmpl);
- extern void cgiCopyTemplateLang(const char *tmpl);
-Index: cgi-bin/template.c
-===================================================================
---- cgi-bin/template.c (.../easysw/current-1.3.x) (revision 1707)
-+++ cgi-bin/template.c (.../branches/leopard/cups) (revision 1707)
-@@ -639,6 +639,8 @@
- fputs(">", out);
- else if (*s == '\"')
- fputs(""", out);
-+ else if (*s == '\'')
-+ fputs("'", out);
- else if (*s == '&')
- fputs("&", out);
- else
-@@ -659,7 +661,7 @@
- {
- while (*s)
- {
-- if (strchr("%&+ <>#=", *s) || *s & 128)
-+ if (strchr("%@&+ <>#=", *s) || *s < ' ' || *s & 128)
- fprintf(out, "%%%02X", *s & 255);
- else
- putc(*s, out);
-Index: cgi-bin/ipp-var.c
-===================================================================
---- cgi-bin/ipp-var.c (.../easysw/current-1.3.x) (revision 1707)
-+++ cgi-bin/ipp-var.c (.../branches/leopard/cups) (revision 1707)
-@@ -1220,7 +1220,9 @@
- int ascending, /* Order of jobs (0 = descending) */
- first, /* First job to show */
- count; /* Number of jobs */
-- const char *var; /* Form variable */
-+ const char *var, /* Form variable */
-+ *query, /* Query string */
-+ *section; /* Section in web interface */
- void *search; /* Search data */
- char url[1024], /* URL for prev/next/this */
- *urlptr, /* Position in URL */
-@@ -1265,10 +1267,13 @@
- * Get a list of matching job objects.
- */
-
-- if ((var = cgiGetVariable("QUERY")) != NULL)
-- search = cgiCompileSearch(var);
-+ if ((query = cgiGetVariable("QUERY")) != NULL)
-+ search = cgiCompileSearch(query);
- else
-+ {
-+ query = NULL;
- search = NULL;
-+ }
-
- jobs = cgiGetIPPObjects(response, search);
- count = cupsArrayCount(jobs);
-@@ -1293,17 +1298,28 @@
- if (first < 0)
- first = 0;
-
-- sprintf(url, "%d", count);
-- cgiSetVariable("TOTAL", url);
--
- if ((var = cgiGetVariable("ORDER")) != NULL)
- ascending = !strcasecmp(var, "asc");
- else
-- {
- ascending = !which_jobs || !strcasecmp(which_jobs, "not-completed");
-- cgiSetVariable("ORDER", ascending ? "asc" : "dec");
-- }
-
-+ section = cgiGetVariable("SECTION");
-+
-+ cgiClearVariables();
-+
-+ if (query)
-+ cgiSetVariable("QUERY", query);
-+
-+ cgiSetVariable("ORDER", ascending ? "asc" : "dec");
-+
-+ cgiSetVariable("SECTION", section);
-+
-+ sprintf(url, "%d", count);
-+ cgiSetVariable("TOTAL", url);
-+
-+ if (which_jobs)
-+ cgiSetVariable("WHICH_JOBS", which_jobs);
-+
- if (ascending)
- {
- for (i = 0, job = (ipp_attribute_t *)cupsArrayIndex(jobs, first);
-@@ -1325,11 +1341,10 @@
-
- urlend = url + sizeof(url);
-
-- if ((var = cgiGetVariable("QUERY")) != NULL)
-+ if (query != NULL)
- {
- if (dest)
-- snprintf(url, sizeof(url), "/%s/%s?QUERY=", cgiGetVariable("SECTION"),
-- dest);
-+ snprintf(url, sizeof(url), "/%s/%s?QUERY=", section, dest);
- else
- strlcpy(url, "/jobs/?QUERY=", sizeof(url));
-
-@@ -1344,7 +1359,7 @@
- else
- {
- if (dest)
-- snprintf(url, sizeof(url), "/%s/%s?", cgiGetVariable("SECTION"), dest);
-+ snprintf(url, sizeof(url), "/%s/%s?", section, dest);
- else
- strlcpy(url, "/jobs/?", sizeof(url));
-
-Index: cgi-bin/admin.c
-===================================================================
---- cgi-bin/admin.c (.../easysw/current-1.3.x) (revision 1707)
-+++ cgi-bin/admin.c (.../branches/leopard/cups) (revision 1707)
-@@ -104,6 +104,7 @@
- */
-
- cgiSetVariable("SECTION", "admin");
-+ cgiSetVariable("REFRESH_PAGE", "");
-
- /*
- * See if we have form data...
-@@ -134,16 +135,61 @@
-
-
- if (getenv("HTTPS"))
-- snprintf(prefix, sizeof(prefix), "https://%s:%s",
-- getenv("SERVER_NAME"), getenv("SERVER_PORT"));
-+ snprintf(prefix, sizeof(prefix), "https://%s:%s",
-+ getenv("SERVER_NAME"), getenv("SERVER_PORT"));
- else
-- snprintf(prefix, sizeof(prefix), "http://%s:%s",
-- getenv("SERVER_NAME"), getenv("SERVER_PORT"));
-+ snprintf(prefix, sizeof(prefix), "http://%s:%s",
-+ getenv("SERVER_NAME"), getenv("SERVER_PORT"));
-
-+ fprintf(stderr, "DEBUG: redirecting with prefix %s!\n", prefix);
-+
- if ((url = cgiGetVariable("URL")) != NULL)
-- printf("Location: %s%s\n\n", prefix, url);
-+ {
-+ char encoded[1024], /* Encoded URL string */
-+ *ptr; /* Pointer into encoded string */
-+
-+
-+ ptr = encoded;
-+ if (*url != '/')
-+ *ptr++ = '/';
-+
-+ for (; *url && ptr < (encoded + sizeof(encoded) - 4); url ++)
-+ {
-+ if (strchr("%@&+ <>#=", *url) || *url < ' ' || *url & 128)
-+ {
-+ /*
-+ * Percent-encode this character; safe because we have at least 4
-+ * bytes left in the array...
-+ */
-+
-+ sprintf(ptr, "%%%02X", *url & 255);
-+ ptr += 3;
-+ }
-+ else
-+ *ptr++ = *url;
-+ }
-+
-+ *ptr = '\0';
-+
-+ if (*url)
-+ {
-+ /*
-+ * URL was too long, just redirect to the admin page...
-+ */
-+
-+ printf("Location: %s/admin\n\n", prefix);
-+ }
-+ else
-+ {
-+ /*
-+ * URL is OK, redirect there...
-+ */
-+
-+ printf("Location: %s%s\n\n", prefix, encoded);
-+ }
-+ }
- else
-- printf("Location: %s/admin\n\n", prefix);
-+ printf("Location: %s/admin\n\n", prefix);
- }
- else if (!strcmp(op, "start-printer"))
- do_printer_op(http, IPP_RESUME_PRINTER, cgiText(_("Start Printer")));
-@@ -293,6 +339,31 @@
- * and classes and (re)show the add page...
- */
-
-+ if (cgiGetVariable("EVENT_JOB_CREATED"))
-+ cgiSetVariable("EVENT_JOB_CREATED", "CHECKED");
-+ if (cgiGetVariable("EVENT_JOB_COMPLETED"))
-+ cgiSetVariable("EVENT_JOB_COMPLETED", "CHECKED");
-+ if (cgiGetVariable("EVENT_JOB_STOPPED"))
-+ cgiSetVariable("EVENT_JOB_STOPPED", "CHECKED");
-+ if (cgiGetVariable("EVENT_JOB_CONFIG_CHANGED"))
-+ cgiSetVariable("EVENT_JOB_CONFIG_CHANGED", "CHECKED");
-+ if (cgiGetVariable("EVENT_PRINTER_STOPPED"))
-+ cgiSetVariable("EVENT_PRINTER_STOPPED", "CHECKED");
-+ if (cgiGetVariable("EVENT_PRINTER_ADDED"))
-+ cgiSetVariable("EVENT_PRINTER_ADDED", "CHECKED");
-+ if (cgiGetVariable("EVENT_PRINTER_MODIFIED"))
-+ cgiSetVariable("EVENT_PRINTER_MODIFIED", "CHECKED");
-+ if (cgiGetVariable("EVENT_PRINTER_DELETED"))
-+ cgiSetVariable("EVENT_PRINTER_DELETED", "CHECKED");
-+ if (cgiGetVariable("EVENT_SERVER_STARTED"))
-+ cgiSetVariable("EVENT_SERVER_STARTED", "CHECKED");
-+ if (cgiGetVariable("EVENT_SERVER_STOPPED"))
-+ cgiSetVariable("EVENT_SERVER_STOPPED", "CHECKED");
-+ if (cgiGetVariable("EVENT_SERVER_RESTARTED"))
-+ cgiSetVariable("EVENT_SERVER_RESTARTED", "CHECKED");
-+ if (cgiGetVariable("EVENT_SERVER_AUDIT"))
-+ cgiSetVariable("EVENT_SERVER_AUDIT", "CHECKED");
-+
- request = ippNewRequest(CUPS_GET_PRINTERS);
- response = cupsDoRequest(http, request, "/");
-
-@@ -450,6 +521,10 @@
- * Do the request and get back a response...
- */
-
-+ cgiClearVariables();
-+ if (name)
-+ cgiSetVariable("PRINTER_NAME", name);
-+
- if ((response = cupsDoRequest(http, request, "/")) != NULL)
- {
- /*
-@@ -2336,7 +2411,9 @@
- if ((val = cupsGetOption("DefaultAuthType", num_settings,
- settings)) != NULL && !strcasecmp(val, "Negotiate"))
- cgiSetVariable("KERBEROS", "CHECKED");
-+ else
- #endif /* HAVE_GSSAPI */
-+ cgiSetVariable("KERBEROS", "");
-
- cupsFreeOptions(num_settings, settings);
-
-Index: cgi-bin/help.c
-===================================================================
---- cgi-bin/help.c (.../easysw/current-1.3.x) (revision 1707)
-+++ cgi-bin/help.c (.../branches/leopard/cups) (revision 1707)
-@@ -63,6 +63,7 @@
- */
-
- cgiSetVariable("SECTION", "help");
-+ cgiSetVariable("REFRESH_PAGE", "");
-
- /*
- * Load the help index...
-@@ -102,7 +103,7 @@
- */
-
- for (i = 0; i < argc; i ++)
-- fprintf(stderr, "argv[%d]=\"%s\"\n", i, argv[i]);
-+ fprintf(stderr, "DEBUG: argv[%d]=\"%s\"\n", i, argv[i]);
-
- if ((helpfile = getenv("PATH_INFO")) != NULL)
- {
-@@ -179,6 +180,12 @@
- topic = cgiGetVariable("TOPIC");
- si = helpSearchIndex(hi, query, topic, helpfile);
-
-+ cgiClearVariables();
-+ if (query)
-+ cgiSetVariable("QUERY", query);
-+ if (topic)
-+ cgiSetVariable("TOPIC", topic);
-+
- fprintf(stderr, "DEBUG: query=\"%s\", topic=\"%s\"\n",
- query ? query : "(null)", topic ? topic : "(null)");
-
-Index: cgi-bin/var.c
-===================================================================
---- cgi-bin/var.c (.../easysw/current-1.3.x) (revision 1707)
-+++ cgi-bin/var.c (.../branches/leopard/cups) (revision 1707)
-@@ -15,6 +15,7 @@
- * Contents:
- *
- * cgiCheckVariables() - Check for the presence of "required" variables.
-+ * cgiClearVariables() - Clear all form variables.
- * cgiGetArray() - Get an element from a form array...
- * cgiGetFile() - Get the file (if any) that was submitted in the form.
- * cgiGetSize() - Get the size of a form array value.
-@@ -135,6 +136,31 @@
-
-
- /*
-+ * 'cgiClearVariables()' - Clear all form variables.
-+ */
-+
-+void
-+cgiClearVariables(void)
-+{
-+ int i, j; /* Looping vars */
-+ _cgi_var_t *v; /* Current variable */
-+
-+
-+ for (v = form_vars, i = form_count; i > 0; v ++, i --)
-+ {
-+ _cupsStrFree(v->name);
-+ for (j = 0; j < v->nvalues; j ++)
-+ if (v->values[j])
-+ _cupsStrFree(v->values[j]);
-+ }
-+
-+ form_count = 0;
-+
-+ cgi_unlink_file();
-+}
-+
-+
-+/*
- * 'cgiGetArray()' - Get an element from a form array...
- */
-
-@@ -154,7 +180,7 @@
- if (element < 0 || element >= var->nvalues)
- return (NULL);
-
-- return (var->values[element]);
-+ return (_cupsStrAlloc(var->values[element]));
- }
-
-
-@@ -209,7 +235,7 @@
- var->values[var->nvalues - 1]);
- #endif /* DEBUG */
-
-- return ((var == NULL) ? NULL : var->values[var->nvalues - 1]);
-+ return ((var == NULL) ? NULL : _cupsStrAlloc(var->values[var->nvalues - 1]));
- }
-
-
-@@ -341,9 +367,9 @@
- var->nvalues = element + 1;
- }
- else if (var->values[element])
-- free((char *)var->values[element]);
-+ _cupsStrFree((char *)var->values[element]);
-
-- var->values[element] = strdup(value);
-+ var->values[element] = _cupsStrAlloc(value);
- }
- }
-
-@@ -388,7 +414,7 @@
- {
- for (i = size; i < var->nvalues; i ++)
- if (var->values[i])
-- free((void *)(var->values[i]));
-+ _cupsStrFree((void *)(var->values[i]));
- }
-
- var->nvalues = size;
-@@ -421,9 +447,9 @@
- {
- for (i = 0; i < var->nvalues; i ++)
- if (var->values[i])
-- free((char *)var->values[i]);
-+ _cupsStrFree((char *)var->values[i]);
-
-- var->values[0] = strdup(value);
-+ var->values[0] = _cupsStrAlloc(value);
- var->nvalues = 1;
- }
- }
-@@ -470,10 +496,10 @@
- if ((var->values = calloc(element + 1, sizeof(char *))) == NULL)
- return;
-
-- var->name = strdup(name);
-+ var->name = _cupsStrAlloc(name);
- var->nvalues = element + 1;
- var->avalues = element + 1;
-- var->values[element] = strdup(value);
-+ var->values[element] = _cupsStrAlloc(value);
-
- form_count ++;
- }
-Index: cgi-bin/jobs.c
-===================================================================
---- cgi-bin/jobs.c (.../easysw/current-1.3.x) (revision 1707)
-+++ cgi-bin/jobs.c (.../branches/leopard/cups) (revision 1707)
-@@ -57,6 +57,7 @@
- */
-
- cgiSetVariable("SECTION", "jobs");
-+ cgiSetVariable("REFRESH_PAGE", "");
-
- /*
- * Connect to the HTTP server...
-Index: cgi-bin/classes.c
-===================================================================
---- cgi-bin/classes.c (.../easysw/current-1.3.x) (revision 1707)
-+++ cgi-bin/classes.c (.../branches/leopard/cups) (revision 1707)
-@@ -69,6 +69,7 @@
- */
-
- cgiSetVariable("SECTION", "classes");
-+ cgiSetVariable("REFRESH_PAGE", "");
-
- /*
- * See if we are displaying a printer or all classes...
-
diff --git a/net-print/cups/files/cups-1.3.11-str3401-security-1.3v2-regression.patch b/net-print/cups/files/cups-1.3.11-str3401-security-1.3v2-regression.patch
deleted file mode 100644
index 5f57175..0000000
--- a/net-print/cups/files/cups-1.3.11-str3401-security-1.3v2-regression.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- cgi-bin/admin.c.ori 2009-10-30 14:07:13.000000000 -0400
-+++ cgi-bin/admin.c 2009-10-30 14:06:54.000000000 -0400
-@@ -536,6 +536,7 @@
- ipp_attribute_t *attr; /* member-uris attribute */
- char uri[HTTP_MAX_URI]; /* Device or printer URI */
- const char *name, /* Pointer to class name */
-+ *op, /* Operation name */
- *ptr; /* Pointer to CGI variable */
- const char *title; /* Title of page */
- static const char * const pattrs[] = /* Requested printer attributes */
-@@ -547,6 +548,7 @@
-
-
- title = cgiText(modify ? _("Modify Class") : _("Add Class"));
-+ op = cgiGetVariable("OP");
- name = cgiGetVariable("PRINTER_NAME");
-
- if (cgiGetVariable("PRINTER_LOCATION") == NULL)
-@@ -572,6 +574,8 @@
- */
-
- cgiClearVariables();
-+ if (op)
-+ cgiSetVariable("OP", op);
- if (name)
- cgiSetVariable("PRINTER_NAME", name);
-
diff --git a/net-print/cups/files/cups-1.3.7-backend-https.patch b/net-print/cups/files/cups-1.3.7-backend-https.patch
deleted file mode 100644
index 44706b3..0000000
--- a/net-print/cups/files/cups-1.3.7-backend-https.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Naur cups-1.3.7/backend/Makefile cups-1.3.7.new/backend/Makefile
---- cups-1.3.7/backend/Makefile 2007-08-08 21:27:51.000000000 +0200
-+++ cups-1.3.7.new/backend/Makefile 2008-04-14 16:42:18.106785330 +0200
-@@ -62,6 +62,7 @@
- done
- $(RM) $(SERVERBIN)/backend/http
- $(LN) ipp $(SERVERBIN)/backend/http
-+ $(LN) ipp $(SERVERBIN)/backend/https
- if test "x$(SYMROOT)" != "x"; then \
- $(INSTALL_DIR) $(SYMROOT); \
- for file in $(TARGETS); do \
diff --git a/net-print/cups/files/cups-1.3.8-group_fix.patch b/net-print/cups/files/cups-1.3.8-group_fix.patch
deleted file mode 100644
index c69723f..0000000
--- a/net-print/cups/files/cups-1.3.8-group_fix.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-diff -Nuar cups-1.3.8.orig/scheduler/auth.c cups-1.3.8/scheduler/auth.c
---- cups-1.3.8.orig/scheduler/auth.c 2008-04-21 18:13:22.000000000 -0500
-+++ cups-1.3.8/scheduler/auth.c 2008-10-08 16:23:32.000000000 -0500
-@@ -1281,6 +1281,7 @@
- const char *groupname) /* I - Group name */
- {
- int i; /* Looping var */
-+ int foundit; /* Whether or not the search returned a positive result. */
- struct group *group; /* System group info */
- char junk[33]; /* MD5 password (not used) */
- #ifdef HAVE_MBR_UID_TO_UUID
-@@ -1302,29 +1303,43 @@
- return (0);
-
- /*
-- * Check to see if the user is a member of the named group...
-+ * Iterate through all group entries until a match is found.
- */
--
-- group = getgrnam(groupname);
-- endgrent();
--
-- if (group != NULL)
-+ setgrent();
-+ foundit=0;
-+ while(!foundit && (group=getgrent())!=NULL)
- {
- /*
-- * Group exists, check it...
-+ * If the group name doesn't match, move on...
- */
-+ if(strcasecmp(groupname, group->gr_name))
-+ continue;
-
-+ /*
-+ * First, check to see if group ID matches the user's group ID.
-+ */
-+ if(user && group->gr_gid == user->pw_gid)
-+ {
-+ foundit=1;
-+ break;
-+ }
-+
-+ /*
-+ * Check to see if the user is listed as a member of the group...
-+ */
- for (i = 0; group->gr_mem[i]; i ++)
- if (!strcasecmp(username, group->gr_mem[i]))
-- return (1);
-+ {
-+ foundit=1;
-+ break;
-+ }
- }
-+ endgrent();
-
- /*
-- * Group doesn't exist or user not in group list, check the group ID
-- * against the user's group ID...
-+ * If the group membership was confirmed, return.
- */
--
-- if (user && group && group->gr_gid == user->pw_gid)
-+ if(foundit)
- return (1);
-
- #ifdef HAVE_MBR_UID_TO_UUID
diff --git a/net-print/cups/files/cups-1.4.6-web-hang.patch b/net-print/cups/files/cups-1.4.6-web-hang.patch
deleted file mode 100644
index 6ccf05a..0000000
--- a/net-print/cups/files/cups-1.4.6-web-hang.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Index: cgi-bin/html.c
-===================================================================
---- cgi-bin/html.c (revision 9428)
-+++ cgi-bin/html.c (working copy)
-@@ -1,9 +1,9 @@
- /*
- * "$Id: cups-1.4.6-web-hang.patch,v 1.1 2011/04/30 15:39:45 scarabeus Exp $"
- *
-- * HTML support functions for the Common UNIX Printing System (CUPS).
-+ * HTML support functions for CUPS.
- *
-- * Copyright 2007-2009 by Apple Inc.
-+ * Copyright 2007-2011 by Apple Inc.
- * Copyright 1997-2006 by Easy Software Products.
- *
- * These coded instructions, statements, and computer programs are the
-@@ -208,31 +208,13 @@
- int /* O - 1 if multi-part supported, 0 otherwise */
- cgiSupportsMultipart(void)
- {
-- const char *user_agent; /* User-Agent string */
-- static int supports_multipart = -1;/* Cached value */
-+ /*
-+ * Too many bug reports for browsers that don't support it, and too much pain
-+ * to whitelist known-good browsers, so for now we just punt on multi-part
-+ * support... :(
-+ */
-
--
-- if (supports_multipart < 0)
-- {
-- /*
-- * CUPS STR #3049: Apparently some browsers don't support multi-part
-- * documents, which makes them useless for many web sites. Rather than
-- * abandoning those users, we'll offer a degraded single-part mode...
-- *
-- * Currently we know that anything based on Gecko, MSIE, and Safari all
-- * work. We'll add more as they are reported/tested.
-- */
--
-- if ((user_agent = getenv("HTTP_USER_AGENT")) != NULL &&
-- (strstr(user_agent, " Gecko/") != NULL ||
-- strstr(user_agent, " MSIE ") != NULL ||
-- strstr(user_agent, " Safari/") != NULL))
-- supports_multipart = 1;
-- else
-- supports_multipart = 0;
-- }
--
-- return (supports_multipart);
-+ return (0);
- }
-
-
diff --git a/net-print/cups/files/cupsd.init.d b/net-print/cups/files/cupsd.init.d
index e5529ee..1e9ccf8 100644
--- a/net-print/cups/files/cupsd.init.d
+++ b/net-print/cups/files/cupsd.init.d
@@ -9,6 +9,8 @@ depend() {
start() {
ebegin "Starting cupsd"
+ checkpath -q -d -m 0755 -o root:lp /var/run/cups
+ checkpath -q -d -m 0511 -o lp:lpadmin /var/run/cups/certs
start-stop-daemon --start --quiet --exec /usr/sbin/cupsd
eend $?
}