From: msweet Date: Wed, 27 Aug 2008 22:04:19 +0000 (+0000) Subject: Merge changes from CUPS 1.4svn-r7874. X-Git-Tag: release-1.6.3~147 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fcups.git;a=commitdiff_plain;h=5f64df29828e9ca71164342efd357e9debfb6e44 Merge changes from CUPS 1.4svn-r7874. git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@924 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES-1.3.txt b/CHANGES-1.3.txt index ced5b20d7..d126cfac9 100644 --- a/CHANGES-1.3.txt +++ b/CHANGES-1.3.txt @@ -3,6 +3,12 @@ CHANGES-1.3.txt CHANGES IN CUPS V1.3.9 + - Documentation updates (STR #2904) + - The scheduler required Kerberos authentication for + all operations on remote Kerberized printers instead + of just for the operations that needed it. + - The socket backend could wait indefinitely for back- + channel data with some devices. - PJL panel messages were not reset correctly on older printers (STR #2909) - cupsfilter used the wrong default path (STR #2908) diff --git a/Makedefs.in b/Makedefs.in index b34c7ae0e..f213a3f38 100644 --- a/Makedefs.in +++ b/Makedefs.in @@ -152,6 +152,8 @@ PHPDIR = @PHPDIR@ PHPOPTIONS = @PHPOPTIONS@ -I../.. `$(PHPCONFIG) --includes` SSLFLAGS = @SSLFLAGS@ SSLLIBS = @SSLLIBS@ +UNITTESTS = @UNITTESTS@ + # # Separate 32/64-bit library support... diff --git a/Makefile b/Makefile index 9354f05ca..7be3bac59 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,8 @@ all: echo Using ARCHFLAGS="$(ARCHFLAGS)" echo Using ALL_CFLAGS="$(ALL_CFLAGS)" echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)" + echo Using CC="$(CC)" + echo Using CXX="$(CC)" echo Using DSOFLAGS="$(DSOFLAGS)" echo Using LDFLAGS="$(LDFLAGS)" echo Using LIBS="$(LIBS)" @@ -51,6 +53,8 @@ libs: echo Using ARCHFLAGS="$(ARCHFLAGS)" echo Using ALL_CFLAGS="$(ALL_CFLAGS)" echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)" + echo Using CC="$(CC)" + echo Using CXX="$(CC)" echo Using DSOFLAGS="$(DSOFLAGS)" echo Using LDFLAGS="$(LDFLAGS)" echo Using LIBS="$(LIBS)" @@ -60,6 +64,25 @@ libs: done +# +# Make unit test targets... +# + +unittests: + echo Using ARCHFLAGS="$(ARCHFLAGS)" + echo Using ALL_CFLAGS="$(ALL_CFLAGS)" + echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)" + echo Using CC="$(CC)" + echo Using CXX="$(CC)" + echo Using DSOFLAGS="$(DSOFLAGS)" + echo Using LDFLAGS="$(LDFLAGS)" + echo Using LIBS="$(LIBS)" + for dir in $(DIRS); do\ + echo Making all in $$dir... ;\ + (cd $$dir ; $(MAKE) $(MFLAGS) unittests) || exit 1;\ + done + + # # Remove object and target files... # diff --git a/backend/Makefile b/backend/Makefile index a2d4b1ed0..bb9d0f8dc 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -40,6 +40,13 @@ all: $(TARGETS) libs: +# +# Make unit tests... +# + +unittests: + + # # Clean all object files... # diff --git a/backend/socket.c b/backend/socket.c index 4e2dac146..70a089195 100644 --- a/backend/socket.c +++ b/backend/socket.c @@ -72,7 +72,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ sep; /* Option separator */ int print_fd; /* Print file */ int copies; /* Number of copies to print */ - time_t start_time; /* Time of first connect */ + time_t start_time, /* Time of first connect */ + wait_time; /* Time to wait before shutting down socket */ int recoverable; /* Recoverable error shown? */ int contimeout; /* Connection timeout */ int waiteof; /* Wait for end-of-file? */ @@ -412,10 +413,13 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ } /* - * Get any pending back-channel data... + * Wait up to 5 seconds to get any pending back-channel data... */ - while (wait_bc(device_fd, 5) > 0); + wait_time = time(NULL) + 5; + while (wait_time >= time(NULL)) + if (wait_bc(device_fd, 1) <= 0) + break; if (waiteof) { diff --git a/berkeley/Makefile b/berkeley/Makefile index 7852f245f..996858d38 100644 --- a/berkeley/Makefile +++ b/berkeley/Makefile @@ -15,6 +15,7 @@ include ../Makedefs + TARGETS = lpc lpq lpr lprm OBJS = lpc.o lpq.o lpr.o lprm.o @@ -33,6 +34,13 @@ all: $(TARGETS) libs: +# +# Make unit tests... +# + +unittests: + + # # Clean all object files... # diff --git a/cgi-bin/Makefile b/cgi-bin/Makefile index 3ddc6cd65..0d538c0d7 100644 --- a/cgi-bin/Makefile +++ b/cgi-bin/Makefile @@ -48,14 +48,16 @@ LIBTARGETS = \ $(LIBCUPSCGI) \ $(LIB32CUPSCGI) \ $(LIB32CUPSCGI) \ + websearch + +UNITTARGETS = \ testcgi \ testhi \ - websearch + testtemplate TARGETS = \ $(LIBTARGETS) \ - $(CGIS) \ - testtemplate + $(CGIS) # @@ -69,7 +71,14 @@ all: $(TARGETS) # Make library targets... # -libs: $(LIBTARGETS) +libs: $(LIBTARGETS) $(UNITTESTS) + + +# +# Make unit tests... +# + +unittests: $(UNITTARGETS) # @@ -77,7 +86,7 @@ libs: $(LIBTARGETS) # clean: - $(RM) $(OBJS) $(TARGETS) + $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS) $(RM) libcupscgi.so libcupscgi.sl libcupscgi.dylib $(RM) -r 32bit 64bit diff --git a/conf/Makefile b/conf/Makefile index 8d4ffbf2f..acd7eacba 100644 --- a/conf/Makefile +++ b/conf/Makefile @@ -37,6 +37,13 @@ all: libs: +# +# Make unit tests... +# + +unittests: + + # # Clean all config and object files... # diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4 index 8d30df79c..2781e18ba 100644 --- a/config-scripts/cups-compiler.m4 +++ b/config-scripts/cups-compiler.m4 @@ -22,15 +22,29 @@ AC_SUBST(OPTIM) AC_ARG_WITH(optim, [ --with-optim="flags" set optimization flags ]) AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging, default=no]) +AC_ARG_ENABLE(debug_printfs, [ --enable-debug-printfs turn on debug printfs, default=no]) +AC_ARG_ENABLE(unit_tests, [ --enable-unit-tests turn on unit tests, default=no]) dnl For debugging, keep symbols, otherwise strip them... if test x$enable_debug = xyes; then OPTIM="-g" - CFLAGS="$CFLAGS -DDEBUG" else INSTALL_STRIP="-s" fi +dnl Debug printfs can slow things down, so provide a separate option for that +if test x$enable_debug_printf = xyes; then + CFLAGS="$CFLAGS -DDEBUG" +fi + +dnl Unit tests take up time during a compile... +if test x$enable_unit_tests = xyes; then + UNITTESTS="unittests" +else + UNITTESTS="" +fi +AC_SUBST(UNITTESTS) + dnl Setup general architecture flags... AC_ARG_WITH(archflags, [ --with-archflags="flags" set default architecture flags ]) diff --git a/cups/Makefile b/cups/Makefile index 584276a16..752edd1a9 100644 --- a/cups/Makefile +++ b/cups/Makefile @@ -115,22 +115,24 @@ LIBTARGETS = \ $(LIBCUPS) \ $(LIB32CUPS) \ $(LIB64CUPS) \ - libcups.a \ + libcups.a + +UNITTARGETS = \ + testadmin \ testarray \ + testconflicts \ + testcups \ testfile \ testhttp \ testi18n \ testipp \ testlang \ testoptions \ - testppd + testppd \ + testsnmp TARGETS = \ - $(LIBTARGETS) \ - testadmin \ - testconflicts \ - testcups \ - testsnmp + $(LIBTARGETS) # @@ -147,12 +149,19 @@ all: $(TARGETS) libs: $(LIBTARGETS) +# +# Make unit tests... +# + +unittests: $(UNITTARGETS) + + # # Remove object and target files... # clean: - $(RM) $(OBJS) $(TARGETS) + $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS) $(RM) libcups.so libcups.sl libcups.dylib $(RM) -r 32bit 64bit diff --git a/cups/globals.c b/cups/globals.c index d104f1b50..14d5f7842 100644 --- a/cups/globals.c +++ b/cups/globals.c @@ -155,7 +155,7 @@ globals_destructor(void *value) /* I - Data to free */ cupsFileClose(cg->stdio_files[i]); if (cg->last_status_message) - free(cg->last_status_message); + _cupsStrFree(cg->last_status_message); cupsFreeOptions(cg->cupsd_num_settings, cg->cupsd_settings); diff --git a/cups/http-addr.c b/cups/http-addr.c index b16961886..0bc71f6fa 100644 --- a/cups/http-addr.c +++ b/cups/http-addr.c @@ -249,12 +249,13 @@ httpAddrLookup( int /* O - Port number */ _httpAddrPort(http_addr_t *addr) /* I - Address */ { + if (!addr) + return (ippPort()); #ifdef AF_INET6 - if (addr->addr.sa_family == AF_INET6) + else if (addr->addr.sa_family == AF_INET6) return (ntohs(addr->ipv6.sin6_port)); - else #endif /* AF_INET6 */ - if (addr->addr.sa_family == AF_INET) + else if (addr->addr.sa_family == AF_INET) return (ntohs(addr->ipv4.sin_port)); else return (ippPort()); diff --git a/data/Makefile b/data/Makefile index 48dd1db55..9e8378b28 100644 --- a/data/Makefile +++ b/data/Makefile @@ -99,6 +99,13 @@ all: libs: +# +# Make unit tests... +# + +unittests: + + # # Clean all config and object files... # diff --git a/doc/Makefile b/doc/Makefile index 9d24b2844..4c461f75f 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -132,6 +132,13 @@ all: libs: +# +# Make unit tests... +# + +unittests: + + # # Remove all generated files... # diff --git a/doc/help/spec-command.html b/doc/help/spec-command.html index 7abb3adea..3e48f9f18 100644 --- a/doc/help/spec-command.html +++ b/doc/help/spec-command.html @@ -17,20 +17,10 @@ Copyright 1997-2006 by Easy Software Products. These coded instructions, statements, and computer programs are the - property of Easy Software Products and are protected by Federal - copyright law. Distribution and use rights are outlined in the file - "LICENSE.txt" which should have been included with this file. If this - file is missing or damaged please contact Easy Software Products - at: - - Attn: CUPS Licensing Information - Easy Software Products - 44141 Airport View Drive, Suite 204 - Hollywood, Maryland 20636 USA - - Voice: (301) 373-9600 - EMail: cups-info@cups.org - WWW: http://www.cups.org + property of Apple Inc. and are protected by Federal copyright + law. Distribution and use rights are outlined in the file "LICENSE.txt" + which should have been included with this file. If this file is + file is missing or damaged, see the license at "http://www.cups.org/". -->

Introduction

diff --git a/doc/help/spec-ipp.html b/doc/help/spec-ipp.html index 63a5fe5a6..74df07290 100644 --- a/doc/help/spec-ipp.html +++ b/doc/help/spec-ipp.html @@ -15,20 +15,10 @@ Copyright 1997-2007 by Easy Software Products. These coded instructions, statements, and computer programs are the - property of Easy Software Products and are protected by Federal - copyright law. Distribution and use rights are outlined in the file - "LICENSE.txt" which should have been included with this file. If this - file is missing or damaged please contact Easy Software Products - at: - - Attn: CUPS Licensing Information - Easy Software Products - 44141 Airport View Drive, Suite 204 - Hollywood, Maryland 20636 USA - - Voice: (301) 373-9600 - EMail: cups-info@cups.org - WWW: http://www.cups.org + property of Apple Inc. and are protected by Federal copyright + law. Distribution and use rights are outlined in the file "LICENSE.txt" + which should have been included with this file. If this file is + file is missing or damaged, see the license at "http://www.cups.org/". -->

Introduction

diff --git a/doc/help/spec-postscript.html b/doc/help/spec-postscript.html index 7e9f9a802..1bb3cd67a 100644 --- a/doc/help/spec-postscript.html +++ b/doc/help/spec-postscript.html @@ -12,23 +12,14 @@ CUPS PostScript file specification for the Common UNIX Printing System (CUPS). + Copyright 2007-2008 by Apple Inc. Copyright 2006 by Easy Software Products. These coded instructions, statements, and computer programs are the - property of Easy Software Products and are protected by Federal - copyright law. Distribution and use rights are outlined in the file - "LICENSE.txt" which should have been included with this file. If this - file is missing or damaged please contact Easy Software Products - at: - - Attn: CUPS Licensing Information - Easy Software Products - 44141 Airport View Drive, Suite 204 - Hollywood, Maryland 20636 USA - - Voice: (301) 373-9600 - EMail: cups-info@cups.org - WWW: http://www.cups.org + property of Apple Inc. and are protected by Federal copyright + law. Distribution and use rights are outlined in the file "LICENSE.txt" + which should have been included with this file. If this file is + file is missing or damaged, see the license at "http://www.cups.org/". -->

Introduction

@@ -46,16 +37,16 @@ output will work reliably.

defacto-standard print job file format/language for UNIX-based applications, it is slowly being phased out in favor of Adobe's Portable Document Format ("PDF") which offers many advantages -over PostScript. MacOS X uses PDF as the primary print job file -format, and we expect Linux to soon follow. Both PostScript and +over PostScript. Mac OS X uses PDF as the primary print job file +format and Linux is making the transition. Both PostScript and PDF are complex formats, and we highly recommend using high-level -toolkits whenever possible. +toolkits whenever possible to create your print jobs.

Anatomy of a PostScript File

PostScript files are ASCII text files starting with a header line (%!PS-Adobe-3.0) followed by a combination of -comment lines starting with two percent signs (%%) and +comment lines starting with the percent sign (%) and PostScript code lines. The lines themselves should not exceed 255 characters to conform to the DSC. The following short PostScript file produces a box with a smiley face in it:

@@ -66,7 +57,13 @@ file produces a box with a smiley face in it:

%%Pages: 1 %%LanguageLevel: 2 %%EndComments +%%BeginSetup +% this is where fonts would be embedded +%%EndSetup %%Page: (1) 1 +%%BeginPageSetup +% this is where page-specific features would be specified +%%EndPageSetup % Draw a black box around the page 0 setgray 1 setlinewidth @@ -98,23 +95,52 @@ width="445" height="570" alt="Sample PostScript File Output"> -

Embedding Printer Options

+

Embedding Printer Options

+

There are two main strategies for embedding printer options in PostScript +files. The first is to list CUPS options using the %cupsJobTicket +comment:

-

Embedding Fonts and Text

+
+%!PS-Adobe-3.0
+%cupsJobTicket: media=A4 sides=two-sided-long-edge
+%cupsJobTicket: PrinterOption=foo PrinterOption2=bar
+...
+%%EndComments
+
+ +

CUPS options apply to the entire job. To apply options to individual pages, +use the %%IncludeFeature comment instead:

+ +
+%%Page: label 123
+%%BeginPageSetup
+%%IncludeFeature: *PageSize A4
+%%IncludeFeature: *PrinterOption Foo
+%%IncludeFeature: *PrinterOption2 Bar
+%%EndPageSetup
+...
+
-

Embedding Images

+

Embedding Fonts and Text

+

Always embed the fonts used by your print job, and for best performance +embed the fonts and character encodings in the setup section of the PostScript +file. Type 1 and Type 3 fonts are supported by all PostScript printers, while +Type 42 (TrueType) and CID fonts are supported by most level 2 and all level 3 +PostScript printers. Binary font files should always be converted to the +corresponding ASCII (hex) encoding to avoid problems when printing over +interfaces that do not support binary PostScript.

-
Note: While some printers support arbitrary -binary data in PostScript files, we do not recommend this -practice because it does not work with all printers or -interfaces. In most cases, the Base-85 encoding and compression -filters can be used to embed images with very little, if any, -increase in data size.
+

Embedding Images

+

The image operator should be used to embed images in PostScript +files. Always use ASCII hex or Base-85 encoding for the image data to avoid +problems when printing over interfaces that do not support binary PostScript. +In most cases, the Base-85 encoding and compression filters can be used to +embed images with very little, if any, increase in data size.

diff --git a/driver/Makefile b/driver/Makefile index 81d58ff25..998501e88 100644 --- a/driver/Makefile +++ b/driver/Makefile @@ -79,6 +79,13 @@ all: $(TARGETS) libs: $(LIBTARGETS) +# +# Make unit tests... +# + +unittests: + + # # Clean everything... # diff --git a/filter/Makefile b/filter/Makefile index 3bb3981bb..ff4e724bb 100644 --- a/filter/Makefile +++ b/filter/Makefile @@ -33,13 +33,14 @@ LIBTARGETS = \ $(LIBCUPSIMAGE) \ libcupsimage.a \ $(LIB32CUPSIMAGE) \ - $(LIB64CUPSIMAGE) \ + $(LIB64CUPSIMAGE) +UNITTARGETS = \ + rasterbench \ + testimage \ testraster TARGETS = \ $(LIBTARGETS) \ - $(FILTERS) \ - rasterbench \ - testimage + $(FILTERS) HPGLOBJS = hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \ hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o @@ -71,12 +72,19 @@ all: $(TARGETS) libs: $(LIBTARGETS) +# +# Make unit tests... +# + +unittests: $(UNITTARGETS) + + # # Clean all object files... # clean: - $(RM) $(OBJS) $(TARGETS) + $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS) $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib $(RM) -r 32bit 64bit diff --git a/fonts/Makefile b/fonts/Makefile index a73e23433..7018beb45 100644 --- a/fonts/Makefile +++ b/fonts/Makefile @@ -37,6 +37,13 @@ all: libs: +# +# Make unit tests... +# + +unittests: + + # # Clean all config and object files... # diff --git a/locale/Makefile b/locale/Makefile index 04656a59c..0baf06cdb 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -34,6 +34,13 @@ all: $(TARGETS) libs: +# +# Make unit tests... +# + +unittests: + + # # Clean all config and object files... # diff --git a/man/Makefile b/man/Makefile index c89770b08..1e2bb0100 100644 --- a/man/Makefile +++ b/man/Makefile @@ -83,6 +83,13 @@ all: $(MAN1) $(MAN5) $(MAN7) $(MAN8) html libs: +# +# Make unit tests... +# + +unittests: + + # # Clean all config and object files... # diff --git a/monitor/Makefile b/monitor/Makefile index 2083948e4..4debb6ac0 100644 --- a/monitor/Makefile +++ b/monitor/Makefile @@ -36,6 +36,13 @@ all: $(TARGETS) libs: +# +# Make unit tests... +# + +unittests: + + # # Clean all object files... # diff --git a/notifier/Makefile b/notifier/Makefile index 90b51b4d7..42c86ea86 100644 --- a/notifier/Makefile +++ b/notifier/Makefile @@ -34,6 +34,13 @@ all: $(TARGETS) libs: +# +# Make unit tests... +# + +unittests: + + # # Clean all object files... # diff --git a/ppdc/Makefile b/ppdc/Makefile index 34f8a61e0..16c32dd8e 100644 --- a/ppdc/Makefile +++ b/ppdc/Makefile @@ -54,16 +54,17 @@ OBJS = \ testcatalog.o LIBTARGETS = \ $(LIBCUPSPPDC) \ - libcupsppdc.a \ - ppdc-static + libcupsppdc.a +UNITTARGETS = \ + ppdc-static \ + testcatalog TARGETS = \ $(LIBTARGETS) \ ppdc \ ppdhtml \ ppdi \ ppdmerge \ - ppdpo \ - testcatalog + ppdpo # @@ -80,6 +81,13 @@ all: $(TARGETS) libs: $(LIBTARGETS) +# +# Make unit tests... +# + +unittests: $(UNITTARGETS) + + # # Clean everything... # @@ -87,7 +95,7 @@ libs: $(LIBTARGETS) clean: $(RM) $(OBJS) core $(RM) *.bak *.bck core.* - $(RM) $(TARGETS) + $(RM) $(TARGETS) $(UNITTARGETS) $(RM) -r ppd $(RM) test.drv $(RM) libcupsppdc.so libcupsppdc.sl libcupsppdc.dylib diff --git a/scheduler/Makefile b/scheduler/Makefile index e580c2ddc..2921faf7f 100644 --- a/scheduler/Makefile +++ b/scheduler/Makefile @@ -101,6 +101,13 @@ all: $(TARGETS) libs: $(LIBTARGETS) +# +# Make unit tests... +# + +unittests: + + # # Clean all object files... # diff --git a/scheduler/ipp.c b/scheduler/ipp.c index ccd8d851c..35a61a696 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -9811,35 +9811,57 @@ send_http_error( uri ? uri->values[0].string.text : "no URI", con->http.hostname); - if (status == HTTP_UNAUTHORIZED && - printer && printer->num_auth_info_required > 0 && - !strcmp(printer->auth_info_required[0], "negotiate")) - cupsdSendError(con, status, CUPSD_AUTH_NEGOTIATE); - else if (printer) - { - char resource[HTTP_MAX_URI]; /* Resource portion of URI */ - cupsd_location_t *auth; /* Pointer to authentication element */ + if (printer) + { int auth_type; /* Type of authentication required */ - if (printer->type & CUPS_PRINTER_CLASS) - snprintf(resource, sizeof(resource), "/classes/%s", printer->name); - else - snprintf(resource, sizeof(resource), "/printers/%s", printer->name); - - if ((auth = cupsdFindBest(resource, HTTP_POST)) == NULL || - auth->type == CUPSD_AUTH_NONE) - auth = cupsdFindPolicyOp(printer->op_policy_ptr, - con->request ? - con->request->request.op.operation_id : - IPP_PRINT_JOB); - - if (!auth) - auth_type = CUPSD_AUTH_NONE; - else if (auth->type == CUPSD_AUTH_DEFAULT) - auth_type = DefaultAuthType; + auth_type = CUPSD_AUTH_NONE; + + if (status == HTTP_UNAUTHORIZED && + printer->num_auth_info_required > 0 && + !strcmp(printer->auth_info_required[0], "negotiate") && + con->request && + (con->request->request.op.operation_id == IPP_PRINT_JOB || + con->request->request.op.operation_id == IPP_CREATE_JOB || + con->request->request.op.operation_id == CUPS_AUTHENTICATE_JOB)) + { + /* + * Creating and authenticating jobs requires Kerberos... + */ + + auth_type = CUPSD_AUTH_NEGOTIATE; + } else - auth_type = auth->type; + { + /* + * Use policy/location-defined authentication requirements... + */ + + char resource[HTTP_MAX_URI]; /* Resource portion of URI */ + cupsd_location_t *auth; /* Pointer to authentication element */ + + + if (printer->type & CUPS_PRINTER_CLASS) + snprintf(resource, sizeof(resource), "/classes/%s", printer->name); + else + snprintf(resource, sizeof(resource), "/printers/%s", printer->name); + + if ((auth = cupsdFindBest(resource, HTTP_POST)) == NULL || + auth->type == CUPSD_AUTH_NONE) + auth = cupsdFindPolicyOp(printer->op_policy_ptr, + con->request ? + con->request->request.op.operation_id : + IPP_PRINT_JOB); + + if (auth) + { + if (auth->type == CUPSD_AUTH_DEFAULT) + auth_type = DefaultAuthType; + else + auth_type = auth->type; + } + } cupsdSendError(con, status, auth_type); } diff --git a/scripting/php/Makefile b/scripting/php/Makefile index 36b5766af..191478698 100644 --- a/scripting/php/Makefile +++ b/scripting/php/Makefile @@ -52,6 +52,13 @@ all: $(PHPCUPS) libs: +# +# Make unit tests... +# + +unittests: + + # # Remove object and target files... # diff --git a/standards/Makefile b/standards/Makefile index 6e39c798b..bda305af0 100644 --- a/standards/Makefile +++ b/standards/Makefile @@ -75,6 +75,13 @@ all: rfctohtml $(RFCS:.txt=.html) libs: +# +# Make unit tests... +# + +unittests: + + # # Clean all config and object files... # diff --git a/systemv/Makefile b/systemv/Makefile index 5b906e6c9..8d95c1fc1 100644 --- a/systemv/Makefile +++ b/systemv/Makefile @@ -36,6 +36,13 @@ all: $(TARGETS) libs: +# +# Make unit tests... +# + +unittests: + + # # Clean all object files... # diff --git a/templates/Makefile b/templates/Makefile index 831c1c968..34712e5b4 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -103,6 +103,13 @@ all: libs: +# +# Make unit tests... +# + +unittests: + + # # Clean all config and object files... # diff --git a/test/Makefile b/test/Makefile index 1698aca3d..f3e0fcf31 100644 --- a/test/Makefile +++ b/test/Makefile @@ -30,6 +30,13 @@ all: ipptest libs: +# +# Make unit tests... +# + +unittests: + + # # Clean all object files... #