From: msweet Date: Thu, 24 Sep 2009 23:50:39 +0000 (+0000) Subject: Merge changes from CUPS 1.5svn-r8829. X-Git-Tag: release-1.6.3~88 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fcups.git;a=commitdiff_plain;h=18ecb4282108afe096df4958d992c80bb5f2b570 Merge changes from CUPS 1.5svn-r8829. git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1695 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES-1.4.txt b/CHANGES-1.4.txt new file mode 100644 index 000000000..7bf0924d7 --- /dev/null +++ b/CHANGES-1.4.txt @@ -0,0 +1,533 @@ +CHANGES-1.4.txt +--------------- + +CHANGES IN CUPS V1.4.2 + + - cupsSideChannelRead() did not return an error for short reads. + - The installed PAM configuration file did not use the correct options + with the pam_unix2 module (STR #3313) + - The scheduler did not preserve default options that contained special + characters (STR #3340) + - The scheduler did not remove old pre-filters when updating a printer + driver (STR #3342) + - The HP/GL-2 filter did not check for early end-of-file (STR #3319) + - The USB backend did not compile on some platforms (STR #3332) + - cupsSideChannelSNMPWalk() could go into an infinite loop with broken + SNMP implementations. + + +CHANGES IN CUPS V1.4.1 + + - Documention fixes (STR #3296) + - SNMP supply levels and states were wrong for some printers. + - The IPP backend did not update the auth-info-required value. + - The libusb-based USB backend would hang at the end of the job + (STR #3315, STR #3318) + - DNS-SD registrations for raw queues had an empty "ty" key (STR #3299) + - The JPEG and BMP MIME type rules were broken (STR #3284) + - cupsGetNamedDest returned the default printer when the named + destination did not exist (STR #3285) + - The JobKillDelay was not triggered for canceled jobs (STR #3292) + - The PPD compiler could get in an infinite loop (STR #3293) + - The configure check for dns-sd.h was broken (STR #3297) + - The "Query Printer for Default Options" page did not go away if the + query job was held (STR #3302) + - Boolean options did not show up as selected in the web interface + (STR #3303) + - The scheduler did not cache or report driver information files + correctly, leading to a variety of issues (STR #3283, STR #3297, + STR #3305) + - cupsDoIORequest() did not abort on permanent errors (STR #3311) + - Modifying a class in the web interface did not work (STR #3312) + - BrowseLocalProtocols could be cleared when changing the sharing + setting (STR #3287) + - The scheduler could return an empty supported document format + (STR #3308) + - The PPD compiler generated invalid PPD files when the locale used + something other than "." for the decimal point (STR #3300) + - The IPP backend did not handle some non-comforming IPP printer + implementations (STR #3262) + - The scheduler leaked three file descriptors to each job filter + (STR #3263) + - The scheduler now uses a default CUPS-Get-Devices timeout of 15 + seconds (STR #3307) + + +CHANGES IN CUPS V1.4.0 + + - Localization updates (STR #3223, STR #3246, STR #3248, STR #3250) + - Documentation updates (STR #3225, STR #3230, STR #3242, STR #3260) + - The --with-pdftops configure option did not accept a full path to the + filter (STR #3278) + - The banner filter did not position the back side image correctly + (STR #3277) + - The dnssd backend could crash (STR #3272) + - The 1284 device ID sometimes contained trailing garbage (STR #3266) + - The USB backend returned different URIs for some printers than in + CUPS 1.3 (STR #3259) + - The scheduler did not do local job-hold-until processing for remote + queues (STR #3258) + - The scheduler did not try all possible SSL certificates on Mac OS X. + - The scheduler did not always remove a file descriptor when using the + kqueue interface (STR #3256) + - The scheduler did not protect against bad job control files in all + cases (STR #3253) + - The scheduler did not encode "+" in model names (STR #3254) + - The web interface didn't show the default options (STR #3244) + - The IPP and LPD backends needed print data before they would do an + SNMP query. + - Fixed a GNU TLS compatibility issue (STR #3231) + - Fixed a HTML error in the add and modify printer web interface + templates (STR #3229) + - The scheduler did not minimize the number of printer state events that + were generated by filter STATE: messages, which could lead to poor + performance. + - The USB backend on Mac OS X did not cleanly cancel a job. + - The network backends now set the connecting-to-device printer-state- + reasons value when looking up the address and copying the print data + for consistency. + - The scheduler now supports the com.apple.print.recoverable-warning + reason on all platforms. + + +CHANGES IN CUPS V1.4rc1 + + - The PPD compiler documentation was missing information on localization + (STR #3212) + - The IPP backend now reconnects after every request when talking to + printers that claim IPP support but only use HTTP/1.0. + - The PPD compiler crashed when both "Resolution" and "Group foo Option + Resolution" were specified in the .drv file. + - The PPD compiler's #if/#elif/#else/#endif did not work for undefined + variables (STR #3210) + - Static libraries could not be installed by a non-root user on systems + needing a ranlib program (STR #3209) + - The scheduler incorrectly always tried to copy Kerberos credentials + for print jobs. + - Updated the Spanish localization (STR #3204) + - The scheduler crashed when getting the default paper size from + libpaper (STR #3205, STR #3206) + - The PPD compiler now defines six variables: CUPS_VERSION, + CUPS_VERSION_MAJOR, CUPS_VERSION_MINOR, CUPS_VERSION_PATCH, + PLATFORM_NAME, and PLATFORM_ARCH (STR #3203) + - Fixed a whitespace skipping bug in cupsRasterInterpretPPD. + - The scheduler did not return HTTP 403 (Forbidden) for authenticated + users that were not authorized to do IPP operations (STR #3193) + - The scheduler did not report more than 8 Product strings from a PPD + file. Some PPD files have as many as 24. + - ppdOpen*() could crash if a keyword had no value string (something + that cupstestppd looks for...) + - cupsLangDefault() did not return the correct language on Mac OS X. + - The Mac OS X USB backend did not handle aborted or stalled pipe + conditions properly, which prevented drivers from ejecting partial + pages when a job was canceled or held. + + +CHANGES IN CUPS V1.4b3 + + - Documentation fixes (STR #3044, STR #3057, STR #3153, STR #3158, + STR #3173) + - Added complete localizations for German, Japanese, Polish, and + Russian and partial localizations for Chinese, Danish, Finnish, + French, Italian, Korean, Norwegian, Portuguese, and Swedish + (STR #3096, STR #3098, STR #3109, STR #3111, STR #3141) + - Updated the configure check for -fstack-protector (STR #3198) + - The network backends now correctly convert SNMP supply descriptions to + UTF-8 encoding as needed. + - The scheduler could crash when deleting an attribute (STR #3197) + - The cups-driverd program did not detect symlink loops (STR #3185) + - The EPSON 24-pin series driver should now feed the correct amount + (STR #2624) + - The scheduler now automatically logs the last N debug messages for + failed print jobs. + - You can now modify a raw print queue (STR #3133) + - Fixed a number of ppdi issues and added a unit test to validate that + ppdc + ppdi can generate and import the same data (STR #3152) + - Moving jobs in the web interface now shows an error if you only have + one printer or class added (STR #3094) + - Since classes have never truly supported the printer-error-policy + stuff added in CUPS 1.2, update the code to reflect the current + reality and support only the retry-current-job policy for now + (STR #3171) + - Revised the password callback support (STR #2953) + - ppdEmit*() did not choose between PageSize and PageRegion properly. + - Make some fairly substantial changes to the Kerberos support code so + that CUPS can work in multi-realm environments and does not require + delegatable credentials. Shared printing still requires delegation, + however "delegation by policy" can be enabled in the KDC to make this + all work. + - "AccessLogLevel actions" did not hide client-error-not-found errors. + - AP_FIRST_InputSlot did not work with number-up. + - cupsBackChannelRead() and cupsBackChannelWrite() could fail due to a + lack of kernel buffers. + - The IPP and LPD backends did not respond to side-channel requests + while copying print data to a temporary file. + - cupsWriteRequestData() flushed the output buffer unnecessarily, + causing reduced performance in some situations. + - If a CGI process died before sending its MIME headers, the request + would hang on the client. + - The printer/class/job search feature on the web interface did not + work (STR #3132) + - The scheduler did not write the printers out for classes. + - CUPS-Get-PPDs did not work properly when filtering by language, + product, or psversion (STR #3136) + - The scheduler now kills job filters when it takes more than 30 seconds + (configurable) to cancel or hold the job. + - The cupstestppd program did not validate the capitalization of + filenames in the PPD file. + - The cupstestppd program did not validate the PageSize and PageRegion + values. + - The cups-deviced helper program could miss reporting some backend + devices (STR #3108) + - The cupsSideChannelSNMP* functions did not work. + - The scheduler could consume 100% CPU when jobs were canceled. + - Clicking on "Select Another Make/Manufacturer" in the web interface + incorrectly added the printer (STR #3095) + - The scheduler no longer uses programs with insecure file + permissions. + - httpAssembleURI*() did not escape backslashes in hostnames. + - The dnssd backend did not unquote "full names" before creating the + device URI. + - The scheduler now supports JobRetryInterval values less than 10 + seconds. + - Updated the Spanish localization (STR #3090) + - The scheduler did not redo Bonjour/DNS-SD registrations when updating + them failed. + - The "authenticated" policy incorrectly required authentication for + status operations. + - ppdOpen*() incorrectly loaded PPDs with multiple JobPatchFile + keywords. + - The network backends no longer report the SNMP "offline" or + maintenance status bits since they are inconsistently implemented and + often unreliable. + - The scheduler no longer logs child processes killed via SIGKILL as + "crashed". + - The printer link shown on the "job moved" template was bad (STR #3085) + - Updated the HTML templates to use the final HTML 4 DOCTYPE (STR #3086) + - The scheduler did not track the "paused" reason properly if a + printer had other reasons associated with it. + - cupsSendRequest() did not clear old local certificate auth data. + - The PPD compiler did not search for localization files properly + (STR #3084) + - cupsGetNamedDest() did not use the fallback default like + cupsGetDests*() (STR #3082) + - The scheduler now provides a LogTimeFormat directive to enable + microseconds in the date and time that are logged. + - The scheduler now provides a MultipleOperationTimeout directive to + control the timeout for multi-file print jobs. + - The configure script incorrectly allowed Avahi to be used for DNS-SD + printer discovery (STR #3065) + - The web interface and scheduler did not support URIs up to 1024 bytes + in length (STR #3072) + - Fixed pdftops issues with page sizes (STR #3063) + - Fixed pdftops issues with Ghostscript (STR #3062) + - The scheduler incorrectly registered default profiles for PostScript + printers with no specified colorspace. + - The scheduler incorrectly created an empty org.cups.printers.plist + file on Mac OS X. + - cupsGetPPD3() did not look for local PPDs in the right directory. + - SNMP lookups via side-channel did not work for NULL-VALUE and + and OCTET-STRING OIDs containing nul characters. + - The libusb-based USB backend did not work. + - The scheduler did not set the printer-commands attribute correctly + for some PPDs. + - The ppdi utility did not work. + - The web interface no longer uses multi-part output with old or broken + web browsers (STR #3049) + - CUPS now conforms to the draft IPP/2.0 and IPP/2.1 specification. + - Added a new cupsGetConflicts() API to get a list of conflicting + options. + - The PPD compiler didn't localize options or choices that did not + have associated translation text (STR #3045) + - Updated the Spanish localization (STR #3043) + - Fixed build problems (STR #3040, STR #3047) + - cupsResolveConflicts() did not resolve using the default option + choice in some cases due to the mirror UIConstraints that are + present in most PPD files. + - The scheduler did not honor MIME type priorities. + - The commandtops filter incorrectly used the JCLBegin code to end + its jobs. + - The default BrowseLocalProtocols value was not set properly. + - Since the commandtops filter does not actually support ReportLevels + all on its own, don't list that printer command by default for PS + printers. + - The scheduler did not give filters a chance to log errors or update + printer attributes when a job was canceled. + - The scheduler did not clear the "connecting-to-device" reason keyword + when a job finished. + + +CHANGES IN CUPS V1.4b2 + + - Documentation updates (STR #2983, STR #2998, STR #3021) + - The cupstestppd utility now validates the FileVersion and + FormatVersion values in PPD files. + - The default cupsd.conf file did not reflect the + --with-local-protocols value set at compile-time (STR #3037) + - The cupsGetPPD* APIs now create symlinks to local PPD files + rather than copying them whenever possible. + - Various performance optimizations in the string pool, dests, and + options implementations. + - The cupsGetDests* APIs now return the marker and printer-commands + attributes. + - Side-channel SNMP lookups would not work when cupsSNMPSupplies + was set to False in the PPD file. + - Localized the device descriptions for the SCSI, serial, + and network backends (STR #3014) + - Added a Spanish localization (STR #3015) + - Added support for marker-low-levels and marker-high-levels + attributes. + - The scheduler could hang writing a long log line. + - The cupsGetDevices() function now has an "include_schemes" + parameter. + - The lpinfo command now supports --include-schemes and + --exclude-schemes options. + - The CUPS-Get-PPDs operation now supports the include-schemes + and exclude-schemes attributes. + - The CUPS-Get-Devices operation now supports the include-schemes + attribute. + - The print filters now support a replacement for the fitplot + option called "fit-to-page". + - The LPD backend no longer tries to collect page accounting + information since the LPD protocol does not allow us to + prevent race conditions. + - The scheduler did not save the last marker-change-time value. + - Fixed a problem with printing to some IPP printers, including + CUPS 1.1.x. + - Fixed a redirection problem with the printer web page (STR #3012) + - Fixed a PPD compiler problem with the loading of message + catalogs (STR #2990) + - Fixed a PPD compiler problem with the loading of .strings files + (STR #2989) + - The cupsfilter utility did not set the CONTENT_TYPE environment + variable when running filters. + - The scheduler now waits to allow system sleep until the jobs + have all stopped. + - The IPP, LPD, and socket backends used different "connecting" + progress messages. + + +CHANGES IN CUPS V1.4b1 + + - Documentation updates (STR #2567) + - The PPD compiler now allows local message catalogs to + override the standard CUPS translations (STR #2642) + - The ppdmerge command did not merge custom option strings + (STR #2863) + - The scheduler now supports the Hold-New-Jobs and + Release-Held-New-Jobs operations; these are exposed via the + cupsdisable and cupsenable commands (STR #2332) + - The lpstat command is now much faster when displaying the + status of a single printer (STR #2843) + - The scheduler now caches information from PPD files to provide + significantly faster startup time with large numbers of PPDs + (STR #1293) + - CUPS-Get-Driver now provides much better driver matching based + on the IEEE-1284 device ID and make/model strings (STR #2707) + - Now support the cupsSNMPSupplies keyword to control whether + the network backends query the SNMP Printer MIB for supply + levels. + - Now support and use a new banner file format for better text + support and easier customization (STR #2490) + - The scheduler now sets the PRINTER_INFO and PRINTER_LOCATION + environment variables from the corresponding IPP attributes. + - The ippRead*() and ippWrite*() functions no longer use a + stack-based buffer (STR #2388) + - The CUPS-Add-Modify-Printer operation now allows you to set + the printer-state-reasons attribute. + - The "set printer options" page now supports auto-configuration + of printer options (STR #1440) + - The web interface now provides an advanced server settings + form. + - The web interface's "modify printer" pages now make it + easier to change just one setting (STR #1919) + - The scheduler now supports a plist PrintcapFormat. + - The scheduler now supports multiple addresses in Allow and + Deny lines, just like Apache (STR #2947) + - Added CUPS_JOBTYPE environment variable for job filters so + they know whether they are printing a banner or document + file (STR #2799) + - Added support for printer filtering by the cupsfilter + command (STR #2562) + - Added a SSLOptions directive to allow Windows clients to + talk to CUPS in FIPS mode (STR #2827) + - Renamed the accept and reject commands to cupsaccept and + cupsreject; the old names are still available (STR #2936) + - The locale/translate utility needed an update to work with + Google (STR #2882) + - The lpstat command now supports a -H option to display the + default server (STR #2833) + - The scheduler now supports a FatalErrors directive to control + which errors should cause the scheduler to exit (STR #2536) + - The scheduler now uses the php-cgi program if it is available + (STR #2923) + - The scheduler now supports a DefaultPaperSize directive + (STR #2848) + - The scheduler now passes the job-originating-host-name + value to filters in the options argument (STR #2558) + - CUPS now supports job tickets in PDF files (STR #2903) + - Added a DBUS notifier (STR #2529) + - The LPD mini-daemon now passes the document name when queuing + print jobs (STR #2482) + - The IPP backend did not relay com.apple.print.recoverable-message + values. + - The scheduler now supports a job-media-progress attribute to + track the progress of individual pages. + - The sample HP driver now supports A5 (STR #2798) + - The CUPS web interface menu item now uses the xdg-open + command, when available (STR #2724) + - The cups-lpd program now supports the -h option (STR #2794) + - The scheduler now sets the PAM_TTY parameter and the + PAM_ESTABLISH_CRED credential flag (STR #2745) + - The scheduler now logs unsuccessful requests to the error_log + file as errors (STR #2616) + - Added support for a "retry-current-job" error policy that + retries the current job immediately when the backend encounters + an error (STR #2555) + - The scheduler now returns a "forbidden" error when a user + correctly authenticates but does not have permission to + continue further (STR #2101) + - The scheduler now loads both the server and CA certificates + (if present) from the ServerCertificate file (STR #2146) + - New RSS subscriptions now create their feed files immediately + (STR #2853) + - Added support for a device-location attribute which provides + the physical location of a printer device. + - Added a cupsBackendReport() API which handles quoting of the + device data by a backend. + - Added support for custom options in the web interface + (STR #1729) + - Added support for Mozilla LDAP, reconnection to LDAP servers, + and improved LDAP performance (STR #1962) + - Added Solaris SMF support (STR #1477) + - Added optional support for using TCP wrappers to limit access + to CUPS (STR #263) + - Added ppdPageSizeLimits API. + - Added support for new cupsMediaQualifier2, cupsMediaQualifier3, + cupsMinSize, and cupsMaxSize attributes. + - Added cupsResolveConflicts and ppdInstallableConflict APIs. + - Added support for new cupsUIConstraints and cupsUIResolver + attributes for better option conflict detection and + resolution. + - Increased the maximum size of 1284 device ID strings to + 256 bytes (STR #2877) + - Added an AccessLogLevel directive to cupsd.conf to control + what is logged to the access_log file. + - The default LogLevel is now "warn" instead of "info" to reduce + the amount of logging that is done to disk by default. + - The PPD compiler did not include OID query keywords in PPD + files (STR #2871) + - The cups-driverd helper program now directly supports driver + information files. + - The USB backend now uses libusb when available (STR #1575) + - Added ppdLocalizeAttr function to get the localized version + of an attribute. + - MIME types now support a priority() attribute (STR #2719) + - The standard MIME types are now installed in + DataDir/mime (STR #2719) + - The lpoptions command now describes custom options and + the necessary parameters (STR #2660) + - The ppdmerge program did not support Simplified Chinese + or Traditional Chinese language version strings (STR #2851) + - The PPD compiler now supports localizable attributes + (STR #2738) + - The ppdpo utility now includes cupsIPPReasons values in + the message catalogs it generates (STR #2754) + - The PPD compiler now supports conditional directives + (STR #2636) + - The ppdc utility now supports a "-t" option to test PPD + files (STR #2739) + - The ppdc utility now supports a "-m" option to use the + ModelName value as the output filename. + - The ppdc utility now supports a FileName directive to + set an alternate output filename (STR #2740) + - The side-channel API now supports SNMP queries for the + standard network backends. + - Added a PageLogFormat directive to the cupsd.conf file to + control the format of lines in the page_log file. + - Filters can now send PPD: messages to stderr to set PPD + keywords like DefaultPageSize while a job is printing. + - Added a mdns backend for discovery and printing to printers + that advertise themselves via DNS-SD (Bonjour) + - The ipp, lpd, and socket backends now support DNS-SD service + name resolution. + - The scheduler now uses a single shared file descriptor for + all DNS-SD registrations (STR #2674) + - The ipp, lpd, and socket backends now support SNMP-based + page accounting and supply level monitoring (STR #1655) + - Added support for cupsPJLDisplay attribute to control what + PJL commands are used to display the job information. + - Driver information files can now be installed in + /Library/Printers/PPDs.drv on Mac OS X. + - The CUPS image library now supports reading images larger + than 2GB. + - The scheduler now delays writing config and state files to + reduce disk activity (STR #2684) + - The CUPS-Get-Devices operation now supports the + exclude-schemes and timeout attributes to control which + backends are polled and for how long. + - The cups-deviced helper application now runs backends in + parallel to get the list of devices faster. + - Added --enable-pap configure option. + - The default cupsd.conf file now includes an "authenticated" + policy which requires authentication for remote print jobs. + - Added support for Czech and Hungarian in PPD files + (STR #2735, STR #2736) + - The PPD compiler tools now support Mac OS X .strings files + for localization (STR #2737) + - ppdOpen*() now default the colorspace member to PPD_CS_N + when no DefaultColorSpace attribute is present in the PPD + file. + - The build system has been updated to support separate + installation of data, program, header, and library files. + - All support libraries are now built as shared libraries + by default. + - The scheduler now manages ICC color profiles on Mac OS X. + - The network backends (ipp, lpd, socket) now support + SNMP-based supply and page count monitoring (STR #1655) + - The lppasswd program is no longer installed setuid to + root to make the default installation more secure. + - Added a new ppdLocalizeMarkerName() function to get + the localized version of a marker-names value. + - The scheduler now provides the printer-dns-sd-name + attribute for printers shared via DNS-SD/Bonjour. + - The pdftops filter now executes the Xpdf or poppler + pdftops utility to convert PDF files (STR #1471) + - Bonjour printer registrations now advertise as local or + global based on the current access policies for the + printer. + - cupsGetDests*() and cupsSetDests*() now track the last + used printer preference on Mac OS X. + - Added a new streaming request API (STR #2261) + - Added a new cupsGetNamedDest() function to the CUPS + library for faster printing with lp and lpr (STR #2638) + - The scheduler now sets the PAM RHOST value on systems + that support it (STR #2637) + - The scheduler now sandboxes child processes when + possible. + - The Cancel-Job operation now supports a purge-job + attriibute to purge a specified job. + - ppdEmit* and ppdCollect* now use the NonUIOrderDependency + attributes for custom option selections. + - The web interface now enables/disables the printer + sharing (formerly publishing) controls based on the + server-is-sharing-printers state (STR #2233) + - The scheduler now tracks printer sharing via the + server-is-sharing-printers attribute, and manages LPD + and SMB sharing as well (STR #2233) + - The web interface now allows you to go back to the make/ + manufacturer page if there is no matching printer driver + on the model page (STR #2436) + - The printer list now shows the default media, banner, and + duplex options as well as the color and duplex capabilities + of printers (STR #1175) + - The web interface look-n-feel has been updated (STR #2492) + - The scheduler now supports a CUPS-Get-Document operation + that returns the specified print job document (STR #118) + - The cupsfilter utility now supports a "-J jobid" option + to filter the document from the specified job. + - The scheduler (cupsd) now supports a new option (-t) to + do a syntax check of the cupsd.conf file (STR #2003) + - Added new cupsGetPPD3() API to allow applications to + cache PPDs safely (STR #1473) + - Added generic PostScript and PCL printer driver PPDs. diff --git a/CHANGES.txt b/CHANGES.txt index e101a5c24..c5f663c41 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,514 +1,7 @@ -CHANGES.txt - 2009-08-28 +CHANGES.txt - 2009-09-11 ------------------------ -CHANGES IN CUPS V1.4.1 +CHANGES IN CUPS V1.5b1 - - Documention fixes (STR #3296) - - DNS-SD registrations for raw queues had an empty "ty" key (STR #3299) - - The JPEG and BMP MIME type rules were broken (STR #3284) - - cupsGetNamedDest returned the default printer when the named - destination did not exist (STR #3285) - - The JobKillDelay was not triggered for canceled jobs (STR #3292) - - The PPD compiler could get in an infinite loop (STR #3293) - - The configure check for dns-sd.h was broken (STR #3297) - - The "Query Printer for Default Options" page did not go away if the - query job was held (STR #3302) - - Boolean options did not show up as selected in the web interface - (STR #3303) - - The scheduler did not cache or report driver information files - correctly, leading to a variety of issues (STR #3283, STR #3297, - STR #3305) - - cupsDoIORequest() did not abort on permanent errors (STR #3311) - - Modifying a class in the web interface did not work (STR #3312) - - BrowseLocalProtocols could be cleared when changing the sharing - setting (STR #3287) - - The scheduler could return an empty supported document format - (STR #3308) - - The PPD compiler generated invalid PPD files when the locale used - something other than "." for the decimal point (STR #3300) - - The IPP backend did not handle some non-comforming IPP printer - implementations (STR #3262) - - The scheduler leaked three file descriptors to each job filter - (STR #3263) - - The scheduler now uses a default CUPS-Get-Devices timeout of 15 - seconds (STR #3307) - - -CHANGES IN CUPS V1.4.0 - - - Localization updates (STR #3223, STR #3246, STR #3248, STR #3250) - - Documentation updates (STR #3225, STR #3230, STR #3242, STR #3260) - - The --with-pdftops configure option did not accept a full path to the - filter (STR #3278) - - The banner filter did not position the back side image correctly - (STR #3277) - - The dnssd backend could crash (STR #3272) - - The 1284 device ID sometimes contained trailing garbage (STR #3266) - - The USB backend returned different URIs for some printers than in - CUPS 1.3 (STR #3259) - - The scheduler did not do local job-hold-until processing for remote - queues (STR #3258) - - The scheduler did not try all possible SSL certificates on Mac OS X. - - The scheduler did not always remove a file descriptor when using the - kqueue interface (STR #3256) - - The scheduler did not protect against bad job control files in all - cases (STR #3253) - - The scheduler did not encode "+" in model names (STR #3254) - - The web interface didn't show the default options (STR #3244) - - The IPP and LPD backends needed print data before they would do an - SNMP query. - - Fixed a GNU TLS compatibility issue (STR #3231) - - Fixed a HTML error in the add and modify printer web interface - templates (STR #3229) - - The scheduler did not minimize the number of printer state events that - were generated by filter STATE: messages, which could lead to poor - performance. - - The USB backend on Mac OS X did not cleanly cancel a job. - - The network backends now set the connecting-to-device printer-state- - reasons value when looking up the address and copying the print data - for consistency. - - The scheduler now supports the com.apple.print.recoverable-warning - reason on all platforms. - - -CHANGES IN CUPS V1.4rc1 - - - The PPD compiler documentation was missing information on localization - (STR #3212) - - The IPP backend now reconnects after every request when talking to - printers that claim IPP support but only use HTTP/1.0. - - The PPD compiler crashed when both "Resolution" and "Group foo Option - Resolution" were specified in the .drv file. - - The PPD compiler's #if/#elif/#else/#endif did not work for undefined - variables (STR #3210) - - Static libraries could not be installed by a non-root user on systems - needing a ranlib program (STR #3209) - - The scheduler incorrectly always tried to copy Kerberos credentials - for print jobs. - - Updated the Spanish localization (STR #3204) - - The scheduler crashed when getting the default paper size from - libpaper (STR #3205, STR #3206) - - The PPD compiler now defines six variables: CUPS_VERSION, - CUPS_VERSION_MAJOR, CUPS_VERSION_MINOR, CUPS_VERSION_PATCH, - PLATFORM_NAME, and PLATFORM_ARCH (STR #3203) - - Fixed a whitespace skipping bug in cupsRasterInterpretPPD. - - The scheduler did not return HTTP 403 (Forbidden) for authenticated - users that were not authorized to do IPP operations (STR #3193) - - The scheduler did not report more than 8 Product strings from a PPD - file. Some PPD files have as many as 24. - - ppdOpen*() could crash if a keyword had no value string (something - that cupstestppd looks for...) - - cupsLangDefault() did not return the correct language on Mac OS X. - - The Mac OS X USB backend did not handle aborted or stalled pipe - conditions properly, which prevented drivers from ejecting partial - pages when a job was canceled or held. - - -CHANGES IN CUPS V1.4b3 - - - Documentation fixes (STR #3044, STR #3057, STR #3153, STR #3158, - STR #3173) - - Added complete localizations for German, Japanese, Polish, and - Russian and partial localizations for Chinese, Danish, Finnish, - French, Italian, Korean, Norwegian, Portuguese, and Swedish - (STR #3096, STR #3098, STR #3109, STR #3111, STR #3141) - - Updated the configure check for -fstack-protector (STR #3198) - - The network backends now correctly convert SNMP supply descriptions to - UTF-8 encoding as needed. - - The scheduler could crash when deleting an attribute (STR #3197) - - The cups-driverd program did not detect symlink loops (STR #3185) - - The EPSON 24-pin series driver should now feed the correct amount - (STR #2624) - - The scheduler now automatically logs the last N debug messages for - failed print jobs. - - You can now modify a raw print queue (STR #3133) - - Fixed a number of ppdi issues and added a unit test to validate that - ppdc + ppdi can generate and import the same data (STR #3152) - - Moving jobs in the web interface now shows an error if you only have - one printer or class added (STR #3094) - - Since classes have never truly supported the printer-error-policy - stuff added in CUPS 1.2, update the code to reflect the current - reality and support only the retry-current-job policy for now - (STR #3171) - - Revised the password callback support (STR #2953) - - ppdEmit*() did not choose between PageSize and PageRegion properly. - - Make some fairly substantial changes to the Kerberos support code so - that CUPS can work in multi-realm environments and does not require - delegatable credentials. Shared printing still requires delegation, - however "delegation by policy" can be enabled in the KDC to make this - all work. - - "AccessLogLevel actions" did not hide client-error-not-found errors. - - AP_FIRST_InputSlot did not work with number-up. - - cupsBackChannelRead() and cupsBackChannelWrite() could fail due to a - lack of kernel buffers. - - The IPP and LPD backends did not respond to side-channel requests - while copying print data to a temporary file. - - cupsWriteRequestData() flushed the output buffer unnecessarily, - causing reduced performance in some situations. - - If a CGI process died before sending its MIME headers, the request - would hang on the client. - - The printer/class/job search feature on the web interface did not - work (STR #3132) - - The scheduler did not write the printers out for classes. - - CUPS-Get-PPDs did not work properly when filtering by language, - product, or psversion (STR #3136) - - The scheduler now kills job filters when it takes more than 30 seconds - (configurable) to cancel or hold the job. - - The cupstestppd program did not validate the capitalization of - filenames in the PPD file. - - The cupstestppd program did not validate the PageSize and PageRegion - values. - - The cups-deviced helper program could miss reporting some backend - devices (STR #3108) - - The cupsSideChannelSNMP* functions did not work. - - The scheduler could consume 100% CPU when jobs were canceled. - - Clicking on "Select Another Make/Manufacturer" in the web interface - incorrectly added the printer (STR #3095) - - The scheduler no longer uses programs with insecure file - permissions. - - httpAssembleURI*() did not escape backslashes in hostnames. - - The dnssd backend did not unquote "full names" before creating the - device URI. - - The scheduler now supports JobRetryInterval values less than 10 - seconds. - - Updated the Spanish localization (STR #3090) - - The scheduler did not redo Bonjour/DNS-SD registrations when updating - them failed. - - The "authenticated" policy incorrectly required authentication for - status operations. - - ppdOpen*() incorrectly loaded PPDs with multiple JobPatchFile - keywords. - - The network backends no longer report the SNMP "offline" or - maintenance status bits since they are inconsistently implemented and - often unreliable. - - The scheduler no longer logs child processes killed via SIGKILL as - "crashed". - - The printer link shown on the "job moved" template was bad (STR #3085) - - Updated the HTML templates to use the final HTML 4 DOCTYPE (STR #3086) - - The scheduler did not track the "paused" reason properly if a - printer had other reasons associated with it. - - cupsSendRequest() did not clear old local certificate auth data. - - The PPD compiler did not search for localization files properly - (STR #3084) - - cupsGetNamedDest() did not use the fallback default like - cupsGetDests*() (STR #3082) - - The scheduler now provides a LogTimeFormat directive to enable - microseconds in the date and time that are logged. - - The scheduler now provides a MultipleOperationTimeout directive to - control the timeout for multi-file print jobs. - - The configure script incorrectly allowed Avahi to be used for DNS-SD - printer discovery (STR #3065) - - The web interface and scheduler did not support URIs up to 1024 bytes - in length (STR #3072) - - Fixed pdftops issues with page sizes (STR #3063) - - Fixed pdftops issues with Ghostscript (STR #3062) - - The scheduler incorrectly registered default profiles for PostScript - printers with no specified colorspace. - - The scheduler incorrectly created an empty org.cups.printers.plist - file on Mac OS X. - - cupsGetPPD3() did not look for local PPDs in the right directory. - - SNMP lookups via side-channel did not work for NULL-VALUE and - and OCTET-STRING OIDs containing nul characters. - - The libusb-based USB backend did not work. - - The scheduler did not set the printer-commands attribute correctly - for some PPDs. - - The ppdi utility did not work. - - The web interface no longer uses multi-part output with old or broken - web browsers (STR #3049) - - CUPS now conforms to the draft IPP/2.0 and IPP/2.1 specification. - - Added a new cupsGetConflicts() API to get a list of conflicting - options. - - The PPD compiler didn't localize options or choices that did not - have associated translation text (STR #3045) - - Updated the Spanish localization (STR #3043) - - Fixed build problems (STR #3040, STR #3047) - - cupsResolveConflicts() did not resolve using the default option - choice in some cases due to the mirror UIConstraints that are - present in most PPD files. - - The scheduler did not honor MIME type priorities. - - The commandtops filter incorrectly used the JCLBegin code to end - its jobs. - - The default BrowseLocalProtocols value was not set properly. - - Since the commandtops filter does not actually support ReportLevels - all on its own, don't list that printer command by default for PS - printers. - - The scheduler did not give filters a chance to log errors or update - printer attributes when a job was canceled. - - The scheduler did not clear the "connecting-to-device" reason keyword - when a job finished. - - -CHANGES IN CUPS V1.4b2 - - - Documentation updates (STR #2983, STR #2998, STR #3021) - - The cupstestppd utility now validates the FileVersion and - FormatVersion values in PPD files. - - The default cupsd.conf file did not reflect the - --with-local-protocols value set at compile-time (STR #3037) - - The cupsGetPPD* APIs now create symlinks to local PPD files - rather than copying them whenever possible. - - Various performance optimizations in the string pool, dests, and - options implementations. - - The cupsGetDests* APIs now return the marker and printer-commands - attributes. - - Side-channel SNMP lookups would not work when cupsSNMPSupplies - was set to False in the PPD file. - - Localized the device descriptions for the SCSI, serial, - and network backends (STR #3014) - - Added a Spanish localization (STR #3015) - - Added support for marker-low-levels and marker-high-levels - attributes. - - The scheduler could hang writing a long log line. - - The cupsGetDevices() function now has an "include_schemes" - parameter. - - The lpinfo command now supports --include-schemes and - --exclude-schemes options. - - The CUPS-Get-PPDs operation now supports the include-schemes - and exclude-schemes attributes. - - The CUPS-Get-Devices operation now supports the include-schemes - attribute. - - The print filters now support a replacement for the fitplot - option called "fit-to-page". - - The LPD backend no longer tries to collect page accounting - information since the LPD protocol does not allow us to - prevent race conditions. - - The scheduler did not save the last marker-change-time value. - - Fixed a problem with printing to some IPP printers, including - CUPS 1.1.x. - - Fixed a redirection problem with the printer web page (STR #3012) - - Fixed a PPD compiler problem with the loading of message - catalogs (STR #2990) - - Fixed a PPD compiler problem with the loading of .strings files - (STR #2989) - - The cupsfilter utility did not set the CONTENT_TYPE environment - variable when running filters. - - The scheduler now waits to allow system sleep until the jobs - have all stopped. - - The IPP, LPD, and socket backends used different "connecting" - progress messages. - - -CHANGES IN CUPS V1.4b1 - - - Documentation updates (STR #2567) - - The PPD compiler now allows local message catalogs to - override the standard CUPS translations (STR #2642) - - The ppdmerge command did not merge custom option strings - (STR #2863) - - The scheduler now supports the Hold-New-Jobs and - Release-Held-New-Jobs operations; these are exposed via the - cupsdisable and cupsenable commands (STR #2332) - - The lpstat command is now much faster when displaying the - status of a single printer (STR #2843) - - The scheduler now caches information from PPD files to provide - significantly faster startup time with large numbers of PPDs - (STR #1293) - - CUPS-Get-Driver now provides much better driver matching based - on the IEEE-1284 device ID and make/model strings (STR #2707) - - Now support the cupsSNMPSupplies keyword to control whether - the network backends query the SNMP Printer MIB for supply - levels. - - Now support and use a new banner file format for better text - support and easier customization (STR #2490) - - The scheduler now sets the PRINTER_INFO and PRINTER_LOCATION - environment variables from the corresponding IPP attributes. - - The ippRead*() and ippWrite*() functions no longer use a - stack-based buffer (STR #2388) - - The CUPS-Add-Modify-Printer operation now allows you to set - the printer-state-reasons attribute. - - The "set printer options" page now supports auto-configuration - of printer options (STR #1440) - - The web interface now provides an advanced server settings - form. - - The web interface's "modify printer" pages now make it - easier to change just one setting (STR #1919) - - The scheduler now supports a plist PrintcapFormat. - - The scheduler now supports multiple addresses in Allow and - Deny lines, just like Apache (STR #2947) - - Added CUPS_JOBTYPE environment variable for job filters so - they know whether they are printing a banner or document - file (STR #2799) - - Added support for printer filtering by the cupsfilter - command (STR #2562) - - Added a SSLOptions directive to allow Windows clients to - talk to CUPS in FIPS mode (STR #2827) - - Renamed the accept and reject commands to cupsaccept and - cupsreject; the old names are still available (STR #2936) - - The locale/translate utility needed an update to work with - Google (STR #2882) - - The lpstat command now supports a -H option to display the - default server (STR #2833) - - The scheduler now supports a FatalErrors directive to control - which errors should cause the scheduler to exit (STR #2536) - - The scheduler now uses the php-cgi program if it is available - (STR #2923) - - The scheduler now supports a DefaultPaperSize directive - (STR #2848) - - The scheduler now passes the job-originating-host-name - value to filters in the options argument (STR #2558) - - CUPS now supports job tickets in PDF files (STR #2903) - - Added a DBUS notifier (STR #2529) - - The LPD mini-daemon now passes the document name when queuing - print jobs (STR #2482) - - The IPP backend did not relay com.apple.print.recoverable-message - values. - - The scheduler now supports a job-media-progress attribute to - track the progress of individual pages. - - The sample HP driver now supports A5 (STR #2798) - - The CUPS web interface menu item now uses the xdg-open - command, when available (STR #2724) - - The cups-lpd program now supports the -h option (STR #2794) - - The scheduler now sets the PAM_TTY parameter and the - PAM_ESTABLISH_CRED credential flag (STR #2745) - - The scheduler now logs unsuccessful requests to the error_log - file as errors (STR #2616) - - Added support for a "retry-current-job" error policy that - retries the current job immediately when the backend encounters - an error (STR #2555) - - The scheduler now returns a "forbidden" error when a user - correctly authenticates but does not have permission to - continue further (STR #2101) - - The scheduler now loads both the server and CA certificates - (if present) from the ServerCertificate file (STR #2146) - - New RSS subscriptions now create their feed files immediately - (STR #2853) - - Added support for a device-location attribute which provides - the physical location of a printer device. - - Added a cupsBackendReport() API which handles quoting of the - device data by a backend. - - Added support for custom options in the web interface - (STR #1729) - - Added support for Mozilla LDAP, reconnection to LDAP servers, - and improved LDAP performance (STR #1962) - - Added Solaris SMF support (STR #1477) - - Added optional support for using TCP wrappers to limit access - to CUPS (STR #263) - - Added ppdPageSizeLimits API. - - Added support for new cupsMediaQualifier2, cupsMediaQualifier3, - cupsMinSize, and cupsMaxSize attributes. - - Added cupsResolveConflicts and ppdInstallableConflict APIs. - - Added support for new cupsUIConstraints and cupsUIResolver - attributes for better option conflict detection and - resolution. - - Increased the maximum size of 1284 device ID strings to - 256 bytes (STR #2877) - - Added an AccessLogLevel directive to cupsd.conf to control - what is logged to the access_log file. - - The default LogLevel is now "warn" instead of "info" to reduce - the amount of logging that is done to disk by default. - - The PPD compiler did not include OID query keywords in PPD - files (STR #2871) - - The cups-driverd helper program now directly supports driver - information files. - - The USB backend now uses libusb when available (STR #1575) - - Added ppdLocalizeAttr function to get the localized version - of an attribute. - - MIME types now support a priority() attribute (STR #2719) - - The standard MIME types are now installed in - DataDir/mime (STR #2719) - - The lpoptions command now describes custom options and - the necessary parameters (STR #2660) - - The ppdmerge program did not support Simplified Chinese - or Traditional Chinese language version strings (STR #2851) - - The PPD compiler now supports localizable attributes - (STR #2738) - - The ppdpo utility now includes cupsIPPReasons values in - the message catalogs it generates (STR #2754) - - The PPD compiler now supports conditional directives - (STR #2636) - - The ppdc utility now supports a "-t" option to test PPD - files (STR #2739) - - The ppdc utility now supports a "-m" option to use the - ModelName value as the output filename. - - The ppdc utility now supports a FileName directive to - set an alternate output filename (STR #2740) - - The side-channel API now supports SNMP queries for the - standard network backends. - - Added a PageLogFormat directive to the cupsd.conf file to - control the format of lines in the page_log file. - - Filters can now send PPD: messages to stderr to set PPD - keywords like DefaultPageSize while a job is printing. - - Added a mdns backend for discovery and printing to printers - that advertise themselves via DNS-SD (Bonjour) - - The ipp, lpd, and socket backends now support DNS-SD service - name resolution. - - The scheduler now uses a single shared file descriptor for - all DNS-SD registrations (STR #2674) - - The ipp, lpd, and socket backends now support SNMP-based - page accounting and supply level monitoring (STR #1655) - - Added support for cupsPJLDisplay attribute to control what - PJL commands are used to display the job information. - - Driver information files can now be installed in - /Library/Printers/PPDs.drv on Mac OS X. - - The CUPS image library now supports reading images larger - than 2GB. - - The scheduler now delays writing config and state files to - reduce disk activity (STR #2684) - - The CUPS-Get-Devices operation now supports the - exclude-schemes and timeout attributes to control which - backends are polled and for how long. - - The cups-deviced helper application now runs backends in - parallel to get the list of devices faster. - - Added --enable-pap configure option. - - The default cupsd.conf file now includes an "authenticated" - policy which requires authentication for remote print jobs. - - Added support for Czech and Hungarian in PPD files - (STR #2735, STR #2736) - - The PPD compiler tools now support Mac OS X .strings files - for localization (STR #2737) - - ppdOpen*() now default the colorspace member to PPD_CS_N - when no DefaultColorSpace attribute is present in the PPD - file. - - The build system has been updated to support separate - installation of data, program, header, and library files. - - All support libraries are now built as shared libraries - by default. - - The scheduler now manages ICC color profiles on Mac OS X. - - The network backends (ipp, lpd, socket) now support - SNMP-based supply and page count monitoring (STR #1655) - - The lppasswd program is no longer installed setuid to - root to make the default installation more secure. - - Added a new ppdLocalizeMarkerName() function to get - the localized version of a marker-names value. - - The scheduler now provides the printer-dns-sd-name - attribute for printers shared via DNS-SD/Bonjour. - - The pdftops filter now executes the Xpdf or poppler - pdftops utility to convert PDF files (STR #1471) - - Bonjour printer registrations now advertise as local or - global based on the current access policies for the - printer. - - cupsGetDests*() and cupsSetDests*() now track the last - used printer preference on Mac OS X. - - Added a new streaming request API (STR #2261) - - Added a new cupsGetNamedDest() function to the CUPS - library for faster printing with lp and lpr (STR #2638) - - The scheduler now sets the PAM RHOST value on systems - that support it (STR #2637) - - The scheduler now sandboxes child processes when - possible. - - The Cancel-Job operation now supports a purge-job - attriibute to purge a specified job. - - ppdEmit* and ppdCollect* now use the NonUIOrderDependency - attributes for custom option selections. - - The web interface now enables/disables the printer - sharing (formerly publishing) controls based on the - server-is-sharing-printers state (STR #2233) - - The scheduler now tracks printer sharing via the - server-is-sharing-printers attribute, and manages LPD - and SMB sharing as well (STR #2233) - - The web interface now allows you to go back to the make/ - manufacturer page if there is no matching printer driver - on the model page (STR #2436) - - The printer list now shows the default media, banner, and - duplex options as well as the color and duplex capabilities - of printers (STR #1175) - - The web interface look-n-feel has been updated (STR #2492) - - The scheduler now supports a CUPS-Get-Document operation - that returns the specified print job document (STR #118) - - The cupsfilter utility now supports a "-J jobid" option - to filter the document from the specified job. - - The scheduler (cupsd) now supports a new option (-t) to - do a syntax check of the cupsd.conf file (STR #2003) - - Added new cupsGetPPD3() API to allow applications to - cache PPDs safely (STR #1473) - - Added generic PostScript and PCL printer driver PPDs. + - The PPD compiler now checks for overlapping filenames when writing + PPD files. diff --git a/backend/backend-private.h b/backend/backend-private.h index 612a9b680..7d8fd2e2c 100644 --- a/backend/backend-private.h +++ b/backend/backend-private.h @@ -276,16 +276,16 @@ extern int backendGetDeviceID(int fd, char *device_id, extern int backendGetMakeModel(const char *device_id, char *make_model, int make_model_size); -extern void backendNetworkSideCB(int print_fd, int device_fd, +extern int backendNetworkSideCB(int print_fd, int device_fd, int snmp_fd, http_addr_t *addr, int use_bc); extern ssize_t backendRunLoop(int print_fd, int device_fd, int snmp_fd, http_addr_t *addr, int use_bc, - void (*side_cb)(int print_fd, - int device_fd, - int snmp_fd, - http_addr_t *addr, - int use_bc)); + int (*side_cb)(int print_fd, + int device_fd, + int snmp_fd, + http_addr_t *addr, + int use_bc)); extern int backendSNMPSupplies(int snmp_fd, http_addr_t *addr, int *page_count, int *printer_state); diff --git a/backend/ipp.c b/backend/ipp.c index 65c254c86..c2fd7dbc8 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -45,6 +45,8 @@ static char *password = NULL; /* Password for device URI */ static int password_tries = 0; /* Password tries */ +static const char *auth_info_required = "none"; + /* New auth-info-required value */ #ifdef __APPLE__ static char pstmpname[1024] = ""; /* Temporary PostScript file name */ #endif /* __APPLE__ */ @@ -1049,16 +1051,21 @@ main(int argc, /* I - Number of command-line args */ _cupsLangPrintf(stderr, _("ERROR: Print file was not accepted (%s)!\n"), cupsLastErrorString()); - if (ipp_status == IPP_NOT_AUTHORIZED) + if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) { 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... + */ + if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE), "Negotiate", 9)) - fputs("ATTR: auth-info-required=negotiate\n", stderr); - else - fputs("ATTR: auth-info-required=username,password\n", stderr); + auth_info_required = "negotiate"; } } } @@ -1296,6 +1303,15 @@ main(int argc, /* I - Number of command-line args */ page_count > start_count) fprintf(stderr, "PAGE: total %d\n", page_count - start_count); +#ifdef HAVE_GSSAPI + /* + * See if we used Kerberos at all... + */ + + if (http->gssctx) + auth_info_required = "negotiate"; +#endif /* HAVE_GSSAPI */ + /* * Free memory... */ @@ -1328,7 +1344,9 @@ main(int argc, /* I - Number of command-line args */ * Return the queue status... */ - if (ipp_status == IPP_NOT_AUTHORIZED) + fprintf(stderr, "ATTR: auth-info-required=%s\n", auth_info_required); + + if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) return (CUPS_BACKEND_AUTH_REQUIRED); else if (ipp_status == IPP_INTERNAL_ERROR) return (CUPS_BACKEND_STOP); @@ -1532,6 +1550,12 @@ password_cb(const char *prompt) /* I - Prompt (not used) */ { (void)prompt; + /* + * Remember that we need to authenticate... + */ + + auth_info_required = "username,password"; + if (password && *password && password_tries < 3) { password_tries ++; @@ -1541,23 +1565,10 @@ password_cb(const char *prompt) /* I - Prompt (not used) */ else { /* - * If there is no password set in the device URI, return the - * "authentication required" exit code... + * Give up after 3 tries or if we don't have a password to begin with... */ - if (tmpfilename[0]) - unlink(tmpfilename); - -#ifdef __APPLE__ - if (pstmpname[0]) - unlink(pstmpname); -#endif /* __APPLE__ */ - - fputs("ATTR: auth-info-required=username,password\n", stderr); - - exit(CUPS_BACKEND_AUTH_REQUIRED); - - return (NULL); /* Eliminate compiler warning */ + return (NULL); } } diff --git a/backend/network.c b/backend/network.c index 06ffc0467..e5cb16d1a 100644 --- a/backend/network.c +++ b/backend/network.c @@ -61,7 +61,7 @@ backendCheckSideChannel( * 'backendNetworkSideCB()' - Handle common network side-channel commands. */ -void +int /* O - -1 on error, 0 on success */ backendNetworkSideCB( int print_fd, /* I - Print file or -1 */ int device_fd, /* I - Device file or -1 */ @@ -79,10 +79,7 @@ backendNetworkSideCB( datalen = sizeof(data); if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0)) - { - _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n")); - return; - } + return (-1); switch (command) { @@ -284,7 +281,7 @@ backendNetworkSideCB( break; } - cupsSideChannelWrite(command, status, data, datalen, 1.0); + return (cupsSideChannelWrite(command, status, data, datalen, 1.0)); } diff --git a/backend/pap.c b/backend/pap.c index 12dbb9e89..8acda032e 100644 --- a/backend/pap.c +++ b/backend/pap.c @@ -1278,7 +1278,7 @@ int papCancelRequest(int sockfd, u_short tid) * 'sidechannel_request()' - Handle side-channel requests. */ -static void +static int sidechannel_request() { cups_sc_command_t command; /* Request command */ @@ -1289,32 +1289,29 @@ sidechannel_request() datalen = sizeof(data); if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0)) - { - fputs(_("WARNING: Failed to read side-channel request!\n"), stderr); - return; - } + return (-1); switch (command) { case CUPS_SC_CMD_GET_BIDI: /* Is the connection bidirectional? */ data[0] = 1; - cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0); + return (cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0)); break; case CUPS_SC_CMD_GET_STATE: /* Return device state */ data[0] = CUPS_SC_STATE_ONLINE; - cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0); + return (cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0)); break; case CUPS_SC_CMD_DRAIN_OUTPUT: /* Drain all pending output */ case CUPS_SC_CMD_SOFT_RESET: /* Do a soft reset */ case CUPS_SC_CMD_GET_DEVICE_ID: /* Return IEEE-1284 device ID */ default: - cupsSideChannelWrite(command, CUPS_SC_STATUS_NOT_IMPLEMENTED, - NULL, 0, 1.0); + return (cupsSideChannelWrite(command, CUPS_SC_STATUS_NOT_IMPLEMENTED, + NULL, 0, 1.0)); break; } - return; + return (0); } diff --git a/backend/parallel.c b/backend/parallel.c index 41238a8e9..03d59d443 100644 --- a/backend/parallel.c +++ b/backend/parallel.c @@ -59,7 +59,7 @@ */ static void list_devices(void); -static void side_cb(int print_fd, int device_fd, int snmp_fd, +static int side_cb(int print_fd, int device_fd, int snmp_fd, http_addr_t *addr, int use_bc); @@ -615,7 +615,7 @@ list_devices(void) * 'side_cb()' - Handle side-channel requests... */ -static void +static int /* O - 0 on success, -1 on error */ side_cb(int print_fd, /* I - Print file */ int device_fd, /* I - Device file */ int snmp_fd, /* I - SNMP socket (unused) */ @@ -634,10 +634,7 @@ side_cb(int print_fd, /* I - Print file */ datalen = sizeof(data); if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0)) - { - _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n")); - return; - } + return (-1); switch (command) { @@ -680,7 +677,7 @@ side_cb(int print_fd, /* I - Print file */ break; } - cupsSideChannelWrite(command, status, data, datalen, 1.0); + return (cupsSideChannelWrite(command, status, data, datalen, 1.0)); } diff --git a/backend/runloop.c b/backend/runloop.c index fa8825ce2..d5de2e4c3 100644 --- a/backend/runloop.c +++ b/backend/runloop.c @@ -147,7 +147,7 @@ backendRunLoop( int snmp_fd, /* I - SNMP socket or -1 if none */ http_addr_t *addr, /* I - Address of device */ int use_bc, /* I - Use back-channel? */ - void (*side_cb)(int, int, int, http_addr_t *, int)) + int (*side_cb)(int, int, int, http_addr_t *, int)) /* I - Side-channel callback */ { int nfds; /* Maximum file descriptor value + 1 */ @@ -274,7 +274,8 @@ backendRunLoop( * loop since it may have read from print_fd... */ - (*side_cb)(print_fd, device_fd, snmp_fd, addr, use_bc); + if ((*side_cb)(print_fd, device_fd, snmp_fd, addr, use_bc)) + side_cb = NULL; continue; } diff --git a/backend/serial.c b/backend/serial.c index 803df0cb6..c83f13705 100644 --- a/backend/serial.c +++ b/backend/serial.c @@ -84,7 +84,7 @@ */ static void list_devices(void); -static void side_cb(int print_fd, int device_fd, int use_bc); +static int side_cb(int print_fd, int device_fd, int use_bc); /* @@ -109,7 +109,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ sep; /* Option separator */ int port; /* Port number (not used) */ int copies; /* Number of copies to print */ - int print_fd, /* Print file */ + int side_eof = 0, /* Saw EOF on side-channel? */ + print_fd, /* Print file */ device_fd; /* Serial device */ int nfds; /* Maximum file descriptor value + 1 */ fd_set input, /* Input set for reading */ @@ -558,7 +559,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ if (!print_bytes) FD_SET(print_fd, &input); FD_SET(device_fd, &input); - if (!print_bytes) + if (!print_bytes && !side_eof) FD_SET(CUPS_SC_FD, &input); FD_ZERO(&output); @@ -579,7 +580,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ * loop since it may have read from print_fd... */ - side_cb(print_fd, device_fd, 1); + if (side_cb(print_fd, device_fd, 1)) + side_eof = 1; continue; } @@ -1278,7 +1280,7 @@ list_devices(void) * 'side_cb()' - Handle side-channel requests... */ -static void +static int /* O - 0 on success, -1 on error */ side_cb(int print_fd, /* I - Print file */ int device_fd, /* I - Device file */ int use_bc) /* I - Using back-channel? */ @@ -1292,11 +1294,7 @@ side_cb(int print_fd, /* I - Print file */ datalen = sizeof(data); if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0)) - { - _cupsLangPuts(stderr, - _("WARNING: Failed to read side-channel request!\n")); - return; - } + return (-1); switch (command) { @@ -1323,7 +1321,7 @@ side_cb(int print_fd, /* I - Print file */ break; } - cupsSideChannelWrite(command, status, data, datalen, 1.0); + return (cupsSideChannelWrite(command, status, data, datalen, 1.0)); } diff --git a/backend/snmp-supplies.c b/backend/snmp-supplies.c index 684ff54b5..6be80ee14 100644 --- a/backend/snmp-supplies.c +++ b/backend/snmp-supplies.c @@ -229,8 +229,11 @@ backendSNMPSupplies( packet.object_type != CUPS_ASN1_OCTET_STRING) return (-1); - new_state = (packet.object_value.string.bytes[0] << 8) | - packet.object_value.string.bytes[1]; + if (packet.object_value.string.num_bytes == 2) + new_state = (packet.object_value.string.bytes[0] << 8) | + packet.object_value.string.bytes[1]; + else + new_state = 0; if (current_state < 0) change_state = 0xffff; diff --git a/backend/usb-darwin.c b/backend/usb-darwin.c index 2c7932cb2..0fb993d83 100644 --- a/backend/usb-darwin.c +++ b/backend/usb-darwin.c @@ -292,9 +292,8 @@ static void status_timer_cb(CFRunLoopTimerRef timer, void *info); #if defined(__i386__) || defined(__x86_64__) static pid_t child_pid; /* Child PID */ static void run_legacy_backend(int argc, char *argv[], int fd); /* Starts child backend process running as a ppc executable */ -#endif /* __i386__ || __x86_64__ */ -static int job_canceled = 0; /* Was the job canceled? */ static void sigterm_handler(int sig); /* SIGTERM handler */ +#endif /* __i386__ || __x86_64__ */ #ifdef PARSE_PS_ERRORS static const char *next_line (const char *buffer); @@ -461,9 +460,9 @@ print_device(const char *uri, /* I - Device URI */ fputs("STATE: -connecting-to-device\n", stderr); /* - * Now that we are "connected" to the port, catch SIGTERM so that we + * Now that we are "connected" to the port, ignore SIGTERM so that we * can finish out any page data the driver sends (e.g. to eject the - * current page... Only catch SIGTERM if we are printing data from + * current page... Only ignore SIGTERM if we are printing data from * stdin (otherwise you can't cancel raw jobs...) */ @@ -475,7 +474,7 @@ print_device(const char *uri, /* I - Device URI */ memset(&action, 0, sizeof(action)); sigemptyset(&action.sa_mask); - action.sa_handler = sigterm_handler; + action.sa_handler = SIG_IGN; sigaction(SIGTERM, &action, NULL); } @@ -725,7 +724,7 @@ print_device(const char *uri, /* I - Device URI */ fprintf(stderr, "DEBUG: USB class driver Abort returned %x\n", err); - status = job_canceled ? CUPS_BACKEND_FAILED : CUPS_BACKEND_STOP; + status = CUPS_BACKEND_FAILED; break; } else if (bytes > 0) @@ -944,7 +943,7 @@ sidechannel_thread(void *reference) datalen = sizeof(data); if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0)) - continue; + break; switch (command) { @@ -2020,8 +2019,6 @@ static void run_legacy_backend(int argc, exit(exitstatus); } -#endif /* __i386__ || __x86_64__ */ - /* * 'sigterm_handler()' - SIGTERM handler. @@ -2030,7 +2027,8 @@ static void run_legacy_backend(int argc, static void sigterm_handler(int sig) /* I - Signal */ { -#if defined(__i386__) || defined(__x86_64__) + /* If we started a child process pass the signal on to it... + */ if (child_pid) { /* @@ -2052,15 +2050,10 @@ sigterm_handler(int sig) /* I - Signal */ exit(CUPS_BACKEND_STOP); } } -#endif /* __i386__ || __x86_64__ */ - - /* - * Otherwise just flag that the job has been canceled... - */ - - job_canceled = 1; } +#endif /* __i386__ || __x86_64__ */ + #ifdef PARSE_PS_ERRORS /* diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c index d5c6ae5b6..d265d1203 100644 --- a/backend/usb-libusb.c +++ b/backend/usb-libusb.c @@ -158,7 +158,16 @@ print_device(const char *uri, /* I - Device URI */ while (poll(pfds, 2, -1) > 0) { - if (pfds[0].revents & POLLIN) + /* + * CUPS STR #3318: USB process hangs on end-of-file, making further + * printing impossible + * + * From a strict interpretation of POSIX poll(), POLLHUP should never be + * set without POLLIN, since POLLIN is the event you request. That said, + * it appears that some versions of Linux break this. + */ + + if (pfds[0].revents & (POLLIN | POLLHUP)) { if ((bytes = read(print_fd, buffer, sizeof(buffer))) > 0) { @@ -178,8 +187,13 @@ print_device(const char *uri, /* I - Device URI */ break; } - if (pfds[1].revents & POLLIN) - tbytes += side_cb(printer, print_fd); + if (pfds[1].revents & (POLLIN | POLLHUP)) + { + if ((bytes = side_cb(printer, print_fd)) < 0) + pfds[1].events = 0; /* Filter has gone away... */ + else + tbytes += bytes; + } } } @@ -745,10 +759,7 @@ side_cb(usb_printer_t *printer, /* I - Printer */ datalen = sizeof(data); if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0)) - { - _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n")); - return (0); - } + return (-1); switch (command) { diff --git a/backend/usb-unix.c b/backend/usb-unix.c index 9808f8c0a..44faa630c 100644 --- a/backend/usb-unix.c +++ b/backend/usb-unix.c @@ -36,7 +36,7 @@ */ static int open_device(const char *uri, int *use_bc); -static void side_cb(int print_fd, int device_fd, int snmp_fd, +static int side_cb(int print_fd, int device_fd, int snmp_fd, http_addr_t *addr, int use_bc); @@ -560,7 +560,7 @@ open_device(const char *uri, /* I - Device URI */ * 'side_cb()' - Handle side-channel requests... */ -static void +static int /* O - 0 on success, -1 on error */ side_cb(int print_fd, /* I - Print file */ int device_fd, /* I - Device file */ int snmp_fd, /* I - SNMP socket (unused) */ @@ -579,10 +579,7 @@ side_cb(int print_fd, /* I - Print file */ datalen = sizeof(data); if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0)) - { - _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n")); - return; - } + return (-1); switch (command) { @@ -625,7 +622,7 @@ side_cb(int print_fd, /* I - Print file */ break; } - cupsSideChannelWrite(command, status, data, datalen, 1.0); + return (cupsSideChannelWrite(command, status, data, datalen, 1.0)); } diff --git a/conf/Makefile b/conf/Makefile index e8cdbfc10..4e3963e21 100644 --- a/conf/Makefile +++ b/conf/Makefile @@ -90,7 +90,7 @@ install-data: done -if test x$(PAMDIR) != x; then \ $(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \ - if test -r $(BUILDROOT)$(PAMDIR)/cups/$(PAMFILE) ; then \ + if test -r $(BUILDROOT)$(PAMDIR)/cups ; then \ $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.N ; \ else \ $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups ; \ diff --git a/conf/cupsd.conf.in b/conf/cupsd.conf.in index adc0752cf..f02a74133 100644 --- a/conf/cupsd.conf.in +++ b/conf/cupsd.conf.in @@ -1,9 +1,8 @@ # # "$Id: cupsd.conf.in 7888 2008-08-29 21:16:56Z mike $" # -# Sample configuration file for the Common UNIX Printing System (CUPS) -# scheduler. See "man cupsd.conf" for a complete description of this -# file. +# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a +# complete description of this file. # # Log general information in error_log - change "@CUPS_LOG_LEVEL@" to "debug" diff --git a/conf/pam.irix b/conf/pam.irix deleted file mode 100644 index 476383acb..000000000 --- a/conf/pam.irix +++ /dev/null @@ -1,3 +0,0 @@ -#%PAM-1.0 -auth required pam_unix.so shadow nodelay nullok -account required pam_unix.so diff --git a/conf/pam.std.in b/conf/pam.std.in index 3ddcdd0d3..68fb50af3 100644 --- a/conf/pam.std.in +++ b/conf/pam.std.in @@ -1,2 +1,2 @@ -auth required @PAMMOD@ nullok shadow +auth required @PAMMODAUTH@ account required @PAMMOD@ diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index d0535dd3b..8a744a745 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -1,5 +1,5 @@ dnl -dnl "$Id: cups-common.m4 7900 2008-09-03 13:47:57Z mike $" +dnl "$Id: cups-common.m4 8781 2009-08-28 17:34:54Z mike $" dnl dnl Common configuration stuff for the Common UNIX Printing System (CUPS). dnl @@ -20,7 +20,7 @@ dnl Set the name of the config header file... AC_CONFIG_HEADER(config.h) dnl Version number information... -CUPS_VERSION="1.4.1" +CUPS_VERSION="1.5svn" CUPS_REVISION="" #if test -z "$CUPS_REVISION" -a -d .svn; then # CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`" @@ -355,5 +355,5 @@ AC_SUBST(FONTS) AC_SUBST(LEGACY_BACKENDS) dnl -dnl End of "$Id: cups-common.m4 7900 2008-09-03 13:47:57Z mike $". +dnl End of "$Id: cups-common.m4 8781 2009-08-28 17:34:54Z mike $". dnl diff --git a/config-scripts/cups-pam.m4 b/config-scripts/cups-pam.m4 index 1b554a411..1cb1efc9d 100644 --- a/config-scripts/cups-pam.m4 +++ b/config-scripts/cups-pam.m4 @@ -22,9 +22,10 @@ if test $uname = AIX; then fi PAMDIR="" -PAMFILE="" +PAMFILE="pam.std" PAMLIBS="" PAMMOD="pam_unknown.so" +PAMMODAUTH="pam_unknown.so" if test x$enable_pam != xno; then SAVELIBS="$LIBS" @@ -60,7 +61,7 @@ if test x$enable_pam != xno; then case "$uname" in Darwin*) - # Darwin, MacOS X + # Darwin/Mac OS X if test "x$with_pam_module" != x; then PAMFILE="pam.$with_pam_module" elif test -f /usr/lib/pam/pam_opendirectory.so.2; then @@ -70,26 +71,22 @@ if test x$enable_pam != xno; then fi ;; - IRIX) - # SGI IRIX - PAMFILE="pam.irix" - ;; - *) # All others; this test might need to be updated # as Linux distributors move things around... if test "x$with_pam_module" != x; then PAMMOD="pam_${with_pam_module}.so" - else - for mod in pam_unix2.so pam_unix.so pam_pwdb.so; do - if test -f /lib/security/$mod; then - PAMMOD="$mod" - break; - fi - done + elif test -f /lib/security/pam_unix2.so; then + PAMMOD="pam_unix2.so" + elif test -f /lib/security/pam_unix.so; then + PAMMOD="pam_unix.so" fi - PAMFILE="pam.std" + if test "x$PAMMOD" = xpam_unix.so; then + PAMMODAUTH="$PAMMOD shadow nodelay" + else + PAMMODAUTH="$PAMMOD nodelay" + fi ;; esac fi @@ -98,6 +95,7 @@ AC_SUBST(PAMDIR) AC_SUBST(PAMFILE) AC_SUBST(PAMLIBS) AC_SUBST(PAMMOD) +AC_SUBST(PAMMODAUTH) dnl dnl End of "$Id: cups-pam.m4 7960 2008-09-17 19:42:02Z mike $". diff --git a/cups/cups.h b/cups/cups.h index 09aa2d1c4..c460e8f89 100644 --- a/cups/cups.h +++ b/cups/cups.h @@ -1,5 +1,5 @@ /* - * "$Id: cups.h 7847 2008-08-19 04:22:14Z mike $" + * "$Id: cups.h 8781 2009-08-28 17:34:54Z mike $" * * API definitions for the Common UNIX Printing System (CUPS). * @@ -59,10 +59,10 @@ extern "C" { * Constants... */ -# define CUPS_VERSION 1.0401 +# define CUPS_VERSION 1.0499 # define CUPS_VERSION_MAJOR 1 -# define CUPS_VERSION_MINOR 4 -# define CUPS_VERSION_PATCH 1 +# define CUPS_VERSION_MINOR 5 +# define CUPS_VERSION_PATCH -1 # define CUPS_BC_FD 3 /* Back-channel file descriptor for select/poll */ # define CUPS_DATE_ANY (time_t)-1 @@ -334,5 +334,5 @@ extern http_status_t cupsWriteRequestData(http_t *http, const char *buffer, #endif /* !_CUPS_CUPS_H_ */ /* - * End of "$Id: cups.h 7847 2008-08-19 04:22:14Z mike $". + * End of "$Id: cups.h 8781 2009-08-28 17:34:54Z mike $". */ diff --git a/cups/sidechannel.c b/cups/sidechannel.c index 0f51fd1bd..da3d2b847 100644 --- a/cups/sidechannel.c +++ b/cups/sidechannel.c @@ -191,9 +191,23 @@ cupsSideChannelRead( if (errno != EINTR && errno != EAGAIN) { DEBUG_printf(("1cupsSideChannelRead: Read error: %s", strerror(errno))); + *command = CUPS_SC_CMD_NONE; + *status = CUPS_SC_STATUS_IO_ERROR; return (-1); } + /* + * Watch for EOF or too few bytes... + */ + + if (bytes < 4) + { + DEBUG_printf(("1cupsSideChannelRead: Short read of %d bytes", bytes)); + *command = CUPS_SC_CMD_NONE; + *status = CUPS_SC_STATUS_BAD_MESSAGE; + return (-1); + } + /* * Validate the command code in the message... */ @@ -202,6 +216,8 @@ cupsSideChannelRead( buffer[0] > CUPS_SC_CMD_SNMP_GET_NEXT) { DEBUG_printf(("1cupsSideChannelRead: Bad command %d!", buffer[0])); + *command = CUPS_SC_CMD_NONE; + *status = CUPS_SC_STATUS_BAD_MESSAGE; return (-1); } @@ -379,6 +395,7 @@ cupsSideChannelSNMPWalk( real_oidlen, /* Length of returned OID string */ oidlen; /* Length of first OID */ const char *current_oid; /* Current OID */ + char last_oid[2048]; /* Last OID */ DEBUG_printf(("cupsSideChannelSNMPWalk(oid=\"%s\", timeout=%.3f, cb=%p, " @@ -397,6 +414,7 @@ cupsSideChannelSNMPWalk( current_oid = oid; oidlen = (int)strlen(oid); + last_oid[0] = '\0'; do { @@ -422,7 +440,8 @@ cupsSideChannelSNMPWalk( * Parse the response of the form "oid\0value"... */ - if (strncmp(real_data, oid, oidlen) || real_data[oidlen] != '.') + if (strncmp(real_data, oid, oidlen) || real_data[oidlen] != '.' || + !strcmp(real_data, last_oid)) { /* * Done with this set of OIDs... @@ -448,6 +467,7 @@ cupsSideChannelSNMPWalk( */ current_oid = real_data; + strlcpy(last_oid, current_oid, sizeof(last_oid)); } } while (status == CUPS_SC_STATUS_OK); diff --git a/cups/sidechannel.h b/cups/sidechannel.h index 8242247cb..c52cd51cb 100644 --- a/cups/sidechannel.h +++ b/cups/sidechannel.h @@ -55,6 +55,7 @@ typedef enum cups_sc_bidi_e cups_sc_bidi_t; enum cups_sc_command_e /**** Request command codes ****/ { + CUPS_SC_CMD_NONE = 0, /* No command @private@ */ CUPS_SC_CMD_SOFT_RESET = 1, /* Do a soft reset */ CUPS_SC_CMD_DRAIN_OUTPUT = 2, /* Drain all pending output */ CUPS_SC_CMD_GET_BIDI = 3, /* Return bidirectional capabilities */ diff --git a/cups/snmp.c b/cups/snmp.c index d37582b96..c9951702e 100644 --- a/cups/snmp.c +++ b/cups/snmp.c @@ -608,6 +608,8 @@ _cupsSNMPWalk(int fd, /* I - SNMP socket */ int count = 0; /* Number of OIDs found */ int request_id = 0; /* Current request ID */ cups_snmp_t packet; /* Current response packet */ + int lastoid[CUPS_SNMP_MAX_OID]; + /* Last OID we got */ /* @@ -631,14 +633,15 @@ _cupsSNMPWalk(int fd, /* I - SNMP socket */ */ _cupsSNMPCopyOID(packet.object_name, prefix, CUPS_SNMP_MAX_OID); + lastoid[0] = -1; for (;;) { request_id ++; if (!_cupsSNMPWrite(fd, address, version, community, - CUPS_ASN1_GET_NEXT_REQUEST, request_id, - packet.object_name)) + CUPS_ASN1_GET_NEXT_REQUEST, request_id, + packet.object_name)) { DEBUG_puts("5_cupsSNMPWalk: Returning -1"); @@ -652,7 +655,8 @@ _cupsSNMPWalk(int fd, /* I - SNMP socket */ return (-1); } - if (!_cupsSNMPIsOIDPrefixed(&packet, prefix)) + if (!_cupsSNMPIsOIDPrefixed(&packet, prefix) || + _cupsSNMPIsOID(&packet, lastoid)) { DEBUG_printf(("5_cupsSNMPWalk: Returning %d", count)); @@ -666,6 +670,8 @@ _cupsSNMPWalk(int fd, /* I - SNMP socket */ return (count > 0 ? count : -1); } + _cupsSNMPCopyOID(lastoid, packet.object_name, CUPS_SNMP_MAX_OID); + count ++; (*cb)(&packet, data); @@ -1280,7 +1286,7 @@ asn1_get_integer( int value; /* Integer value */ - for (value = 0; + for (value = (**buffer & 0x80) ? -1 : 0; length > 0 && *buffer < bufend; length --, (*buffer) ++) value = (value << 8) | **buffer; diff --git a/doc/help/spec-ipp.html b/doc/help/spec-ipp.html index ae043e744..efdc7b041 100644 --- a/doc/help/spec-ipp.html +++ b/doc/help/spec-ipp.html @@ -558,7 +558,7 @@ job as well.

Cancel-Job Request

The following groups of attributes are supplied as part of the -Set-Job-Attributes request: +Cancel-Job request:

Group 1: Operation Attributes @@ -632,6 +632,17 @@ Purge-Jobs request:

The client MUST supply a URI for the specified printer or "ipp://.../printers" for all printers and classes. +
CUPS 1.2/Mac OS X 10.5"requesting-user-name" (name(MAX)): + +
The client OPTIONALLY supplies this attribute to specify whose jobs + jobs are purged or canceled. + +
CUPS 1.2/Mac OS X 10.5"my-jobs" (boolean): + +
The client OPTIONALLY supplies this attribute to specify that only + the jobs owned by the requesting user are purged or canceled. The + default is false. +
CUPS 1.2/Mac OS X 10.5"purge-jobs" (boolean):
The client OPTIONALLY supplies this attribute to specify diff --git a/filter/hpgl-input.c b/filter/hpgl-input.c index fdc45555e..75102dd7d 100644 --- a/filter/hpgl-input.c +++ b/filter/hpgl-input.c @@ -144,7 +144,7 @@ ParseCommand(FILE *fp, /* I - File to read from */ if (!strcasecmp(name, "LB")) { bufptr = buf; - while ((ch = getc(fp)) != StringTerminator) + while ((ch = getc(fp)) != StringTerminator && ch != EOF) if (bufptr < (buf + sizeof(buf) - 1)) *bufptr++ = ch; *bufptr = '\0'; diff --git a/ppdc/ppdc.cxx b/ppdc/ppdc.cxx index 42d09fc0e..fbc54378f 100644 --- a/ppdc/ppdc.cxx +++ b/ppdc/ppdc.cxx @@ -61,6 +61,7 @@ main(int argc, // I - Number of command-line arguments verbose; // Verbosity ppdcLineEnding le; // Line ending to use ppdcArray *locales; // List of locales + cups_array_t *filenames; // List of generated filenames _cupsSetLocale(argv); @@ -75,6 +76,7 @@ main(int argc, // I - Number of command-line arguments src = new ppdcSource(); use_model_name = 0; verbose = 0; + filenames = cupsArrayNew((cups_array_func_t)strcasecmp, NULL); for (i = 1; i < argc; i ++) if (argv[i][0] == '-') @@ -339,6 +341,13 @@ main(int argc, // I - Number of command-line arguments else snprintf(filename, sizeof(filename), "%s/%s", outdir, pcfilename); + if (cupsArrayFind(filenames, filename)) + _cupsLangPrintf(stderr, + _("ppdc: Warning - overlapping filename \"%s\".\n"), + filename); + else + cupsArrayAdd(filenames, strdup(filename)); + fp = cupsFileOpen(filename, comp ? "w9" : "w"); if (!fp) { diff --git a/ppdc/sample.drv b/ppdc/sample.drv index 94966f45f..a6c45c89f 100644 --- a/ppdc/sample.drv +++ b/ppdc/sample.drv @@ -112,7 +112,7 @@ #media "w576h468/8.00x6.50\"" 576 468 // Common stuff for all drivers... -Attribute "cupsVersion" "" "1.4" +Attribute "cupsVersion" "" "1.5" Attribute "FileSystem" "" "False" Attribute "LandscapeOrientation" "" "Plus90" Attribute "TTRasterizer" "" "Type42" diff --git a/scheduler/cups-driverd.cxx b/scheduler/cups-driverd.cxx index 1439dd795..0d776a637 100644 --- a/scheduler/cups-driverd.cxx +++ b/scheduler/cups-driverd.cxx @@ -328,7 +328,8 @@ cat_drv(const char *name, /* I - PPD name */ *pc_file_name++ = '\0'; #ifdef __APPLE__ - if (!strncmp(resource, "/Library/Printers/PPDs.drv/", 27)) + if (!strncmp(resource, "/Library/Printers/PPDs/Contents/Resources/", 42) || + !strncmp(resource, "/System/Library/Printers/PPDs/Contents/Resources/", 49)) strlcpy(filename, resource, sizeof(filename)); else #endif // __APPLE__ diff --git a/scheduler/ipp.c b/scheduler/ipp.c index d212b2055..60aa932ec 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -8470,7 +8470,9 @@ ppd_parse_line(const char *line, /* I - Line */ * Read the option name... */ - for (line += 8, olen --; isalnum(*line & 255); line ++) + for (line += 8, olen --; + *line > ' ' && *line < 0x7f && *line != ':' && *line != '/'; + line ++) if (olen > 0) { *option++ = *line; @@ -8498,7 +8500,9 @@ ppd_parse_line(const char *line, /* I - Line */ while (isspace(*line & 255)) line ++; - for (clen --; isalnum(*line & 255); line ++) + for (clen --; + *line > ' ' && *line < 0x7f && *line != ':' && *line != '/'; + line ++) if (clen > 0) { *choice++ = *line; diff --git a/scheduler/printers.c b/scheduler/printers.c index 29f55231b..844000854 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -3834,7 +3834,7 @@ delete_printer_filters( for (filter = mimeFirstFilter(MimeDatabase); filter; filter = mimeNextFilter(MimeDatabase)) - if (filter->dst == p->filetype) + if (filter->dst == p->filetype || filter->dst == p->prefiltertype) { /* * Delete the current filter... diff --git a/standards/cs-ipp20-20090731-5100.10.pdf b/standards/cs-ipp20-20090731-5100.10.pdf new file mode 100644 index 000000000..1623ccb12 Binary files /dev/null and b/standards/cs-ipp20-20090731-5100.10.pdf differ diff --git a/standards/cs-ippstate10-20090731-5100.9.pdf b/standards/cs-ippstate10-20090731-5100.9.pdf new file mode 100644 index 000000000..3c3c5252c Binary files /dev/null and b/standards/cs-ippstate10-20090731-5100.9.pdf differ diff --git a/standards/lcrc-ipp20-20090602.pdf b/standards/lcrc-ipp20-20090602.pdf deleted file mode 100644 index 004b1eed4..000000000 Binary files a/standards/lcrc-ipp20-20090602.pdf and /dev/null differ diff --git a/standards/lcrc-ippstate10-20090603.pdf b/standards/lcrc-ippstate10-20090603.pdf deleted file mode 100644 index cb9be4ca3..000000000 Binary files a/standards/lcrc-ippstate10-20090603.pdf and /dev/null differ diff --git a/tools/makesrcdist b/tools/makesrcdist index bda71393f..9642409a5 100755 --- a/tools/makesrcdist +++ b/tools/makesrcdist @@ -32,7 +32,7 @@ else fileurl="ftp://ftp.easysw.com/pub/cups/$version/cups-$fileversion-source.tar." url="https://svn.easysw.com/public/cups/tags/release-$version" - svn copy https://svn.easysw.com/public/cups/branches/branch-1.4 "$url" \ + svn copy https://svn.easysw.com/public/cups/trunk "$url" \ -m "Tag $version" || exit 1 fi