summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-print/cups/files/cups-1.3.4-CVE-2007-4045.patch')
-rw-r--r--net-print/cups/files/cups-1.3.4-CVE-2007-4045.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/net-print/cups/files/cups-1.3.4-CVE-2007-4045.patch b/net-print/cups/files/cups-1.3.4-CVE-2007-4045.patch
new file mode 100644
index 000000000000..aab1b213d018
--- /dev/null
+++ b/net-print/cups/files/cups-1.3.4-CVE-2007-4045.patch
@@ -0,0 +1,47 @@
+diff -up cups-1.3.4/scheduler/client.c.CVE-2007-4045 cups-1.3.4/scheduler/client.c
+--- cups-1.3.4/scheduler/client.c.CVE-2007-4045 2007-11-07 21:11:58.000000000 +0000
++++ cups-1.3.4/scheduler/client.c 2007-11-07 21:13:26.000000000 +0000
+@@ -114,6 +114,25 @@ static int write_file(cupsd_client_t *c
+ static void write_pipe(cupsd_client_t *con);
+
+
++void
++_cupsdFixClientsBIO(void)
++{
++#ifdef HAVE_LIBSSL
++ cupsd_client_t *c;
++ BIO *bio;
++ cupsArraySave (Clients);
++ for (c = (cupsd_client_t *)cupsArrayFirst(Clients);
++ c;
++ c = (cupsd_client_t *)cupsArrayNext(Clients))
++ {
++ bio = SSL_get_wbio(c->http.tls);
++ BIO_ctrl(bio, BIO_C_SET_FILE_PTR, 0, (char *)HTTP(c));
++ }
++ cupsArrayRestore (Clients);
++#endif
++}
++
++
+ /*
+ * 'cupsdAcceptClient()' - Accept a new client.
+ */
+@@ -451,6 +470,7 @@ cupsdAcceptClient(cupsd_listener_t *lis)
+ }
+
+ cupsArrayAdd(Clients, con);
++ _cupsdFixClientsBIO();
+
+ cupsdLogMessage(CUPSD_LOG_DEBUG2,
+ "cupsdAcceptClient: %d connected to server on %s:%d",
+@@ -735,6 +755,7 @@ cupsdCloseClient(cupsd_client_t *con) /*
+ */
+
+ cupsArrayRemove(Clients, con);
++ _cupsdFixClientsBIO();
+
+ free(con);
+ }
+diff -up cups-1.3.4/scheduler/main.c.CVE-2007-4045 cups-1.3.4/scheduler/main.c
+