From b7255586dee6815ff6bd0e0278882f6fd6a3e7c9 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 1 Sep 2014 10:17:39 +0100 Subject: [PATCH] More STR #4461 fixes from upstream. --- cups-str4461.patch | 86 ++++++++++++++++++++++++++++++++++++++++++++-- cups.spec | 5 ++- 2 files changed, 87 insertions(+), 4 deletions(-) diff --git a/cups-str4461.patch b/cups-str4461.patch index 44152c9..b44562c 100644 --- a/cups-str4461.patch +++ b/cups-str4461.patch @@ -1,6 +1,62 @@ +diff -up cups-1.7.5/notifier/rss.c.str4461 cups-1.7.5/notifier/rss.c +--- cups-1.7.5/notifier/rss.c.str4461 2013-05-29 12:51:34.000000000 +0100 ++++ cups-1.7.5/notifier/rss.c 2014-09-01 10:16:34.088149082 +0100 +@@ -1,27 +1,16 @@ + /* + * "$Id: rss.c 10996 2013-05-29 11:51:34Z msweet $" + * +- * RSS notifier for CUPS. ++ * RSS notifier for CUPS. + * +- * Copyright 2007-2012 by Apple Inc. +- * Copyright 2007 by Easy Software Products. ++ * Copyright 2007-2014 by Apple Inc. ++ * Copyright 2007 by Easy Software Products. + * +- * These coded instructions, statements, and computer programs are the +- * property of Apple Inc. and are protected by Federal copyright +- * law. Distribution and use rights are outlined in the file "LICENSE.txt" +- * which should have been included with this file. If this file is +- * file is missing or damaged, see the license at "http://www.cups.org/". +- * +- * Contents: +- * +- * main() - Main entry for the test notifier. +- * compare_rss() - Compare two messages. +- * delete_message() - Free all memory used by a message. +- * load_rss() - Load an existing RSS feed file. +- * new_message() - Create a new RSS message. +- * password_cb() - Return the cached password. +- * save_rss() - Save messages to a RSS file. +- * xml_escape() - Copy a string, escaping &, <, and > as needed. ++ * These coded instructions, statements, and computer programs are the ++ * property of Apple Inc. and are protected by Federal copyright ++ * law. Distribution and use rights are outlined in the file "LICENSE.txt" ++ * which should have been included with this file. If this file is ++ * file is missing or damaged, see the license at "http://www.cups.org/". + */ + + /* +@@ -29,6 +18,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -629,6 +619,8 @@ save_rss(cups_array_t *rss, /* I - RSS + return (0); + } + ++ fchmod(fileno(fp), 0644); ++ + fputs("\n", fp); + fputs("\n", fp); + fputs(" \n", fp); diff -up cups-1.7.5/scheduler/client.c.str4461 cups-1.7.5/scheduler/client.c --- cups-1.7.5/scheduler/client.c.str4461 2014-07-22 15:03:19.000000000 +0100 -+++ cups-1.7.5/scheduler/client.c 2014-08-26 14:58:04.461055778 +0100 ++++ cups-1.7.5/scheduler/client.c 2014-09-01 10:15:51.970947105 +0100 @@ -3263,6 +3263,7 @@ get_file(cupsd_client_t *con, /* I - C char *ptr; /* Pointer info filename */ int plen; /* Remaining length after pointer */ @@ -66,9 +122,21 @@ diff -up cups-1.7.5/scheduler/client.c.str4461 cups-1.7.5/scheduler/client.c { cupsdLogMessage(CUPSD_LOG_INFO, "[Client %d] Files/directories such as \"%s\" must be world-readable.", con->http.fd, filename); return (NULL); +diff -up cups-1.7.5/scheduler/conf.c.str4461 cups-1.7.5/scheduler/conf.c +--- cups-1.7.5/scheduler/conf.c.str4461 2014-09-01 10:15:51.968947096 +0100 ++++ cups-1.7.5/scheduler/conf.c 2014-09-01 10:16:52.624237974 +0100 +@@ -1092,7 +1092,7 @@ cupsdReadConfiguration(void) + + if ((cupsdCheckPermissions(RequestRoot, NULL, 0710, RunUser, + Group, 1, 1) < 0 || +- cupsdCheckPermissions(CacheDir, NULL, 0775, RunUser, ++ cupsdCheckPermissions(CacheDir, NULL, 0770, RunUser, + Group, 1, 1) < 0 || + cupsdCheckPermissions(temp, NULL, 0775, RunUser, + Group, 1, 1) < 0 || diff -up cups-1.7.5/scheduler/ipp.c.str4461 cups-1.7.5/scheduler/ipp.c ---- cups-1.7.5/scheduler/ipp.c.str4461 2014-08-26 14:57:56.387013559 +0100 -+++ cups-1.7.5/scheduler/ipp.c 2014-08-26 14:58:04.467055810 +0100 +--- cups-1.7.5/scheduler/ipp.c.str4461 2014-09-01 10:15:51.848946520 +0100 ++++ cups-1.7.5/scheduler/ipp.c 2014-09-01 10:15:51.972947115 +0100 @@ -2743,7 +2743,6 @@ add_printer(cupsd_client_t *con, /* I - cupsdLogMessage(CUPSD_LOG_DEBUG, @@ -95,3 +163,15 @@ diff -up cups-1.7.5/scheduler/ipp.c.str4461 cups-1.7.5/scheduler/ipp.c } +diff -up cups-1.7.5/scheduler/Makefile.str4461 cups-1.7.5/scheduler/Makefile +--- cups-1.7.5/scheduler/Makefile.str4461 2014-09-01 10:15:51.965947081 +0100 ++++ cups-1.7.5/scheduler/Makefile 2014-09-01 10:16:52.624237974 +0100 +@@ -174,7 +174,7 @@ install-data: + echo Creating $(REQUESTS)/tmp... + $(INSTALL_DIR) -m 1770 -g $(CUPS_GROUP) $(REQUESTS)/tmp + echo Creating $(CACHEDIR)... +- $(INSTALL_DIR) -m 775 -g $(CUPS_GROUP) $(CACHEDIR) ++ $(INSTALL_DIR) -m 770 -g $(CUPS_GROUP) $(CACHEDIR) + if test "x$(INITDIR)" != x; then \ + echo Installing init scripts...; \ + $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \ diff --git a/cups.spec b/cups.spec index 2063920..4086624 100644 --- a/cups.spec +++ b/cups.spec @@ -11,7 +11,7 @@ Summary: CUPS printing system Name: cups Epoch: 1 Version: 1.7.5 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Url: http://www.cups.org/ Source: http://www.cups.org/software/%{version}/cups-%{version}-source.tar.bz2 @@ -650,6 +650,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man5/ipptoolfile.5.gz %changelog +* Mon Sep 1 2014 Tim Waugh - 1:1.7.5-5 +- More STR #4461 fixes from upstream. + * Tue Aug 26 2014 Tim Waugh - 1:1.7.5-4 - Use upstream patch for STR #4461.