- 1.4rc1. No longer need str3124, CVE-2009-0163, CVE-2009-0164, str3197,

missing-devices patches.
- Disabled avahi patch for the time being. More work is needed to port this
    to rc1.
- Removed wbuffer patch as it is not needed (see STR #1968).
This commit is contained in:
Tim Waugh 2009-06-17 11:30:03 +00:00
parent 740cdc423f
commit ca53cd4a43
12 changed files with 185 additions and 937 deletions

View File

@ -37,3 +37,4 @@ cups-1.3.9-source.tar.bz2
cups-1.4b1-source.tar.bz2
cups-1.4b2-source.tar.bz2
cups-1.4b2-svn8404-source.tar.bz2
cups-1.4rc1-source.tar.bz2

View File

@ -1,14 +0,0 @@
diff -up cups-1.4b2-svn8404/filter/image-private.h.CVE-2009-0163 cups-1.4b2-svn8404/filter/image-private.h
--- cups-1.4b2-svn8404/filter/image-private.h.CVE-2009-0163 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/filter/image-private.h 2009-04-17 16:21:52.000000000 +0100
@@ -40,8 +40,8 @@
# define CUPS_IMAGE_MAX_WIDTH 0x07ffffff
/* 2^27-1 to allow for 15-channel data */
-# define CUPS_IMAGE_MAX_HEIGHT 0x7fffffff
- /* 2^31-1 */
+# define CUPS_IMAGE_MAX_HEIGHT 0x3fffffff
+ /* 2^30-1 */
# define CUPS_TILE_SIZE 256 /* 256x256 pixel tiles */
# define CUPS_TILE_MINIMUM 10 /* Minimum number of tiles */

View File

@ -1,658 +0,0 @@
diff -up cups-1.4b2-svn8404/CHANGES-1.3.txt.CVE-2009-0164 cups-1.4b2-svn8404/CHANGES-1.3.txt
--- cups-1.4b2-svn8404/CHANGES-1.3.txt.CVE-2009-0164 2009-03-05 10:54:00.000000000 +0000
+++ cups-1.4b2-svn8404/CHANGES-1.3.txt 2009-04-26 13:22:11.000000000 +0100
@@ -69,11 +69,6 @@ CHANGES IN CUPS V1.3.10
- The scheduler now rejects ATTR: messages with empty values.
- The scheduler could consume all CPU handling closed connections
(STR #2988)
- - The scheduler now protects against DNS rebinding attacks on
- localhost.
- - SECURITY: The PNG image reading code did not validate the
- image size properly, leading to a potential buffer overflow
- (STR #2974)
- Fixed some configure script bugs with rc/xinetd directories
(STR #2970)
- The Epson sample driver PPDs contained errors (STR #2979)
diff -up cups-1.4b2-svn8404/cups/http-addr.c.CVE-2009-0164 cups-1.4b2-svn8404/cups/http-addr.c
--- cups-1.4b2-svn8404/cups/http-addr.c.CVE-2009-0164 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/cups/http-addr.c 2009-04-26 13:22:11.000000000 +0100
@@ -154,7 +154,7 @@ httpAddrLocalhost(
#endif /* AF_LOCAL */
if (addr->addr.sa_family == AF_INET &&
- ntohl(addr->ipv4.sin_addr.s_addr) == 0x7f000001)
+ (ntohl(addr->ipv4.sin_addr.s_addr) & 0xff000000) == 0x7f000000)
return (1);
return (0);
diff -up cups-1.4b2-svn8404/cups/http.c.CVE-2009-0164 cups-1.4b2-svn8404/cups/http.c
--- cups-1.4b2-svn8404/cups/http.c.CVE-2009-0164 2009-04-26 13:22:11.000000000 +0100
+++ cups-1.4b2-svn8404/cups/http.c 2009-04-26 13:22:11.000000000 +0100
@@ -1842,18 +1842,35 @@ httpSetField(http_t *http, /* I -
strlcpy(http->fields[field], value, HTTP_MAX_VALUE);
- /*
- * Special case for Authorization: as its contents can be
- * longer than HTTP_MAX_VALUE
- */
-
if (field == HTTP_FIELD_AUTHORIZATION)
{
+ /*
+ * Special case for Authorization: as its contents can be
+ * longer than HTTP_MAX_VALUE
+ */
+
if (http->field_authorization)
free(http->field_authorization);
http->field_authorization = strdup(value);
}
+ else if (field == HTTP_FIELD_HOST)
+ {
+ /*
+ * Special-case for Host: as we don't want a trailing "." on the hostname.
+ */
+
+ char *ptr = http->fields[HTTP_FIELD_HOST];
+ /* Pointer into Host: field */
+
+ if (*ptr)
+ {
+ ptr += strlen(ptr) - 1;
+
+ if (*ptr == '.')
+ *ptr = '\0';
+ }
+ }
}
diff -up cups-1.4b2-svn8404/man/cupsd.conf.man.in.CVE-2009-0164 cups-1.4b2-svn8404/man/cupsd.conf.man.in
--- cups-1.4b2-svn8404/man/cupsd.conf.man.in.CVE-2009-0164 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/man/cupsd.conf.man.in 2009-04-26 13:22:11.000000000 +0100
@@ -617,6 +617,11 @@ ServerAdmin user@domain.com
.br
Specifies the email address of the server administrator.
.TP 5
+ServerAlias hostname
+.br
+Specifies an alternate name that the server is known by. The special name "*"
+allows any name to be used.
+.TP 5
ServerBin directory
.br
Specifies the directory where backends, CGIs, daemons, and filters may
diff -up cups-1.4b2-svn8404/scheduler/client.c.CVE-2009-0164 cups-1.4b2-svn8404/scheduler/client.c
--- cups-1.4b2-svn8404/scheduler/client.c.CVE-2009-0164 2009-03-05 10:54:00.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/client.c 2009-04-26 13:38:34.000000000 +0100
@@ -39,6 +39,7 @@
* is_path_absolute() - Is a path absolute and free of relative elements.
* make_certificate() - Make a self-signed SSL/TLS certificate.
* pipe_command() - Pipe the output of a command to the remote client.
+ * valid_host() - Is the Host: field valid?
* write_file() - Send a file via HTTP.
* write_pipe() - Flag that data is available on the CGI pipe.
*/
@@ -108,6 +109,7 @@ static int make_certificate(cupsd_clien
#endif /* HAVE_SSL */
static int pipe_command(cupsd_client_t *con, int infile, int *outfile,
char *command, char *options, int root);
+static int valid_host(cupsd_client_t *con);
static int write_file(cupsd_client_t *con, http_status_t code,
char *filename, char *type,
struct stat *filestats);
@@ -1129,13 +1131,7 @@ cupsdReadClient(cupsd_client_t *con) /*
return;
}
}
- else if (httpAddrLocalhost(con->http.hostaddr) &&
- strcasecmp(con->http.fields[HTTP_FIELD_HOST], "localhost") &&
- strncasecmp(con->http.fields[HTTP_FIELD_HOST], "localhost:", 10) &&
- strcmp(con->http.fields[HTTP_FIELD_HOST], "127.0.0.1") &&
- strncmp(con->http.fields[HTTP_FIELD_HOST], "127.0.0.1:", 10) &&
- strcmp(con->http.fields[HTTP_FIELD_HOST], "[::1]") &&
- strncmp(con->http.fields[HTTP_FIELD_HOST], "[::1]:", 6))
+ else if (!valid_host(con))
{
/*
* Access to localhost must use "localhost" or the corresponding IPv4
@@ -3278,6 +3274,10 @@ get_cdsa_certificate(cupsd_client_t *con
ssl_options.ServerName = con->servername;
ssl_options.ServerNameLen = strlen(con->servername);
+ cupsdLogMessage(CUPSD_LOG_DEBUG,
+ "get_cdsa_certificate: Looking for certs for \"%s\"...",
+ con->servername);
+
options.Data = (uint8 *)&ssl_options;
options.Length = sizeof(ssl_options);
@@ -3970,7 +3970,7 @@ make_certificate(cupsd_client_t *con) /*
envp[envc] = NULL;
if (!cupsdStartProcess(command, argv, envp, -1, -1, -1, -1, -1, 1, NULL, 0,
- &pid))
+ NULL, &pid))
{
unlink(seedfile);
return (0);
@@ -4862,6 +4862,166 @@ pipe_command(cupsd_client_t *con, /* I -
/*
+ * 'valid_host()' - Is the Host: field valid?
+ */
+
+static int /* O - 1 if valid, 0 if not */
+valid_host(cupsd_client_t *con) /* I - Client connection */
+{
+ cupsd_alias_t *a; /* Current alias */
+ cupsd_netif_t *netif; /* Current network interface */
+ const char *host, /* Host field */
+ *end; /* End character */
+
+
+ host = con->http.fields[HTTP_FIELD_HOST];
+
+ if (httpAddrLocalhost(con->http.hostaddr))
+ {
+ /*
+ * Only allow "localhost" or the equivalent IPv4 or IPv6 numerical
+ * addresses when accessing CUPS via the loopback interface...
+ */
+
+ return (!strcasecmp(host, "localhost") ||
+ !strncasecmp(host, "localhost:", 10) ||
+ !strcasecmp(host, "localhost.") ||
+ !strncasecmp(host, "localhost.:", 11) ||
+#ifdef __linux
+ !strcasecmp(host, "localhost.localdomain") ||
+ !strncasecmp(host, "localhost.localdomain:", 22) ||
+#endif /* __linux */
+ !strcmp(host, "127.0.0.1") ||
+ !strncmp(host, "127.0.0.1:", 10) ||
+ !strcmp(host, "[::1]") ||
+ !strncmp(host, "[::1]:", 6) ||
+ !strcmp(host, "::1"));
+ }
+
+#ifdef HAVE_DNSSD
+ /*
+ * Check if the hostname is something.local (Bonjour); if so, allow it.
+ */
+
+ if ((end = strrchr(host, '.')) != NULL &&
+ (!strcasecmp(end, ".local") || !strncasecmp(end, ".local:", 7) ||
+ !strcasecmp(end, ".local.") || !strncasecmp(end, ".local.:", 8)))
+ return (1);
+#endif /* HAVE_DNSSD */
+
+ /*
+ * Check if the hostname is an IP address...
+ */
+
+ if (isdigit(*host & 255) || *host == '[')
+ {
+ /*
+ * Possible IPv4/IPv6 address...
+ */
+
+ char temp[1024], /* Temporary string */
+ *ptr; /* Pointer into temporary string */
+ http_addrlist_t *addrlist; /* List of addresses */
+
+
+ strlcpy(temp, host, sizeof(temp));
+ if ((ptr = strrchr(temp, ':')) != NULL && !strchr(ptr, ']'))
+ *ptr = '\0'; /* Strip :port from host value */
+
+ if ((addrlist = httpAddrGetList(temp, AF_UNSPEC, NULL)) != NULL)
+ {
+ /*
+ * Good IPv4/IPv6 address...
+ */
+
+ httpAddrFreeList(addrlist);
+ return (1);
+ }
+ }
+
+ /*
+ * Check for (alias) name matches...
+ */
+
+ for (a = (cupsd_alias_t *)cupsArrayFirst(ServerAlias);
+ a;
+ a = (cupsd_alias_t *)cupsArrayNext(ServerAlias))
+ {
+ /*
+ * "ServerAlias *" allows all host values through...
+ */
+
+ if (!strcmp(a->name, "*"))
+ return (1);
+
+ if (!strncasecmp(host, a->name, a->namelen))
+ {
+ /*
+ * Prefix matches; check the character at the end - it must be ":", ".",
+ * ".:", or nul...
+ */
+
+ end = host + a->namelen;
+
+ if (!*end || *end == ':' || (*end == '.' && (!end[1] || end[1] == ':')))
+ return (1);
+ }
+ }
+
+#ifdef HAVE_DNSSD
+ for (a = (cupsd_alias_t *)cupsArrayFirst(DNSSDAlias);
+ a;
+ a = (cupsd_alias_t *)cupsArrayNext(DNSSDAlias))
+ {
+ /*
+ * "ServerAlias *" allows all host values through...
+ */
+
+ if (!strcmp(a->name, "*"))
+ return (1);
+
+ if (!strncasecmp(host, a->name, a->namelen))
+ {
+ /*
+ * Prefix matches; check the character at the end - it must be ":", ".",
+ * ".:", or nul...
+ */
+
+ end = host + a->namelen;
+
+ if (!*end || *end == ':' || (*end == '.' && (!end[1] || end[1] == ':')))
+ return (1);
+ }
+ }
+#endif /* HAVE_DNSSD */
+
+ /*
+ * Check for interface hostname matches...
+ */
+
+ for (netif = (cupsd_netif_t *)cupsArrayFirst(NetIFList);
+ netif;
+ netif = (cupsd_netif_t *)cupsArrayNext(NetIFList))
+ {
+ if (!strncasecmp(host, netif->hostname, netif->hostlen))
+ {
+ /*
+ * Prefix matches; check the character at the end - it must be ":", ".",
+ * ".:", or nul...
+ */
+
+ end = host + netif->hostlen;
+
+ if (!*end || *end == ':' || (*end == '.' && (!end[1] || end[1] == ':')))
+ return (1);
+ }
+ }
+
+ return (0);
+}
+
+
+/*
* 'write_file()' - Send a file via HTTP.
*/
diff -up cups-1.4b2-svn8404/scheduler/conf.c.CVE-2009-0164 cups-1.4b2-svn8404/scheduler/conf.c
--- cups-1.4b2-svn8404/scheduler/conf.c.CVE-2009-0164 2009-04-26 13:22:11.000000000 +0100
+++ cups-1.4b2-svn8404/scheduler/conf.c 2009-04-26 13:43:59.000000000 +0100
@@ -14,13 +14,15 @@
*
* Contents:
*
+ * cupsdAddAlias() - Add a host alias.
* cupsdCheckPermissions() - Fix the mode and ownership of a file or
* directory.
+ * cupsdFreeAliases() - Free all of the alias entries.
* cupsdReadConfiguration() - Read the cupsd.conf file.
* get_address() - Get an address + port number from a line.
* get_addr_and_mask() - Get an IP address and netmask.
- * parse_aaa() - Parse authentication, authorization, and
- * access control lines.
+ * parse_aaa() - Parse authentication, authorization, and access
+ * control lines.
* parse_fatal_errors() - Parse FatalErrors values in a string.
* parse_groups() - Parse system group names in a string.
* parse_protocols() - Parse browse protocols in a string.
@@ -197,6 +199,7 @@ static const unsigned zeros[4] =
/*
* Local functions...
*/
+
static http_addrlist_t *get_address(const char *value, int defport);
static int get_addr_and_mask(const char *value, unsigned *ip,
unsigned *mask);
@@ -211,6 +214,30 @@ static int read_policy(cups_file_t *fp,
/*
+ * 'cupsdAddAlias()' - Add a host alias.
+ */
+
+void
+cupsdAddAlias(cups_array_t *aliases, /* I - Array of aliases */
+ const char *name) /* I - Name to add */
+{
+ cupsd_alias_t *a; /* New alias */
+ size_t namelen; /* Length of name */
+
+
+ namelen = strlen(name);
+
+ if ((a = (cupsd_alias_t *)malloc(sizeof(cupsd_alias_t) + namelen)) == NULL)
+ return;
+
+ a->namelen = namelen;
+ strcpy(a->name, name); /* OK since a->name is allocated */
+
+ cupsArrayAdd(aliases, a);
+}
+
+
+/*
* 'cupsdCheckPermissions()' - Fix the mode and ownership of a file or directory.
*/
@@ -362,6 +389,25 @@ cupsdCheckPermissions(
/*
+ * 'cupsdFreeAliases()' - Free all of the alias entries.
+ */
+
+void
+cupsdFreeAliases(cups_array_t *aliases) /* I - Array of aliases */
+{
+ cupsd_alias_t *a; /* Current alias */
+
+
+ for (a = (cupsd_alias_t *)cupsArrayFirst(ServerAlias);
+ a;
+ a = (cupsd_alias_t *)cupsArrayNext(ServerAlias))
+ free(a);
+
+ cupsArrayDelete(aliases);
+}
+
+
+/*
* 'cupsdReadConfiguration()' - Read the cupsd.conf file.
*/
@@ -433,6 +479,9 @@ cupsdReadConfiguration(void)
* String options...
*/
+ cupsdFreeAliases(ServerAlias);
+ ServerAlias = NULL;
+
cupsdClearString(&ServerName);
cupsdClearString(&ServerAdmin);
cupsdSetString(&ServerBin, CUPS_SERVERBIN);
@@ -674,9 +723,7 @@ cupsdReadConfiguration(void)
if (!ServerName)
{
- if (HostNameLookups || RemoteAccessEnabled)
- httpGetHostname(NULL, temp, sizeof(temp));
- else if (gethostname(temp, sizeof(temp)))
+ if (gethostname(temp, sizeof(temp)))
{
cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to get hostname: %s",
strerror(errno));
@@ -686,6 +733,54 @@ cupsdReadConfiguration(void)
cupsdSetString(&ServerName, temp);
}
+ if (!ServerAlias)
+ ServerAlias = cupsArrayNew(NULL, NULL);
+
+ cupsdAddAlias(ServerAlias, ServerName);
+ cupsdLogMessage(CUPSD_LOG_DEBUG, "Added auto ServerAlias %s", ServerName);
+
+ if (HostNameLookups || RemoteAccessEnabled)
+ {
+ struct hostent *host; /* Host entry to get FQDN */
+
+ if ((host = gethostbyname(ServerName)) != NULL)
+ {
+ if (strcasecmp(ServerName, host->h_name))
+ {
+ cupsdSetString(&ServerName, host->h_name);
+ cupsdAddAlias(ServerAlias, host->h_name);
+ cupsdLogMessage(CUPSD_LOG_DEBUG, "Added auto ServerAlias %s",
+ host->h_name);
+ }
+
+ if (host->h_aliases)
+ {
+ for (i = 0; host->h_aliases[i]; i ++)
+ if (strcasecmp(ServerName, host->h_aliases[i]))
+ {
+ cupsdAddAlias(ServerAlias, host->h_aliases[i]);
+ cupsdLogMessage(CUPSD_LOG_DEBUG, "Added auto ServerAlias %s",
+ host->h_aliases[i]);
+ }
+ }
+ }
+ }
+
+ /*
+ * Make sure we have the base hostname added as an alias, too!
+ */
+
+ if ((slash = strchr(ServerName, '.')) != NULL)
+ {
+ size_t n = slash - ServerName;
+ if (n > sizeof(temp) - 1)
+ n = sizeof(temp) - 1;
+ memcpy (temp, ServerName, n);
+ temp[n] = '\0';
+ cupsdAddAlias(ServerAlias, temp);
+ cupsdLogMessage(CUPSD_LOG_DEBUG, "Added auto ServerAlias %s", temp);
+ }
+
for (slash = ServerName; isdigit(*slash & 255) || *slash == '.'; slash ++);
ServerNameIsIP = !*slash;
@@ -3278,6 +3373,13 @@ read_configuration(cups_file_t *fp) /* I
break;
}
}
+ else if (!strcasecmp(line, "ServerAlias") && value)
+ {
+ if (!ServerAlias)
+ ServerAlias = cupsArrayNew(NULL, NULL);
+
+ cupsdAddAlias(ServerAlias, value);
+ }
else if (!strcasecmp(line, "SetEnv") && value)
{
/*
diff -up cups-1.4b2-svn8404/scheduler/conf.h.CVE-2009-0164 cups-1.4b2-svn8404/scheduler/conf.h
--- cups-1.4b2-svn8404/scheduler/conf.h.CVE-2009-0164 2009-04-26 13:22:11.000000000 +0100
+++ cups-1.4b2-svn8404/scheduler/conf.h 2009-04-26 13:22:11.000000000 +0100
@@ -82,6 +82,17 @@ typedef enum
/*
+ * ServerAlias data...
+ */
+
+typedef struct
+{
+ size_t namelen; /* Length of alias name */
+ char name[1]; /* Alias name */
+} cupsd_alias_t;
+
+
+/*
* Globals...
*/
@@ -105,6 +116,8 @@ VAR char *ConfigurationFile VALUE(NULL)
/* Directory for request files */
*DocumentRoot VALUE(NULL);
/* Root directory for documents */
+VAR cups_array_t *ServerAlias VALUE(NULL);
+ /* Alias names for server */
VAR int RemoteAccessEnabled VALUE(0),
/* Are we listening on non-local addresses? */
ServerNameIsIP VALUE(0);
@@ -269,10 +282,12 @@ VAR char *SystemGroupAuthKey VALUE(NULL
* Prototypes...
*/
+extern void cupsdAddAlias(cups_array_t *aliases, const char *name);
extern int cupsdCheckPermissions(const char *filename,
const char *suffix, int mode,
int user, int group, int is_dir,
int create_dir);
+extern void cupsdFreeAliases(cups_array_t *aliases);
extern char *cupsdGetDateTime(struct timeval *t, cupsd_time_t format);
#ifdef HAVE_GSSAPI
extern int cupsdLogGSSMessage(int level, int major_status,
diff -up cups-1.4b2-svn8404/scheduler/dirsvc.c.CVE-2009-0164 cups-1.4b2-svn8404/scheduler/dirsvc.c
--- cups-1.4b2-svn8404/scheduler/dirsvc.c.CVE-2009-0164 2009-04-26 13:22:11.000000000 +0100
+++ cups-1.4b2-svn8404/scheduler/dirsvc.c 2009-04-26 13:22:11.000000000 +0100
@@ -38,6 +38,7 @@
* cupsdUpdateLDAPBrowse() - Scan for new printers via LDAP...
* cupsdUpdateSLPBrowse() - Get browsing information via SLP.
* dequote() - Remote quotes from a string.
+ * dnssdAddAlias() - Add a DNS-SD alias name.
* dnssdBuildTxtRecord() - Build a TXT record from printer info.
* dnssdComparePrinters() - Compare the registered names of two printers.
* dnssdDeregisterPrinter() - Stop sending broadcast information for a
@@ -155,6 +156,10 @@ static void update_smb(int onoff);
#ifdef HAVE_DNSSD
+# ifdef HAVE_COREFOUNDATION
+static void dnssdAddAlias(const void *key, const void *value,
+ void *context);
+# endif /* HAVE_COREFOUNDATION */
static char *dnssdBuildTxtRecord(int *txt_len, cupsd_printer_t *p,
int for_lpd);
static int dnssdComparePrinters(cupsd_printer_t *a, cupsd_printer_t *b);
@@ -2199,6 +2204,38 @@ dequote(char *d, /* I - Destinat
#ifdef HAVE_DNSSD
+# ifdef HAVE_COREFOUNDATION
+/*
+ * 'dnssdAddAlias()' - Add a DNS-SD alias name.
+ */
+
+static void
+dnssdAddAlias(const void *key, /* I - Key */
+ const void *value, /* I - Value (domain) */
+ void *context) /* I - Unused */
+{
+ char valueStr[1024], /* Domain string */
+ hostname[1024]; /* Complete hostname */
+
+
+ (void)context;
+
+ if (CFGetTypeID((CFStringRef)value) == CFStringGetTypeID() &&
+ CFStringGetCString((CFStringRef)value, valueStr, sizeof(valueStr),
+ kCFStringEncodingUTF8))
+ {
+ snprintf(hostname, sizeof(hostname), "%s.%s", DNSSDName, valueStr);
+ if (!DNSSDAlias)
+ DNSSDAlias = cupsArrayNew(NULL, NULL);
+
+ cupsdAddAlias(DNSSDAlias, hostname);
+ cupsdLogMessage(CUPSD_LOG_DEBUG, "Added Back to My Mac ServerAlias %s",
+ hostname);
+ }
+}
+# endif /* HAVE_COREFOUNDATION */
+
+
/*
* 'dnssdBuildTxtRecord()' - Build a TXT record from printer info.
*/
diff -up cups-1.4b2-svn8404/scheduler/dirsvc.h.CVE-2009-0164 cups-1.4b2-svn8404/scheduler/dirsvc.h
--- cups-1.4b2-svn8404/scheduler/dirsvc.h.CVE-2009-0164 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/dirsvc.h 2009-04-26 13:22:11.000000000 +0100
@@ -4,7 +4,7 @@
* Directory services definitions for the Common UNIX Printing System
* (CUPS) scheduler.
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -135,6 +135,8 @@ VAR cupsd_statbuf_t *PollStatusBuffer VA
#ifdef HAVE_DNSSD
VAR char *DNSSDName VALUE(NULL);
/* Computer/server name */
+VAR cups_array_t *DNSSDAlias VALUE(NULL);
+ /* List of dynamic ServerAlias's */
VAR int DNSSDPort VALUE(0);
/* Port number to register */
VAR cups_array_t *DNSSDPrinters VALUE(NULL);
diff -up cups-1.4b2-svn8404/scheduler/network.c.CVE-2009-0164 cups-1.4b2-svn8404/scheduler/network.c
--- cups-1.4b2-svn8404/scheduler/network.c.CVE-2009-0164 2009-02-05 10:57:28.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/network.c 2009-04-26 13:22:11.000000000 +0100
@@ -101,6 +101,7 @@ cupsdNetIFUpdate(void)
struct ifaddrs *addrs, /* Interface address list */
*addr; /* Current interface address */
char hostname[1024]; /* Hostname for address */
+ size_t hostlen; /* Length of hostname */
/*
@@ -176,8 +177,8 @@ cupsdNetIFUpdate(void)
* Create a new address element...
*/
- if ((temp = calloc(1, sizeof(cupsd_netif_t) +
- strlen(hostname))) == NULL)
+ hostlen = strlen(hostname);
+ if ((temp = calloc(1, sizeof(cupsd_netif_t) + hostlen)) == NULL)
break;
/*
@@ -185,6 +186,7 @@ cupsdNetIFUpdate(void)
*/
strlcpy(temp->name, addr->ifa_name, sizeof(temp->name));
+ temp->hostlen = hostlen;
strcpy(temp->hostname, hostname); /* Safe because hostname is allocated */
if (addr->ifa_addr->sa_family == AF_INET)
diff -up cups-1.4b2-svn8404/scheduler/network.h.CVE-2009-0164 cups-1.4b2-svn8404/scheduler/network.h
--- cups-1.4b2-svn8404/scheduler/network.h.CVE-2009-0164 2008-12-03 15:39:53.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/network.h 2009-04-26 13:22:11.000000000 +0100
@@ -4,7 +4,7 @@
* Network interface definitions for the Common UNIX Printing System
* (CUPS) scheduler.
*
- * Copyright 2007 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -25,6 +25,7 @@ typedef struct cupsd_netif_s /**** Netw
http_addr_t address, /* Network address */
mask, /* Network mask */
broadcast; /* Broadcast address */
+ size_t hostlen; /* Length of hostname */
char name[32], /* Network interface name */
hostname[1]; /* Hostname associated with interface */
} cupsd_netif_t;

View File

@ -1,6 +1,6 @@
diff -up cups-1.4b2/Makedefs.in.build cups-1.4b2/Makedefs.in
--- cups-1.4b2/Makedefs.in.build 2008-11-11 00:57:12.000000000 +0000
+++ cups-1.4b2/Makedefs.in 2008-12-16 11:30:09.000000000 +0000
diff -up cups-1.4rc1/Makedefs.in.build cups-1.4rc1/Makedefs.in
--- cups-1.4rc1/Makedefs.in.build 2009-05-27 00:27:06.000000000 +0100
+++ cups-1.4rc1/Makedefs.in 2009-06-17 11:18:27.185443255 +0100
@@ -124,7 +124,7 @@ ARFLAGS = @ARFLAGS@
BACKLIBS = @BACKLIBS@
BANNERTOPS = @BANNERTOPS@
@ -10,10 +10,10 @@ diff -up cups-1.4b2/Makedefs.in.build cups-1.4b2/Makedefs.in
CUPSDLIBS = @CUPSDLIBS@
CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@
CXXLIBS = @CXXLIBS@
diff -up cups-1.4b2/scheduler/dirsvc.c.build cups-1.4b2/scheduler/dirsvc.c
--- cups-1.4b2/scheduler/dirsvc.c.build 2008-10-08 05:26:38.000000000 +0100
+++ cups-1.4b2/scheduler/dirsvc.c 2008-12-16 11:30:09.000000000 +0000
@@ -1948,7 +1948,7 @@ cupsdUpdateDNSSDName(void)
diff -up cups-1.4rc1/scheduler/dirsvc.c.build cups-1.4rc1/scheduler/dirsvc.c
--- cups-1.4rc1/scheduler/dirsvc.c.build 2009-05-14 18:54:37.000000000 +0100
+++ cups-1.4rc1/scheduler/dirsvc.c 2009-06-17 11:23:23.366318546 +0100
@@ -2042,7 +2042,7 @@ cupsdUpdateDNSSDName(void)
WebIFRef = DNSSDRef;
if ((error = DNSServiceRegister(&WebIFRef,
@ -22,21 +22,21 @@ diff -up cups-1.4b2/scheduler/dirsvc.c.build cups-1.4b2/scheduler/dirsvc.c
0, webif, "_http._tcp", NULL,
NULL, htons(DNSSDPort), 7,
"\006path=/", dnssdRegisterCallback,
@@ -2622,7 +2622,7 @@ dnssdRegisterPrinter(cupsd_printer_t *p)
@@ -2765,7 +2765,7 @@ dnssdRegisterPrinter(cupsd_printer_t *p)
do
{
p->ipp_ref = DNSSDRef;
- if ((se = DNSServiceRegister(&p->ipp_ref, kDNSServiceFlagsShareConnection,
+ if ((se = DNSServiceRegister(&p->ipp_ref, 0,
0, name, regtype, domain, NULL,
0, name, regtype, NULL, NULL,
htons(DNSSDPort), ipp_len, ipp_txt,
dnssdRegisterCallback,
@@ -2693,7 +2693,7 @@ dnssdRegisterPrinter(cupsd_printer_t *p)
@@ -2854,7 +2854,7 @@ dnssdRegisterPrinter(cupsd_printer_t *p)
p->printer_ref = DNSSDRef;
if ((se = DNSServiceRegister(&p->printer_ref,
- kDNSServiceFlagsShareConnection,
+ 0,
0, name, "_printer._tcp", domain, NULL,
0, name, "_printer._tcp", NULL, NULL,
htons(515), printer_len, printer_txt,
dnssdRegisterCallback,

View File

@ -1,7 +1,7 @@
diff -up cups-1.4b2-svn8404/config.h.in.lspp cups-1.4b2-svn8404/config.h.in
--- cups-1.4b2-svn8404/config.h.in.lspp 2009-04-17 16:48:02.000000000 +0100
+++ cups-1.4b2-svn8404/config.h.in 2009-04-17 16:48:03.000000000 +0100
@@ -626,6 +626,13 @@
diff -up cups-1.4rc1/config.h.in.lspp cups-1.4rc1/config.h.in
--- cups-1.4rc1/config.h.in.lspp 2009-05-14 21:48:55.000000000 +0100
+++ cups-1.4rc1/config.h.in 2009-06-17 11:24:06.635318677 +0100
@@ -628,6 +628,13 @@
#undef HAVE_TCPD_H
@ -15,9 +15,9 @@ diff -up cups-1.4b2-svn8404/config.h.in.lspp cups-1.4b2-svn8404/config.h.in
#endif /* !_CUPS_CONFIG_H_ */
/*
diff -up /dev/null cups-1.4b2-svn8404/config-scripts/cups-lspp.m4
--- /dev/null 2009-04-17 08:56:26.038189487 +0100
+++ cups-1.4b2-svn8404/config-scripts/cups-lspp.m4 2009-04-17 16:48:03.000000000 +0100
diff -up /dev/null cups-1.4rc1/config-scripts/cups-lspp.m4
--- /dev/null 2009-06-17 07:38:58.313242196 +0100
+++ cups-1.4rc1/config-scripts/cups-lspp.m4 2009-06-17 11:24:06.636318615 +0100
@@ -0,0 +1,36 @@
+dnl
+dnl LSPP code for the Common UNIX Printing System (CUPS).
@ -55,9 +55,9 @@ diff -up /dev/null cups-1.4b2-svn8404/config-scripts/cups-lspp.m4
+ ;;
+ esac
+fi
diff -up cups-1.4b2-svn8404/configure.in.lspp cups-1.4b2-svn8404/configure.in
--- cups-1.4b2-svn8404/configure.in.lspp 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/configure.in 2009-04-17 16:48:03.000000000 +0100
diff -up cups-1.4rc1/configure.in.lspp cups-1.4rc1/configure.in
--- cups-1.4rc1/configure.in.lspp 2008-11-14 19:32:22.000000000 +0000
+++ cups-1.4rc1/configure.in 2009-06-17 11:24:06.636318615 +0100
@@ -42,6 +42,8 @@ sinclude(config-scripts/cups-pap.m4)
sinclude(config-scripts/cups-pdf.m4)
sinclude(config-scripts/cups-scripting.m4)
@ -67,9 +67,9 @@ diff -up cups-1.4b2-svn8404/configure.in.lspp cups-1.4b2-svn8404/configure.in
INSTALL_LANGUAGES=""
UNINSTALL_LANGUAGES=""
LANGFILES=""
diff -up cups-1.4b2-svn8404/cups/cups.h.lspp cups-1.4b2-svn8404/cups/cups.h
--- cups-1.4b2-svn8404/cups/cups.h.lspp 2009-03-05 10:54:00.000000000 +0000
+++ cups-1.4b2-svn8404/cups/cups.h 2009-04-17 16:48:03.000000000 +0100
diff -up cups-1.4rc1/cups/cups.h.lspp cups-1.4rc1/cups/cups.h
--- cups-1.4rc1/cups/cups.h.lspp 2009-05-22 22:46:12.000000000 +0100
+++ cups-1.4rc1/cups/cups.h 2009-06-17 11:24:06.637318262 +0100
@@ -15,6 +15,9 @@
* This file is subject to the Apple OS-Developed Software exception.
*/
@ -93,9 +93,9 @@ diff -up cups-1.4b2-svn8404/cups/cups.h.lspp cups-1.4b2-svn8404/cups/cups.h
/*
* Types and structures...
*/
diff -up cups-1.4b2-svn8404/data/Makefile.lspp cups-1.4b2-svn8404/data/Makefile
--- cups-1.4b2-svn8404/data/Makefile.lspp 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/data/Makefile 2009-04-17 16:48:03.000000000 +0100
diff -up cups-1.4rc1/data/Makefile.lspp cups-1.4rc1/data/Makefile
--- cups-1.4rc1/data/Makefile.lspp 2008-11-12 19:30:57.000000000 +0000
+++ cups-1.4rc1/data/Makefile 2009-06-17 11:24:06.638317553 +0100
@@ -25,7 +25,10 @@ BANNERS = \
secret \
standard \
@ -108,9 +108,9 @@ diff -up cups-1.4b2-svn8404/data/Makefile.lspp cups-1.4b2-svn8404/data/Makefile
CHARMAPS = \
euc-cn.txt \
diff -up /dev/null cups-1.4b2-svn8404/data/mls
--- /dev/null 2009-04-17 08:56:26.038189487 +0100
+++ cups-1.4b2-svn8404/data/mls 2009-04-17 16:48:03.000000000 +0100
diff -up /dev/null cups-1.4rc1/data/mls
--- /dev/null 2009-06-17 07:38:58.313242196 +0100
+++ cups-1.4rc1/data/mls 2009-06-17 11:24:06.639317340 +0100
@@ -0,0 +1,261 @@
+%!PS-Adobe-3.0
+%%BoundingBox: 0 0 612 792
@ -373,9 +373,9 @@ diff -up /dev/null cups-1.4b2-svn8404/data/mls
+% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $".
+%
+%%EOF
diff -up /dev/null cups-1.4b2-svn8404/data/selinux
--- /dev/null 2009-04-17 08:56:26.038189487 +0100
+++ cups-1.4b2-svn8404/data/selinux 2009-04-17 16:48:03.000000000 +0100
diff -up /dev/null cups-1.4rc1/data/selinux
--- /dev/null 2009-06-17 07:38:58.313242196 +0100
+++ cups-1.4rc1/data/selinux 2009-06-17 11:24:06.639317340 +0100
@@ -0,0 +1,261 @@
+%!PS-Adobe-3.0
+%%BoundingBox: 0 0 612 792
@ -638,9 +638,9 @@ diff -up /dev/null cups-1.4b2-svn8404/data/selinux
+% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $".
+%
+%%EOF
diff -up /dev/null cups-1.4b2-svn8404/data/te
--- /dev/null 2009-04-17 08:56:26.038189487 +0100
+++ cups-1.4b2-svn8404/data/te 2009-04-17 16:48:03.000000000 +0100
diff -up /dev/null cups-1.4rc1/data/te
--- /dev/null 2009-06-17 07:38:58.313242196 +0100
+++ cups-1.4rc1/data/te 2009-06-17 11:24:06.640317408 +0100
@@ -0,0 +1,261 @@
+%!PS-Adobe-3.0
+%%BoundingBox: 0 0 612 792
@ -903,9 +903,9 @@ diff -up /dev/null cups-1.4b2-svn8404/data/te
+% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $".
+%
+%%EOF
diff -up cups-1.4b2-svn8404/filter/common.c.lspp cups-1.4b2-svn8404/filter/common.c
--- cups-1.4b2-svn8404/filter/common.c.lspp 2008-12-03 15:39:53.000000000 +0000
+++ cups-1.4b2-svn8404/filter/common.c 2009-04-17 16:48:03.000000000 +0100
diff -up cups-1.4rc1/filter/common.c.lspp cups-1.4rc1/filter/common.c
--- cups-1.4rc1/filter/common.c.lspp 2007-07-11 22:46:42.000000000 +0100
+++ cups-1.4rc1/filter/common.c 2009-06-17 11:24:06.641317391 +0100
@@ -30,6 +30,12 @@
* Include necessary headers...
*/
@ -1074,10 +1074,10 @@ diff -up cups-1.4b2-svn8404/filter/common.c.lspp cups-1.4b2-svn8404/filter/commo
/*
diff -up cups-1.4b2-svn8404/filter/pstops.c.lspp cups-1.4b2-svn8404/filter/pstops.c
--- cups-1.4b2-svn8404/filter/pstops.c.lspp 2009-04-17 16:48:02.000000000 +0100
+++ cups-1.4b2-svn8404/filter/pstops.c 2009-04-17 16:48:03.000000000 +0100
@@ -3239,6 +3239,18 @@ write_label_prolog(pstops_doc_t *doc, /*
diff -up cups-1.4rc1/filter/pstops.c.lspp cups-1.4rc1/filter/pstops.c
--- cups-1.4rc1/filter/pstops.c.lspp 2009-06-17 11:24:06.511318859 +0100
+++ cups-1.4rc1/filter/pstops.c 2009-06-17 11:24:06.643317146 +0100
@@ -3242,6 +3242,18 @@ write_label_prolog(pstops_doc_t *doc, /*
{
const char *classification; /* CLASSIFICATION environment variable */
const char *ptr; /* Temporary string pointer */
@ -1096,7 +1096,7 @@ diff -up cups-1.4b2-svn8404/filter/pstops.c.lspp cups-1.4b2-svn8404/filter/pstop
/*
@@ -3261,6 +3273,124 @@ write_label_prolog(pstops_doc_t *doc, /*
@@ -3264,6 +3276,124 @@ write_label_prolog(pstops_doc_t *doc, /*
return;
}
@ -1221,7 +1221,7 @@ diff -up cups-1.4b2-svn8404/filter/pstops.c.lspp cups-1.4b2-svn8404/filter/pstop
/*
* Set the classification + page label string...
*/
@@ -3339,7 +3469,10 @@ write_label_prolog(pstops_doc_t *doc, /*
@@ -3342,7 +3472,10 @@ write_label_prolog(pstops_doc_t *doc, /*
doc_printf(doc, " %.0f moveto ESPpl show\n", top - 14.0);
doc_puts(doc, "pop\n");
doc_puts(doc, "}bind put\n");
@ -1232,9 +1232,9 @@ diff -up cups-1.4b2-svn8404/filter/pstops.c.lspp cups-1.4b2-svn8404/filter/pstop
/*
diff -up cups-1.4b2-svn8404/Makedefs.in.lspp cups-1.4b2-svn8404/Makedefs.in
--- cups-1.4b2-svn8404/Makedefs.in.lspp 2009-04-17 16:48:02.000000000 +0100
+++ cups-1.4b2-svn8404/Makedefs.in 2009-04-17 16:48:03.000000000 +0100
diff -up cups-1.4rc1/Makedefs.in.lspp cups-1.4rc1/Makedefs.in
--- cups-1.4rc1/Makedefs.in.lspp 2009-06-17 11:24:06.613318752 +0100
+++ cups-1.4rc1/Makedefs.in 2009-06-17 11:24:06.645317442 +0100
@@ -146,7 +146,7 @@ LIBCUPSORDER = @LIBCUPSORDER@
LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@
LINKCUPS = @LINKCUPS@ $(SSLLIBS) $(DNSSDLIBS)
@ -1253,18 +1253,18 @@ diff -up cups-1.4b2-svn8404/Makedefs.in.lspp cups-1.4b2-svn8404/Makedefs.in
.SUFFIXES: .1 .1.gz .1m .1m.gz .3 .3.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .32.o .64.o .gz
.c.o:
diff -up cups-1.4b2-svn8404/scheduler/client.c.lspp cups-1.4b2-svn8404/scheduler/client.c
--- cups-1.4b2-svn8404/scheduler/client.c.lspp 2009-04-17 16:48:03.000000000 +0100
+++ cups-1.4b2-svn8404/scheduler/client.c 2009-04-17 16:48:25.000000000 +0100
@@ -42,6 +42,7 @@
* valid_host() - Is the Host: field valid?
* write_file() - Send a file via HTTP.
* write_pipe() - Flag that data is available on the CGI pipe.
+ * client_pid_to_auid() - Get the audit login uid of the client.
diff -up cups-1.4rc1/scheduler/client.c.lspp cups-1.4rc1/scheduler/client.c
--- cups-1.4rc1/scheduler/client.c.lspp 2009-05-26 23:01:23.000000000 +0100
+++ cups-1.4rc1/scheduler/client.c 2009-06-17 11:24:32.101443240 +0100
@@ -44,6 +44,7 @@
* valid_host() - Is the Host: field valid?
* write_file() - Send a file via HTTP.
* write_pipe() - Flag that data is available on the CGI pipe.
+ * client_pid_to_auid() - Get the audit login uid of the client.
*/
/*
@@ -50,6 +51,7 @@
@@ -52,6 +53,7 @@
#include "cupsd.h"
@ -1272,7 +1272,7 @@ diff -up cups-1.4b2-svn8404/scheduler/client.c.lspp cups-1.4b2-svn8404/scheduler
#ifdef HAVE_CDSASSL
# include <Security/Security.h>
# ifdef HAVE_SECIDENTITYSEARCHPRIV_H
@@ -82,6 +84,12 @@ extern const char *cssmErrorString(int e
@@ -84,6 +86,12 @@ extern const char *cssmErrorString(int e
# include <tcpd.h>
#endif /* HAVE_TCPD_H */
@ -1285,7 +1285,7 @@ diff -up cups-1.4b2-svn8404/scheduler/client.c.lspp cups-1.4b2-svn8404/scheduler
/*
* Local functions...
@@ -383,6 +391,57 @@ cupsdAcceptClient(cupsd_listener_t *lis)
@@ -385,6 +393,57 @@ cupsdAcceptClient(cupsd_listener_t *lis)
}
#endif /* HAVE_TCPD_H */
@ -1343,7 +1343,7 @@ diff -up cups-1.4b2-svn8404/scheduler/client.c.lspp cups-1.4b2-svn8404/scheduler
#ifdef AF_INET6
if (con->http.hostaddr->addr.sa_family == AF_INET6)
cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdAcceptClient: %d from %s:%d (IPv6)",
@@ -774,6 +833,13 @@ cupsdReadClient(cupsd_client_t *con) /*
@@ -775,6 +834,13 @@ cupsdReadClient(cupsd_client_t *con) /*
mime_type_t *type; /* MIME type of file */
cupsd_printer_t *p; /* Printer */
static unsigned request_id = 0; /* Request ID for temp files */
@ -1357,7 +1357,7 @@ diff -up cups-1.4b2-svn8404/scheduler/client.c.lspp cups-1.4b2-svn8404/scheduler
status = HTTP_CONTINUE;
@@ -2050,6 +2116,67 @@ cupsdReadClient(cupsd_client_t *con) /*
@@ -2100,6 +2166,67 @@ cupsdReadClient(cupsd_client_t *con) /*
fchmod(con->file, 0640);
fchown(con->file, RunUser, Group);
fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC);
@ -1425,7 +1425,7 @@ diff -up cups-1.4b2-svn8404/scheduler/client.c.lspp cups-1.4b2-svn8404/scheduler
}
if (con->http.state != HTTP_POST_SEND)
@@ -4330,6 +4457,50 @@ make_certificate(cupsd_client_t *con) /*
@@ -4448,6 +4575,50 @@ make_certificate(cupsd_client_t *con) /*
#endif /* HAVE_SSL */
@ -1476,9 +1476,9 @@ diff -up cups-1.4b2-svn8404/scheduler/client.c.lspp cups-1.4b2-svn8404/scheduler
/*
* 'pipe_command()' - Pipe the output of a command to the remote client.
*/
diff -up cups-1.4b2-svn8404/scheduler/client.h.lspp cups-1.4b2-svn8404/scheduler/client.h
--- cups-1.4b2-svn8404/scheduler/client.h.lspp 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/client.h 2009-04-17 16:48:03.000000000 +0100
diff -up cups-1.4rc1/scheduler/client.h.lspp cups-1.4rc1/scheduler/client.h
--- cups-1.4rc1/scheduler/client.h.lspp 2009-05-26 23:01:23.000000000 +0100
+++ cups-1.4rc1/scheduler/client.h 2009-06-17 11:24:06.652317592 +0100
@@ -18,6 +18,13 @@
#endif /* HAVE_AUTHORIZATION_H */
@ -1493,7 +1493,7 @@ diff -up cups-1.4b2-svn8404/scheduler/client.h.lspp cups-1.4b2-svn8404/scheduler
/*
* HTTP client structure...
*/
@@ -63,6 +70,10 @@ struct cupsd_client_s
@@ -64,6 +71,10 @@ struct cupsd_client_s
#ifdef HAVE_AUTHORIZATION_H
AuthorizationRef authref; /* Authorization ref */
#endif /* HAVE_AUTHORIZATION_H */
@ -1504,7 +1504,7 @@ diff -up cups-1.4b2-svn8404/scheduler/client.h.lspp cups-1.4b2-svn8404/scheduler
};
#define HTTP(con) &((con)->http)
@@ -130,6 +141,9 @@ extern void cupsdStartListening(void);
@@ -133,6 +144,9 @@ extern void cupsdStartListening(void);
extern void cupsdStopListening(void);
extern void cupsdUpdateCGI(void);
extern void cupsdWriteClient(cupsd_client_t *con);
@ -1514,9 +1514,9 @@ diff -up cups-1.4b2-svn8404/scheduler/client.h.lspp cups-1.4b2-svn8404/scheduler
/*
diff -up cups-1.4b2-svn8404/scheduler/conf.c.lspp cups-1.4b2-svn8404/scheduler/conf.c
--- cups-1.4b2-svn8404/scheduler/conf.c.lspp 2009-04-17 16:48:03.000000000 +0100
+++ cups-1.4b2-svn8404/scheduler/conf.c 2009-04-17 16:48:03.000000000 +0100
diff -up cups-1.4rc1/scheduler/conf.c.lspp cups-1.4rc1/scheduler/conf.c
--- cups-1.4rc1/scheduler/conf.c.lspp 2009-06-17 11:24:06.521317718 +0100
+++ cups-1.4rc1/scheduler/conf.c 2009-06-17 11:25:04.221442770 +0100
@@ -29,6 +29,7 @@
* read_configuration() - Read a configuration file.
* read_location() - Read a <Location path> definition.
@ -1525,7 +1525,7 @@ diff -up cups-1.4b2-svn8404/scheduler/conf.c.lspp cups-1.4b2-svn8404/scheduler/c
*/
/*
@@ -50,6 +51,9 @@
@@ -54,6 +55,9 @@
# define INADDR_NONE 0xffffffff
#endif /* !INADDR_NONE */
@ -1535,7 +1535,7 @@ diff -up cups-1.4b2-svn8404/scheduler/conf.c.lspp cups-1.4b2-svn8404/scheduler/c
/*
* Configuration variable structure...
@@ -171,6 +175,10 @@ static const cupsd_var_t variables[] =
@@ -174,6 +178,10 @@ static const cupsd_var_t variables[] =
# if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
{ "ServerKey", &ServerKey, CUPSD_VARTYPE_PATHNAME },
# endif /* HAVE_LIBSSL || HAVE_GNUTLS */
@ -1546,7 +1546,7 @@ diff -up cups-1.4b2-svn8404/scheduler/conf.c.lspp cups-1.4b2-svn8404/scheduler/c
#endif /* HAVE_SSL */
{ "ServerName", &ServerName, CUPSD_VARTYPE_STRING },
{ "ServerRoot", &ServerRoot, CUPSD_VARTYPE_PATHNAME },
@@ -428,6 +436,9 @@ cupsdReadConfiguration(void)
@@ -432,6 +440,9 @@ cupsdReadConfiguration(void)
const char *tmpdir; /* TMPDIR environment variable */
struct stat tmpinfo; /* Temporary directory info */
cupsd_policy_t *p; /* Policy */
@ -1556,7 +1556,7 @@ diff -up cups-1.4b2-svn8404/scheduler/conf.c.lspp cups-1.4b2-svn8404/scheduler/c
/*
@@ -714,6 +725,25 @@ cupsdReadConfiguration(void)
@@ -718,6 +729,25 @@ cupsdReadConfiguration(void)
RunUser = getuid();
@ -1580,9 +1580,9 @@ diff -up cups-1.4b2-svn8404/scheduler/conf.c.lspp cups-1.4b2-svn8404/scheduler/c
+#endif /* WITH_LSPP */
+
cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.",
RemoteAccessEnabled ? "enabled" : "disabled");
RemotePort ? "enabled" : "disabled");
@@ -1072,11 +1102,23 @@ cupsdReadConfiguration(void)
@@ -1083,11 +1113,23 @@ cupsdReadConfiguration(void)
* Update classification setting as needed...
*/
@ -1607,7 +1607,7 @@ diff -up cups-1.4b2-svn8404/scheduler/conf.c.lspp cups-1.4b2-svn8404/scheduler/c
/*
* Check the MaxClients setting, and then allocate memory for it...
@@ -3634,6 +3676,18 @@ read_location(cups_file_t *fp, /* I - C
@@ -3646,6 +3688,18 @@ read_location(cups_file_t *fp, /* I - C
return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum);
}
@ -1626,10 +1626,10 @@ diff -up cups-1.4b2-svn8404/scheduler/conf.c.lspp cups-1.4b2-svn8404/scheduler/c
/*
* 'read_policy()' - Read a <Policy name> definition.
diff -up cups-1.4b2-svn8404/scheduler/conf.h.lspp cups-1.4b2-svn8404/scheduler/conf.h
--- cups-1.4b2-svn8404/scheduler/conf.h.lspp 2009-04-17 16:48:03.000000000 +0100
+++ cups-1.4b2-svn8404/scheduler/conf.h 2009-04-17 16:48:03.000000000 +0100
@@ -259,6 +259,12 @@ VAR char *ServerKey VALUE(NULL);
diff -up cups-1.4rc1/scheduler/conf.h.lspp cups-1.4rc1/scheduler/conf.h
--- cups-1.4rc1/scheduler/conf.h.lspp 2009-06-17 11:24:06.522318771 +0100
+++ cups-1.4rc1/scheduler/conf.h 2009-06-17 11:24:06.663317557 +0100
@@ -253,6 +253,12 @@ VAR char *ServerKey VALUE(NULL);
VAR int SSLOptions VALUE(CUPSD_SSL_NONE);
/* SSL/TLS options */
#endif /* HAVE_SSL */
@ -1642,7 +1642,7 @@ diff -up cups-1.4b2-svn8404/scheduler/conf.h.lspp cups-1.4b2-svn8404/scheduler/c
#ifdef HAVE_LAUNCHD
VAR int LaunchdTimeout VALUE(DEFAULT_KEEPALIVE);
@@ -277,6 +283,9 @@ VAR char *SystemGroupAuthKey VALUE(NULL
@@ -271,6 +277,9 @@ VAR char *SystemGroupAuthKey VALUE(NULL
/* System group auth key */
#endif /* HAVE_AUTHORIZATION_H */
@ -1652,9 +1652,9 @@ diff -up cups-1.4b2-svn8404/scheduler/conf.h.lspp cups-1.4b2-svn8404/scheduler/c
/*
* Prototypes...
diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ipp.c
--- cups-1.4b2-svn8404/scheduler/ipp.c.lspp 2009-04-17 16:48:02.000000000 +0100
+++ cups-1.4b2-svn8404/scheduler/ipp.c 2009-04-17 16:48:03.000000000 +0100
diff -up cups-1.4rc1/scheduler/ipp.c.lspp cups-1.4rc1/scheduler/ipp.c
--- cups-1.4rc1/scheduler/ipp.c.lspp 2009-06-17 11:24:06.598318705 +0100
+++ cups-1.4rc1/scheduler/ipp.c 2009-06-17 11:24:06.668442879 +0100
@@ -41,6 +41,7 @@
* cancel_all_jobs() - Cancel all print jobs.
* cancel_job() - Cancel a print job.
@ -1673,7 +1673,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
/*
* Include necessary headers...
*/
@@ -128,6 +132,14 @@ extern int mbr_check_membership_by_id(uu
@@ -124,6 +128,14 @@ extern int mbr_check_membership_by_id(uu
# endif /* HAVE_MEMBERSHIPPRIV_H */
#endif /* __APPLE__ */
@ -1688,7 +1688,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
/*
* Local functions...
@@ -161,6 +173,9 @@ static void cancel_all_jobs(cupsd_client
@@ -157,6 +169,9 @@ static void cancel_all_jobs(cupsd_client
static void cancel_job(cupsd_client_t *con, ipp_attribute_t *uri);
static void cancel_subscription(cupsd_client_t *con, int id);
static int check_rss_recipient(const char *recipient);
@ -1698,7 +1698,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
static int check_quotas(cupsd_client_t *con, cupsd_printer_t *p);
static ipp_attribute_t *copy_attribute(ipp_t *to, ipp_attribute_t *attr,
int quickcopy);
@@ -1334,6 +1349,21 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1332,6 +1347,21 @@ add_job(cupsd_client_t *con, /* I - Cl
int kbytes; /* Size of print file */
int i; /* Looping var */
int lowerpagerange; /* Page range bound */
@ -1720,7 +1720,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
@@ -1550,6 +1580,104 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1548,6 +1578,104 @@ add_job(cupsd_client_t *con, /* I - Cl
ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL,
title = "Untitled");
@ -1825,7 +1825,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
if ((job = cupsdAddJob(priority, printer->name)) == NULL)
{
send_ipp_status(con, IPP_INTERNAL_ERROR,
@@ -1558,6 +1686,32 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1556,6 +1684,32 @@ add_job(cupsd_client_t *con, /* I - Cl
return (NULL);
}
@ -1858,7 +1858,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT |
CUPS_PRINTER_REMOTE);
job->attrs = con->request;
@@ -1766,6 +1920,29 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1764,6 +1918,29 @@ add_job(cupsd_client_t *con, /* I - Cl
attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]);
attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]);
}
@ -1888,7 +1888,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
job->job_sheets = attr;
@@ -1796,6 +1973,9 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1794,6 +1971,9 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s,none\", "
"job-originating-user-name=\"%s\"",
Classification, job->username);
@ -1898,7 +1898,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
}
else if (attr->num_values == 2 &&
strcmp(attr->values[0].string.text,
@@ -1814,6 +1994,9 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1812,6 +1992,9 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-originating-user-name=\"%s\"",
attr->values[0].string.text,
attr->values[1].string.text, job->username);
@ -1908,7 +1908,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
}
else if (strcmp(attr->values[0].string.text, Classification) &&
strcmp(attr->values[0].string.text, "none") &&
@@ -1834,6 +2017,9 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1832,6 +2015,9 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-originating-user-name=\"%s\"",
attr->values[0].string.text,
attr->values[1].string.text, job->username);
@ -1918,7 +1918,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
}
}
else if (strcmp(attr->values[0].string.text, Classification) &&
@@ -1874,8 +2060,52 @@ add_job(cupsd_client_t *con, /* I - Cl
@@ -1872,8 +2058,52 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s\", "
"job-originating-user-name=\"%s\"",
Classification, job->username);
@ -1971,7 +1971,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
/*
* See if we need to add the starting sheet...
@@ -4202,6 +4432,103 @@ check_rss_recipient(
@@ -4205,6 +4435,103 @@ check_rss_recipient(
}
@ -2075,7 +2075,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
/*
* 'check_quotas()' - Check quotas for a printer and user.
*/
@@ -4753,6 +5080,15 @@ copy_banner(cupsd_client_t *con, /* I -
@@ -4756,6 +5083,15 @@ copy_banner(cupsd_client_t *con, /* I -
char attrname[255], /* Name of attribute */
*s; /* Pointer into name */
ipp_attribute_t *attr; /* Attribute */
@ -2091,7 +2091,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
cupsdLogMessage(CUPSD_LOG_DEBUG2,
@@ -4788,6 +5124,82 @@ copy_banner(cupsd_client_t *con, /* I -
@@ -4791,6 +5127,82 @@ copy_banner(cupsd_client_t *con, /* I -
fchmod(cupsFileNumber(out), 0640);
fchown(cupsFileNumber(out), RunUser, Group);
@ -2174,7 +2174,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
/*
* Try the localized banner file under the subdirectory...
@@ -4882,6 +5294,24 @@ copy_banner(cupsd_client_t *con, /* I -
@@ -4885,6 +5297,24 @@ copy_banner(cupsd_client_t *con, /* I -
else
s = attrname;
@ -2199,7 +2199,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
if (!strcmp(s, "printer-name"))
{
cupsFilePuts(out, job->dest);
@@ -6802,6 +7232,22 @@ get_job_attrs(cupsd_client_t *con, /* I
@@ -6824,6 +7254,22 @@ get_job_attrs(cupsd_client_t *con, /* I
return;
}
@ -2222,7 +2222,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
/*
* Copy attributes...
*/
@@ -7021,6 +7467,11 @@ get_jobs(cupsd_client_t *con, /* I - C
@@ -7043,6 +7489,11 @@ get_jobs(cupsd_client_t *con, /* I - C
if (username[0] && strcasecmp(username, job->username))
continue;
@ -2234,7 +2234,7 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
if (count > 0)
ippAddSeparator(con->response);
@@ -11454,6 +11905,11 @@ validate_user(cupsd_job_t *job, /* I
@@ -11425,6 +11876,11 @@ validate_user(cupsd_job_t *job, /* I
strlcpy(username, get_username(con), userlen);
@ -2246,10 +2246,10 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.lspp cups-1.4b2-svn8404/scheduler/ip
/*
* Check the username against the owner...
*/
diff -up cups-1.4b2-svn8404/scheduler/job.c.lspp cups-1.4b2-svn8404/scheduler/job.c
--- cups-1.4b2-svn8404/scheduler/job.c.lspp 2009-04-17 16:48:02.000000000 +0100
+++ cups-1.4b2-svn8404/scheduler/job.c 2009-04-17 16:48:03.000000000 +0100
@@ -65,6 +65,9 @@
diff -up cups-1.4rc1/scheduler/job.c.lspp cups-1.4rc1/scheduler/job.c
--- cups-1.4rc1/scheduler/job.c.lspp 2009-06-17 11:24:06.534317793 +0100
+++ cups-1.4rc1/scheduler/job.c 2009-06-17 11:24:06.674442529 +0100
@@ -66,6 +66,9 @@
* update_job_attrs() - Update the job-printer-* attributes.
*/
@ -2259,7 +2259,7 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.lspp cups-1.4b2-svn8404/scheduler/jo
/*
* Include necessary headers...
*/
@@ -74,6 +77,14 @@
@@ -75,6 +78,14 @@
#include <cups/backend.h>
#include <cups/dir.h>
@ -2274,7 +2274,7 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.lspp cups-1.4b2-svn8404/scheduler/jo
/*
* Design Notes for Job Management
@@ -478,6 +489,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I
@@ -505,6 +516,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I
/* PRINTER env variable */
rip_max_cache[255];
/* RIP_MAX_CACHE env variable */
@ -2289,7 +2289,7 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.lspp cups-1.4b2-svn8404/scheduler/jo
cupsdLogMessage(CUPSD_LOG_DEBUG2,
@@ -898,6 +917,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I
@@ -911,6 +930,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I
}
}
@ -2357,7 +2357,7 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.lspp cups-1.4b2-svn8404/scheduler/jo
if (Classification && !banner_page)
{
if ((attr = ippFindAttribute(job->attrs, "job-sheets",
@@ -1141,13 +1221,13 @@ cupsdContinueJob(cupsd_job_t *job) /* I
@@ -1147,13 +1227,13 @@ cupsdContinueJob(cupsd_job_t *job) /* I
if (access(command, F_OK))
{
snprintf(command, sizeof(command), "%s/backend/%s", ServerBin_compat,
@ -2373,7 +2373,7 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.lspp cups-1.4b2-svn8404/scheduler/jo
ServerBin);
}
else
@@ -1155,7 +1235,7 @@ cupsdContinueJob(cupsd_job_t *job) /* I
@@ -1161,7 +1241,7 @@ cupsdContinueJob(cupsd_job_t *job) /* I
/* Not in the compat directory either; make any error
messages use the correct directory name then. */
snprintf(command, sizeof(command), "%s/backend/%s", ServerBin,
@ -2382,7 +2382,7 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.lspp cups-1.4b2-svn8404/scheduler/jo
}
}
#endif /* __x86_64__ */
@@ -1561,6 +1641,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
@@ -1608,6 +1688,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
goto error;
}
@ -2403,7 +2403,7 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.lspp cups-1.4b2-svn8404/scheduler/jo
job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed",
IPP_TAG_INTEGER);
job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME);
@@ -1909,6 +2003,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
@@ -1957,6 +2051,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
{
char filename[1024]; /* Job control filename */
cups_file_t *fp; /* Job file */
@ -2418,7 +2418,7 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.lspp cups-1.4b2-svn8404/scheduler/jo
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p",
@@ -1927,6 +2029,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
@@ -1975,6 +2077,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
fchmod(cupsFileNumber(fp), 0600);
fchown(cupsFileNumber(fp), RunUser, Group);
@ -2495,7 +2495,7 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.lspp cups-1.4b2-svn8404/scheduler/jo
job->attrs->state = IPP_IDLE;
if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL,
@@ -2846,6 +3018,18 @@ get_options(cupsd_job_t *job, /* I - Jo
@@ -3103,6 +3275,18 @@ get_options(cupsd_job_t *job, /* I - Jo
banner_page)
continue;
@ -2514,7 +2514,7 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.lspp cups-1.4b2-svn8404/scheduler/jo
/*
* Otherwise add them to the list...
*/
@@ -3516,6 +3700,19 @@ static void
@@ -3777,6 +3961,19 @@ static void
start_job(cupsd_job_t *job, /* I - Job ID */
cupsd_printer_t *printer) /* I - Printer to print job */
{
@ -2534,7 +2534,7 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.lspp cups-1.4b2-svn8404/scheduler/jo
cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))",
job, job->id, printer, printer->name);
@@ -3629,6 +3826,106 @@ start_job(cupsd_job_t *job, /* I -
@@ -3894,6 +4091,106 @@ start_job(cupsd_job_t *job, /* I -
fcntl(job->side_pipes[1], F_SETFL,
fcntl(job->side_pipes[1], F_GETFL) | O_NONBLOCK);
@ -2641,9 +2641,9 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.lspp cups-1.4b2-svn8404/scheduler/jo
/*
* Now start the first file in the job...
*/
diff -up cups-1.4b2-svn8404/scheduler/job.h.lspp cups-1.4b2-svn8404/scheduler/job.h
--- cups-1.4b2-svn8404/scheduler/job.h.lspp 2009-03-05 10:54:00.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/job.h 2009-04-17 16:48:03.000000000 +0100
diff -up cups-1.4rc1/scheduler/job.h.lspp cups-1.4rc1/scheduler/job.h
--- cups-1.4rc1/scheduler/job.h.lspp 2009-05-11 23:46:01.000000000 +0100
+++ cups-1.4rc1/scheduler/job.h 2009-06-17 11:25:35.151318166 +0100
@@ -13,6 +13,13 @@
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
@ -2658,7 +2658,7 @@ diff -up cups-1.4b2-svn8404/scheduler/job.h.lspp cups-1.4b2-svn8404/scheduler/jo
/*
* Constants...
*/
@@ -80,6 +87,10 @@ typedef struct cupsd_job_s
@@ -83,6 +90,10 @@ struct cupsd_job_s /**** Job request *
krb5_ccache ccache; /* Kerberos credential cache */
char *ccname; /* KRB5CCNAME environment variable */
#endif /* HAVE_GSSAPI */
@ -2666,12 +2666,12 @@ diff -up cups-1.4b2-svn8404/scheduler/job.h.lspp cups-1.4b2-svn8404/scheduler/jo
+ security_context_t scon; /* Security context of job */
+ uid_t auid; /* Audit loginuid for this job */
+#endif /* WITH_LSPP */
} cupsd_job_t;
};
diff -up cups-1.4b2-svn8404/scheduler/main.c.lspp cups-1.4b2-svn8404/scheduler/main.c
--- cups-1.4b2-svn8404/scheduler/main.c.lspp 2009-04-17 16:48:02.000000000 +0100
+++ cups-1.4b2-svn8404/scheduler/main.c 2009-04-17 16:48:03.000000000 +0100
typedef struct cupsd_joblog_s /**** Job log message ****/
diff -up cups-1.4rc1/scheduler/main.c.lspp cups-1.4rc1/scheduler/main.c
--- cups-1.4rc1/scheduler/main.c.lspp 2009-06-17 11:24:06.577318612 +0100
+++ cups-1.4rc1/scheduler/main.c 2009-06-17 11:24:06.678443262 +0100
@@ -35,6 +35,8 @@
* usage() - Show scheduler usage.
*/
@ -2691,7 +2691,7 @@ diff -up cups-1.4b2-svn8404/scheduler/main.c.lspp cups-1.4b2-svn8404/scheduler/m
/*
* Local functions...
@@ -154,6 +159,9 @@ main(int argc, /* I - Number of comm
@@ -156,6 +161,9 @@ main(int argc, /* I - Number of comm
int launchd_idle_exit;
/* Idle exit on select timeout? */
#endif /* HAVE_LAUNCHD */
@ -2701,7 +2701,7 @@ diff -up cups-1.4b2-svn8404/scheduler/main.c.lspp cups-1.4b2-svn8404/scheduler/m
#ifdef HAVE_GETEUID
@@ -426,6 +434,25 @@ main(int argc, /* I - Number of comm
@@ -462,6 +470,25 @@ main(int argc, /* I - Number of comm
#endif /* DEBUG */
}
@ -2727,7 +2727,7 @@ diff -up cups-1.4b2-svn8404/scheduler/main.c.lspp cups-1.4b2-svn8404/scheduler/m
/*
* Set the timezone info...
*/
@@ -1206,6 +1233,11 @@ main(int argc, /* I - Number of comm
@@ -1230,6 +1257,11 @@ main(int argc, /* I - Number of comm
cupsdStopSelect();
@ -2739,9 +2739,9 @@ diff -up cups-1.4b2-svn8404/scheduler/main.c.lspp cups-1.4b2-svn8404/scheduler/m
return (!stop_scheduler);
}
diff -up cups-1.4b2-svn8404/scheduler/printers.c.lspp cups-1.4b2-svn8404/scheduler/printers.c
--- cups-1.4b2-svn8404/scheduler/printers.c.lspp 2009-04-17 16:48:02.000000000 +0100
+++ cups-1.4b2-svn8404/scheduler/printers.c 2009-04-17 16:48:03.000000000 +0100
diff -up cups-1.4rc1/scheduler/printers.c.lspp cups-1.4rc1/scheduler/printers.c
--- cups-1.4rc1/scheduler/printers.c.lspp 2009-06-17 11:24:06.543317142 +0100
+++ cups-1.4rc1/scheduler/printers.c 2009-06-17 11:26:11.746318088 +0100
@@ -58,6 +58,8 @@
* write_xml_string() - Write a string with XML escaping.
*/
@ -2762,9 +2762,9 @@ diff -up cups-1.4b2-svn8404/scheduler/printers.c.lspp cups-1.4b2-svn8404/schedul
/*
* 'cupsdAddPrinter()' - Add a printer to the system.
@@ -2168,6 +2174,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
{ /* No authentication */
"none"
@@ -2166,6 +2172,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
"username",
"password"
};
+#ifdef WITH_LSPP
+ char *audit_message; /* Audit message string */
@ -2776,7 +2776,7 @@ diff -up cups-1.4b2-svn8404/scheduler/printers.c.lspp cups-1.4b2-svn8404/schedul
DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
@@ -2313,6 +2326,42 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
@@ -2296,6 +2309,42 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
attr->values[1].string.text = _cupsStrAlloc(Classification ?
Classification : p->job_sheets[1]);
}
@ -2819,7 +2819,7 @@ diff -up cups-1.4b2-svn8404/scheduler/printers.c.lspp cups-1.4b2-svn8404/schedul
}
p->raw = 0;
@@ -4865,7 +4914,6 @@ write_irix_state(cupsd_printer_t *p) /*
@@ -4827,7 +4876,6 @@ write_irix_state(cupsd_printer_t *p) /*
}
#endif /* __sgi */

View File

@ -1,27 +0,0 @@
diff -up cups-1.4b2/backend/dnssd.c.missing-devices cups-1.4b2/backend/dnssd.c
--- cups-1.4b2/backend/dnssd.c.missing-devices 2009-02-19 18:24:07.000000000 +0000
+++ cups-1.4b2/backend/dnssd.c 2009-02-19 18:25:06.000000000 +0000
@@ -437,6 +437,11 @@ main(int argc, /* I - Number of comm
best->name, NULL, NULL);
best->sent = 1;
best = device;
+
+#ifdef HAVE_AVAHI
+ /* Hack so that cups-deviced doesn't miss anything (STR #3108). */
+ sleep (1);
+#endif
}
else if (best->priority > device->priority ||
(best->priority == device->priority &&
@@ -458,6 +463,11 @@ main(int argc, /* I - Number of comm
cupsBackendReport("network", device_uri, best->make_and_model,
best->name, NULL, NULL);
best->sent = 1;
+
+#ifdef HAVE_AVAHI
+ /* Hack so that cups-deviced doesn't miss anything (STR #3108). */
+ sleep (1);
+#endif
}
}
}

View File

@ -1,7 +1,7 @@
diff -up cups-1.4b2-svn8404/scheduler/conf.c.serverbin-compat cups-1.4b2-svn8404/scheduler/conf.c
--- cups-1.4b2-svn8404/scheduler/conf.c.serverbin-compat 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/conf.c 2009-03-05 11:08:57.000000000 +0000
@@ -436,6 +436,9 @@ cupsdReadConfiguration(void)
diff -up cups-1.4rc1/scheduler/conf.c.serverbin-compat cups-1.4rc1/scheduler/conf.c
--- cups-1.4rc1/scheduler/conf.c.serverbin-compat 2009-05-26 16:41:04.000000000 +0100
+++ cups-1.4rc1/scheduler/conf.c 2009-06-17 11:03:24.286442640 +0100
@@ -490,6 +490,9 @@ cupsdReadConfiguration(void)
cupsdClearString(&ServerName);
cupsdClearString(&ServerAdmin);
cupsdSetString(&ServerBin, CUPS_SERVERBIN);
@ -11,7 +11,7 @@ diff -up cups-1.4b2-svn8404/scheduler/conf.c.serverbin-compat cups-1.4b2-svn8404
cupsdSetString(&RequestRoot, CUPS_REQUESTS);
cupsdSetString(&CacheDir, CUPS_CACHEDIR);
cupsdSetString(&DataDir, CUPS_DATADIR);
@@ -1217,7 +1220,12 @@ cupsdReadConfiguration(void)
@@ -1320,7 +1323,12 @@ cupsdReadConfiguration(void)
* Read the MIME type and conversion database...
*/
@ -24,10 +24,10 @@ diff -up cups-1.4b2-svn8404/scheduler/conf.c.serverbin-compat cups-1.4b2-svn8404
snprintf(mimedir, sizeof(mimedir), "%s/mime", DataDir);
MimeDatabase = mimeLoadTypes(NULL, mimedir);
diff -up cups-1.4b2-svn8404/scheduler/conf.h.serverbin-compat cups-1.4b2-svn8404/scheduler/conf.h
--- cups-1.4b2-svn8404/scheduler/conf.h.serverbin-compat 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/conf.h 2009-03-05 11:08:57.000000000 +0000
@@ -95,6 +95,10 @@ VAR char *ConfigurationFile VALUE(NULL)
diff -up cups-1.4rc1/scheduler/conf.h.serverbin-compat cups-1.4rc1/scheduler/conf.h
--- cups-1.4rc1/scheduler/conf.h.serverbin-compat 2009-05-11 23:46:01.000000000 +0100
+++ cups-1.4rc1/scheduler/conf.h 2009-06-17 11:03:24.287442308 +0100
@@ -106,6 +106,10 @@ VAR char *ConfigurationFile VALUE(NULL)
/* Root directory for scheduler */
*ServerBin VALUE(NULL),
/* Root directory for binaries */
@ -38,9 +38,9 @@ diff -up cups-1.4b2-svn8404/scheduler/conf.h.serverbin-compat cups-1.4b2-svn8404
*StateDir VALUE(NULL),
/* Root directory for state data */
*RequestRoot VALUE(NULL),
diff -up cups-1.4b2-svn8404/scheduler/env.c.serverbin-compat cups-1.4b2-svn8404/scheduler/env.c
--- cups-1.4b2-svn8404/scheduler/env.c.serverbin-compat 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/env.c 2009-03-05 11:08:57.000000000 +0000
diff -up cups-1.4rc1/scheduler/env.c.serverbin-compat cups-1.4rc1/scheduler/env.c
--- cups-1.4rc1/scheduler/env.c.serverbin-compat 2008-06-18 23:31:26.000000000 +0100
+++ cups-1.4rc1/scheduler/env.c 2009-06-17 11:03:24.288442597 +0100
@@ -86,8 +86,13 @@ cupsdInitEnv(void)
cupsdSetEnv("LD_LIBRARY_PATH", NULL);
cupsdSetEnv("LD_PRELOAD", NULL);
@ -55,10 +55,10 @@ diff -up cups-1.4b2-svn8404/scheduler/env.c.serverbin-compat cups-1.4b2-svn8404/
cupsdSetEnv("SERVER_ADMIN", ServerAdmin);
cupsdSetEnv("SHLIB_PATH", NULL);
cupsdSetEnv("SOFTWARE", CUPS_MINIMAL);
diff -up cups-1.4b2-svn8404/scheduler/ipp.c.serverbin-compat cups-1.4b2-svn8404/scheduler/ipp.c
--- cups-1.4b2-svn8404/scheduler/ipp.c.serverbin-compat 2009-03-05 10:54:00.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/ipp.c 2009-03-05 11:08:57.000000000 +0000
@@ -2541,9 +2541,18 @@ add_printer(cupsd_client_t *con, /* I -
diff -up cups-1.4rc1/scheduler/ipp.c.serverbin-compat cups-1.4rc1/scheduler/ipp.c
--- cups-1.4rc1/scheduler/ipp.c.serverbin-compat 2009-05-26 23:01:23.000000000 +0100
+++ cups-1.4rc1/scheduler/ipp.c 2009-06-17 11:03:24.295443078 +0100
@@ -2539,9 +2539,18 @@ add_printer(cupsd_client_t *con, /* I -
* Could not find device in list!
*/
@ -77,10 +77,10 @@ diff -up cups-1.4b2-svn8404/scheduler/ipp.c.serverbin-compat cups-1.4b2-svn8404/
}
}
diff -up cups-1.4b2-svn8404/scheduler/job.c.serverbin-compat cups-1.4b2-svn8404/scheduler/job.c
--- cups-1.4b2-svn8404/scheduler/job.c.serverbin-compat 2009-03-05 10:54:00.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/job.c 2009-03-05 11:08:57.000000000 +0000
@@ -966,8 +966,32 @@ cupsdContinueJob(cupsd_job_t *job) /* I
diff -up cups-1.4rc1/scheduler/job.c.serverbin-compat cups-1.4rc1/scheduler/job.c
--- cups-1.4rc1/scheduler/job.c.serverbin-compat 2009-05-11 23:46:01.000000000 +0100
+++ cups-1.4rc1/scheduler/job.c 2009-06-17 11:03:24.305442437 +0100
@@ -972,8 +972,32 @@ cupsdContinueJob(cupsd_job_t *job) /* I
i ++, filter = (mime_filter_t *)cupsArrayNext(filters))
{
if (filter->filter[0] != '/')
@ -115,7 +115,7 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.serverbin-compat cups-1.4b2-svn8404/
else
strlcpy(command, filter->filter, sizeof(command));
@@ -1113,6 +1137,28 @@ cupsdContinueJob(cupsd_job_t *job) /* I
@@ -1119,6 +1143,28 @@ cupsdContinueJob(cupsd_job_t *job) /* I
cupsdClosePipe(job->print_pipes);
cupsdClosePipe(job->back_pipes);
cupsdClosePipe(job->side_pipes);
@ -144,17 +144,17 @@ diff -up cups-1.4b2-svn8404/scheduler/job.c.serverbin-compat cups-1.4b2-svn8404/
close(job->status_pipes[1]);
job->status_pipes[1] = -1;
diff -up cups-1.4b2-svn8404/scheduler/printers.c.serverbin-compat cups-1.4b2-svn8404/scheduler/printers.c
--- cups-1.4b2-svn8404/scheduler/printers.c.serverbin-compat 2009-03-05 10:54:00.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/printers.c 2009-03-05 11:09:46.000000000 +0000
@@ -1021,9 +1021,19 @@ cupsdLoadAllPrinters(void)
diff -up cups-1.4rc1/scheduler/printers.c.serverbin-compat cups-1.4rc1/scheduler/printers.c
--- cups-1.4rc1/scheduler/printers.c.serverbin-compat 2009-05-16 22:49:57.000000000 +0100
+++ cups-1.4rc1/scheduler/printers.c 2009-06-17 11:08:13.888317742 +0100
@@ -1015,9 +1015,19 @@ cupsdLoadAllPrinters(void)
* Backend does not exist, stop printer...
*/
+#ifdef __x86_64__
+ snprintf(line, sizeof(line), "%s/backend/%s", ServerBin_compat,
+ p->device_uri);
+ if (access(line, F_OK))
+ if (access(line, 0))
+ {
+#endif /* __x86_64__ */
+
@ -167,25 +167,25 @@ diff -up cups-1.4b2-svn8404/scheduler/printers.c.serverbin-compat cups-1.4b2-svn
}
}
@@ -3580,6 +3590,12 @@ add_printer_filter(
@@ -3549,6 +3559,12 @@ add_printer_filter(
if (stat(filename, &fileinfo))
{
+#ifdef __x86_64__
+ snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin_compat,
+ program);
+ if (access(filename, X_OK))
+ {
+ if (stat(filename, &fileinfo))
+ {
+#endif /* __x86_64__ */
memset(&fileinfo, 0, sizeof(fileinfo));
snprintf(p->state_message, sizeof(p->state_message),
"Filter \"%s\" for printer \"%s\" not available: %s",
filename, p->name, strerror(errno));
@@ -3587,6 +3603,9 @@ add_printer_filter(
@@ -3557,6 +3573,9 @@ add_printer_filter(
cupsdSetPrinterReasons(p, "+cups-missing-filter-warning");
cupsdLogMessage(CUPSD_LOG_ERROR, "%s", p->state_message);
return;
+#ifdef __x86_64__
+ }
+ }
+#endif /* __x86_64__ */
}

View File

@ -1,25 +0,0 @@
diff -up cups-1.4b2-svn8404/scheduler/cups-driverd.cxx.str3124 cups-1.4b2-svn8404/scheduler/cups-driverd.cxx
--- cups-1.4b2-svn8404/scheduler/cups-driverd.cxx.str3124 2009-02-19 17:56:47.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/cups-driverd.cxx 2009-03-10 17:46:05.000000000 +0000
@@ -1716,7 +1716,7 @@ load_ppds(const char *d, /* I - Actual
}
for (i = 0; i < (int)(sizeof(languages) / sizeof(languages[0])); i ++)
- if (!strcmp(languages[i].version, lang_version))
+ if (!strcasecmp(languages[i].version, lang_version))
break;
if (i < (int)(sizeof(languages) / sizeof(languages[0])))
@@ -1731,10 +1731,10 @@ load_ppds(const char *d, /* I - Actual
else
{
/*
- * Unknown language; use "xx"...
+ * Unknown language; use "C"...
*/
- strcpy(lang_version, "xx");
+ strcpy(lang_version, "C");
}
/*

View File

@ -1,12 +0,0 @@
diff -up cups-1.4b2-svn8404/cups/ipp.c.str3197 cups-1.4b2-svn8404/cups/ipp.c
--- cups-1.4b2-svn8404/cups/ipp.c.str3197 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/cups/ipp.c 2009-05-15 09:56:48.558436055 +0100
@@ -1431,7 +1431,7 @@ ippReadIO(void *src, /* I - Data
case IPP_TAG_NOTSETTABLE :
case IPP_TAG_DELETEATTR :
case IPP_TAG_ADMINDEFINE :
- if (attr->value_tag == IPP_TAG_NOVALUE)
+ if (attr->value_tag == tag)
{
if (n == 0)
break;

View File

@ -1,12 +0,0 @@
diff -up cups-1.4b1/cups/http.c.wbuffer cups-1.4b1/cups/http.c
--- cups-1.4b1/cups/http.c.wbuffer 2008-08-20 01:07:25.000000000 +0100
+++ cups-1.4b1/cups/http.c 2008-11-12 09:13:29.000000000 +0000
@@ -2166,7 +2166,7 @@ httpWrite2(http_t *http, /* I - Con
if (length > 0)
{
- if (http->wused && (length + http->wused) > sizeof(http->wbuffer))
+ if (http->wused && (length + http->wused) >= sizeof(http->wbuffer))
{
DEBUG_printf(("httpWrite2: Flushing buffer (wused=%d, length="
CUPS_LLFMT ")\n", http->wused, CUPS_LLCAST length));

View File

@ -1,5 +1,4 @@
%define pre b2
%define svn -svn8404
%define pre rc1
%define initdir /etc/rc.d/init.d
%define use_alternatives 1
%define lspp 1
@ -8,7 +7,7 @@
Summary: Common Unix Printing System
Name: cups
Version: 1.4
Release: 0.%{pre}.18%{?dist}
Release: 0.%{pre}.1%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source: ftp://ftp.easysw.com/pub/cups/test//cups-%{version}%{?pre}%{?svn}-source.tar.bz2
@ -33,12 +32,10 @@ Patch6: cups-banners.patch
Patch7: cups-serverbin-compat.patch
Patch8: cups-no-export-ssllibs.patch
Patch9: cups-paps.patch
Patch10: cups-wbuffer.patch
Patch11: cups-direct-usb.patch
Patch12: cups-lpr-help.patch
Patch13: cups-peercred.patch
Patch14: cups-pid.patch
Patch15: cups-str3124.patch
Patch16: cups-eggcups.patch
Patch17: cups-getpass.patch
Patch18: cups-driverd-timeout.patch
@ -48,10 +45,6 @@ Patch21: cups-usb-paperout.patch
Patch22: cups-build.patch
Patch23: cups-res_init.patch
Patch26: cups-avahi.patch
Patch27: cups-missing-devices.patch
Patch28: cups-CVE-2009-0163.patch
Patch29: cups-CVE-2009-0164.patch
Patch30: cups-str3197.patch
Patch100: cups-lspp.patch
Epoch: 1
Url: http://www.cups.org/
@ -179,12 +172,10 @@ module.
%patch7 -p1 -b .serverbin-compat
%patch8 -p1 -b .no-export-ssllibs
%patch9 -p1 -b .paps
%patch10 -p1 -b .wbuffer
%patch11 -p1 -b .direct-usb
%patch12 -p1 -b .lpr-help
%patch13 -p1 -b .peercred
%patch14 -p1 -b .pid
%patch15 -p1 -b .str3124
%patch16 -p1 -b .eggcups
%patch17 -p1 -b .getpass
%patch18 -p1 -b .driverd-timeout
@ -193,11 +184,7 @@ module.
%patch21 -p1 -b .usb-paperout
%patch22 -p1 -b .build
%patch23 -p1 -b .res_init
%patch26 -p1 -b .avahi
%patch27 -p1 -b .missing-devices
%patch28 -p1 -b .CVE-2009-0163
%patch29 -p1 -b .CVE-2009-0164
%patch30 -p1 -b .str3197
#%patch26 -p1 -b .avahi
%if %lspp
%patch100 -p1 -b .lspp
@ -396,12 +383,12 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_datadir}/%{name}/www/ja
%dir %{_datadir}/%{name}/www/pl
%dir %{_datadir}/%{name}/www/ru
%config(noreplace) %{_datadir}/%{name}/www/favicon.*
%config(noreplace) %{_datadir}/%{name}/www/images
%config(noreplace) %{_datadir}/%{name}/www/*.css
%config(noreplace) %doc %{_datadir}/%{name}/www/index.html
%config(noreplace) %doc %{_datadir}/%{name}/www/help
%config(noreplace) %doc %{_datadir}/%{name}/www/robots.txt
%config(noreplace) %doc %{_datadir}/%{name}/www/de/index.html
%config(noreplace) %doc %{_datadir}/%{name}/www/es/index.html
%config(noreplace) %doc %{_datadir}/%{name}/www/ja/index.html
%config(noreplace) %doc %{_datadir}/%{name}/www/pl/index.html
@ -435,6 +422,7 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/cups/model
%dir %{_datadir}/cups/templates
%config(noreplace) %{_datadir}/cups/templates/*.tmpl
%config(noreplace) %{_datadir}/cups/templates/de/*.tmpl
%config(noreplace) %{_datadir}/cups/templates/es/*.tmpl
%config(noreplace) %{_datadir}/cups/templates/ja/*.tmpl
%config(noreplace) %{_datadir}/cups/templates/pl/*.tmpl
@ -480,6 +468,13 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/php/modules/*.so
%changelog
* Wed Jun 17 2009 Tim Waugh <twaugh@redhat.com> 1:1.4-0.rc1.1
- 1.4rc1. No longer need str3124, CVE-2009-0163, CVE-2009-0164,
str3197, missing-devices patches.
- Disabled avahi patch for the time being. More work is needed to
port this to rc1.
- Removed wbuffer patch as it is not needed (see STR #1968).
* Fri May 15 2009 Tim Waugh <twaugh@redhat.com> 1:1.4-0.b2.18
- More complete fix for STR #3197 (bug #500859).

View File

@ -1,2 +1,2 @@
b0bb017098e8e76b8a25e666c41ce540 postscript.ppd.gz
f520304d497111b8421e12a408a8bcda cups-1.4b2-svn8404-source.tar.bz2
79948fc1a46e1a3f7aabe5a76fb99e8e cups-1.4rc1-source.tar.bz2