From 22c9029b44a790ba1ee894027431dcea1ec2aeab Mon Sep 17 00:00:00 2001 From: msweet Date: Fri, 22 Apr 2011 23:02:56 +0000 Subject: [PATCH] Merge changes from CUPS 1.5svn-r9717. git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@3171 a1ca3aef-8c08-0410-bb20-df032aa958be --- CHANGES-1.4.txt | 6 +- Makedefs.in | 2 +- backend/ipp.c | 210 +-- backend/lpd.c | 36 +- backend/snmp.c | 79 +- backend/socket.c | 29 +- backend/usb-darwin.c | 44 +- config-scripts/cups-compiler.m4 | 16 +- cups/Dependencies | 45 +- cups/api-filter.shtml | 15 +- cups/auth.c | 2 + cups/backend.h | 4 +- cups/file-private.h | 43 +- cups/file.c | 326 ++++- cups/http-addr.c | 22 + cups/http-addrlist.c | 2 +- cups/http-private.h | 2 + cups/http.c | 11 +- cups/libcups2.def | 1 + cups/libcups_s.exp | 1 + cups/ppd-cache.c | 17 +- cups/request.c | 10 +- cups/snmp.c | 7 +- cups/transcode.c | 11 +- data/media.defs | 110 +- doc/help/accounting.html | 6 +- doc/help/api-cups.html | 9 + doc/help/api-filedir.html | 4 +- doc/help/api-filter.html | 21 +- doc/help/api-mime.html | 36 +- doc/help/spec-ppd.html | 8 +- filter/Dependencies | 15 + filter/spec-ppd.header | 2 +- filter/spec-ppd.shtml | 6 + locale/cups.pot | 1858 ++++++++++++++------------ locale/cups.strings | 100 +- man/backend.man | 21 +- notifier/Dependencies | 23 +- scheduler/client.c | 91 +- scheduler/conf.c | 39 +- scheduler/conf.h | 6 +- scheduler/cups-deviced.c | 6 +- scheduler/cups-driverd.cxx | 60 +- scheduler/cups-exec.c | 20 +- scheduler/cups-polld.c | 2 +- scheduler/cupsd.h | 1 + scheduler/dirsvc.c | 12 +- scheduler/filter.c | 170 ++- scheduler/ipp.c | 14 +- scheduler/job.c | 96 +- scheduler/listen.c | 13 +- scheduler/log.c | 410 +++--- scheduler/main.c | 15 +- scheduler/mime.c | 269 +++- scheduler/network.c | 7 +- scheduler/org.cups.cupsd.plist | 11 + scheduler/printers.c | 109 +- scheduler/process.c | 108 +- scheduler/testdirsvc.c | 4 +- scheduler/testmime.c | 229 +++- scheduler/type.c | 150 ++- scheduler/util.c | 2 +- scheduler/util.h | 2 +- systemv/cupstestppd.c | 158 ++- test/get-jobs.test | 4 +- test/ippserver.c | 22 +- xcode/CUPS.xcodeproj/project.pbxproj | 485 ++++++- 67 files changed, 3666 insertions(+), 2009 deletions(-) diff --git a/CHANGES-1.4.txt b/CHANGES-1.4.txt index f9191242e..1cf3a8f22 100644 --- a/CHANGES-1.4.txt +++ b/CHANGES-1.4.txt @@ -4,11 +4,15 @@ CHANGES-1.4.txt CHANGES IN CUPS V1.4.7 - Documentation changes (STR #3710, STR #3720, STR #3745, STR #3750, - STR #3757, STR #3758, STR #3782) + STR #3757, STR #3758, STR #3782, STR #3826, STR #3829) - Web interface fixes (STR #3412, STR #3345, STR #3455, STR #3707, STR #3755, STR #3769, STR #3783) - Configure script fixes (STR #3659, STR #3691) - Compilation fixes (STR #3718, STR #3771, STR #3774) + - The scheduler might leave old job data files in the spool directory + (STR #3795) + - CUPS did not work with locales using the ASCII character set + (STR #3832) - httpAddrString() did not return a URI-style IPv6 numeric address (STR #3814) - Fixed an issue when reading compressed CUPS raster streams (STR #3812) diff --git a/Makedefs.in b/Makedefs.in index 61f12bb59..10fb71da8 100644 --- a/Makedefs.in +++ b/Makedefs.in @@ -3,7 +3,7 @@ # # Common makefile definitions for CUPS. # -# Copyright 2007-2010 by Apple Inc. +# Copyright 2007-2011 by Apple Inc. # Copyright 1997-2007 by Easy Software Products, all rights reserved. # # These coded instructions, statements, and computer programs are the diff --git a/backend/ipp.c b/backend/ipp.c index d54bd3def..7fac198ed 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -640,22 +640,20 @@ main(int argc, /* I - Number of command-line args */ { case EHOSTDOWN : _cupsLangPrintFilter(stderr, "WARNING", - _("Network printer \"%s\" may not exist or " - "is unavailable at this time."), - hostname); + _("The printer may not exist or " + "is unavailable at this time.")); break; case EHOSTUNREACH : _cupsLangPrintFilter(stderr, "WARNING", - _("Network printer \"%s\" is unreachable at " - "this time."), hostname); + _("The printer is unreachable at this " + "time.")); break; case ECONNREFUSED : default : _cupsLangPrintFilter(stderr, "WARNING", - _("Network printer \"%s\" is busy."), - hostname); + _("The printer is busy.")); break; } @@ -666,8 +664,7 @@ main(int argc, /* I - Number of command-line args */ else { _cupsLangPrintFilter(stderr, "ERROR", - _("Network printer \"%s\" is not responding."), - hostname); + _("The printer is not responding.")); sleep(30); } @@ -685,17 +682,9 @@ main(int argc, /* I - Number of command-line args */ fputs("STATE: -connecting-to-device\n", stderr); _cupsLangPrintFilter(stderr, "INFO", _("Connected to printer.")); -#ifdef AF_INET6 - if (http->hostaddr->addr.sa_family == AF_INET6) - fprintf(stderr, "DEBUG: Connected to [%s]:%d (IPv6)...\n", - httpAddrString(http->hostaddr, addrname, sizeof(addrname)), - ntohs(http->hostaddr->ipv6.sin6_port)); - else -#endif /* AF_INET6 */ - if (http->hostaddr->addr.sa_family == AF_INET) - fprintf(stderr, "DEBUG: Connected to %s:%d (IPv4)...\n", - httpAddrString(http->hostaddr, addrname, sizeof(addrname)), - ntohs(http->hostaddr->ipv4.sin_port)); + fprintf(stderr, "DEBUG: Connected to %s:%d...\n", + httpAddrString(http->hostaddr, addrname, sizeof(addrname)), + _httpAddrPort(http->hostaddr)); /* * Build a URI for the printer and fill the standard IPP attributes for @@ -763,6 +752,9 @@ main(int argc, /* I - Number of command-line args */ supported = cupsDoRequest(http, request, resource); ipp_status = cupsLastError(); + fprintf(stderr, "DEBUG: Get-Printer-Attributes: %s (%s)\n", + ippErrorString(ipp_status), cupsLastErrorString()); + if (ipp_status > IPP_OK_CONFLICT) { fprintf(stderr, "DEBUG: Get-Printer-Attributes returned %s.\n", @@ -778,9 +770,7 @@ main(int argc, /* I - Number of command-line args */ return (CUPS_BACKEND_FAILED); } - _cupsLangPrintFilter(stderr, "WARNING", - _("Network host \"%s\" is busy; will retry in %d " - "seconds."), hostname, delay); + _cupsLangPrintFilter(stderr, "INFO", _("The printer is busy.")); report_printer_state(supported, 0); @@ -818,8 +808,7 @@ main(int argc, /* I - Number of command-line args */ _("The printer URI is incorrect or no longer " "exists.")); - if (supported) - ippDelete(supported); + ippDelete(supported); return (CUPS_BACKEND_STOP); } @@ -835,17 +824,49 @@ main(int argc, /* I - Number of command-line args */ else { _cupsLangPrintFilter(stderr, "ERROR", - _("Unable to get printer status: %s"), - cupsLastErrorString()); + _("Unable to get printer status.")); sleep(10); } - if (supported) - ippDelete(supported); - + ippDelete(supported); + supported = NULL; continue; } + /* + * Check printer-state-reasons for the "spool-area-full" keyword... + */ + + if ((printer_state = ippFindAttribute(supported, "printer-state-reasons", + IPP_TAG_KEYWORD)) != NULL) + { + for (i = 0; i < printer_state->num_values; i ++) + if (!strcmp(printer_state->values[0].string.text, "spool-area-full") || + !strncmp(printer_state->values[0].string.text, "spool-area-full-", + 16)) + break; + + if (i < printer_state->num_values) + { + _cupsLangPrintFilter(stderr, "INFO", _("The printer is busy.")); + + report_printer_state(supported, 0); + + sleep(delay); + + delay = _cupsNextDelay(delay, &prev_delay); + + ippDelete(supported); + supported = NULL; + continue; + } + } + else + _cupsLangPrintFilter(stderr, "ERROR", + _("This printer does not conform to the IPP " + "standard. Please contact the manufacturer of " + "your printer for assistance.")); + /* * Check for supported attributes... */ @@ -1086,7 +1107,7 @@ main(int argc, /* I - Number of command-line args */ * Validate access to the printer... */ - while (!job_canceled) + while (!job_canceled && validate_job) { request = new_request(IPP_VALIDATE_JOB, version, uri, argv[2], argv[3], num_options, options, compression, @@ -1097,48 +1118,47 @@ main(int argc, /* I - Number of command-line args */ ipp_status = cupsLastError(); - if (ipp_status > IPP_OK_CONFLICT && - ipp_status != IPP_OPERATION_NOT_SUPPORTED) - { - if (job_canceled) - break; + fprintf(stderr, "DEBUG: Validate-Job: %s (%s)\n", + ippErrorString(ipp_status), cupsLastErrorString()); - if (ipp_status == IPP_SERVICE_UNAVAILABLE || - ipp_status == IPP_PRINTER_BUSY) - { - _cupsLangPrintFilter(stderr, "INFO", - _("Printer busy; will retry in 10 seconds.")); - sleep(10); - } - else - { - /* - * Update auth-info-required as needed... - */ + if (job_canceled) + break; - _cupsLangPrintFilter(stderr, "ERROR", "%s", cupsLastErrorString()); + if (ipp_status == IPP_SERVICE_UNAVAILABLE || ipp_status == IPP_PRINTER_BUSY) + { + _cupsLangPrintFilter(stderr, "INFO", _("The printer is busy.")); + sleep(10); + } + else if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) + { + /* + * Update auth-info-required as needed... + */ - if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) - { - fprintf(stderr, "DEBUG: WWW-Authenticate=\"%s\"\n", - httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE)); + fprintf(stderr, "DEBUG: WWW-Authenticate=\"%s\"\n", + httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE)); - /* - * Normal authentication goes through the password callback, which sets - * auth_info_required to "username,password". Kerberos goes directly - * through GSSAPI, so look for Negotiate in the WWW-Authenticate header - * here and set auth_info_required as needed... - */ + /* + * Normal authentication goes through the password callback, which sets + * auth_info_required to "username,password". Kerberos goes directly + * through GSSAPI, so look for Negotiate in the WWW-Authenticate header + * here and set auth_info_required as needed... + */ - if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE), - "Negotiate", 9)) - auth_info_required = "negotiate"; - } + if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE), + "Negotiate", 9)) + auth_info_required = "negotiate"; - goto cleanup; - } + goto cleanup; } - else + else if (ipp_status == IPP_OPERATION_NOT_SUPPORTED) + { + _cupsLangPrintFilter(stderr, "WARNING", + _("This printer does not conform to the IPP " + "standard and may not work.")); + break; + } + else if (ipp_status < IPP_REDIRECTION_OTHER_SITE) break; } @@ -1220,6 +1240,10 @@ main(int argc, /* I - Number of command-line args */ ipp_status = cupsLastError(); + fprintf(stderr, "DEBUG: %s: %s (%s)\n", + num_files > 1 ? "Create-Job" : "Print-Job", + ippErrorString(ipp_status), cupsLastErrorString()); + if (ipp_status > IPP_OK_CONFLICT) { job_id = 0; @@ -1230,9 +1254,18 @@ main(int argc, /* I - Number of command-line args */ if (ipp_status == IPP_SERVICE_UNAVAILABLE || ipp_status == IPP_PRINTER_BUSY) { - _cupsLangPrintFilter(stderr, "INFO", - _("Printer busy; will retry in 10 seconds.")); + _cupsLangPrintFilter(stderr, "INFO", _("The printer is busy.")); sleep(10); + + if (num_files == 0) + { + /* + * We can't re-submit when we have no files to print, so exit + * immediately with the right status code... + */ + + goto cleanup; + } } else { @@ -1241,8 +1274,7 @@ main(int argc, /* I - Number of command-line args */ */ _cupsLangPrintFilter(stderr, "ERROR", - _("Print file was not accepted: %s"), - cupsLastErrorString()); + _("Print file was not accepted.")); if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) { @@ -1260,6 +1292,18 @@ main(int argc, /* I - Number of command-line args */ "Negotiate", 9)) auth_info_required = "negotiate"; } + else + sleep(10); + + if (num_files == 0) + { + /* + * We can't re-submit when we have no files to print, so exit + * immediately with the right status code... + */ + + goto cleanup; + } } } else if ((job_id_attr = ippFindAttribute(response, "job-id", @@ -1340,13 +1384,15 @@ main(int argc, /* I - Number of command-line args */ ippDelete(cupsGetResponse(http, resource)); ippDelete(request); + fprintf(stderr, "DEBUG: Send-Document: %s (%s)\n", + ippErrorString(cupsLastError()), cupsLastErrorString()); + if (cupsLastError() > IPP_OK_CONFLICT) { ipp_status = cupsLastError(); _cupsLangPrintFilter(stderr, "ERROR", - _("Unable to add file to job: %s"), - cupsLastErrorString()); + _("Unable to add document to print job.")); break; } } @@ -1422,6 +1468,9 @@ main(int argc, /* I - Number of command-line args */ break; } + fprintf(stderr, "DEBUG: Get-Job-Attributes: %s (%s)\n", + ippErrorString(ipp_status), cupsLastErrorString()); + if (ipp_status > IPP_OK_CONFLICT) { if (ipp_status != IPP_SERVICE_UNAVAILABLE && @@ -1430,8 +1479,7 @@ main(int argc, /* I - Number of command-line args */ ippDelete(response); _cupsLangPrintFilter(stderr, "ERROR", - _("Unable to get job attributes: %s"), - cupsLastErrorString()); + _("Unable to get print job status.")); break; } } @@ -1574,8 +1622,11 @@ main(int argc, /* I - Number of command-line args */ return (CUPS_BACKEND_AUTH_REQUIRED); else if (ipp_status == IPP_INTERNAL_ERROR) return (CUPS_BACKEND_STOP); - else if (ipp_status > IPP_OK_CONFLICT) + else if (ipp_status == IPP_DOCUMENT_FORMAT || + ipp_status == IPP_CONFLICT) return (CUPS_BACKEND_FAILED); + else if (ipp_status > IPP_OK_CONFLICT) + return (CUPS_BACKEND_RETRY_CURRENT); else { _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.")); @@ -1620,8 +1671,7 @@ cancel_job(http_t *http, /* I - HTTP connection */ ippDelete(cupsDoRequest(http, request, resource)); if (cupsLastError() > IPP_OK_CONFLICT) - _cupsLangPrintFilter(stderr, "ERROR", _("Unable to cancel job: %s"), - cupsLastErrorString()); + _cupsLangPrintFilter(stderr, "ERROR", _("Unable to cancel print job.")); } @@ -1675,6 +1725,9 @@ check_printer_state( ippDelete(response); } + fprintf(stderr, "DEBUG: Get-Printer-Attributes: %s (%s)\n", + ippErrorString(cupsLastError()), cupsLastErrorString()); + /* * Return the printer-state value... */ @@ -1831,6 +1884,9 @@ monitor_printer( response = cupsDoRequest(http, request, monitor->resource); + fprintf(stderr, "DEBUG: Get-Job-Attributes: %s (%s)\n", + ippErrorString(cupsLastError()), cupsLastErrorString()); + if ((attr = ippFindAttribute(response, "job-state", IPP_TAG_ENUM)) != NULL) monitor->job_state = (ipp_jstate_t)attr->values[0].integer; diff --git a/backend/lpd.c b/backend/lpd.c index af690adb0..d17493af3 100644 --- a/backend/lpd.c +++ b/backend/lpd.c @@ -816,22 +816,20 @@ lpd_queue(const char *hostname, /* I - Host to connect to */ { case EHOSTDOWN : _cupsLangPrintFilter(stderr, "WARNING", - _("Network printer \"%s\" may not exist or " - "is unavailable at this time."), - hostname); + _("The printer may not exist or " + "is unavailable at this time.")); break; case EHOSTUNREACH : _cupsLangPrintFilter(stderr, "WARNING", - _("Network printer \"%s\" is unreachable at " - "this time."), hostname); + _("The printer is unreachable at " + "this time.")); break; case ECONNREFUSED : default : _cupsLangPrintFilter(stderr, "WARNING", - _("Network printer \"%s\" is busy."), - hostname); + _("The printer is busy.")); break; } @@ -851,8 +849,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */ else { _cupsLangPrintFilter(stderr, "ERROR", - _("Network printer \"%s\" is not responding."), - hostname); + _("The printer is not responding.")); sleep(30); } } @@ -860,17 +857,9 @@ lpd_queue(const char *hostname, /* I - Host to connect to */ fputs("STATE: -connecting-to-device\n", stderr); _cupsLangPrintFilter(stderr, "INFO", _("Connected to printer.")); -#ifdef AF_INET6 - if (addr->addr.addr.sa_family == AF_INET6) - fprintf(stderr, "DEBUG: Connected to [%s]:%d (IPv6) (local port %d)...\n", - httpAddrString(&addr->addr, addrname, sizeof(addrname)), - ntohs(addr->addr.ipv6.sin6_port), lport); - else -#endif /* AF_INET6 */ - if (addr->addr.addr.sa_family == AF_INET) - fprintf(stderr, "DEBUG: Connected to %s:%d (IPv4) (local port %d)...\n", - httpAddrString(&addr->addr, addrname, sizeof(addrname)), - ntohs(addr->addr.ipv4.sin_port), lport); + fprintf(stderr, "DEBUG: Connected to %s:%d (local port %d)...\n", + httpAddrString(&(addr->addr), addrname, sizeof(addrname)), + _httpAddrPort(&(addr->addr)), lport); /* * See if the printer supports SNMP... @@ -1278,12 +1267,7 @@ rresvport_af(int *port, /* IO - Port number to bind to */ * Set the port number... */ -# ifdef AF_INET6 - if (family == AF_INET6) - addr.ipv6.sin6_port = htons(*port); - else -# endif /* AF_INET6 */ - addr.ipv4.sin_port = htons(*port); + _httpAddrSetPort(&addr, *port); /* * Try binding the port to the socket; return if all is OK... diff --git a/backend/snmp.c b/backend/snmp.c index aa66c16ce..34494d0e7 100644 --- a/backend/snmp.c +++ b/backend/snmp.c @@ -1,9 +1,9 @@ /* * "$Id: snmp.c 7810 2008-07-29 01:11:15Z mike $" * - * SNMP discovery backend for the Common UNIX Printing System (CUPS). + * SNMP discovery backend for CUPS. * - * Copyright 2007-2009 by Apple Inc. + * Copyright 2007-2011 by Apple Inc. * Copyright 2006-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -164,7 +164,7 @@ static void probe_device(snmp_cache_t *device); static void read_snmp_conf(const char *address); static void read_snmp_response(int fd); static double run_time(void); -static void scan_devices(int fd); +static void scan_devices(int ipv4, int ipv6); static int try_connect(http_addr_t *addr, const char *addrname, int port); static void update_cache(snmp_cache_t *device, const char *uri, @@ -202,7 +202,8 @@ int /* O - Exit status */ main(int argc, /* I - Number of command-line arguments (6 or 7) */ char *argv[]) /* I - Command-line arguments */ { - int fd; /* SNMP socket */ + int ipv4, /* SNMP IPv4 socket */ + ipv6; /* SNMP IPv6 socket */ #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) struct sigaction action; /* Actions for POSIX signals */ #endif /* HAVE_SIGACTION && !HAVE_SIGSET */ @@ -245,9 +246,16 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ * Open the SNMP socket... */ - if ((fd = _cupsSNMPOpen(AF_INET)) < 0) + if ((ipv4 = _cupsSNMPOpen(AF_INET)) < 0) return (1); +#ifdef AF_INET6 + if ((ipv6 = _cupsSNMPOpen(AF_INET6)) < 0) + return (1); +#else + ipv6 = -1; +#endif /* AF_INET6 */ + /* * Read the configuration file and any cache data... */ @@ -262,13 +270,15 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ * Scan for devices... */ - scan_devices(fd); + scan_devices(ipv4, ipv6); /* * Close, free, and return with no errors... */ - _cupsSNMPClose(fd); + _cupsSNMPClose(ipv4); + if (ipv6 >= 0) + _cupsSNMPClose(ipv6); free_array(Addresses); free_array(Communities); @@ -708,7 +718,7 @@ probe_device(snmp_cache_t *device) /* I - Device */ #ifdef __APPLE__ /* - * TODO: Try an mDNS query first, and then fallback on direct probes... + * If the printer supports Bonjour/mDNS, don't report it from the SNMP backend. */ if (!try_connect(&(device->address), device->addrname, 5353)) @@ -1146,8 +1156,11 @@ run_time(void) */ static void -scan_devices(int fd) /* I - SNMP socket */ +scan_devices(int ipv4, /* I - SNMP IPv4 socket */ + int ipv6) /* I - SNMP IPv6 socket */ { + int fd, /* File descriptor for this address */ + busy; /* Are we busy processing something? */ char *address, /* Current address */ *community; /* Current community */ fd_set input; /* Input set for select() */ @@ -1156,6 +1169,7 @@ scan_devices(int fd) /* I - SNMP socket */ http_addrlist_t *addrs, /* List of addresses */ *addr; /* Current address */ snmp_cache_t *device; /* Current device */ + char temp[1024]; /* Temporary address string */ gettimeofday(&StartTime, NULL); @@ -1174,7 +1188,6 @@ scan_devices(int fd) /* I - SNMP socket */ { char ifname[255]; /* Interface name */ - strlcpy(ifname, address + 4, sizeof(ifname)); if (ifname[0]) ifname[strlen(ifname) - 1] = '\0'; @@ -1182,7 +1195,7 @@ scan_devices(int fd) /* I - SNMP socket */ addrs = get_interface_addresses(ifname); } else - addrs = httpAddrGetList(address, AF_INET, NULL); + addrs = httpAddrGetList(address, AF_UNSPEC, NULL); if (!addrs) { @@ -1198,8 +1211,20 @@ scan_devices(int fd) /* I - SNMP socket */ community, address); for (addr = addrs; addr; addr = addr->next) + { +#ifdef AF_INET6 + if (_httpAddrFamily(&(addr->addr)) == AF_INET6) + fd = ipv6; + else +#endif /* AF_INET6 */ + fd = ipv4; + + debug_printf("DEBUG: Sending get request to %s...\n", + httpAddrString(&(addr->addr), temp, sizeof(temp))); + _cupsSNMPWrite(fd, &(addr->addr), CUPS_SNMP_VERSION_1, community, CUPS_ASN1_GET_REQUEST, DEVICE_TYPE, DeviceTypeOID); + } } httpAddrFreeList(addrs); @@ -1218,17 +1243,33 @@ scan_devices(int fd) /* I - SNMP socket */ timeout.tv_sec = 2; timeout.tv_usec = 0; - FD_SET(fd, &input); + FD_SET(ipv4, &input); + if (ipv6 >= 0) + FD_SET(ipv6, &input); + + fd = ipv4 > ipv6 ? ipv4 : ipv6; if (select(fd + 1, &input, NULL, NULL, &timeout) < 0) { - fprintf(stderr, "ERROR: %.3f select() for %d failed: %s\n", run_time(), - fd, strerror(errno)); + fprintf(stderr, "ERROR: %.3f select() for %d/%d failed: %s\n", run_time(), + ipv4, ipv6, strerror(errno)); break; } - if (FD_ISSET(fd, &input)) - read_snmp_response(fd); - else + busy = 0; + + if (FD_ISSET(ipv4, &input)) + { + read_snmp_response(ipv4); + busy = 1; + } + + if (ipv6 >= 0 && FD_ISSET(ipv6, &input)) + { + read_snmp_response(ipv6); + busy = 1; + } + + if (!busy) { /* * List devices with complete information... @@ -1274,14 +1315,14 @@ try_connect(http_addr_t *addr, /* I - Socket address */ debug_printf("DEBUG: %.3f Trying %s://%s:%d...\n", run_time(), port == 515 ? "lpd" : "socket", addrname, port); - if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) + if ((fd = socket(_httpAddrFamily(addr), SOCK_STREAM, 0)) < 0) { fprintf(stderr, "ERROR: Unable to create socket: %s\n", strerror(errno)); return (-1); } - addr->ipv4.sin_port = htons(port); + _httpAddrSetPort(addr, port); alarm(1); diff --git a/backend/socket.c b/backend/socket.c index 414955948..d993dbabc 100644 --- a/backend/socket.c +++ b/backend/socket.c @@ -352,22 +352,20 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ { case EHOSTDOWN : _cupsLangPrintFilter(stderr, "WARNING", - _("Network printer \"%s\" may not exist or " - "is unavailable at this time."), - hostname); + _("The printer may not exist or " + "is unavailable at this time.")); break; case EHOSTUNREACH : _cupsLangPrintFilter(stderr, "WARNING", - _("Network printer \"%s\" is unreachable at " - "this time."), hostname); + _("The printer is unreachable at this " + "time.")); break; case ECONNREFUSED : default : _cupsLangPrintFilter(stderr, "WARNING", - _("Network printer \"%s\" is busy."), - hostname); + _("The printer is busy.")); break; } @@ -379,8 +377,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ else { _cupsLangPrintFilter(stderr, "ERROR", - _("Network printer \"%s\" is not responding."), - hostname); + _("The printer is not responding.")); sleep(30); } } @@ -391,17 +388,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ fputs("STATE: -connecting-to-device\n", stderr); _cupsLangPrintFilter(stderr, "INFO", _("Connected to printer.")); -#ifdef AF_INET6 - if (addr->addr.addr.sa_family == AF_INET6) - fprintf(stderr, "DEBUG: Connected to [%s]:%d (IPv6)...\n", - httpAddrString(&addr->addr, addrname, sizeof(addrname)), - ntohs(addr->addr.ipv6.sin6_port)); - else -#endif /* AF_INET6 */ - if (addr->addr.addr.sa_family == AF_INET) - fprintf(stderr, "DEBUG: Connected to %s:%d (IPv4)...\n", - httpAddrString(&addr->addr, addrname, sizeof(addrname)), - ntohs(addr->addr.ipv4.sin_port)); + fprintf(stderr, "DEBUG: Connected to %s:%d...\n", + httpAddrString(&(addr->addr), addrname, sizeof(addrname)), + _httpAddrPort(&(addr->addr))); /* * Print everything... diff --git a/backend/usb-darwin.c b/backend/usb-darwin.c index 0733891b1..63061fc13 100644 --- a/backend/usb-darwin.c +++ b/backend/usb-darwin.c @@ -89,10 +89,10 @@ #include #include #include +#include #include #include #include "backend-private.h" - #include #include #include @@ -1405,7 +1405,6 @@ static kern_return_t load_classdriver(CFStringRef driverPath, classdriver_t **driver = NULL; CFStringRef bundle = driverPath ? driverPath : kUSBGenericTOPrinterClassDriver; char bundlestr[1024]; /* Bundle path */ - struct stat bundleinfo; /* File information for bundle */ CFURLRef url; /* URL for driver */ CFPlugInRef plugin = NULL; /* Plug-in address */ @@ -1416,41 +1415,14 @@ static kern_return_t load_classdriver(CFStringRef driverPath, * Validate permissions for the class driver... */ - if (stat(bundlestr, &bundleinfo)) - { - fprintf(stderr, "DEBUG: Class driver \"%s\" not available: %s\n", - bundlestr, strerror(errno)); - fputs("STATE: +cups-missing-filter-warning\n", stderr); + _cups_fc_result_t result = _cupsFileCheck(bundlestr, + _CUPS_FILE_CHECK_DIRECTORY, 1, + _cupsFileCheckFilter, NULL); - if (errno == ENOENT && driverPath) - return (load_classdriver(NULL, intf, printerDriver)); - else - return (kr); - } - else if (bundleinfo.st_uid || - (bundleinfo.st_gid && (bundleinfo.st_mode & S_IWGRP)) || - (bundleinfo.st_mode & S_IWOTH)) - { - fprintf(stderr, "DEBUG: Class driver \"%s\" has insecure file " - "permissions (0%o/uid=%d/gid=%d).\n", bundlestr, - bundleinfo.st_mode, (int)bundleinfo.st_uid, - (int)bundleinfo.st_gid); - if (bundleinfo.st_uid || - (bundleinfo.st_gid && bundleinfo.st_gid != 80 && - (bundleinfo.st_mode & S_IWGRP)) || - (bundleinfo.st_mode & (S_ISUID | S_IWOTH))) - fputs("STATE: +cups-insecure-filter-warning\n", stderr); - - if (bundleinfo.st_uid || - (bundleinfo.st_gid && bundleinfo.st_gid != 80 && - (bundleinfo.st_mode & S_IWOTH))) - { - if (driverPath) - return (load_classdriver(NULL, intf, printerDriver)); - else - return (kr); - } - } + if (result && driverPath) + return (load_classdriver(NULL, intf, printerDriver)); + else if (result) + return (kr); /* * Try loading the class driver... diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4 index a733269a1..34050c7ef 100644 --- a/config-scripts/cups-compiler.m4 +++ b/config-scripts/cups-compiler.m4 @@ -1,9 +1,9 @@ dnl dnl "$Id: cups-compiler.m4 7871 2008-08-27 21:12:43Z mike $" dnl -dnl Compiler stuff for the Common UNIX Printing System (CUPS). +dnl Compiler stuff for CUPS. dnl -dnl Copyright 2007-2009 by Apple Inc. +dnl Copyright 2007-2011 by Apple Inc. dnl Copyright 1997-2007 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -131,15 +131,15 @@ if test -n "$GCC"; then AC_MSG_RESULT(no)) CFLAGS="$OLDCFLAGS" - # The -pie option is available with some versions of GCC and adds + # The -fPIE option is available with some versions of GCC and adds # randomization of addresses, which avoids another class of exploits # that depend on a fixed address for common functions. - AC_MSG_CHECKING(if GCC supports -pie) + AC_MSG_CHECKING(if GCC supports -fPIE) OLDCFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -pie -fPIE" + CFLAGS="$CFLAGS -fPIE" AC_TRY_COMPILE(,, - PIEFLAGS="-pie -fPIE" - AC_MSG_RESULT(yes), + [PIEFLAGS="-fPIE -Wl,-pie" + AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) CFLAGS="$OLDCFLAGS" @@ -160,7 +160,7 @@ if test -n "$GCC"; then # checking, basically wrapping all string functions # with buffer-limited ones. Not strictly needed for # CUPS since we already use buffer-limited calls, but - # this will catch any additions that are broken. + # this will catch any additions that are broken. CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" if test x$enable_pie = xyes; then diff --git a/cups/Dependencies b/cups/Dependencies index 5ce028e00..5b374f882 100644 --- a/cups/Dependencies +++ b/cups/Dependencies @@ -149,21 +149,16 @@ ppd.o: language.h string-private.h ../config.h debug-private.h ppd-private.h ppd.o: ../cups/ppd.h cups.h pwg-private.h http-private.h ../cups/http.h ppd.o: md5-private.h ipp-private.h ../cups/ipp.h language-private.h ppd.o: ../cups/transcode.h thread-private.h -pwg-file.o: cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h -pwg-file.o: array.h language.h string-private.h ../config.h debug-private.h -pwg-file.o: ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h -pwg-file.o: ../cups/http.h md5-private.h ipp-private.h ../cups/ipp.h -pwg-file.o: language-private.h ../cups/transcode.h thread-private.h +ppd-cache.o: cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h +ppd-cache.o: array.h language.h string-private.h ../config.h debug-private.h +ppd-cache.o: ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h +ppd-cache.o: ../cups/http.h md5-private.h ipp-private.h ../cups/ipp.h +ppd-cache.o: language-private.h ../cups/transcode.h thread-private.h pwg-media.o: cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h pwg-media.o: array.h language.h string-private.h ../config.h debug-private.h pwg-media.o: ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h pwg-media.o: ../cups/http.h md5-private.h ipp-private.h ../cups/ipp.h pwg-media.o: language-private.h ../cups/transcode.h thread-private.h -pwg-ppd.o: cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h -pwg-ppd.o: array.h language.h string-private.h ../config.h debug-private.h -pwg-ppd.o: ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h -pwg-ppd.o: ../cups/http.h md5-private.h ipp-private.h ../cups/ipp.h -pwg-ppd.o: language-private.h ../cups/transcode.h thread-private.h request.o: cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h request.o: array.h language.h string-private.h ../config.h debug-private.h request.o: ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h @@ -398,21 +393,16 @@ ppd.32.o: ppd.c language.h string-private.h ../config.h debug-private.h ppd-pri ppd.32.o: ppd.c ../cups/ppd.h cups.h pwg-private.h http-private.h ../cups/http.h ppd.32.o: ppd.c md5-private.h ipp-private.h ../cups/ipp.h language-private.h ppd.32.o: ppd.c ../cups/transcode.h thread-private.h -pwg-file.32.o: pwg-file.c cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h -pwg-file.32.o: pwg-file.c array.h language.h string-private.h ../config.h debug-private.h -pwg-file.32.o: pwg-file.c ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h -pwg-file.32.o: pwg-file.c ../cups/http.h md5-private.h ipp-private.h ../cups/ipp.h -pwg-file.32.o: pwg-file.c language-private.h ../cups/transcode.h thread-private.h +ppd-cache.32.o: ppd-cache.c cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h +ppd-cache.32.o: ppd-cache.c array.h language.h string-private.h ../config.h debug-private.h +ppd-cache.32.o: ppd-cache.c ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h +ppd-cache.32.o: ppd-cache.c ../cups/http.h md5-private.h ipp-private.h ../cups/ipp.h +ppd-cache.32.o: ppd-cache.c language-private.h ../cups/transcode.h thread-private.h pwg-media.32.o: pwg-media.c cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h pwg-media.32.o: pwg-media.c array.h language.h string-private.h ../config.h debug-private.h pwg-media.32.o: pwg-media.c ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h pwg-media.32.o: pwg-media.c ../cups/http.h md5-private.h ipp-private.h ../cups/ipp.h pwg-media.32.o: pwg-media.c language-private.h ../cups/transcode.h thread-private.h -pwg-ppd.32.o: pwg-ppd.c cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h -pwg-ppd.32.o: pwg-ppd.c array.h language.h string-private.h ../config.h debug-private.h -pwg-ppd.32.o: pwg-ppd.c ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h -pwg-ppd.32.o: pwg-ppd.c ../cups/http.h md5-private.h ipp-private.h ../cups/ipp.h -pwg-ppd.32.o: pwg-ppd.c language-private.h ../cups/transcode.h thread-private.h request.32.o: request.c cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h request.32.o: request.c array.h language.h string-private.h ../config.h debug-private.h request.32.o: request.c ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h @@ -647,21 +637,16 @@ ppd.64.o: ppd.c language.h string-private.h ../config.h debug-private.h ppd-pri ppd.64.o: ppd.c ../cups/ppd.h cups.h pwg-private.h http-private.h ../cups/http.h ppd.64.o: ppd.c md5-private.h ipp-private.h ../cups/ipp.h language-private.h ppd.64.o: ppd.c ../cups/transcode.h thread-private.h -pwg-file.64.o: pwg-file.c cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h -pwg-file.64.o: pwg-file.c array.h language.h string-private.h ../config.h debug-private.h -pwg-file.64.o: pwg-file.c ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h -pwg-file.64.o: pwg-file.c ../cups/http.h md5-private.h ipp-private.h ../cups/ipp.h -pwg-file.64.o: pwg-file.c language-private.h ../cups/transcode.h thread-private.h +ppd-cache.64.o: ppd-cache.c cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h +ppd-cache.64.o: ppd-cache.c array.h language.h string-private.h ../config.h debug-private.h +ppd-cache.64.o: ppd-cache.c ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h +ppd-cache.64.o: ppd-cache.c ../cups/http.h md5-private.h ipp-private.h ../cups/ipp.h +ppd-cache.64.o: ppd-cache.c language-private.h ../cups/transcode.h thread-private.h pwg-media.64.o: pwg-media.c cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h pwg-media.64.o: pwg-media.c array.h language.h string-private.h ../config.h debug-private.h pwg-media.64.o: pwg-media.c ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h pwg-media.64.o: pwg-media.c ../cups/http.h md5-private.h ipp-private.h ../cups/ipp.h pwg-media.64.o: pwg-media.c language-private.h ../cups/transcode.h thread-private.h -pwg-ppd.64.o: pwg-ppd.c cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h -pwg-ppd.64.o: pwg-ppd.c array.h language.h string-private.h ../config.h debug-private.h -pwg-ppd.64.o: pwg-ppd.c ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h -pwg-ppd.64.o: pwg-ppd.c ../cups/http.h md5-private.h ipp-private.h ../cups/ipp.h -pwg-ppd.64.o: pwg-ppd.c language-private.h ../cups/transcode.h thread-private.h request.64.o: request.c cups-private.h ../cups/cups.h file.h versioning.h ipp.h http.h request.64.o: request.c array.h language.h string-private.h ../config.h debug-private.h request.64.o: request.c ppd-private.h ../cups/ppd.h cups.h pwg-private.h http-private.h diff --git a/cups/api-filter.shtml b/cups/api-filter.shtml index 0af098f3f..e44c7063a 100644 --- a/cups/api-filter.shtml +++ b/cups/api-filter.shtml @@ -1,10 +1,9 @@ + EnvironmentVariables + + CUPS_DEBUG_LOG + /var/log/cups/debug_log + CUPS_DEBUG_LEVEL + 3 + CUPS_DEBUG_FILTER + ^(http|_http|ipp|_ipp|mime).* + ServiceIPC Sockets diff --git a/scheduler/printers.c b/scheduler/printers.c index de4b637de..e3c7ad394 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -1409,8 +1409,11 @@ cupsdRenamePrinter( mimeDeleteType(MimeDatabase, p->filetype); p->filetype = mimeAddType(MimeDatabase, "printer", name); - mimeDeleteType(MimeDatabase, p->prefiltertype); - p->prefiltertype = mimeAddType(MimeDatabase, "prefilter", name); + if (p->prefiltertype) + { + mimeDeleteType(MimeDatabase, p->prefiltertype); + p->prefiltertype = mimeAddType(MimeDatabase, "prefilter", name); + } /* * Rename the printer... @@ -2447,7 +2450,8 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */ if (p->pc && p->pc->prefilters) { - p->prefiltertype = mimeAddType(MimeDatabase, "prefilter", p->name); + if (!p->prefiltertype) + p->prefiltertype = mimeAddType(MimeDatabase, "prefilter", p->name); for (filter = (char *)cupsArrayFirst(p->pc->prefilters); filter; @@ -3563,9 +3567,8 @@ add_printer_filter( size_t maxsize = 0; /* Maximum supported file size */ mime_type_t *temptype, /* MIME type looping var */ *desttype; /* Destination MIME type */ - char filename[1024], /* Full filter filename */ - *dirsep; /* Pointer to directory separator */ - struct stat fileinfo; /* File information */ + mime_filter_t *filterptr; /* MIME filter */ + char filename[1024]; /* Full filter filename */ cupsdLogMessage(CUPSD_LOG_DEBUG2, @@ -3633,85 +3636,24 @@ add_printer_filter( } /* - * See if the filter program exists; if not, stop the printer and flag - * the error! + * Check permissions on the filter and its containing directory... */ if (strcmp(program, "-")) { + _cups_fc_result_t result; /* Result of file check */ + if (program[0] == '/') strlcpy(filename, program, sizeof(filename)); else snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin, program); - if (stat(filename, &fileinfo)) - { - memset(&fileinfo, 0, sizeof(fileinfo)); + result = _cupsFileCheck(filename, _CUPS_FILE_CHECK_PROGRAM, !RunUser, + cupsdLogFCMessage, p); - snprintf(p->state_message, sizeof(p->state_message), - "Printer driver \"%s\" not available: %s", filename, - strerror(errno)); - cupsdSetPrinterReasons(p, "+cups-missing-filter-warning"); - - cupsdLogMessage(CUPSD_LOG_ERROR, "%s: %s", p->name, p->state_message); - } - - /* - * When running as root, do additional security checks... - */ - - else if (!RunUser) - { - /* - * Only use filters that are owned by root and do not have world write - * permissions. - */ - - if (fileinfo.st_uid || - (fileinfo.st_gid && (fileinfo.st_mode & S_IWGRP)) || - (fileinfo.st_mode & (S_ISUID | S_IWOTH)) != 0) - { - snprintf(p->state_message, sizeof(p->state_message), - "Printer driver \"%s\" has insecure permissions " - "(0%o/uid=%d/gid=%d).", filename, fileinfo.st_mode, - (int)fileinfo.st_uid, (int)fileinfo.st_gid); - -#ifdef __APPLE__ /* Don't flag filters with group write for "admin" */ - if (fileinfo.st_uid || - (fileinfo.st_gid && fileinfo.st_gid != 80 && - (fileinfo.st_mode & S_IWGRP)) || - (fileinfo.st_mode & (S_ISUID | S_IWOTH))) -#endif /* __APPLE__ */ - cupsdSetPrinterReasons(p, "+cups-insecure-filter-warning"); - - cupsdLogMessage(CUPSD_LOG_WARN, "%s: %s", p->name, p->state_message); - } - else if (fileinfo.st_mode) - { - /* - * Similarly, check that the parent directory is also owned by root and - * does not have world write permissions. - */ - - if ((dirsep = strrchr(filename, '/')) != NULL) - *dirsep = '\0'; - - if (!stat(filename, &fileinfo) && - (fileinfo.st_uid || - (fileinfo.st_gid && (fileinfo.st_mode & S_IWGRP)) || - (fileinfo.st_mode & (S_ISUID | S_IWOTH)) != 0)) - { - snprintf(p->state_message, sizeof(p->state_message), - "Printer driver directory \"%s\" has insecure permissions " - "(0%o/uid=%d/gid=%d).", filename, fileinfo.st_mode, - (int)fileinfo.st_uid, (int)fileinfo.st_gid); - - cupsdSetPrinterReasons(p, "+cups-insecure-filter-warning"); - - cupsdLogMessage(CUPSD_LOG_WARN, "%s: %s", p->name, p->state_message); - } - } - } + if (result == _CUPS_FILE_CHECK_MISSING || + result == _CUPS_FILE_CHECK_WRONG_TYPE) + return; } /* @@ -3732,7 +3674,8 @@ add_printer_filter( "%s", p->name, temptype->super, temptype->type, desttype->super, desttype->type, cost, program); - mimeAddFilter(MimeDatabase, temptype, desttype, cost, program); + filterptr = mimeAddFilter(MimeDatabase, temptype, desttype, cost, + program); if (!mimeFilterLookup(MimeDatabase, desttype, filtertype)) { @@ -3750,8 +3693,12 @@ add_printer_filter( "%s", p->name, temptype->super, temptype->type, filtertype->super, filtertype->type, cost, program); - mimeAddFilter(MimeDatabase, temptype, filtertype, cost, program); + filterptr = mimeAddFilter(MimeDatabase, temptype, filtertype, cost, + program); } + + if (filterptr) + filterptr->maxsize = maxsize; } } @@ -4060,7 +4007,7 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ ppd_info.st_mtime = 1; ippDelete(p->ppd_attrs); - p->ppd_attrs = ippNew(); + p->ppd_attrs = NULL; _ppdCacheDestroy(p->pc); p->pc = NULL; @@ -4094,6 +4041,8 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ finishings[0] = IPP_FINISHINGS_NONE; num_finishings = 1; + p->ppd_attrs = ippNew(); + if ((ppd = ppdOpenFile(ppd_name)) != NULL) { /* @@ -4899,7 +4848,9 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ */ if ((ppd_attr = ppdFindAttr(ppd, "APPrinterIconPath", NULL)) != NULL && - ppd_attr->value) + ppd_attr->value && + !_cupsFileCheck(ppd_attr->value, _CUPS_FILE_CHECK_FILE, !RunUser, + cupsdLogFCMessage, p)) { CGImageRef imageRef = NULL;/* Current icon image */ CGImageRef biggestIconRef = NULL; diff --git a/scheduler/process.c b/scheduler/process.c index 80c3fcb59..8b3e3f23b 100644 --- a/scheduler/process.c +++ b/scheduler/process.c @@ -317,7 +317,6 @@ cupsdStartProcess( char *real_argv[103], /* Real command-line arguments */ cups_exec[1024]; /* Path to "cups-exec" program */ int user; /* Command UID */ - struct stat commandinfo; /* Command file information */ cupsd_proc_t *proc; /* New process record */ #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) struct sigaction action; /* POSIX signal handler */ @@ -329,6 +328,8 @@ cupsdStartProcess( #endif /* __APPLE__ */ + *pid = 0; + /* * Figure out the UID for the child process... */ @@ -344,110 +345,9 @@ cupsdStartProcess( * Check the permissions of the command we are running... */ - if (stat(command, &commandinfo)) - { - *pid = 0; - - cupsdLogMessage(CUPSD_LOG_DEBUG2, - "cupsdStartProcess(command=\"%s\", argv=%p, envp=%p, " - "infd=%d, outfd=%d, errfd=%d, backfd=%d, sidefd=%d, root=%d, " - "profile=%p, job=%p(%d), pid=%p) = %d", - command, argv, envp, infd, outfd, errfd, backfd, sidefd, - root, profile, job, job ? job->id : 0, pid, *pid); - cupsdLogMessage(CUPSD_LOG_ERROR, - "%s%s \"%s\" not available: %s", - job && job->printer ? job->printer->name : "", - job && job->printer ? ": Printer driver" : "Program", - command, strerror(errno)); - - if (job && job->printer) - { - if (cupsdSetPrinterReasons(job->printer, "+cups-missing-filter-warning")) - cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, job->printer, NULL, - "Printer driver \"%s\" not available.", command); - } - - return (0); - } - else if (!RunUser && - ((commandinfo.st_mode & (S_ISUID | S_IWOTH)) || - commandinfo.st_uid)) - { - *pid = 0; - - cupsdLogMessage(CUPSD_LOG_DEBUG2, - "cupsdStartProcess(command=\"%s\", argv=%p, envp=%p, " - "infd=%d, outfd=%d, errfd=%d, backfd=%d, sidefd=%d, root=%d, " - "profile=%p, job=%p(%d), pid=%p) = %d", - command, argv, envp, infd, outfd, errfd, backfd, sidefd, - root, profile, job, job ? job->id : 0, pid, *pid); - cupsdLogMessage(CUPSD_LOG_ERROR, - "%s%s \"%s\" has insecure permissions " - "(0%o/uid=%d/gid=%d).", - job && job->printer ? job->printer->name : "", - job && job->printer ? ": Printer driver" : "Program", - command, commandinfo.st_mode, - (int)commandinfo.st_uid, (int)commandinfo.st_gid); - - if (job && job->printer) - { - if (cupsdSetPrinterReasons(job->printer, "+cups-insecure-filter-warning")) - cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, job->printer, NULL, - "Printer driver \"%s\" has insecure permissions " - "(0%o/uid=%d/gid=%d).", command, commandinfo.st_mode, - (int)commandinfo.st_uid, (int)commandinfo.st_gid); - } - - errno = EPERM; - - return (0); - } - else if ((commandinfo.st_uid != user || !(commandinfo.st_mode & S_IXUSR)) && - (commandinfo.st_gid != Group || !(commandinfo.st_mode & S_IXGRP)) && - !(commandinfo.st_mode & S_IXOTH)) - { - *pid = 0; - - cupsdLogMessage(CUPSD_LOG_DEBUG2, - "cupsdStartProcess(command=\"%s\", argv=%p, envp=%p, " - "infd=%d, outfd=%d, errfd=%d, backfd=%d, sidefd=%d, root=%d, " - "profile=%p, job=%p(%d), pid=%p) = %d", - command, argv, envp, infd, outfd, errfd, backfd, sidefd, - root, profile, job, job ? job->id : 0, pid, *pid); - cupsdLogMessage(CUPSD_LOG_ERROR, - "%s%s \"%s\" does not have execute permissions " - "(0%o/uid=%d/gid=%d).", - job && job->printer ? job->printer->name : "", - job && job->printer ? ": Printer driver" : "Program", - command, commandinfo.st_mode, (int)commandinfo.st_uid, - (int)commandinfo.st_gid); - - errno = EPERM; + if (_cupsFileCheck(command, _CUPS_FILE_CHECK_PROGRAM, !RunUser, + cupsdLogFCMessage, job ? job->printer : NULL)) return (0); - } - else if (!RunUser && commandinfo.st_gid && (commandinfo.st_mode & S_IWGRP)) - { - cupsdLogMessage(CUPSD_LOG_WARN, - "%s%s \"%s\" has insecure permissions " - "(0%o/uid=%d/gid=%d).", - job && job->printer ? job->printer->name : "", - job && job->printer ? ": Printer driver" : "Program", - command, commandinfo.st_mode, - (int)commandinfo.st_uid, (int)commandinfo.st_gid); - -#ifdef __APPLE__ /* Don't flag filters with group write for "admin" */ - if (commandinfo.st_gid != 80 && job && job->printer) -#else - if (job && job->printer) -#endif /* __APPLE__ */ - { - if (cupsdSetPrinterReasons(job->printer, "+cups-insecure-filter-warning")) - cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, job->printer, NULL, - "Printer driver \"%s\" has insecure permissions " - "(0%o/uid=%d/gid=%d).", command, commandinfo.st_mode, - (int)commandinfo.st_uid, (int)commandinfo.st_gid); - } - } #if defined(__APPLE__) if (envp) diff --git a/scheduler/testdirsvc.c b/scheduler/testdirsvc.c index cf607e20b..bf3030428 100644 --- a/scheduler/testdirsvc.c +++ b/scheduler/testdirsvc.c @@ -3,7 +3,7 @@ * * Browsing test program for CUPS. * - * Copyright 2007-2010 by Apple Inc. + * Copyright 2007-2011 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -297,7 +297,7 @@ main(int argc, /* I - Number of command-line arguments */ * Sleep for any remaining time... */ - if (seconds > 0) + if (seconds > 0) sleep(seconds); } diff --git a/scheduler/testmime.c b/scheduler/testmime.c index 1a8713801..1561e81b7 100644 --- a/scheduler/testmime.c +++ b/scheduler/testmime.c @@ -14,9 +14,11 @@ * * Contents: * - * main() - Main entry for the test program. - * print_rules() - Print the rules for a file type... - * type_dir() - Show the MIME types for a given directory. + * main() - Main entry for the test program. + * add_ppd_filter() - Add a printer filter from a PPD. + * add_ppd_filters() - Add all filters from a PPD. + * print_rules() - Print the rules for a file type... + * type_dir() - Show the MIME types for a given directory. */ /* @@ -25,6 +27,8 @@ #include #include +#include +#include #include "mime.h" @@ -32,6 +36,9 @@ * Local functions... */ +static void add_ppd_filter(mime_t *mime, mime_type_t *filtertype, + const char *filter); +static void add_ppd_filters(mime_t *mime, ppd_file_t *ppd); static void print_rules(mime_magic_t *rules); static void type_dir(mime_t *mime, const char *dirname); @@ -53,6 +60,8 @@ main(int argc, /* I - Number of command-line args */ mime_t *mime; /* MIME database */ mime_type_t *src, /* Source type */ *dst; /* Destination type */ + struct stat srcinfo; /* Source information */ + ppd_file_t *ppd; /* PPD file */ cups_array_t *filters; /* Filters for the file */ mime_filter_t *filter; /* Current filter */ @@ -60,7 +69,10 @@ main(int argc, /* I - Number of command-line args */ mime = NULL; src = NULL; dst = NULL; - filter_path = "../filter:../pdftops:" CUPS_SERVERBIN "/filter"; + ppd = NULL; + filter_path = "../filter:" CUPS_SERVERBIN "/filter"; + + srcinfo.st_size = 0; for (i = 1; i < argc; i ++) if (!strcmp(argv[i], "-d")) @@ -68,7 +80,12 @@ main(int argc, /* I - Number of command-line args */ i ++; if (i < argc) + { mime = mimeLoad(argv[i], filter_path); + + if (ppd) + add_ppd_filters(mime, ppd); + } } else if (!strcmp(argv[i], "-f")) { @@ -77,12 +94,28 @@ main(int argc, /* I - Number of command-line args */ if (i < argc) filter_path = argv[i]; } + else if (!strcmp(argv[i], "-p")) + { + i ++; + + if (i < argc) + { + ppd = ppdOpenFile(argv[i]); + + if (mime) + add_ppd_filters(mime, ppd); + } + } else if (!src) { if (!mime) mime = mimeLoad("../conf", filter_path); + if (ppd) + add_ppd_filters(mime, ppd); + src = mimeFileType(mime, argv[i], NULL, &compression); + stat(argv[i], &srcinfo); if (src) printf("%s: %s/%s%s\n", argv[i], src->super, src->type, @@ -102,7 +135,7 @@ main(int argc, /* I - Number of command-line args */ sscanf(argv[i], "%15[^/]/%31s", super, type); dst = mimeType(mime, super, type); - filters = mimeFilter(mime, src, dst, &cost); + filters = mimeFilter2(mime, src, srcinfo.st_size, dst, &cost); if (!filters) { @@ -111,15 +144,25 @@ main(int argc, /* I - Number of command-line args */ } else { - printf("Filter cost = %d\n", cost); + int first = 1; /* First filter shown? */ - filter = (mime_filter_t *)cupsArrayFirst(filters); - fputs(filter->filter, stdout); + printf("Filter cost = %d\n", cost); - for (filter = (mime_filter_t *)cupsArrayNext(filters); + for (filter = (mime_filter_t *)cupsArrayFirst(filters); filter; filter = (mime_filter_t *)cupsArrayNext(filters)) - printf(" | %s", filter->filter); + { + if (!strcmp(filter->filter, "-")) + continue; + + if (first) + { + first = 0; + fputs(filter->filter, stdout); + } + else + printf(" | %s", filter->filter); + } putchar('\n'); @@ -128,7 +171,11 @@ main(int argc, /* I - Number of command-line args */ } if (!mime) + { mime = mimeLoad("../conf", filter_path); + if (ppd) + add_ppd_filters(mime, ppd); + } if (!src) { @@ -150,13 +197,173 @@ main(int argc, /* I - Number of command-line args */ filter->filter, filter->cost); type_dir(mime, "../doc"); - type_dir(mime, "../man"); } return (0); } +/* + * 'add_printer_filter()' - Add a printer filter from a PPD. + */ + +static void +add_ppd_filter(mime_t *mime, /* I - MIME database */ + mime_type_t *filtertype, /* I - Filter or prefilter MIME type */ + const char *filter) /* I - Filter to add */ +{ + char super[MIME_MAX_SUPER], /* Super-type for filter */ + type[MIME_MAX_TYPE], /* Type for filter */ + dsuper[MIME_MAX_SUPER], /* Destination super-type for filter */ + dtype[MIME_MAX_TYPE], /* Destination type for filter */ + dest[MIME_MAX_SUPER + MIME_MAX_TYPE + 2], + /* Destination super/type */ + program[1024]; /* Program/filter name */ + int cost; /* Cost of filter */ + size_t maxsize = 0; /* Maximum supported file size */ + mime_type_t *temptype, /* MIME type looping var */ + *desttype; /* Destination MIME type */ + mime_filter_t *filterptr; /* MIME filter */ + + + DEBUG_printf(("add_ppd_filter(mime=%p, filtertype=%p(%s/%s), filter=\"%s\")", + mime, filtertype, filtertype->super, filtertype->type, filter)); + + /* + * Parse the filter string; it should be in one of the following formats: + * + * source/type cost program + * source/type cost maxsize(nnnn) program + * source/type dest/type cost program + * source/type dest/type cost maxsize(nnnn) program + */ + + if (sscanf(filter, "%15[^/]/%255s%*[ \t]%15[^/]/%255s%d%*[ \t]%1023[^\n]", + super, type, dsuper, dtype, &cost, program) == 6) + { + snprintf(dest, sizeof(dest), "test/%s/%s", dsuper, dtype); + + if ((desttype = mimeType(mime, "printer", dest)) == NULL) + desttype = mimeAddType(mime, "printer", dest); + } + else + { + if (sscanf(filter, "%15[^/]/%255s%d%*[ \t]%1023[^\n]", super, type, &cost, + program) == 4) + { + desttype = filtertype; + } + else + { + printf("testmime: Invalid filter string \"%s\".\n", filter); + return; + } + } + + if (!strncmp(program, "maxsize(", 8)) + { + char *ptr; /* Pointer into maxsize(nnnn) program */ + + maxsize = strtoll(program + 8, &ptr, 10); + + if (*ptr != ')') + { + printf("testmime: Invalid filter string \"%s\".\n", filter); + return; + } + + ptr ++; + while (_cups_isspace(*ptr)) + ptr ++; + + _cups_strcpy(program, ptr); + } + + /* + * Add the filter to the MIME database, supporting wildcards as needed... + */ + + for (temptype = mimeFirstType(mime); + temptype; + temptype = mimeNextType(mime)) + if (((super[0] == '*' && strcasecmp(temptype->super, "printer")) || + !strcasecmp(temptype->super, super)) && + (type[0] == '*' || !strcasecmp(temptype->type, type))) + { + if (desttype != filtertype) + { + DEBUG_printf(("add_ppd_filter: Adding filter %s/%s %s/%s %d %s", + temptype->super, temptype->type, desttype->super, + desttype->type, cost, program)); + filterptr = mimeAddFilter(mime, temptype, desttype, cost, program); + + if (!mimeFilterLookup(mime, desttype, filtertype)) + { + DEBUG_printf(("add_printer_filter: Adding filter %s/%s %s/%s 0 -", + desttype->super, desttype->type, filtertype->super, + filtertype->type)); + mimeAddFilter(mime, desttype, filtertype, cost, "-"); + } + } + else + { + DEBUG_printf(("add_printer_filter: Adding filter %s/%s %s/%s %d %s", + temptype->super, temptype->type, filtertype->super, + filtertype->type, cost, program)); + filterptr = mimeAddFilter(mime, temptype, filtertype, cost, program); + } + + if (filterptr) + filterptr->maxsize = maxsize; + } +} + + +/* + * 'add_ppd_filters()' - Add all filters from a PPD. + */ + +static void +add_ppd_filters(mime_t *mime, /* I - MIME database */ + ppd_file_t *ppd) /* I - PPD file */ +{ + _ppd_cache_t *pc; /* Cache data for PPD */ + const char *value; /* Filter definition value */ + mime_type_t *filter, /* Filter type */ + *prefilter; /* Pre-filter type */ + + + pc = _ppdCacheCreateWithPPD(ppd); + if (!pc) + return; + + filter = mimeAddType(mime, "printer", "test"); + + if (pc->filters) + { + for (value = (const char *)cupsArrayFirst(pc->filters); + value; + value = (const char *)cupsArrayNext(pc->filters)) + add_ppd_filter(mime, filter, value); + } + else + { + add_ppd_filter(mime, filter, "application/vnd.cups-raw 0 -"); + add_ppd_filter(mime, filter, "application/vnd.cups-postscript 0 -"); + } + + if (pc->prefilters) + { + prefilter = mimeAddType(mime, "prefilter", "test"); + + for (value = (const char *)cupsArrayFirst(pc->prefilters); + value; + value = (const char *)cupsArrayNext(pc->prefilters)) + add_ppd_filter(mime, prefilter, value); + } +} + + /* * 'print_rules()' - Print the rules for a file type... */ diff --git a/scheduler/type.c b/scheduler/type.c index 6f4706e20..78652b529 100644 --- a/scheduler/type.c +++ b/scheduler/type.c @@ -3,7 +3,7 @@ * * MIME typing routines for CUPS. * - * Copyright 2007-2010 by Apple Inc. + * Copyright 2007-2011 by Apple Inc. * Copyright 1997-2006 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -14,13 +14,13 @@ * * Contents: * - * mimeAddType() - Add a MIME type to a database. - * mimeAddTypeRule() - Add a detection rule for a file type. - * mimeFileType() - Determine the type of a file. - * mimeType() - Lookup a file type. - * compare_types() - Compare two MIME super/type names. - * checkrules() - Check each rule in a list. - * patmatch() - Pattern matching... + * mimeAddType() - Add a MIME type to a database. + * mimeAddTypeRule() - Add a detection rule for a file type. + * mimeFileType() - Determine the type of a file. + * mimeType() - Lookup a file type. + * mime_compare_types() - Compare two MIME super/type names. + * mime_check_rules() - Check each rule in a list. + * mime_patmatch() - Pattern matching. */ /* @@ -50,10 +50,10 @@ typedef struct _mime_filebuf_s /**** File buffer for MIME typing ****/ * Local functions... */ -static int compare_types(mime_type_t *t0, mime_type_t *t1); -static int checkrules(const char *filename, _mime_filebuf_t *fb, - mime_magic_t *rules); -static int patmatch(const char *s, const char *pat); +static int mime_compare_types(mime_type_t *t0, mime_type_t *t1); +static int mime_check_rules(const char *filename, _mime_filebuf_t *fb, + mime_magic_t *rules); +static int mime_patmatch(const char *s, const char *pat); /* @@ -90,42 +90,60 @@ mimeAddType(mime_t *mime, /* I - MIME database */ const char *type) /* I - Type name */ { mime_type_t *temp; /* New MIME type */ + size_t typelen; /* Length of type name */ + DEBUG_printf(("mimeAddType(mime=%p, super=\"%s\", type=\"%s\")", mime, super, + type)); + /* * Range check input... */ if (!mime || !super || !type) + { + DEBUG_puts("1mimeAddType: Returning NULL (bad arguments)."); return (NULL); + } /* * See if the type already exists; if so, return the existing type... */ if ((temp = mimeType(mime, super, type)) != NULL) + { + DEBUG_printf(("1mimeAddType: Returning %p (existing).", temp)); return (temp); + } /* * The type doesn't exist; add it... */ if (!mime->types) - mime->types = cupsArrayNew((cups_array_func_t)compare_types, NULL); + mime->types = cupsArrayNew((cups_array_func_t)mime_compare_types, NULL); if (!mime->types) + { + DEBUG_puts("1mimeAddType: Returning NULL (no types)."); return (NULL); + } + + typelen = strlen(type) + 1; - if ((temp = calloc(1, sizeof(mime_type_t) - MIME_MAX_TYPE + - strlen(type) + 1)) == NULL) + if ((temp = calloc(1, sizeof(mime_type_t) - MIME_MAX_TYPE + typelen)) == NULL) + { + DEBUG_puts("1mimeAddType: Returning NULL (out of memory)."); return (NULL); + } strlcpy(temp->super, super, sizeof(temp->super)); - strcpy(temp->type, type); /* Safe: temp->type is allocated */ + memcpy(temp->type, type, typelen); temp->priority = 100; cupsArrayAdd(mime->types, temp); + DEBUG_printf(("1mimeAddType: Returning %p (new).", temp)); return (temp); } @@ -151,6 +169,9 @@ mimeAddTypeRule(mime_type_t *mt, /* I - Type to add to */ *current; /* Current rule */ + DEBUG_printf(("mimeAddTypeRule(mt=%p(%s/%s), rule=\"%s\")", mt, + mt ? mt->super : "???", mt ? mt->type : "???", rule)); + /* * Range check input... */ @@ -177,8 +198,6 @@ mimeAddTypeRule(mime_type_t *mt, /* I - Type to add to */ logic = MIME_MAGIC_NOP; invert = 0; - DEBUG_printf(("mimeAddTypeRule: %s/%s: %s", mt->super, mt->type, rule)); - while (*rule != '\0') { while (isspace(*rule & 255)) @@ -186,13 +205,13 @@ mimeAddTypeRule(mime_type_t *mt, /* I - Type to add to */ if (*rule == '(') { - DEBUG_puts("mimeAddTypeRule: New parenthesis group"); + DEBUG_puts("1mimeAddTypeRule: New parenthesis group"); logic = MIME_MAGIC_NOP; rule ++; } else if (*rule == ')') { - DEBUG_puts("mimeAddTypeRule: Close paren..."); + DEBUG_puts("1mimeAddTypeRule: Close paren..."); if (current == NULL || current->parent == NULL) return (-1); @@ -227,11 +246,11 @@ mimeAddTypeRule(mime_type_t *mt, /* I - Type to add to */ current->prev = NULL; current->parent = temp; - DEBUG_printf(("mimeAddTypeRule: Creating new AND group %p...", temp)); + DEBUG_printf(("1mimeAddTypeRule: Creating new AND group %p.", temp)); } else if (current->parent) { - DEBUG_printf(("mimeAddTypeRule: Setting group %p op to AND...", + DEBUG_printf(("1mimeAddTypeRule: Setting group %p op to AND.", current->parent)); current->parent->op = MIME_MAGIC_AND; } @@ -258,8 +277,8 @@ mimeAddTypeRule(mime_type_t *mt, /* I - Type to add to */ if ((temp = calloc(1, sizeof(mime_magic_t))) == NULL) return (-1); - DEBUG_printf(("mimeAddTypeRule: Creating new AND group %p inside OR " - "group", temp)); + DEBUG_printf(("1mimeAddTypeRule: Creating new AND group %p inside OR " + "group.", temp)); while (current->prev != NULL) { @@ -279,7 +298,7 @@ mimeAddTypeRule(mime_type_t *mt, /* I - Type to add to */ * This isn't the top rule, so go up one level... */ - DEBUG_puts("mimeAddTypeRule: Going up one level"); + DEBUG_puts("1mimeAddTypeRule: Going up one level."); current = current->parent; } } @@ -289,7 +308,7 @@ mimeAddTypeRule(mime_type_t *mt, /* I - Type to add to */ } else if (*rule == '!') { - DEBUG_puts("mimeAddTypeRule: NOT"); + DEBUG_puts("1mimeAddTypeRule: NOT"); invert = 1; rule ++; } @@ -463,8 +482,8 @@ mimeAddTypeRule(mime_type_t *mt, /* I - Type to add to */ * Add parenthetical grouping... */ - DEBUG_printf(("mimeAddTypeRule: Making new OR group %p for " - "parenthesis...", temp)); + DEBUG_printf(("1mimeAddTypeRule: Making new OR group %p for " + "parenthesis.", temp)); temp->op = MIME_MAGIC_OR; @@ -479,9 +498,9 @@ mimeAddTypeRule(mime_type_t *mt, /* I - Type to add to */ logic = MIME_MAGIC_OR; } - DEBUG_printf(("mimeAddTypeRule: adding %p: %s, op=MIME_MAGIC_%s(%d), " - "logic=MIME_MAGIC_%s, invert=%d", temp, name, debug_ops[op], - op, debug_ops[logic], invert)); + DEBUG_printf(("1mimeAddTypeRule: Adding %p: %s, op=MIME_MAGIC_%s(%d), " + "logic=MIME_MAGIC_%s, invert=%d.", temp, name, + debug_ops[op], op, debug_ops[logic], invert)); /* * Fill in data for the rule... @@ -579,14 +598,22 @@ mimeFileType(mime_t *mime, /* I - MIME database */ */ if (!mime || !pathname) + { + DEBUG_puts("1mimeFileType: Returning NULL."); return (NULL); + } /* * Try to open the file... */ if ((fb.fp = cupsFileOpen(pathname, "r")) == NULL) + { + DEBUG_printf(("1mimeFileType: Unable to open \"%s\": %s", pathname, + strerror(errno))); + DEBUG_puts("1mimeFileType: Returning NULL."); return (NULL); + } fb.offset = -1; fb.length = 0; @@ -614,7 +641,7 @@ mimeFileType(mime_t *mime, /* I - MIME database */ for (type = (mime_type_t *)cupsArrayFirst(mime->types), best = NULL; type; type = (mime_type_t *)cupsArrayNext(mime->types)) - if (checkrules(base, &fb, type->rules)) + if (mime_check_rules(base, &fb, type->rules)) { if (!best || type->priority > best->priority) best = type; @@ -625,10 +652,15 @@ mimeFileType(mime_t *mime, /* I - MIME database */ */ if (compression) + { *compression = cupsFileCompression(fb.fp); + DEBUG_printf(("1mimeFileType: *compression=%d", *compression)); + } cupsFileClose(fb.fp); + DEBUG_printf(("1mimeFileType: Returning %p(%s/%s).", best, + best ? best->super : "???", best ? best->type : "???")); return (best); } @@ -642,15 +674,22 @@ mimeType(mime_t *mime, /* I - MIME database */ const char *super, /* I - Super-type name */ const char *type) /* I - Type name */ { - mime_type_t key; /* MIME type search key*/ + mime_type_t key, /* MIME type search key */ + *mt; /* Matching type */ + + DEBUG_printf(("mimeType(mime=%p, super=\"%s\", type=\"%s\")", mime, super, + type)); /* * Range check input... */ if (!mime || !super || !type) + { + DEBUG_puts("1mimeType: Returning NULL."); return (NULL); + } /* * Lookup the type in the array... @@ -659,17 +698,19 @@ mimeType(mime_t *mime, /* I - MIME database */ strlcpy(key.super, super, sizeof(key.super)); strlcpy(key.type, type, sizeof(key.type)); - return ((mime_type_t *)cupsArrayFind(mime->types, &key)); + mt = (mime_type_t *)cupsArrayFind(mime->types, &key); + DEBUG_printf(("1mimeType: Returning %p.", mt)); + return (mt); } /* - * 'compare_types()' - Compare two MIME super/type names. + * 'mime_compare_types()' - Compare two MIME super/type names. */ static int /* O - Result of comparison */ -compare_types(mime_type_t *t0, /* I - First type */ - mime_type_t *t1) /* I - Second type */ +mime_compare_types(mime_type_t *t0, /* I - First type */ + mime_type_t *t1) /* I - Second type */ { int i; /* Result of comparison */ @@ -682,13 +723,14 @@ compare_types(mime_type_t *t0, /* I - First type */ /* - * 'checkrules()' - Check each rule in a list. + * 'mime_check_rules()' - Check each rule in a list. */ static int /* O - 1 if match, 0 if no match */ -checkrules(const char *filename, /* I - Filename */ - _mime_filebuf_t *fb, /* I - File to check */ - mime_magic_t *rules) /* I - Rules to check */ +mime_check_rules( + const char *filename, /* I - Filename */ + _mime_filebuf_t *fb, /* I - File to check */ + mime_magic_t *rules) /* I - Rules to check */ { int n; /* Looping var */ int region; /* Region to look at */ @@ -699,7 +741,7 @@ checkrules(const char *filename, /* I - Filename */ unsigned char *bufptr; /* Pointer into buffer */ - DEBUG_printf(("checkrules(filename=\"%s\", fb=%p, rules=%p)", filename, + DEBUG_printf(("4mime_check_rules(filename=\"%s\", fb=%p, rules=%p)", filename, fb, rules)); if (rules == NULL) @@ -721,7 +763,7 @@ checkrules(const char *filename, /* I - Filename */ switch (rules->op) { case MIME_MAGIC_MATCH : - result = patmatch(filename, rules->value.matchv); + result = mime_patmatch(filename, rules->value.matchv); break; case MIME_MAGIC_ASCII : @@ -811,7 +853,7 @@ checkrules(const char *filename, /* I - Filename */ break; case MIME_MAGIC_STRING : - DEBUG_printf(("checkrules: string(%d, \"%s\")", rules->offset, + DEBUG_printf(("5mime_check_rules: string(%d, \"%s\")", rules->offset, rules->value.stringv)); /* @@ -830,8 +872,8 @@ checkrules(const char *filename, /* I - Filename */ sizeof(fb->buffer)); fb->offset = rules->offset; - DEBUG_printf(("checkrules: loaded %d byte fb->buffer at %d, starts " - "with \"%c%c%c%c\"...", + DEBUG_printf(("5mime_check_rules: loaded %d byte fb->buffer at %d, starts " + "with \"%c%c%c%c\".", fb->length, fb->offset, fb->buffer[0], fb->buffer[1], fb->buffer[2], fb->buffer[3])); } @@ -846,7 +888,7 @@ checkrules(const char *filename, /* I - Filename */ else result = (memcmp(fb->buffer + rules->offset - fb->offset, rules->value.stringv, rules->length) == 0); - DEBUG_printf(("checkrules: result=%d", result)); + DEBUG_printf(("5mime_check_rules: result=%d", result)); break; case MIME_MAGIC_ISTRING : @@ -1028,7 +1070,7 @@ checkrules(const char *filename, /* I - Filename */ default : if (rules->child != NULL) - result = checkrules(filename, fb, rules->child); + result = mime_check_rules(filename, fb, rules->child); else result = 0; break; @@ -1047,7 +1089,7 @@ checkrules(const char *filename, /* I - Filename */ * the the rule set is false... */ - DEBUG_printf(("checkrules: result of test %p (MIME_MAGIC_%s) is %d", + DEBUG_printf(("5mime_check_rules: result of test %p (MIME_MAGIC_%s) is %d", rules, debug_ops[rules->op], result)); if ((result && logic == MIME_MAGIC_OR) || @@ -1066,12 +1108,12 @@ checkrules(const char *filename, /* I - Filename */ /* - * 'patmatch()' - Pattern matching... + * 'mime_patmatch()' - Pattern matching. */ -static int /* O - 1 if match, 0 if no match */ -patmatch(const char *s, /* I - String to match against */ - const char *pat) /* I - Pattern to match against */ +static int /* O - 1 if match, 0 if no match */ +mime_patmatch(const char *s, /* I - String to match against */ + const char *pat) /* I - Pattern to match against */ { /* * Range check the input... @@ -1103,7 +1145,7 @@ patmatch(const char *s, /* I - String to match against */ while (*s != '\0') { - if (patmatch(s, pat)) + if (mime_patmatch(s, pat)) return (1); s ++; diff --git a/scheduler/util.c b/scheduler/util.c index b170f8052..e686b6f8b 100644 --- a/scheduler/util.c +++ b/scheduler/util.c @@ -3,7 +3,7 @@ * * Mini-daemon utility functions for CUPS. * - * Copyright 2007-2010 by Apple Inc. + * Copyright 2007-2011 by Apple Inc. * Copyright 1997-2005 by Easy Software Products. * * These coded instructions, statements, and computer programs are the diff --git a/scheduler/util.h b/scheduler/util.h index ecf7645a4..b98476555 100644 --- a/scheduler/util.h +++ b/scheduler/util.h @@ -3,7 +3,7 @@ * * Mini-daemon utility definitions for CUPS. * - * Copyright 2007-2010 by Apple Inc. + * Copyright 2007-2011 by Apple Inc. * Copyright 1997-2005 by Easy Software Products. * * These coded instructions, statements, and computer programs are the diff --git a/systemv/cupstestppd.c b/systemv/cupstestppd.c index 55ebb0f40..b841b975b 100644 --- a/systemv/cupstestppd.c +++ b/systemv/cupstestppd.c @@ -32,7 +32,7 @@ * check_translations() - Check translations in the PPD file. * show_conflicts() - Show option conflicts in a PPD file. * test_raster() - Test PostScript commands for raster printers. - * usage() - Show program usage... + * usage() - Show program usage. * valid_path() - Check whether a path has the correct capitalization. * valid_utf8() - Check whether a string contains valid UTF-8 text. */ @@ -127,7 +127,7 @@ static int check_profiles(ppd_file_t *ppd, const char *root, int errors, static int check_sizes(ppd_file_t *ppd, int errors, int verbose, int warn); static int check_translations(ppd_file_t *ppd, int errors, int verbose, int warn); -static void show_conflicts(ppd_file_t *ppd); +static void show_conflicts(ppd_file_t *ppd, const char *prefix); static int test_raster(ppd_file_t *ppd, int verbose); static void usage(void); static int valid_path(const char *keyword, const char *path, int errors, @@ -1340,15 +1340,6 @@ main(int argc, /* I - Number of command-line args */ attr->name); } - ppdMarkDefaults(ppd); - if (ppdConflicts(ppd)) - { - _cupsLangPuts(stdout, - _(" WARN Default choices conflicting.")); - - show_conflicts(ppd); - } - if (ppdversion < 43) { _cupsLangPrintf(stdout, @@ -2167,6 +2158,22 @@ check_defaults(ppd_file_t *ppd, /* I - PPD file */ prefix = warn ? " WARN " : "**FAIL**"; + ppdMarkDefaults(ppd); + if (ppdConflicts(ppd)) + { + if (!warn && !errors && !verbose) + _cupsLangPuts(stdout, _(" FAIL")); + + if (verbose >= 0) + _cupsLangPrintf(stdout, + _(" %s Default choices conflicting."), prefix); + + show_conflicts(ppd, prefix); + + if (!warn) + errors ++; + } + for (j = 0; j < ppd->num_attrs; j ++) { attr = ppd->attrs[j]; @@ -2916,13 +2923,25 @@ check_sizes(ppd_file_t *ppd, /* I - PPD file */ int verbose, /* I - Verbosity level */ int warn) /* I - Warnings only? */ { - int i; /* Looping vars */ + int i; /* Looping var */ ppd_size_t *size; /* Current size */ int width, /* Custom width */ length; /* Custom length */ const char *prefix; /* WARN/FAIL prefix */ ppd_option_t *page_size, /* PageSize option */ *page_region; /* PageRegion option */ + _pwg_media_t *pwg_media; /* PWG media */ + char buf[1024]; /* PapeSize name that is supposed to be */ + const char *ptr; /* Pointer into string */ + int width_2540ths, /* PageSize width in 2540ths */ + length_2540ths; /* PageSize length in 2540ths */ + int is_ok; /* Flag for PageSize name verification */ + double width_tmp, /* Width after rounded up */ + length_tmp, /* Length after rounded up */ + width_inch, /* Width in inches */ + length_inch, /* Length in inches */ + width_mm, /* Width in millimeters */ + length_mm; /* Length in millimeters */ prefix = warn ? " WARN " : "**FAIL**"; @@ -3028,6 +3047,112 @@ check_sizes(ppd_file_t *ppd, /* I - PPD file */ if (!warn) errors ++; } + + /* + * Verify that the size name is Adobe standard name if it's a standard size + * and the dementional name if it's not a standard size. Suffix should be + * .Fullbleed, etc., or numeric, e.g., Letter, Letter.Fullbleed, + * Letter.Transverse, Letter1, Letter2, 4x8, 55x91mm, 55x91mm.Fullbleed, etc. + */ + + if (warn != 0) + { + is_ok = 1; + width_2540ths = (size->length > size->width) ? + _PWG_FROMPTS(size->width) : + _PWG_FROMPTS(size->length); + length_2540ths = (size->length > size->width) ? + _PWG_FROMPTS(size->length) : + _PWG_FROMPTS(size->width); + pwg_media = _pwgMediaForSize(width_2540ths, length_2540ths); + + if (pwg_media && pwg_media->ppd) + { + strlcpy(buf, pwg_media->ppd, sizeof(buf)); + + if (size->left == 0 && size->bottom == 0 && + size->right == size->width && size->top == size->length) + { + snprintf(buf, sizeof(buf), "%s.Fullbleed", pwg_media->ppd); + if (strcmp(size->name, buf)) + is_ok = 0; + } + else if (size->width > size->length) + { + if ((ptr = pwg_media->ppd + strlen(pwg_media->ppd) - 7) + >= pwg_media->ppd && !strcmp(ptr, "Rotated")) + { + if (strcmp(size->name, buf)) + is_ok = 0; + } + else + { + snprintf(buf, sizeof(buf), "%sRotated", pwg_media->ppd); + if (strcmp(size->name, buf)) + { + snprintf(buf, sizeof(buf), "%s.Transverse", pwg_media->ppd); + if (strcmp(size->name, buf)) + is_ok = 0; + } + } + } + else + { + if ((!strncmp(size->name, pwg_media->ppd, strlen(pwg_media->ppd)))) + { + for (ptr = size->name + strlen(pwg_media->ppd); *ptr; ptr ++) + { + if (!isdigit(*ptr & 255)) + { + is_ok = 0; + break; + } + } + } + else + is_ok = 0; + } + + if (!is_ok) + _cupsLangPrintf(stdout, + _(" %s Size \"%s\" should be the Adobe " + "standard name \"%s\"."), + prefix, size->name, buf); + } + else + { + width_tmp = (fabs(size->width - ceil(size->width)) < 0.1) ? + ceil(size->width) : size->width; + length_tmp = (fabs(size->length - ceil(size->length)) < 0.1) ? + ceil(size->length) : size->length; + + if (fmod(width_tmp, 18.0) == 0.0 && fmod(length_tmp, 18.0) == 0.0) + { + width_inch = width_tmp / 72.0; + length_inch = length_tmp / 72.0; + + snprintf(buf, sizeof(buf), "%gx%g", width_inch, length_inch); + } + else + { + width_mm = size->width / 72.0 * 25.4; + length_mm = size->length / 72.0 * 25.4; + + snprintf(buf, sizeof(buf), "%.0fx%.0fmm", width_mm, length_mm); + } + + if (size->left == 0 && size->bottom == 0 && + size->right == size->width && size->top == size->length) + strlcat(buf, ".Fullbleed", sizeof(buf)); + else if (size->width > size->length) + strlcat(buf, ".Transverse", sizeof(buf)); + + if (strcmp(size->name, buf)) + _cupsLangPrintf(stdout, + _(" %s Size \"%s\" should be \"%s\"."), + prefix, size->name, buf); + } + } } return (errors); @@ -3330,7 +3455,8 @@ check_translations(ppd_file_t *ppd, /* I - PPD file */ */ static void -show_conflicts(ppd_file_t *ppd) /* I - PPD to check */ +show_conflicts(ppd_file_t *ppd, /* I - PPD to check */ + const char *prefix) /* I - Prefix string */ { int i, j; /* Looping variables */ ppd_const_t *c; /* Current constraint */ @@ -3417,9 +3543,9 @@ show_conflicts(ppd_file_t *ppd) /* I - PPD to check */ if (c1 != NULL && c1->marked && c2 != NULL && c2->marked) _cupsLangPrintf(stdout, - _(" WARN \"%s %s\" conflicts with \"%s %s\"\n" + _(" %s \"%s %s\" conflicts with \"%s %s\"\n" " (constraint=\"%s %s %s %s\")."), - o1->keyword, c1->choice, o2->keyword, c2->choice, + prefix, o1->keyword, c1->choice, o2->keyword, c2->choice, c->option1, c->choice1, c->option2, c->choice2); } } @@ -3477,7 +3603,7 @@ test_raster(ppd_file_t *ppd, /* I - PPD file */ /* - * 'usage()' - Show program usage... + * 'usage()' - Show program usage. */ static void diff --git a/test/get-jobs.test b/test/get-jobs.test index 8ad6c5b9f..4da5f6a7a 100644 --- a/test/get-jobs.test +++ b/test/get-jobs.test @@ -1,5 +1,5 @@ # -# "$Id$" +# "$Id: get-jobs.test 9702 2011-04-20 21:16:08Z mike $" # # Get list of not-completed jobs. # @@ -49,5 +49,5 @@ # -# End of "$Id$". +# End of "$Id: get-jobs.test 9702 2011-04-20 21:16:08Z mike $". # diff --git a/test/ippserver.c b/test/ippserver.c index 484ada29d..5d1ce17e9 100644 --- a/test/ippserver.c +++ b/test/ippserver.c @@ -202,7 +202,7 @@ typedef struct _ipp_printer_s /**** Printer data ****/ size_t urilen; /* Length of printer URI */ ipp_t *attrs; /* Static attributes */ ipp_pstate_t state; /* printer-state value */ - _ipp_preasons_t state_reasons; /* printer-state-reasons values */ + _ipp_preasons_t state_reasons; /* printer-state-reasons values */ cups_array_t *jobs; /* Jobs */ _ipp_job_t *active_job; /* Current active/pending job */ int next_job_id; /* Next job-id value */ @@ -1084,16 +1084,8 @@ create_listener(int family, /* I - Address family */ } memset(&address, 0, sizeof(address)); - if (family == AF_INET) - { - address.ipv4.sin_family = family; - address.ipv4.sin_port = htons(*port); - } - else - { - address.ipv6.sin6_family = family; - address.ipv6.sin6_port = htons(*port); - } + address.addr.sa_family = family; + _httpAddrSetPort(&address, *port); if (bind(sock, (struct sockaddr *)&address, httpAddrLength(&address))) { @@ -1305,7 +1297,7 @@ create_printer(const char *servername, /* I - Server hostname (NULL for default) printer->ipv4 = -1; printer->ipv6 = -1; printer->name = _cupsStrAlloc(name); -#ifdef HAVE_DNSSD */ +#ifdef HAVE_DNSSD printer->dnssd_name = _cupsStrRetain(printer->name); #endif /* HAVE_DNSSD */ printer->directory = _cupsStrAlloc(directory); @@ -2898,13 +2890,13 @@ ipp_print_job(_ipp_client_t *client) /* I - Client */ snprintf(filename, sizeof(filename), "%s/%d.png", client->printer->directory, job->id); else if (!strcasecmp(job->format, "application/pdf")) - snprintf(filename, sizeof(filename), "%s/%d.pdf", + snprintf(filename, sizeof(filename), "%s/%d.pdf", client->printer->directory, job->id); else if (!strcasecmp(job->format, "application/postscript")) - snprintf(filename, sizeof(filename), "%s/%d.ps", + snprintf(filename, sizeof(filename), "%s/%d.ps", client->printer->directory, job->id); else - snprintf(filename, sizeof(filename), "%s/%d.prn", + snprintf(filename, sizeof(filename), "%s/%d.prn", client->printer->directory, job->id); if ((job->fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600)) < 0) diff --git a/xcode/CUPS.xcodeproj/project.pbxproj b/xcode/CUPS.xcodeproj/project.pbxproj index 07f865b42..90ed268d7 100644 --- a/xcode/CUPS.xcodeproj/project.pbxproj +++ b/xcode/CUPS.xcodeproj/project.pbxproj @@ -13,6 +13,8 @@ buildPhases = ( ); dependencies = ( + 726AD704135E8AA1002C930D /* PBXTargetDependency */, + 270CCDB2135E3CDE00007BE2 /* PBXTargetDependency */, 273BF6DE1333B6370022CAAB /* PBXTargetDependency */, ); name = Tests; @@ -48,6 +50,7 @@ 276683DD1337B24A000D33D0 /* PBXTargetDependency */, 276683DF1337B24A000D33D0 /* PBXTargetDependency */, 7258EAEF13459ADA009286F1 /* PBXTargetDependency */, + 720DD6D11358FDBE0064AA82 /* PBXTargetDependency */, 7243793F1333FD23009631B9 /* PBXTargetDependency */, 724379C31333FF7D009631B9 /* PBXTargetDependency */, ); @@ -57,6 +60,9 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 270CCDB9135E3D0900007BE2 /* libcups_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 72F75A4C1336F31B004BB496 /* libcups_static.a */; }; + 270CCDBA135E3D0900007BE2 /* libcupsmime.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220FAC13330B2200FCA411 /* libcupsmime.dylib */; }; + 270CCDBC135E3D3E00007BE2 /* testmime.c in Sources */ = {isa = PBXBuildFile; fileRef = 270CCDBB135E3D3E00007BE2 /* testmime.c */; }; 273BF6C71333B5370022CAAB /* testcups.c in Sources */ = {isa = PBXBuildFile; fileRef = 273BF6C61333B5370022CAAB /* testcups.c */; }; 273BF6CE1333B5950022CAAB /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 273BF6CB1333B5950022CAAB /* CoreFoundation.framework */; }; 273BF6CF1333B5950022CAAB /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 273BF6CC1333B5950022CAAB /* libiconv.dylib */; }; @@ -204,6 +210,9 @@ 276683FD1337F7B8000D33D0 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; }; 2766840F1337FA38000D33D0 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; }; 276684111337FA7C000D33D0 /* cupsaddsmb.c in Sources */ = {isa = PBXBuildFile; fileRef = 276684101337FA7C000D33D0 /* cupsaddsmb.c */; }; + 720DD6CD1358FD720064AA82 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; }; + 720DD6D31358FDDE0064AA82 /* snmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 720DD6D21358FDDE0064AA82 /* snmp.c */; }; + 720DD6D413590AB90064AA82 /* ieee1284.c in Sources */ = {isa = PBXBuildFile; fileRef = 724379CA1334000E009631B9 /* ieee1284.c */; }; 72220EB61333052D00FCA411 /* adminutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 72220EB51333052D00FCA411 /* adminutil.c */; }; 72220EC41333056300FCA411 /* adminutil.h in Headers */ = {isa = PBXBuildFile; fileRef = 72220EB71333056300FCA411 /* adminutil.h */; settings = {ATTRIBUTES = (Public, ); }; }; 72220EC51333056300FCA411 /* array.c in Sources */ = {isa = PBXBuildFile; fileRef = 72220EB81333056300FCA411 /* array.c */; }; @@ -350,6 +359,15 @@ 7263EE3613330E4E00BA4D44 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7263EE3513330E4E00BA4D44 /* CoreFoundation.framework */; }; 7263EE3813330E7500BA4D44 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 7263EE3713330E7500BA4D44 /* libz.dylib */; }; 7263EE3A13330EC500BA4D44 /* libldap.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 7263EE3913330EC500BA4D44 /* libldap.dylib */; }; + 726AD702135E8A90002C930D /* ippserver.c in Sources */ = {isa = PBXBuildFile; fileRef = 726AD701135E8A90002C930D /* ippserver.c */; }; + 726AD707135E8B11002C930D /* libcups_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 72F75A4C1336F31B004BB496 /* libcups_static.a */; }; + 726AD708135E8B11002C930D /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220F49133306BB00FCA411 /* CoreFoundation.framework */; }; + 726AD709135E8B11002C930D /* Kerberos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220F55133308EA00FCA411 /* Kerberos.framework */; }; + 726AD70A135E8B11002C930D /* libresolv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220F53133308CB00FCA411 /* libresolv.dylib */; }; + 726AD70B135E8B11002C930D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220F4A133306BB00FCA411 /* libz.dylib */; }; + 726AD70C135E8B11002C930D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220F4B133306BB00FCA411 /* Security.framework */; }; + 726AD70D135E8B11002C930D /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220F4C133306BB00FCA411 /* SystemConfiguration.framework */; }; + 726AD70E135E8B5E002C930D /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220F51133308C100FCA411 /* libiconv.dylib */; }; 72F75A5C1336F988004BB496 /* cupstestppd.c in Sources */ = {isa = PBXBuildFile; fileRef = 72F75A5B1336F988004BB496 /* cupstestppd.c */; }; 72F75A671336FA38004BB496 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; }; 72F75A6C1336FA8A004BB496 /* error.c in Sources */ = {isa = PBXBuildFile; fileRef = 72F75A691336FA8A004BB496 /* error.c */; }; @@ -359,6 +377,27 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 270CCDB1135E3CDE00007BE2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 72BF96371333042100B1EAD7 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 270CCDA6135E3C9E00007BE2; + remoteInfo = testmime; + }; + 270CCDB5135E3CF700007BE2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 72BF96371333042100B1EAD7 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 72220FAB13330B2200FCA411; + remoteInfo = libcupsmime; + }; + 270CCDB7135E3CFD00007BE2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 72BF96371333042100B1EAD7 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 274FF6891333B1C400317ECB; + remoteInfo = libcups_static; + }; 273BF6C81333B5410022CAAB /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 72BF96371333042100B1EAD7 /* Project object */; @@ -660,6 +699,20 @@ remoteGlobalIDString = 276684031337FA1D000D33D0; remoteInfo = cupsaddsmb; }; + 720DD6CE1358FD790064AA82 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 72BF96371333042100B1EAD7 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 72220EAD1333047D00FCA411; + remoteInfo = libcups; + }; + 720DD6D01358FDBE0064AA82 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 72BF96371333042100B1EAD7 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 720DD6C11358FD5F0064AA82; + remoteInfo = snmp; + }; 72220F6413330A6500FCA411 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 72BF96371333042100B1EAD7 /* Project object */; @@ -772,6 +825,20 @@ remoteGlobalIDString = 72F75A601336F9A3004BB496; remoteInfo = libcupsimage; }; + 726AD703135E8AA1002C930D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 72BF96371333042100B1EAD7 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 726AD6F6135E88F0002C930D; + remoteInfo = ippserver; + }; + 726AD705135E8AC5002C930D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 72BF96371333042100B1EAD7 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 274FF6891333B1C400317ECB; + remoteInfo = libcups_static; + }; 72F75A651336FA30004BB496 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 72BF96371333042100B1EAD7 /* Project object */; @@ -796,6 +863,15 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ + 270CCDA5135E3C9E00007BE2 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; 273BF6BB1333B5000022CAAB /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -931,6 +1007,15 @@ ); runOnlyForDeploymentPostprocessing = 1; }; + 720DD6C01358FD5F0064AA82 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; 72220F5913330A5A00FCA411 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -994,6 +1079,15 @@ ); runOnlyForDeploymentPostprocessing = 1; }; + 726AD6F5135E88F0002C930D /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; 72F75A501336F950004BB496 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -1006,6 +1100,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 270CCDA7135E3C9E00007BE2 /* testmime */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testmime; sourceTree = BUILT_PRODUCTS_DIR; }; + 270CCDBB135E3D3E00007BE2 /* testmime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testmime.c; path = ../scheduler/testmime.c; sourceTree = ""; }; 273BF6BD1333B5000022CAAB /* testcups */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testcups; sourceTree = BUILT_PRODUCTS_DIR; }; 273BF6C61333B5370022CAAB /* testcups.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testcups.c; path = ../cups/testcups.c; sourceTree = ""; }; 273BF6CB1333B5950022CAAB /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework; sourceTree = DEVELOPER_DIR; }; @@ -1070,6 +1166,8 @@ 276684101337FA7C000D33D0 /* cupsaddsmb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cupsaddsmb.c; path = ../systemv/cupsaddsmb.c; sourceTree = ""; }; 27D3037C134148CB00F022B1 /* libcups_s.exp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.exports; name = libcups_s.exp; path = ../cups/libcups_s.exp; sourceTree = ""; }; 27D3037D134148CB00F022B1 /* libcups2.def */ = {isa = PBXFileReference; lastKnownFileType = text; name = libcups2.def; path = ../cups/libcups2.def; sourceTree = ""; }; + 720DD6C21358FD5F0064AA82 /* snmp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = snmp; sourceTree = BUILT_PRODUCTS_DIR; }; + 720DD6D21358FDDE0064AA82 /* snmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snmp.c; path = ../backend/snmp.c; sourceTree = ""; }; 72220EAE1333047D00FCA411 /* libcups.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libcups.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 72220EB51333052D00FCA411 /* adminutil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = adminutil.c; path = ../cups/adminutil.c; sourceTree = ""; }; 72220EB71333056300FCA411 /* adminutil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = adminutil.h; path = ../cups/adminutil.h; sourceTree = ""; }; @@ -1227,7 +1325,9 @@ 7263EE3513330E4E00BA4D44 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework; sourceTree = DEVELOPER_DIR; }; 7263EE3713330E7500BA4D44 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = SDKs/MacOSX10.6.sdk/usr/lib/libz.dylib; sourceTree = DEVELOPER_DIR; }; 7263EE3913330EC500BA4D44 /* libldap.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libldap.dylib; path = SDKs/MacOSX10.6.sdk/usr/lib/libldap.dylib; sourceTree = DEVELOPER_DIR; }; - 72F75A4C1336F31B004BB496 /* libcups_static.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libcups_static.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + 726AD6F7135E88F0002C930D /* ippserver */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ippserver; sourceTree = BUILT_PRODUCTS_DIR; }; + 726AD701135E8A90002C930D /* ippserver.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ippserver.c; path = ../test/ippserver.c; sourceTree = ""; }; + 72F75A4C1336F31B004BB496 /* libcups_static.a */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libcups_static.a; sourceTree = BUILT_PRODUCTS_DIR; }; 72F75A521336F950004BB496 /* cupstestppd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = cupstestppd; sourceTree = BUILT_PRODUCTS_DIR; }; 72F75A5B1336F988004BB496 /* cupstestppd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cupstestppd.c; path = ../systemv/cupstestppd.c; sourceTree = ""; }; 72F75A611336F9A3004BB496 /* libcupsimage.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libcupsimage.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1237,10 +1337,20 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 270CCDA4135E3C9E00007BE2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 270CCDB9135E3D0900007BE2 /* libcups_static.a in Frameworks */, + 270CCDBA135E3D0900007BE2 /* libcupsmime.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 273BF6BA1333B5000022CAAB /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 726AD72B135EAE1E002C930D /* libcups_static.dylib in Frameworks */, 273BF6CE1333B5950022CAAB /* CoreFoundation.framework in Frameworks */, 273BF6D31333B5C30022CAAB /* Kerberos.framework in Frameworks */, 273BF6D41333B5C30022CAAB /* Security.framework in Frameworks */, @@ -1391,6 +1501,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 720DD6BF1358FD5F0064AA82 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 720DD6CD1358FD720064AA82 /* libcups.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 72220EAB1333047D00FCA411 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1484,6 +1602,21 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 726AD6F4135E88F0002C930D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 726AD70E135E8B5E002C930D /* libiconv.dylib in Frameworks */, + 726AD707135E8B11002C930D /* libcups_static.a in Frameworks */, + 726AD708135E8B11002C930D /* CoreFoundation.framework in Frameworks */, + 726AD709135E8B11002C930D /* Kerberos.framework in Frameworks */, + 726AD70A135E8B11002C930D /* libresolv.dylib in Frameworks */, + 726AD70B135E8B11002C930D /* libz.dylib in Frameworks */, + 726AD70C135E8B11002C930D /* Security.framework in Frameworks */, + 726AD70D135E8B11002C930D /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 72F75A4F1336F950004BB496 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1507,6 +1640,7 @@ 273BF6B81333B4A90022CAAB /* tests */ = { isa = PBXGroup; children = ( + 270CCDBB135E3D3E00007BE2 /* testmime.c */, 273BF6C61333B5370022CAAB /* testcups.c */, ); name = tests; @@ -1558,8 +1692,9 @@ children = ( 276684101337FA7C000D33D0 /* cupsaddsmb.c */, 276683681337AA00000D33D0 /* cupsctl.c */, - 72F75A5B1336F988004BB496 /* cupstestppd.c */, 274FF68713333B6E00317ECB /* cupsfilter.c */, + 72F75A5B1336F988004BB496 /* cupstestppd.c */, + 726AD701135E8A90002C930D /* ippserver.c */, 276683F91337F7A9000D33D0 /* ipptool.c */, ); name = commands; @@ -1593,7 +1728,6 @@ 724379301333FB85009631B9 /* socket */, 724379471333FEA9009631B9 /* dnssd */, 7243795B1333FF1D009631B9 /* usb */, - 72F75A4C1336F31B004BB496 /* libcups_static.dylib */, 72F75A521336F950004BB496 /* cupstestppd */, 2766835C1337A9B6000D33D0 /* cupsctl */, 276683701337AC79000D33D0 /* ppdc */, @@ -1604,6 +1738,9 @@ 276683F01337F78E000D33D0 /* ipptool */, 276684041337FA1D000D33D0 /* cupsaddsmb */, 7258EAE2134594C4009286F1 /* rastertopwg */, + 720DD6C21358FD5F0064AA82 /* snmp */, + 270CCDA7135E3C9E00007BE2 /* testmime */, + 726AD6F7135E88F0002C930D /* ippserver */, ); name = Products; sourceTree = ""; @@ -1767,7 +1904,20 @@ 72220FB113330B4A00FCA411 /* Frameworks */ = { isa = PBXGroup; children = ( + 72F75A4C1336F31B004BB496 /* libcups_static.a */, 72220FAC13330B2200FCA411 /* libcupsmime.dylib */, + 72220EAE1333047D00FCA411 /* libcups.dylib */, + 72F75A611336F9A3004BB496 /* libcupsimage.dylib */, + 274FF5EE133330C800317ECB /* libcupsppdc.dylib */, + 724379C81333FFF3009631B9 /* CoreFoundation.framework */, + 724379671333FF3B009631B9 /* IOKit.framework */, + 273BF6D51333B5F60022CAAB /* libresolv.dylib */, + 273BF6D61333B5F60022CAAB /* SystemConfiguration.framework */, + 273BF6D11333B5C30022CAAB /* Kerberos.framework */, + 273BF6D21333B5C30022CAAB /* Security.framework */, + 273BF6CB1333B5950022CAAB /* CoreFoundation.framework */, + 273BF6CC1333B5950022CAAB /* libiconv.dylib */, + 273BF6CD1333B5950022CAAB /* libz.dylib */, 7263EE3913330EC500BA4D44 /* libldap.dylib */, 7263EE3713330E7500BA4D44 /* libz.dylib */, 7263EE3513330E4E00BA4D44 /* CoreFoundation.framework */, @@ -1800,6 +1950,7 @@ 724379281333E952009631B9 /* lpd.c */, 7243790B1333E4E3009631B9 /* network.c */, 724379121333E516009631B9 /* runloop.c */, + 720DD6D21358FDDE0064AA82 /* snmp.c */, 7243790C1333E4E3009631B9 /* snmp-supplies.c */, 7243793C1333FD19009631B9 /* socket.c */, 724379C51333FFC7009631B9 /* usb.c */, @@ -1819,18 +1970,6 @@ 72BF96351333042100B1EAD7 = { isa = PBXGroup; children = ( - 72220EAE1333047D00FCA411 /* libcups.dylib */, - 72F75A611336F9A3004BB496 /* libcupsimage.dylib */, - 274FF5EE133330C800317ECB /* libcupsppdc.dylib */, - 724379C81333FFF3009631B9 /* CoreFoundation.framework */, - 724379671333FF3B009631B9 /* IOKit.framework */, - 273BF6D51333B5F60022CAAB /* libresolv.dylib */, - 273BF6D61333B5F60022CAAB /* SystemConfiguration.framework */, - 273BF6D11333B5C30022CAAB /* Kerberos.framework */, - 273BF6D21333B5C30022CAAB /* Security.framework */, - 273BF6CB1333B5950022CAAB /* CoreFoundation.framework */, - 273BF6CC1333B5950022CAAB /* libiconv.dylib */, - 273BF6CD1333B5950022CAAB /* libz.dylib */, 72220FB113330B4A00FCA411 /* Frameworks */, 72220F45133305D000FCA411 /* Public Headers */, 72220F461333060C00FCA411 /* Private Headers */, @@ -1956,6 +2095,25 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 270CCDA6135E3C9E00007BE2 /* testmime */ = { + isa = PBXNativeTarget; + buildConfigurationList = 270CCDAF135E3C9E00007BE2 /* Build configuration list for PBXNativeTarget "testmime" */; + buildPhases = ( + 270CCDA3135E3C9E00007BE2 /* Sources */, + 270CCDA4135E3C9E00007BE2 /* Frameworks */, + 270CCDA5135E3C9E00007BE2 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 270CCDB8135E3CFD00007BE2 /* PBXTargetDependency */, + 270CCDB6135E3CF700007BE2 /* PBXTargetDependency */, + ); + name = testmime; + productName = testmime; + productReference = 270CCDA7135E3C9E00007BE2 /* testmime */; + productType = "com.apple.product-type.tool"; + }; 273BF6BC1333B5000022CAAB /* testcups */ = { isa = PBXNativeTarget; buildConfigurationList = 273BF6C31333B5000022CAAB /* Build configuration list for PBXNativeTarget "testcups" */; @@ -2115,7 +2273,7 @@ ); name = libcups_static; productName = libcups; - productReference = 72F75A4C1336F31B004BB496 /* libcups_static.dylib */; + productReference = 72F75A4C1336F31B004BB496 /* libcups_static.a */; productType = "com.apple.product-type.library.dynamic"; }; 2766835B1337A9B6000D33D0 /* cupsctl */ = { @@ -2267,6 +2425,24 @@ productReference = 276684041337FA1D000D33D0 /* cupsaddsmb */; productType = "com.apple.product-type.tool"; }; + 720DD6C11358FD5F0064AA82 /* snmp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 720DD6CB1358FD600064AA82 /* Build configuration list for PBXNativeTarget "snmp" */; + buildPhases = ( + 720DD6BE1358FD5F0064AA82 /* Sources */, + 720DD6BF1358FD5F0064AA82 /* Frameworks */, + 720DD6C01358FD5F0064AA82 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 720DD6CF1358FD790064AA82 /* PBXTargetDependency */, + ); + name = snmp; + productName = snmp; + productReference = 720DD6C21358FD5F0064AA82 /* snmp */; + productType = "com.apple.product-type.tool"; + }; 72220EAD1333047D00FCA411 /* libcups */ = { isa = PBXNativeTarget; buildConfigurationList = 72220EB21333047D00FCA411 /* Build configuration list for PBXNativeTarget "libcups" */; @@ -2430,6 +2606,24 @@ productReference = 7258EAE2134594C4009286F1 /* rastertopwg */; productType = "com.apple.product-type.tool"; }; + 726AD6F6135E88F0002C930D /* ippserver */ = { + isa = PBXNativeTarget; + buildConfigurationList = 726AD6FE135E88F1002C930D /* Build configuration list for PBXNativeTarget "ippserver" */; + buildPhases = ( + 726AD6F3135E88F0002C930D /* Sources */, + 726AD6F4135E88F0002C930D /* Frameworks */, + 726AD6F5135E88F0002C930D /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 726AD706135E8AC5002C930D /* PBXTargetDependency */, + ); + name = ippserver; + productName = ippserver; + productReference = 726AD6F7135E88F0002C930D /* ippserver */; + productType = "com.apple.product-type.tool"; + }; 72F75A511336F950004BB496 /* cupstestppd */ = { isa = PBXNativeTarget; buildConfigurationList = 72F75A581336F951004BB496 /* Build configuration list for PBXNativeTarget "cupstestppd" */; @@ -2506,6 +2700,7 @@ 72F75A511336F950004BB496 /* cupstestppd */, 724379461333FEA9009631B9 /* dnssd */, 724378FC1333E43E009631B9 /* ipp */, + 726AD6F6135E88F0002C930D /* ippserver */, 276683EF1337F78E000D33D0 /* ipptool */, 724379171333E532009631B9 /* lpd */, 2766836F1337AC79000D33D0 /* ppdc */, @@ -2514,14 +2709,24 @@ 276683961337ACA2000D33D0 /* ppdmerge */, 276683A31337ACAB000D33D0 /* ppdpo */, 7258EAE1134594C4009286F1 /* rastertopwg */, + 720DD6C11358FD5F0064AA82 /* snmp */, 7243792F1333FB85009631B9 /* socket */, 273BF6BC1333B5000022CAAB /* testcups */, + 270CCDA6135E3C9E00007BE2 /* testmime */, 7243795A1333FF1D009631B9 /* usb */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ + 270CCDA3135E3C9E00007BE2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 270CCDBC135E3D3E00007BE2 /* testmime.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 273BF6B91333B5000022CAAB /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2723,6 +2928,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 720DD6BE1358FD5F0064AA82 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 720DD6D413590AB90064AA82 /* ieee1284.c in Sources */, + 720DD6D31358FDDE0064AA82 /* snmp.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 72220EAA1333047D00FCA411 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2875,6 +3089,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 726AD6F3135E88F0002C930D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 726AD702135E8A90002C930D /* ippserver.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 72F75A4E1336F950004BB496 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2896,6 +3118,21 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 270CCDB2135E3CDE00007BE2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 270CCDA6135E3C9E00007BE2 /* testmime */; + targetProxy = 270CCDB1135E3CDE00007BE2 /* PBXContainerItemProxy */; + }; + 270CCDB6135E3CF700007BE2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 72220FAB13330B2200FCA411 /* libcupsmime */; + targetProxy = 270CCDB5135E3CF700007BE2 /* PBXContainerItemProxy */; + }; + 270CCDB8135E3CFD00007BE2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 274FF6891333B1C400317ECB /* libcups_static */; + targetProxy = 270CCDB7135E3CFD00007BE2 /* PBXContainerItemProxy */; + }; 273BF6C91333B5410022CAAB /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 274FF6891333B1C400317ECB /* libcups_static */; @@ -3111,6 +3348,16 @@ target = 276684031337FA1D000D33D0 /* cupsaddsmb */; targetProxy = 276684121337FA8D000D33D0 /* PBXContainerItemProxy */; }; + 720DD6CF1358FD790064AA82 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 72220EAD1333047D00FCA411 /* libcups */; + targetProxy = 720DD6CE1358FD790064AA82 /* PBXContainerItemProxy */; + }; + 720DD6D11358FDBE0064AA82 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 720DD6C11358FD5F0064AA82 /* snmp */; + targetProxy = 720DD6D01358FDBE0064AA82 /* PBXContainerItemProxy */; + }; 72220F6513330A6500FCA411 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 72220EAD1333047D00FCA411 /* libcups */; @@ -3191,6 +3438,16 @@ target = 72F75A601336F9A3004BB496 /* libcupsimage */; targetProxy = 7258EAF213459B67009286F1 /* PBXContainerItemProxy */; }; + 726AD704135E8AA1002C930D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 726AD6F6135E88F0002C930D /* ippserver */; + targetProxy = 726AD703135E8AA1002C930D /* PBXContainerItemProxy */; + }; + 726AD706135E8AC5002C930D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 274FF6891333B1C400317ECB /* libcups_static */; + targetProxy = 726AD705135E8AC5002C930D /* PBXContainerItemProxy */; + }; 72F75A661336FA30004BB496 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 72220EAD1333047D00FCA411 /* libcups */; @@ -3209,6 +3466,43 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ + 270CCDAD135E3C9E00007BE2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = DEBUG; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = NO; + }; + name = Debug; + }; + 270CCDAE135E3C9E00007BE2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = NO; + }; + name = Release; + }; 273BF6C41333B5000022CAAB /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3221,7 +3515,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3238,7 +3531,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3272,7 +3564,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3291,7 +3582,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3327,7 +3617,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3348,7 +3637,6 @@ EXECUTABLE_PREFIX = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3371,7 +3659,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3389,7 +3676,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3410,7 +3696,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3428,7 +3713,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3449,7 +3733,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3467,7 +3750,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3488,7 +3770,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3506,7 +3787,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3527,7 +3807,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3545,7 +3824,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3560,6 +3838,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; COPY_PHASE_STRIP = NO; + EXECUTABLE_EXTENSION = a; EXECUTABLE_PREFIX = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -3567,7 +3846,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3578,6 +3856,7 @@ PRODUCT_NAME = libcups_static; PUBLIC_HEADERS_FOLDER_PATH = /usr/include/cups; SKIP_INSTALL = NO; + STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static; }; name = Debug; }; @@ -3588,10 +3867,10 @@ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + EXECUTABLE_EXTENSION = a; EXECUTABLE_PREFIX = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3601,6 +3880,7 @@ PRODUCT_NAME = libcups_static; PUBLIC_HEADERS_FOLDER_PATH = /usr/include/cups; SKIP_INSTALL = NO; + STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static; }; name = Release; }; @@ -3616,7 +3896,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3634,7 +3913,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3655,7 +3933,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3673,7 +3950,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3694,7 +3970,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3712,7 +3987,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3733,7 +4007,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3751,7 +4024,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3772,7 +4044,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3790,7 +4061,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3811,7 +4081,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3829,7 +4098,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3850,7 +4118,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3868,7 +4135,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3889,7 +4155,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3907,7 +4172,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3916,6 +4180,43 @@ }; name = Release; }; + 720DD6C91358FD5F0064AA82 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INSTALL_PATH = /usr/libexec/cups/backend; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 720DD6CA1358FD5F0064AA82 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INSTALL_PATH = /usr/libexec/cups/backend; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; 72220EB01333047D00FCA411 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3929,7 +4230,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3951,7 +4251,6 @@ EXECUTABLE_PREFIX = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3974,7 +4273,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -3993,7 +4291,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4015,7 +4312,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4035,7 +4331,6 @@ EXECUTABLE_PREFIX = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4056,7 +4351,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4075,7 +4369,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4097,7 +4390,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4115,7 +4407,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4136,7 +4427,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4154,7 +4444,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4175,7 +4464,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4193,7 +4481,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4214,7 +4501,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4236,7 +4522,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4261,7 +4546,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4279,7 +4563,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4288,6 +4571,41 @@ }; name = Release; }; + 726AD6FF135E88F1002C930D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 726AD700135E88F1002C930D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; 72BF963C1333042100B1EAD7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4334,7 +4652,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4352,7 +4669,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4374,7 +4690,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4393,7 +4708,6 @@ EXECUTABLE_PREFIX = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -4405,6 +4719,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 270CCDAF135E3C9E00007BE2 /* Build configuration list for PBXNativeTarget "testmime" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 270CCDAD135E3C9E00007BE2 /* Debug */, + 270CCDAE135E3C9E00007BE2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 273BF6C31333B5000022CAAB /* Build configuration list for PBXNativeTarget "testcups" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -4576,6 +4899,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 720DD6CB1358FD600064AA82 /* Build configuration list for PBXNativeTarget "snmp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 720DD6C91358FD5F0064AA82 /* Debug */, + 720DD6CA1358FD5F0064AA82 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 72220EB21333047D00FCA411 /* Build configuration list for PBXNativeTarget "libcups" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -4657,6 +4989,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 726AD6FE135E88F1002C930D /* Build configuration list for PBXNativeTarget "ippserver" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 726AD6FF135E88F1002C930D /* Debug */, + 726AD700135E88F1002C930D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 72BF963A1333042100B1EAD7 /* Build configuration list for PBXProject "CUPS" */ = { isa = XCConfigurationList; buildConfigurations = ( -- 2.39.2