diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2018-05-25 23:29:36 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 15:04:55 -0700 |
commit | d8220d28e5d53cd896b28d9dea13e2258923f35a (patch) | |
tree | 0ae3d22871d934a49ba1689084ba6fe301ee48e0 /patches/source/cups | |
parent | 5a12e7c134274dba706667107d10d231517d3e05 (diff) | |
download | current-13.0.tar.gz |
Fri May 25 23:29:36 UTC 201813.0
patches/packages/glibc-zoneinfo-2018e-noarch-2_slack13.0.txz: Rebuilt.
Handle removal of US/Pacific-New timezone. If we see that the machine is
using this, it will be automatically switched to US/Pacific.
Diffstat (limited to 'patches/source/cups')
-rw-r--r-- | patches/source/cups/cups-1.3.x.CVE-2010-0542.diff | 25 | ||||
-rw-r--r-- | patches/source/cups/cups-1.3.x.CVE-2010-2941.diff | 44 | ||||
-rwxr-xr-x | patches/source/cups/cups.SlackBuild | 185 | ||||
-rw-r--r-- | patches/source/cups/cups.firefox.desktop.diff | 11 | ||||
-rw-r--r-- | patches/source/cups/doinst.sh | 28 | ||||
-rw-r--r-- | patches/source/cups/slack-desc | 19 | ||||
-rw-r--r-- | patches/source/cups/str4609-1.3.patch | 324 |
7 files changed, 636 insertions, 0 deletions
diff --git a/patches/source/cups/cups-1.3.x.CVE-2010-0542.diff b/patches/source/cups/cups-1.3.x.CVE-2010-0542.diff new file mode 100644 index 00000000..6c234f03 --- /dev/null +++ b/patches/source/cups/cups-1.3.x.CVE-2010-0542.diff @@ -0,0 +1,25 @@ +--- ./filter/texttops.c.orig 2008-10-09 15:12:03.000000000 -0500 ++++ ./filter/texttops.c 2010-11-27 12:42:33.000000000 -0600 +@@ -181,8 +181,20 @@ + exit(1); + } + +- Page = calloc(sizeof(lchar_t *), SizeLines); +- Page[0] = calloc(sizeof(lchar_t), SizeColumns * SizeLines); ++ if ((Page = calloc(sizeof(lchar_t *), SizeLines)) == NULL) ++ { ++ _cupsLangPrintf(stderr, _("ERROR: Unable to print %dx%d text page.\n"), ++ SizeColumns, SizeLines); ++ exit(1); ++ } ++ ++ if ((Page[0] = calloc(sizeof(lchar_t), SizeColumns * SizeLines)) == NULL) ++ { ++ _cupsLangPrintf(stderr, _("ERROR: Unable to print %dx%d text page.\n"), ++ SizeColumns, SizeLines); ++ exit(1); ++ } ++ + for (i = 1; i < SizeLines; i ++) + Page[i] = Page[0] + i * SizeColumns; + diff --git a/patches/source/cups/cups-1.3.x.CVE-2010-2941.diff b/patches/source/cups/cups-1.3.x.CVE-2010-2941.diff new file mode 100644 index 00000000..5dd4d7c0 --- /dev/null +++ b/patches/source/cups/cups-1.3.x.CVE-2010-2941.diff @@ -0,0 +1,44 @@ +--- ./cups/ipp.c.orig 2009-01-21 17:43:53.000000000 -0600 ++++ ./cups/ipp.c 2010-11-27 13:05:25.000000000 -0600 +@@ -1187,15 +1187,18 @@ + + attr->value_tag = tag; + } +- else if (value_tag >= IPP_TAG_TEXTLANG && +- value_tag <= IPP_TAG_MIMETYPE) ++ else if (value_tag == IPP_TAG_TEXTLANG || ++ value_tag == IPP_TAG_NAMELANG || ++ (value_tag >= IPP_TAG_TEXT && ++ value_tag <= IPP_TAG_MIMETYPE)) + { + /* + * String values can sometimes come across in different + * forms; accept sets of differing values... + */ + +- if (tag < IPP_TAG_TEXTLANG || tag > IPP_TAG_MIMETYPE) ++ if (tag != IPP_TAG_TEXTLANG && tag != IPP_TAG_NAMELANG && ++ (tag < IPP_TAG_TEXT || tag > IPP_TAG_MIMETYPE)) + return (IPP_ERROR); + } + else if (value_tag != tag) +@@ -2529,6 +2532,7 @@ + { + case IPP_TAG_TEXT : + case IPP_TAG_NAME : ++ case IPP_TAG_RESERVED_STRING : + case IPP_TAG_KEYWORD : + case IPP_TAG_URI : + case IPP_TAG_URISCHEME : +--- ./cups/ipp.h.orig 2008-07-11 17:48:49.000000000 -0500 ++++ ./cups/ipp.h 2010-11-27 13:05:25.000000000 -0600 +@@ -94,7 +94,8 @@ + IPP_TAG_END_COLLECTION, /* End of collection value */ + IPP_TAG_TEXT = 0x41, /* Text value */ + IPP_TAG_NAME, /* Name value */ +- IPP_TAG_KEYWORD = 0x44, /* Keyword value */ ++ IPP_TAG_RESERVED_STRING, /* Reserved for future string value @private@ */ ++ IPP_TAG_KEYWORD, /* Keyword value */ + IPP_TAG_URI, /* URI value */ + IPP_TAG_URISCHEME, /* URI scheme value */ + IPP_TAG_CHARSET, /* Character set value */ diff --git a/patches/source/cups/cups.SlackBuild b/patches/source/cups/cups.SlackBuild new file mode 100755 index 00000000..fc60430d --- /dev/null +++ b/patches/source/cups/cups.SlackBuild @@ -0,0 +1,185 @@ +#!/bin/sh + +# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# CUPS build script by volkerdi@slackware.com. + +VERSION=1.3.11 +BUILD=${BUILD:-3_slack13.0} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +NUMJOBS=${NUMJOBS:-" -j7 "} + +if [ "$ARCH" = "x86_64" ]; then + LIBDIRSUFFIX="64" +else + LIBDIRSUFFIX="" +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-cups + +rm -rf $PKG +mkdir -p $TMP $PKG + +cd $TMP +rm -rf cups-$VERSION +tar xvf $CWD/cups-$VERSION-source.tar.?z* || exit 1 +cd cups-$VERSION + +zcat $CWD/cups.firefox.desktop.diff.gz | patch -p1 --verbose || exit 1 + +zcat $CWD/cups-1.3.x.CVE-2010-0542.diff.gz | patch -p1 --verbose || exit 1 +zcat $CWD/cups-1.3.x.CVE-2010-2941.diff.gz | patch -p1 --verbose || exit 1 +zcat $CWD/str4609-1.3.patch.gz | patch -p0 --verbose --ignore-whitespace || exit 1 + +sed -i.orig -e 's#$exec_prefix/lib/cups#$libdir/cups#g' configure +./configure \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --enable-ssl \ + --enable-openssl=yes \ + --enable-gnutls=no \ + --enable-cdsassl=no \ + --docdir=/usr/doc \ + --without-php \ + --disable-pam \ + --build=$ARCH-slackware-linux + +make $NUMJOBS || exit 1 +mkdir -p $PKG/etc/cups +mkdir -p $PKG/var/spool +make BUILDROOT=$PKG install || exit 1 + +# I've added so many things like /etc/init.d/ to Slackware that CUPS +# is now installing init scripts to the Red Hat locations. We'll move +# them to the usual locations: +mkdir -p $PKG/etc/rc.d +# Handle this as a config file, and non-executable in a default install: +mv $PKG/etc/init.d/cups $PKG/etc/rc.d/rc.cups.new +chmod 644 $PKG/etc/rc.d/rc.cups.new +# Clear out the additions: +rm -rf $PKG/etc/init.d $PKG/etc/rc{0,2,3,5}.d + +# I'm not sure if overwriting this blindly could have ill effects, +# but it never hurts to play it safe. According to the dbus-daemon +# manpage, only files ending in .conf will be used, so there won't +# be any unintended doubling up. +mv $PKG/etc/dbus-1/system.d/cups.conf $PKG/etc/dbus-1/system.d/cups.conf.new + +# For full CUPS SMB support, you'll need to install the cups-samba +# package from the source in this directory. There's no easy way +# to add that to a package build, and the requests aren't pouring in, +# so you'll have to install it yourself. It's easy to do. + +# However, this will get you the most useful SMB support for free. +# Thanks to Boris Kurktchiev for the tip. :-) +( cd $PKG/usr/lib${LIBDIRSUFFIX}/cups/backend + if [ ! -e smb ]; then + ln -sf /usr/bin/smbspool smb + fi +) + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# Remove preformatted manpages and move the manpages to /usr/man: +( cd $PKG/usr/share/man + find . -type d -name "cat*" | xargs rm -rf + cd .. + mv man .. +) + +# Adjust/expand docs: +( mkdir -p $PKG/usr/doc + mv $PKG/usr/share/doc/cups $PKG/usr/doc/cups-$VERSION + rmdir $PKG/usr/share/doc + cd $PKG/usr/doc + ln -sf cups-$VERSION cups ) + +# I'm sorry, but PDF files are almost as bloated and annoying as +# MS Word documents. We'll retain the HTML files in /usr/doc. +( cd $PKG/usr/doc + find . -name "*.pdf" -exec rm -f {} \; ) + +# Apply no-clobber fix to conffiles: +( cd $PKG/etc/cups + for file in * ; do + if [ -f $file ]; then + mv $file $file.new + fi + done ) + +# Strip stuff: +find $PKG | xargs file | grep -e "executable" -e "shared object" \ + | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +# Use symlinks to certain binaries so that CUPS and LPRng can coexist: +SUFFIX=cups +for file in \ +usr/bin/cancel \ +usr/bin/lp \ +usr/bin/lpq \ +usr/bin/lpr \ +usr/bin/lprm \ +usr/bin/lpstat \ +usr/sbin/lpc ; do + ( cd $PKG + mv ${file} ${file}-${SUFFIX} + ( cd `dirname ${file}` ; ln -sf `basename ${file}`-${SUFFIX} `basename ${file}` ) + ) +done +# Now fix the associated man pages: +mv $PKG/usr/man/man1/cancel.1.gz $PKG/usr/man/man1/cancel-${SUFFIX}.1.gz +mv $PKG/usr/man/man1/lp.1.gz $PKG/usr/man/man1/lp-${SUFFIX}.1.gz +mv $PKG/usr/man/man1/lpq.1.gz $PKG/usr/man/man1/lpq-${SUFFIX}.1.gz +mv $PKG/usr/man/man1/lpr.1.gz $PKG/usr/man/man1/lpr-${SUFFIX}.1.gz +mv $PKG/usr/man/man1/lprm.1.gz $PKG/usr/man/man1/lprm-${SUFFIX}.1.gz +mv $PKG/usr/man/man1/lpstat.1.gz $PKG/usr/man/man1/lpstat-${SUFFIX}.1.gz +mv $PKG/usr/man/man8/lpc.8.gz $PKG/usr/man/man8/lpc-${SUFFIX}.8.gz +( cd $PKG/usr/man/man1 + ln -sf cancel-${SUFFIX}.1.gz cancel.1.gz + ln -sf lp-${SUFFIX}.1.gz lp.1.gz + ln -sf lpq-${SUFFIX}.1.gz lpq.1.gz + ln -sf lpr-${SUFFIX}.1.gz lpr.1.gz + ln -sf lprm-${SUFFIX}.1.gz lprm.1.gz + ln -sf lpstat-${SUFFIX}.1.gz lpstat.1.gz +) +( cd $PKG/usr/man/man8 + ln -sf lpc-${SUFFIX}.8.gz lpc.8.gz +) + +# Add the doinst.sh that installs the .new conffiles: +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh + +# Build the package: +cd $PKG +/sbin/makepkg -l y -c n $TMP/cups-$VERSION-$ARCH-$BUILD.txz + diff --git a/patches/source/cups/cups.firefox.desktop.diff b/patches/source/cups/cups.firefox.desktop.diff new file mode 100644 index 00000000..96affd5a --- /dev/null +++ b/patches/source/cups/cups.firefox.desktop.diff @@ -0,0 +1,11 @@ +diff -u -r --new-file cups-1.3.11.orig/desktop/cups.desktop cups-1.3.11/desktop/cups.desktop +--- cups-1.3.11.orig/desktop/cups.desktop 2008-09-05 19:30:39.000000000 -0500 ++++ cups-1.3.11/desktop/cups.desktop 2009-08-21 20:18:23.604682681 -0500 +@@ -1,6 +1,6 @@ + [Desktop Entry] + Categories=System;Printing;HardwareSettings;X-Red-Hat-Base; +-Exec=htmlview http://localhost:631/ ++Exec=firefox http://localhost:631/ + Icon=cups + StartupNotify=false + Terminal=false diff --git a/patches/source/cups/doinst.sh b/patches/source/cups/doinst.sh new file mode 100644 index 00000000..3f56dab3 --- /dev/null +++ b/patches/source/cups/doinst.sh @@ -0,0 +1,28 @@ +config() { + NEW="$1" + OLD="`dirname $NEW`/`basename $NEW .new`" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} +for file in etc/cups/*.new ; do + config $file +done +config etc/dbus-1/system.d/cups.conf.new + +# Leave any new rc.cups with the same permissions as the old one: +# This is a kludge, but it's because there's no --reference option +# on busybox's 'chmod': +if [ -e etc/rc.d/rc.cups ]; then + if [ -x etc/rc.d/rc.cups ]; then + chmod 755 etc/rc.d/rc.cups.new + else + chmod 644 etc/rc.d/rc.cups.new + fi +fi +# Then config() it: +config etc/rc.d/rc.cups.new diff --git a/patches/source/cups/slack-desc b/patches/source/cups/slack-desc new file mode 100644 index 00000000..c2e1643c --- /dev/null +++ b/patches/source/cups/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' on +# the right side marks the last column you can put a character in. You must make +# exactly 11 lines for the formatting to be correct. It's also customary to +# leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +cups: CUPS (Common UNIX Printing System) +cups: +cups: The Common UNIX Printing System provides a portable printing layer for +cups: UNIX(R)-like operating systems. It has been developed by Easy Software +cups: Products to promote a standard printing solution for all UNIX vendors +cups: and users. CUPS uses the Internet Printing Protocol ("IPP") as the +cups: basis for managing print jobs and queues. The CUPS package includes +cups: System V and Berkeley command-line interfaces, a PostScript RIP +cups: package for supporting non-PostScript printer drivers, and tools for +cups: creating additional printer drivers and other CUPS services. +cups: diff --git a/patches/source/cups/str4609-1.3.patch b/patches/source/cups/str4609-1.3.patch new file mode 100644 index 00000000..da4664a0 --- /dev/null +++ b/patches/source/cups/str4609-1.3.patch @@ -0,0 +1,324 @@ +Index: cgi-bin/ipp-var.c +=================================================================== +--- cgi-bin/ipp-var.c (revision 12588) ++++ cgi-bin/ipp-var.c (working copy) +@@ -1048,21 +1048,7 @@ + * Rewrite URIs... + */ + +- if (!strcmp(name, "member_uris")) +- { +- char url[1024]; /* URL for class member... */ +- +- +- cgiRewriteURL(attr->values[i].string.text, url, +- sizeof(url), NULL); +- +- snprintf(valptr, sizeof(value) - (valptr - value), +- "<A HREF=\"%s\">%s</A>", url, +- strrchr(attr->values[i].string.text, '/') + 1); +- } +- else +- cgiRewriteURL(attr->values[i].string.text, valptr, +- sizeof(value) - (valptr - value), NULL); ++ cgiRewriteURL(attr->values[i].string.text, valptr, sizeof(value) - (valptr - value), NULL); + break; + } + +Index: cgi-bin/template.c +=================================================================== +--- cgi-bin/template.c (revision 12588) ++++ cgi-bin/template.c (working copy) +@@ -602,39 +602,7 @@ + while (*s) + { + if (*s == '<') +- { +- /* +- * Pass <A HREF="url"> and </A>, otherwise quote it... +- */ +- +- if (!strncasecmp(s, "<A HREF=\"", 9)) +- { +- fputs("<A HREF=\"", out); +- s += 9; +- +- while (*s && *s != '\"') +- { +- if (*s == '&') +- fputs("&", out); +- else +- putc(*s, out); +- +- s ++; +- } +- +- if (*s) +- s ++; +- +- fputs("\">", out); +- } +- else if (!strncasecmp(s, "</A>", 4)) +- { +- fputs("</A>", out); +- s += 3; +- } +- else +- fputs("<", out); +- } ++ fputs("<", out); + else if (*s == '>') + fputs(">", out); + else if (*s == '\"') +Index: scheduler/ipp.c +=================================================================== +--- scheduler/ipp.c (revision 12588) ++++ scheduler/ipp.c (working copy) +@@ -463,8 +463,8 @@ + * Remote unauthenticated user masquerading as local root... + */ + +- _cupsStrFree(username->values[0].string.text); +- username->values[0].string.text = _cupsStrAlloc(RemoteRoot); ++ _cupsStrFree(username->values[0].string.text); ++ username->values[0].string.text = _cupsStrAlloc(RemoteRoot); + } + } + +@@ -1517,7 +1517,10 @@ + cupsdSetString(&job->username, con->username); + + if (attr) +- cupsdSetString(&attr->values[0].string.text, con->username); ++ { ++ _cupsStrFree(attr->values[0].string.text); ++ attr->values[0].string.text = _cupsStrAlloc(con->username); ++ } + } + else if (attr) + { +@@ -1568,48 +1571,11 @@ + * Also, we can only have 1 value and it must be a name value. + */ + +- switch (attr->value_tag) +- { +- case IPP_TAG_STRING : +- case IPP_TAG_TEXTLANG : +- case IPP_TAG_NAMELANG : +- case IPP_TAG_TEXT : +- case IPP_TAG_NAME : +- case IPP_TAG_KEYWORD : +- case IPP_TAG_URI : +- case IPP_TAG_URISCHEME : +- case IPP_TAG_CHARSET : +- case IPP_TAG_LANGUAGE : +- case IPP_TAG_MIMETYPE : +- /* +- * Free old strings... +- */ +- +- for (i = 0; i < attr->num_values; i ++) +- { +- _cupsStrFree(attr->values[i].string.text); +- attr->values[i].string.text = NULL; +- if (attr->values[i].string.charset) +- { +- _cupsStrFree(attr->values[i].string.charset); +- attr->values[i].string.charset = NULL; +- } +- } +- +- default : +- break; +- } +- +- /* +- * Use the default connection hostname instead... +- */ +- +- attr->value_tag = IPP_TAG_NAME; +- attr->num_values = 1; +- attr->values[0].string.text = _cupsStrAlloc(con->http.hostname); ++ ippDeleteAttribute(job->attrs, attr); ++ ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-originating-host-name", NULL, con->http.hostname); + } +- +- attr->group_tag = IPP_TAG_JOB; ++ else ++ attr->group_tag = IPP_TAG_JOB; + } + else + { +@@ -1731,7 +1697,8 @@ + * Force the leading banner to have the classification on it... + */ + +- cupsdSetString(&attr->values[0].string.text, Classification); ++ _cupsStrFree(attr->values[0].string.text); ++ attr->values[0].string.text = _cupsStrAlloc(Classification); + + cupsdLogMessage(CUPSD_LOG_NOTICE, "[Job %d] CLASSIFICATION FORCED " + "job-sheets=\"%s,none\", " +@@ -1748,7 +1715,8 @@ + * Can't put two different security markings on the same document! + */ + +- cupsdSetString(&attr->values[1].string.text, attr->values[0].string.text); ++ _cupsStrFree(attr->values[1].string.text); ++ attr->values[1].string.text = _cupsStrAlloc(attr->values[0].string.text); + + cupsdLogMessage(CUPSD_LOG_NOTICE, "[Job %d] CLASSIFICATION FORCED " + "job-sheets=\"%s,%s\", " +@@ -1788,18 +1756,26 @@ + if (attr->num_values > 1 && + !strcmp(attr->values[0].string.text, attr->values[1].string.text)) + { +- cupsdSetString(&(attr->values[0].string.text), Classification); +- cupsdSetString(&(attr->values[1].string.text), Classification); ++ _cupsStrFree(attr->values[0].string.text); ++ attr->values[0].string.text = _cupsStrAlloc(Classification); ++ _cupsStrFree(attr->values[1].string.text); ++ attr->values[1].string.text = _cupsStrAlloc(Classification); + } + else + { + if (attr->num_values == 1 || + strcmp(attr->values[0].string.text, "none")) +- cupsdSetString(&(attr->values[0].string.text), Classification); ++ { ++ _cupsStrFree(attr->values[0].string.text); ++ attr->values[0].string.text = _cupsStrAlloc(Classification); ++ } + + if (attr->num_values > 1 && + strcmp(attr->values[1].string.text, "none")) +- cupsdSetString(&(attr->values[1].string.text), Classification); ++ { ++ _cupsStrFree(attr->values[1].string.text); ++ attr->values[1].string.text = _cupsStrAlloc(Classification); ++ } + } + + if (attr->num_values > 1) +@@ -3088,7 +3064,8 @@ + if (attr) + { + attr->value_tag = IPP_TAG_KEYWORD; +- cupsdSetString(&(attr->values[0].string.text), "no-hold"); ++ _cupsStrFree(attr->values[0].string.text); ++ attr->values[0].string.text = _cupsStrAlloc("no-hold"); + } + + /* +@@ -7665,7 +7642,6 @@ + if (format) + { + _cupsStrFree(format->values[0].string.text); +- + format->values[0].string.text = _cupsStrAlloc(mimetype); + } + else +@@ -8137,9 +8113,8 @@ + + if (attr) + { ++ attr->value_tag = IPP_TAG_KEYWORD; + _cupsStrFree(attr->values[0].string.text); +- +- attr->value_tag = IPP_TAG_KEYWORD; + attr->values[0].string.text = _cupsStrAlloc("no-hold"); + + cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, job->printer, job, +@@ -8894,7 +8869,6 @@ + if (jformat) + { + _cupsStrFree(jformat->values[0].string.text); +- + jformat->values[0].string.text = _cupsStrAlloc(mimetype); + } + else +Index: scheduler/job.c +=================================================================== +--- scheduler/job.c (revision 12588) ++++ scheduler/job.c (working copy) +@@ -393,7 +393,8 @@ + if (attr) + { + attr->value_tag = IPP_TAG_KEYWORD; +- cupsdSetString(&(attr->values[0].string.text), "no-hold"); ++ _cupsStrFree(attr->values[0].string.text); ++ attr->values[0].string.text = _cupsStrAlloc("no-hold"); + cupsdSaveJob(job); + } + } +@@ -457,7 +458,10 @@ + + if ((attr = ippFindAttribute(job->attrs, "job-actual-printer-uri", + IPP_TAG_URI)) != NULL) +- cupsdSetString(&attr->values[0].string.text, printer->uri); ++ { ++ _cupsStrFree(attr->values[0].string.text); ++ attr->values[0].string.text = _cupsStrAlloc(printer->uri); ++ } + else + ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI, + "job-actual-printer-uri", NULL, printer->uri); +@@ -468,7 +472,7 @@ + ((printer->type & CUPS_PRINTER_DISCOVERED) && /* Printer is remote */ + !printer->job)) /* and not printing */ + { +- /* ++ /* + * Clear any message and reasons for the queue... + */ + +@@ -761,8 +765,8 @@ + if (attr) + { + attr->value_tag = IPP_TAG_KEYWORD; +- cupsdSetString(&(attr->values[0].string.text), +- "auth-info-required"); ++ _cupsStrFree(attr->values[0].string.text); ++ attr->values[0].string.text = _cupsStrAlloc("auth-info-required"); + } + + job->state->values[0].integer = IPP_JOB_HELD; +@@ -1350,7 +1354,10 @@ + + if ((attr = ippFindAttribute(job->attrs, "job-printer-uri", + IPP_TAG_URI)) != NULL) +- cupsdSetString(&(attr->values[0].string.text), p->uri); ++ { ++ _cupsStrFree(attr->values[0].string.text); ++ attr->values[0].string.text = _cupsStrAlloc(p->uri); ++ } + + cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, p, job, + "Job #%d moved from %s to %s.", job->id, olddest, +@@ -2425,7 +2432,10 @@ + ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_KEYWORD, "job-hold-until", + NULL, holdstr); + else +- cupsdSetString(&attr->values[0].string.text, holdstr); ++ { ++ _cupsStrFree(attr->values[0].string.text); ++ attr->values[0].string.text = _cupsStrAlloc(holdstr); ++ } + + cupsdSaveJob(job); + } +@@ -3880,9 +3890,10 @@ + */ + + if (job->printer->state_message[0]) +- cupsdSetString(&(job->printer_message->values[0].string.text), +- job->printer->state_message); +- ++ { ++ _cupsStrFree(job->printer_message->values[0].string.text); ++ job->printer_message->values[0].string.text = _cupsStrAlloc(job->printer->state_message); ++ } + /* + * ... and the printer-state-reasons value... + */ |