CHANGES-1.3.txt
---------------
+CHANGES IN CUPS V1.3.5
+
+ - The scheduler incorrectly sent the
+ "com.apple.printerListChanged" message for printer state
+ changes.
+ - The PostScript filter drew the page borders (when enabled)
+ outside the imageable area.
+ - The LPD and IPP backends did not default to the correct
+ port numbers when using alternate scheme names.
+ - The scheduler incorrectly deleted hardwired remote printers
+ on system sleep.
+ - The scheduler would abort if a bad browse protocol name
+ was listed in the cupsd.conf file.
+ - The online cupsd.conf help file incorrectly showed "dns-sd"
+ instead of "dnssd" for Bonjour sharing.
+ - The scheduler could crash changing the port-monitor value.
+ - The scheduler generated CoreFoundation errors when run
+ as a background process.
+ - When printing with number-up > 1, it was possible to get
+ an extra blank page.
+
+
CHANGES IN CUPS V1.3.4
- - Documentation updates (STR #2560, STR #2563)
+ - Documentation updates (STR #2560, STR #2563, STR #2569)
+ - CUPS now maps the "nb" locale to "no" on all platforms
+ (STR #2575)
+ - CUPS did not work with a Windows 2003 R2 KDC (STR #2568)
+ - ippReadIO() could read past the end of a buffer (STR
+ #2561)
+ - The scheduler would crash on shutdown if it was unable
+ to create a Kerberos context.
- Multiple AuthTypes in cupsd.conf did not work (STR
#2545)
- The snmp.conf file referenced the wrong man page (STR
fi
if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
$(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
- if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
- echo Installing StartupItems files...; \
- $(INSTALL_SCRIPT) init/PrintingServices $(BUILDROOT)$(INITDDIR)/PrintingServices; \
- $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
- $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
- $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
- elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
+ if test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
echo Installing LaunchDaemons configuration files...; \
$(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
$(INSTALL_DATA) init/org.cups.cups-lpd.plist $(BUILDROOT)/System/Library/LaunchDaemons; \
return (CUPS_BACKEND_STOP);
}
+ if (!port)
+ port = IPP_PORT; /* Default to port 631 */
+
if (!strcmp(method, "https"))
cupsSetEncryption(HTTP_ENCRYPT_ALWAYS);
else
hostname, sizeof(hostname), &port,
resource, sizeof(resource));
+ if (!port)
+ port = 515; /* Default to port 515 */
+
if (!username[0])
{
/*
language.h \
ppd.h \
sidechannel.h \
- transcode.h
+ transcode.h \
+ versioning.h
#
char prompt[1024], /* Prompt for user */
realm[HTTP_MAX_VALUE], /* realm="xyz" string */
nonce[HTTP_MAX_VALUE], /* nonce="xyz" string */
- encode[2048]; /* Encoded username:password */
+ encode[4096]; /* Encoded username:password */
int localauth; /* Local authentication result */
_cups_globals_t *cg; /* Global data */
{ "page-top-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ "penwidth", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ "penwidth-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
+ { "port-monitor", IPP_TAG_NAME, IPP_TAG_PRINTER },
{ "ppi", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ "ppi-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ "prettyprint", IPP_TAG_BOOLEAN, IPP_TAG_JOB },
ipp_t *ipp) /* I - IPP data */
{
int n; /* Length of data */
- unsigned char buffer[32768], /* Data buffer */
- string[255], /* Small string buffer */
+ unsigned char buffer[IPP_MAX_LENGTH],
+ /* Data buffer */
+ string[IPP_MAX_NAME],
+ /* Small string buffer */
*bufptr; /* Pointer into buffer */
ipp_attribute_t *attr; /* Current attribute */
ipp_tag_t tag; /* Current tag */
{
case IPP_TAG_INTEGER :
case IPP_TAG_ENUM :
+ if (n != 4)
+ {
+ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
+ return (IPP_ERROR);
+ }
+
if ((*cb)(src, buffer, 4) < 4)
{
DEBUG_puts("ippReadIO: Unable to read integer value!");
value->integer = n;
break;
case IPP_TAG_BOOLEAN :
+ if (n != 1)
+ {
+ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
+ return (IPP_ERROR);
+ }
+
if ((*cb)(src, buffer, 1) < 1)
{
DEBUG_puts("ippReadIO: Unable to read boolean value!");
case IPP_TAG_CHARSET :
case IPP_TAG_LANGUAGE :
case IPP_TAG_MIMETYPE :
+ if (n >= sizeof(buffer))
+ {
+ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
+ return (IPP_ERROR);
+ }
+
if ((*cb)(src, buffer, n) < n)
{
DEBUG_puts("ippReadIO: unable to read name!");
value->string.text));
break;
case IPP_TAG_DATE :
+ if (n != 11)
+ {
+ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
+ return (IPP_ERROR);
+ }
+
if ((*cb)(src, value->date, 11) < 11)
{
DEBUG_puts("ippReadIO: Unable to date integer value!");
}
break;
case IPP_TAG_RESOLUTION :
+ if (n != 9)
+ {
+ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
+ return (IPP_ERROR);
+ }
+
if ((*cb)(src, buffer, 9) < 9)
{
DEBUG_puts("ippReadIO: Unable to read resolution value!");
(ipp_res_t)buffer[8];
break;
case IPP_TAG_RANGE :
+ if (n != 8)
+ {
+ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
+ return (IPP_ERROR);
+ }
+
if ((*cb)(src, buffer, 8) < 8)
{
DEBUG_puts("ippReadIO: Unable to read range value!");
break;
case IPP_TAG_TEXTLANG :
case IPP_TAG_NAMELANG :
- if (n > sizeof(buffer) || n < 4)
+ if (n >= sizeof(buffer) || n < 4)
{
DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
return (IPP_ERROR);
n = (bufptr[0] << 8) | bufptr[1];
- if (n >= sizeof(string))
+ if ((bufptr + 2 + n) >= (buffer + sizeof(buffer)) ||
+ n >= sizeof(string))
{
- memcpy(string, bufptr + 2, sizeof(string) - 1);
- string[sizeof(string) - 1] = '\0';
+ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
+ return (IPP_ERROR);
}
- else
- {
- memcpy(string, bufptr + 2, n);
- string[n] = '\0';
- }
+
+ memcpy(string, bufptr + 2, n);
+ string[n] = '\0';
value->string.charset = _cupsStrAlloc((char *)string);
bufptr += 2 + n;
n = (bufptr[0] << 8) | bufptr[1];
+ if ((bufptr + 2 + n) >= (buffer + sizeof(buffer)))
+ {
+ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
+ return (IPP_ERROR);
+ }
+
bufptr[2 + n] = '\0';
value->string.text = _cupsStrAlloc((char *)bufptr + 2);
break;
* we need to carry over...
*/
+ if (n >= sizeof(buffer))
+ {
+ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
+ return (IPP_ERROR);
+ }
+
if ((*cb)(src, buffer, n) < n)
{
DEBUG_puts("ippReadIO: Unable to read member name value!");
break;
default : /* Other unsupported values */
+ if (n > sizeof(buffer))
+ {
+ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
+ return (IPP_ERROR);
+ }
+
value->unknown.length = n;
if (n > 0)
{
{
int i; /* Looping var */
int n; /* Length of data */
- unsigned char buffer[32768], /* Data buffer */
+ unsigned char buffer[IPP_MAX_LENGTH + 2],
+ /* Data buffer + length bytes */
*bufptr; /* Pointer into buffer */
ipp_attribute_t *attr; /* Current attribute */
ipp_value_t *value; /* Current value */
/*
* All simple strings consist of the 2-byte length and
* character data without the trailing nul normally found
- * in C strings. Also, strings cannot be longer than 32767
+ * in C strings. Also, strings cannot be longer than IPP_MAX_LENGTH
* bytes since the 2-byte length is a signed (twos-complement)
* value.
*
* Common limits...
*/
-# define IPP_MAX_NAME 256
+# define IPP_MAX_LENGTH 32767 /* Maximum size of any single value */
+# define IPP_MAX_NAME 256 /* Maximum length of common name values */
# define IPP_MAX_VALUES 8 /* Power-of-2 allocation increment */
strlcpy(locale, ptr, sizeof(locale));
language = locale;
- DEBUG_printf(("cupsLangGet: new language value is \"%s\"\n",
- language ? language : "(null)"));
+ /*
+ * CUPS STR #2575: Map "nb" to "no" for back-compatibility...
+ */
+
+ if (!strncmp(locale, "nb", 2))
+ locale[1] = 'o';
+
+ DEBUG_printf(("cupsLangGet: new language value is \"%s\"\n", language));
}
}
#endif /* __APPLE__ */
BrowseLocalProtocols all
BrowseLocalProtocols none
BrowseLocalProtocols cups
-BrowseLocalProtocols dns-sd
+BrowseLocalProtocols dnssd
BrowseLocalProtocols ldap
BrowseLocalProtocols slp
-BrowseLocalProtocols cups dns-sd
+BrowseLocalProtocols cups dnssd
</PRE>
<H3>Description</H3>
BrowseProtocols all
BrowseProtocols none
BrowseProtocols cups
-BrowseProtocols dns-sd
+BrowseProtocols dnssd
BrowseProtocols ldap
BrowseProtocols slp
-BrowseProtocols cups dns-sd
+BrowseProtocols cups dnssd
</PRE>
<H3>Description</H3>
BrowseRemoteProtocols all
BrowseRemoteProtocols none
BrowseRemoteProtocols cups
-BrowseRemoteProtocols dns-sd
+BrowseRemoteProtocols dnssd
BrowseRemoteProtocols ldap
BrowseRemoteProtocols slp
-BrowseRemoteProtocols cups dns-sd
+BrowseRemoteProtocols cups dnssd
</PRE>
<H3>Description</H3>
<pre class='command'>
<em>*% Base JCL key code option</em>
-*OpenUI JCLPasscode/Key Code: PickOne
+*JCLOpenUI JCLPasscode/Key Code: PickOne
*OrderDependency: 10 JCLSetup *JCLPasscode
*DefaultJCLPasscode: None
*JCLPasscode None/No Code: ""
* Finish up the last page(s)...
*/
- if (number && is_not_last_page(number) && cupsArrayLast(doc->pages))
+ if (number && !is_first_page(number) && cupsArrayLast(doc->pages))
{
pageinfo = (pstops_page_t *)cupsArrayLast(doc->pages);
tx, ty; /* Translation values for subpage */
float pagew, /* Printable width of page */
pagel; /* Printable height of page */
- int bboxw, /* BoundingBox width */
+ int bboxx, /* BoundingBox X origin */
+ bboxy, /* BoundingBox Y origin */
+ bboxw, /* BoundingBox width */
bboxl; /* BoundingBox height */
+ float margin = 0; /* Current margin for border */
if (doc->number_up > 1)
if (doc->fitplot)
{
+ bboxx = bounding_box[0];
+ bboxy = bounding_box[1];
bboxw = bounding_box[2] - bounding_box[0];
bboxl = bounding_box[3] - bounding_box[1];
}
else
{
+ bboxx = 0;
+ bboxy = 0;
bboxw = PageWidth;
bboxl = PageLength;
}
fprintf(stderr, "DEBUG: pagew = %.1f, pagel = %.1f\n", pagew, pagel);
- fprintf(stderr, "DEBUG: bboxw = %d, bboxl = %d\n", bboxw, bboxl);
+ fprintf(stderr, "DEBUG: bboxx = %d, bboxy = %d, bboxw = %d, bboxl = %d\n",
+ bboxx, bboxy, bboxw, bboxl);
fprintf(stderr, "DEBUG: PageLeft = %.1f, PageRight = %.1f\n",
PageLeft, PageRight);
fprintf(stderr, "DEBUG: PageTop = %.1f, PageBottom = %.1f\n",
if (doc->page_border && show_border)
{
int rects; /* Number of border rectangles */
- float fscale, /* Scaling value for points */
- margin; /* Current margin for borders */
+ float fscale; /* Scaling value for points */
rects = (doc->page_border & PSTOPS_BORDERDOUBLE) ? 2 : 1;
for (; rects > 0; rects --, margin += 2 * fscale)
if (doc->number_up > 1)
doc_printf(doc, "%.1f %.1f %.1f %.1f ESPrs\n",
- margin - 2.25 * fscale,
- margin - 2.25 * fscale,
- bboxw + 4.5 * fscale - 2 * margin,
- bboxl + 4.5 * fscale - 2 * margin);
+ margin,
+ margin,
+ bboxw - 2 * margin,
+ bboxl - 2 * margin);
else
doc_printf(doc, "%.1f %.1f %.1f %.1f ESPrs\n",
PageLeft + margin,
if (doc->fitplot)
{
/*
- * Clip the page that follows to the bounding box of the page...
+ * Offset the page by its bounding box...
*/
doc_printf(doc, "%d %d translate\n", -bounding_box[0],
-bounding_box[1]);
- doc_printf(doc, "%d %d %d %d ESPrc\n", bounding_box[0], bounding_box[1],
- bboxw, bboxl);
}
- else if (doc->number_up > 1)
+
+ if (doc->fitplot || doc->number_up > 1)
{
/*
- * Clip the page that follows to the default page size...
+ * Clip the page to the page's bounding box...
*/
- doc_printf(doc, "0 0 %d %d ESPrc\n", bboxw, bboxl);
+ doc_printf(doc, "%.1f %.1f %.1f %.1f ESPrc\n",
+ bboxx + margin, bboxy + margin,
+ bboxw - 2 * margin, bboxl - 2 * margin);
}
}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
-<plist version="0.9">
-<dict>
- <key>Starting printing services</key>
- <string>Starting printing services</string>
-</dict>
-</plist>
-
-#!/bin/sh
-
-##
-# PrintingServices - a.k.a. CUPS
-##
-
-. /etc/rc.common
-
-StartService ()
-{
- if [ "${CUPS:=-AUTOMATIC-}" = "-AUTOMATIC-" ]; then
- ConsoleMessage "Starting printing services"
- /usr/sbin/cupsd
- elif [ "${CUPS:=-AUTOMATIC-}" = "-YES-" ]; then
- ConsoleMessage "Starting printing services"
- /usr/sbin/cupsd
- fi
-}
-
-StopService ()
-{
- # Until cupsd has a pid file...
- pid=`ps ax | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
- if test "$pid" != ""; then
- ConsoleMessage "Stopping printing services"
- kill "${pid}"
- fi
-}
-
-RestartService ()
-{
- # Until cupsd has a pid file...
- pid=`ps ax | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
- if test "x$pid" != x; then
- ConsoleMessage "Restarting printing services"
- kill -HUP "${pid}"
- else
- if [ "${CUPS:=-AUTOMATIC-}" = "-AUTOMATIC-" -o "${CUPS:=-AUTOMATIC-}" = "-YES-" ]; then
- ConsoleMessage "Starting printing services"
- /usr/sbin/cupsd
- fi
- fi
-}
-
-RunService "$1"
-#!/bin/sh
-
-##
-# PrintingServices - a.k.a. CUPS
-##
-
-. /etc/rc.common
-
-StartService ()
-{
- ConsoleMessage "Starting printing services"
- launchctl start org.cups.cupsd
-}
-
-StopService ()
-{
- ConsoleMessage "Stopping printing services"
- launchctl stop org.cups.cupsd
-}
-
-RestartService ()
-{
- ConsoleMessage "Restarting printing services"
- launchctl stop org.cups.cupsd
- launchctl start org.cups.cupsd
-}
-
-RunService "$1"
-{
- Description = "Printing Services";
- Provides = ("PrintingServices");
- Requires = ("Resolver");
- Uses = ("Network Time");
- OrderPreference = "Late";
-}
d 0755 root sys $DATADIR/templates -
f 0644 root sys $DATADIR/templates templates/*.tmpl
-# Japanese template files
-%subpackage de
-d 0755 root sys $DATADIR/templates/de
-f 0644 root sys $DATADIR/templates/de templates/de/*.tmpl
-%subpackage es
-d 0755 root sys $DATADIR/templates/es
-f 0644 root sys $DATADIR/templates/es templates/es/*.tmpl
-%subpackage et
-d 0755 root sys $DATADIR/templates/et
-f 0644 root sys $DATADIR/templates/et templates/et/*.tmpl
-%subpackage fr
-d 0755 root sys $DATADIR/templates/fr
-f 0644 root sys $DATADIR/templates/fr templates/fr/*.tmpl
-%subpackage he
-d 0755 root sys $DATADIR/templates/he
-f 0644 root sys $DATADIR/templates/he templates/he/*.tmpl
-%subpackage it
-d 0755 root sys $DATADIR/templates/it
-f 0644 root sys $DATADIR/templates/it templates/it/*.tmpl
-%subpackage ja
-d 0755 root sys $DATADIR/templates/ja
-f 0644 root sys $DATADIR/templates/ja templates/ja/*.tmpl
-%subpackage pl
-d 0755 root sys $DATADIR/templates/pl
-f 0644 root sys $DATADIR/templates/pl templates/pl/*.tmpl
-%subpackage sv
-d 0755 root sys $DATADIR/templates/sv
-f 0644 root sys $DATADIR/templates/sv templates/sv/*.tmpl
-%subpackage zh
-d 0755 root sys $DATADIR/templates/zh_TW
-f 0644 root sys $DATADIR/templates/zh_TW templates/zh_TW/*.tmpl
-%subpackage
+## Template files
+#%subpackage de
+#d 0755 root sys $DATADIR/templates/de
+#f 0644 root sys $DATADIR/templates/de templates/de/*.tmpl
+#%subpackage es
+#d 0755 root sys $DATADIR/templates/es
+#f 0644 root sys $DATADIR/templates/es templates/es/*.tmpl
+#%subpackage et
+#d 0755 root sys $DATADIR/templates/et
+#f 0644 root sys $DATADIR/templates/et templates/et/*.tmpl
+#%subpackage fr
+#d 0755 root sys $DATADIR/templates/fr
+#f 0644 root sys $DATADIR/templates/fr templates/fr/*.tmpl
+#%subpackage he
+#d 0755 root sys $DATADIR/templates/he
+#f 0644 root sys $DATADIR/templates/he templates/he/*.tmpl
+#%subpackage it
+#d 0755 root sys $DATADIR/templates/it
+#f 0644 root sys $DATADIR/templates/it templates/it/*.tmpl
+#%subpackage ja
+#d 0755 root sys $DATADIR/templates/ja
+#f 0644 root sys $DATADIR/templates/ja templates/ja/*.tmpl
+#%subpackage pl
+#d 0755 root sys $DATADIR/templates/pl
+#f 0644 root sys $DATADIR/templates/pl templates/pl/*.tmpl
+#%subpackage sv
+#d 0755 root sys $DATADIR/templates/sv
+#f 0644 root sys $DATADIR/templates/sv templates/sv/*.tmpl
+#%subpackage zh
+#d 0755 root sys $DATADIR/templates/zh_TW
+#f 0644 root sys $DATADIR/templates/zh_TW templates/zh_TW/*.tmpl
+#%subpackage
# Config files
d 0755 root sys $SERVERROOT -
# Startup scripts
%system darwin
f 0644 root sys /System/Library/LaunchDaemons/org.cups.cupsd.plist init/org.cups.cupsd.plist
-d 0755 root sys /System/Library/StartupItems/PrintingServices -
-f 0644 root sys /System/Library/StartupItems/PrintingServices/PrintingServices init/PrintingServices.launchd
-f 0644 root sys /System/Library/StartupItems/PrintingServices/StartupParamters.plist init/StartupParameters.plist
-d 0755 root sys /System/Library/StartupItems/PrintingServices/Resources -
-d 0755 root sys /System/Library/StartupItems/PrintingServices/Resources/English.lproj -
-f 0644 root sys /System/Library/StartupItems/PrintingServices/Resources/English.lproj/Localizable.strings init/Localizable.strings
%preremove <<EOF
launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist || exit 0
killall cupsd || exit 0
%files de
%defattr(-,root,root)
-%dir /usr/share/doc/cups/de
-/usr/share/doc/cups/de/index.html
-%dir /usr/share/cups/templates/de
-/usr/share/cups/templates/de/*
+#%dir /usr/share/doc/cups/de
+#/usr/share/doc/cups/de/index.html
+#%dir /usr/share/cups/templates/de
+#/usr/share/cups/templates/de/*
/usr/share/locale/de/cups_de.po
%files es
%defattr(-,root,root)
-%dir /usr/share/doc/cups/es
-/usr/share/doc/cups/es/index.html
-%dir /usr/share/cups/templates/es
-/usr/share/cups/templates/es/*
+#%dir /usr/share/doc/cups/es
+#/usr/share/doc/cups/es/index.html
+#%dir /usr/share/cups/templates/es
+#/usr/share/cups/templates/es/*
/usr/share/locale/es/cups_es.po
%files et
%defattr(-,root,root)
-%dir /usr/share/doc/cups/et
-/usr/share/doc/cups/et/index.html
-%dir /usr/share/cups/templates/et
-/usr/share/cups/templates/et/*
+#%dir /usr/share/doc/cups/et
+#/usr/share/doc/cups/et/index.html
+#%dir /usr/share/cups/templates/et
+#/usr/share/cups/templates/et/*
/usr/share/locale/et/cups_et.po
%files fi
%files fr
%defattr(-,root,root)
-%dir /usr/share/doc/cups/fr
-/usr/share/doc/cups/fr/index.html
-%dir /usr/share/cups/templates/fr
-/usr/share/cups/templates/fr/*
+#%dir /usr/share/doc/cups/fr
+#/usr/share/doc/cups/fr/index.html
+#%dir /usr/share/cups/templates/fr
+#/usr/share/cups/templates/fr/*
/usr/share/locale/fr/cups_fr.po
%files he
%defattr(-,root,root)
-%dir /usr/share/doc/cups/he
-/usr/share/doc/cups/he/index.html
-/usr/share/doc/cups/he/cups.css
-%dir /usr/share/cups/templates/he
-/usr/share/cups/templates/he/*
+#%dir /usr/share/doc/cups/he
+#/usr/share/doc/cups/he/index.html
+#/usr/share/doc/cups/he/cups.css
+#%dir /usr/share/cups/templates/he
+#/usr/share/cups/templates/he/*
/usr/share/locale/he/cups_he.po
%files it
%defattr(-,root,root)
-%dir /usr/share/doc/cups/it
-/usr/share/doc/cups/it/index.html
-%dir /usr/share/cups/templates/it
-/usr/share/cups/templates/it/*
+#%dir /usr/share/doc/cups/it
+#/usr/share/doc/cups/it/index.html
+#%dir /usr/share/cups/templates/it
+#/usr/share/cups/templates/it/*
/usr/share/locale/it/cups_it.po
%files ja
%defattr(-,root,root)
-%dir /usr/share/doc/cups/ja
-/usr/share/doc/cups/ja/index.html
-%dir /usr/share/cups/templates/ja
-/usr/share/cups/templates/ja/*
+#%dir /usr/share/doc/cups/ja
+#/usr/share/doc/cups/ja/index.html
+#%dir /usr/share/cups/templates/ja
+#/usr/share/cups/templates/ja/*
/usr/share/locale/ja/cups_ja.po
%files ko
%files pl
%defattr(-,root,root)
-%dir /usr/share/doc/cups/pl
-/usr/share/doc/cups/pl/index.html
-%dir /usr/share/cups/templates/pl
-/usr/share/cups/templates/pl/*
+#%dir /usr/share/doc/cups/pl
+#/usr/share/doc/cups/pl/index.html
+#%dir /usr/share/cups/templates/pl
+#/usr/share/cups/templates/pl/*
/usr/share/locale/pl/cups_pl.po
%files pt
%files sv
%defattr(-,root,root)
-%dir /usr/share/doc/cups/sv
-/usr/share/doc/cups/sv/index.html
-%dir /usr/share/cups/templates/sv
-/usr/share/cups/templates/sv/*
+#%dir /usr/share/doc/cups/sv
+#/usr/share/doc/cups/sv/index.html
+#%dir /usr/share/cups/templates/sv
+#/usr/share/cups/templates/sv/*
/usr/share/locale/sv/cups_sv.po
%files zh
%defattr(-,root,root)
-%dir /usr/share/doc/cups/zh_TW
-/usr/share/doc/cups/zh_TW/index.html
-%dir /usr/share/cups/templates/zh_TW
-/usr/share/cups/templates/zh_TW/*
+#%dir /usr/share/doc/cups/zh_TW
+#/usr/share/doc/cups/zh_TW/index.html
+#%dir /usr/share/cups/templates/zh_TW
+#/usr/share/cups/templates/zh_TW/*
/usr/share/locale/zh/cups_zh.po
/usr/share/locale/zh_TW/cups_zh_TW.po
protocols |= BROWSE_SLP;
else if (!strcasecmp(valstart, "ldap"))
protocols |= BROWSE_LDAP;
- else if (!strcasecmp(valstart, "dnssd") || !strcasecmp(valstart, "bonjour"))
+ else if (!strcasecmp(valstart, "dnssd") ||
+ !strcasecmp(valstart, "dns-sd") ||
+ !strcasecmp(valstart, "bonjour"))
protocols |= BROWSE_DNSSD;
else if (!strcasecmp(valstart, "lpd"))
protocols |= BROWSE_LPD;
else if (!strcasecmp(valstart, "all"))
protocols |= BROWSE_ALL;
else if (strcasecmp(valstart, "none"))
- return (-1);
+ cupsdLogMessage(CUPSD_LOG_ERROR,
+ "Unknown browse protocol \"%s\" ignored!", valstart);
for (valstart = valend; *valstart; valstart ++)
if (!isspace(*valstart & 255) || *valstart != ',')
need_restart_job = 1;
supported = ippFindAttribute(printer->attrs, "port-monitor-supported",
- IPP_TAG_KEYWORD);
+ IPP_TAG_NAME);
for (i = 0; i < supported->num_values; i ++)
if (!strcmp(supported->values[i].string.text,
attr->values[0].string.text))
cups_file_t *fp; /* Fake lpsched lock file */
struct stat statbuf; /* Needed for checking lpsched FIFO */
#endif /* __sgi */
+#ifdef __APPLE__
+ int run_as_child = 0;
+ /* Needed for Mac OS X fork/exec */
+#endif /* __APPLE__ */
#if HAVE_LAUNCHD
int launchd_idle_exit;
/* Idle exit on select timeout? */
for (opt = argv[i] + 1; *opt != '\0'; opt ++)
switch (*opt)
{
+#ifdef __APPLE__
+ case 'C' : /* Run as child with config file */
+ run_as_child = 1;
+ fg = -1;
+#endif /* __APPLE__ */
+
case 'c' : /* Configuration file */
i ++;
if (i >= argc)
return (3);
}
}
+
+#ifdef __APPLE__
+ /*
+ * Since CoreFoundation has an overly-agressive check for whether a
+ * process has forked but not exec'd (whether CF has been called or
+ * not...), we now have to exec ourselves with the "-f" option to
+ * eliminate their bogus warning messages.
+ */
+
+ execlp(argv[0], argv[0], "-C", ConfigurationFile, (char *)0);
+ exit(errno);
+#endif /* __APPLE__ */
}
if (fg < 1)
*/
if (krb5_init_context(&KerberosContext))
+ {
+ KerberosContext = NULL;
+
cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to initialize Kerberos context");
+ }
#endif /* HAVE_GSSAPI */
/*
* we are up and running...
*/
+#ifdef __APPLE__
+ if (!fg || run_as_child)
+#else
if (!fg)
+#endif /* __APPLE__ */
{
/*
* Send a signal to the parent process, but only if the parent is
if (LastEvent)
{
#ifdef HAVE_NOTIFY_POST
- if (LastEvent & CUPSD_EVENT_PRINTER_CHANGED)
+ if (LastEvent & (CUPSD_EVENT_PRINTER_ADDED |
+ CUPSD_EVENT_PRINTER_DELETED |
+ CUPSD_EVENT_PRINTER_MODIFIED))
{
cupsdLogMessage(CUPSD_LOG_DEBUG2,
"notify_post(\"com.apple.printerListChange\")");
if (krb5_init_context != NULL)
# endif /* __APPLE__ */
- krb5_free_context(KerberosContext);
+ if (KerberosContext)
+ krb5_free_context(KerberosContext);
#endif /* HAVE_GSSAPI */
#ifdef __APPLE__
p;
p = (cupsd_printer_t *)cupsArrayNext(Printers))
{
- if (p->type & CUPS_PRINTER_REMOTE)
+ if (p->type & CUPS_PRINTER_DISCOVERED)
{
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Deleting remote destination \"%s\"", p->name);
if ((protocol = cupsGetOption("protocol", num_options, options)) != NULL)
{
if (!strcasecmp(protocol, "bcp"))
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "port-monitor",
+ ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME, "port-monitor",
NULL, "bcp");
else if (!strcasecmp(protocol, "tbcp"))
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "port-monitor",
+ ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME, "port-monitor",
NULL, "tbcp");
}
echo Updating $file...
sed -e '1,$s/@CUPS_VERSION@/'$version'/g' \
-e '1,$s/@CUPS_REVISION@//g' \
- -e '1,$s/@CUPS_RELEASE@/1.3.'$rev'/g' \
+ -e '1,$s/@CUPS_RELEASE@/1.4.'$rev'/g' \
<$file.in >$file
done