mike [Sat, 17 Sep 2005 16:00:23 +0000 (16:00 +0000)]
The pdftops filter now minimizes print processing of PDF files
when using the page-ranges option (STR #273)
pdftops/Gfx.cxx:
- Gfx::Gfx(): Add initialization of renderThisPage member.
pdftops/Gfx.h:
- Add renderThisPage member.
pdftops/OutputDev.h:
pdftops/SplashOutputDev.h:
- startPage(): Change to return GBool.
pdftops/pdftops.cxx
- main(): Pass page-ranges option to PSOutputDev.
pdftops/PSOutputDev.cxx
- PSOutputDev(), init(): Add pageRangesA argument.
- startPage(): Return gTrue or gFalse depending on whether
the page will be printed.
- checkRange(): Add.
mike [Sat, 17 Sep 2005 03:48:43 +0000 (03:48 +0000)]
Added new cupsBackchannelRead() and cupsBackchannelWrite()
functions, as well as backchannel support to the parallel,
serial, socket, and USB backends (STR #1252)
The parallel and USB backends now treat a "no space available"
error as an out-of-paper condition (STR #1225)
backend/ipp.c:
- report_printer_state(): Cleanup printer status handling.
backend/parallel.c:
- main(): Add backchannel support, and check for ENOSPC
error.
config-scripts/cups-network.m4:
- Add check for getaddrinfo.
- Replace check for rresvport with check for rresvport_af.
cups/http.c:
- httpConnect(): Change "encrypt" to "encryption".
- httpConnectEncrypt(): Change "encrypt" to "encryption".
cups/http.h:
- httpConnectEncrypt(): Change "encrypt" to "encryption".
cups/http-addr.c:
- httpAddrLocalhost(): Treat unspecified IPv6 address as
local.
- httpAddrString(): Change IPv6 address format to [x:x:x:x].
- httpAddrGetHostByName(): Support [x:x:x:x] format for IPv6
addresses and use getaddrinfo() if available.
cups/http-support.c:
- httpSeparate(): Change method to scheme.
- httpSeparate2(): Change method to scheme, methodlen to
schemelen, support IPv6 addresses using the [x:x:x:x]
format, and decode all resources for the shortcut forms.
pdftops/gfile.h:
- Remove DIRENT checks.
scheduler/auth.c:
- CheckAuth(): Make IPv6 variables conditional.
- cupsdIsAuthorized(): Load IPv4 address using 0:0:0 prefix.
scheduler/client.c:
- AcceptClient(): Only do lookup after checking localhost and
server address.
scheduler/conf.c:
- get_address(): Support [x:x:x:x] format for IPv6 addresses,
and load IPv4 addresses using 0:0:0 prefix.
- get_addr_and_mask(): Support [x:x:x:x] format for IPv6 addresses,
and load IPv4 addresses using 0:0:0 prefix.
- read_configuration(): Add experimental code to double up
IPv6 + IPv4 for wildcard address (commented, since it isn't
needed for Linux, but we need to test other OS's...)
scheduler/listen.c:
- StartListening(): Automatically try binding IPv4 versions
of IPv6 loopback and "any" addresses, in case the local
system does not have IPv6 enabled at run time.
mike [Fri, 16 Sep 2005 14:44:00 +0000 (14:44 +0000)]
ippReadIO() did not read collections properly (STR #1249)
cups/ipp.c:
- ippReadIO(): Decrement attr->num_values when handling an
IPP_TAG_MEMBERNAME attribute, since collection members are
encoded differently than regular attributes.
cups/testipp.c:
- main(): Add more tests to confirm that attributes are read
correctly, and separate file tests from memory tests.
mike [Thu, 15 Sep 2005 19:10:34 +0000 (19:10 +0000)]
Added new httpGetHostname() function to CUPS API, and use it
instead of gethostname() so that the web interface will work
correctly on systems whose hostname is not the FQDN (STR #1266)
mike [Thu, 15 Sep 2005 18:43:06 +0000 (18:43 +0000)]
The configure script now supports "--disable-library" to disable
particular image file format support libraries, even if they are
available on the build system (STR #1248)
Also fix spelling error for "Renew-Subscription" operation.
mike [Thu, 15 Sep 2005 16:01:32 +0000 (16:01 +0000)]
Fix inefficient class management issues.
scheduler/classes.c:
- AddPrinterToClass(): Don't call SetPrinterAttrs(), as it is called
elsewhere as needed.
scheduler/dirsvc.c:
- ProcessBrowseData(): Log printer/class renames, send the
appropriate events (delete old, add new), and track implicit
class updates so that we don't call SetPrinterAttrs() more
than once for the class.
scheduler/printers.c:
- SetPrinterAttrs(): Only add raw filter for real printers - classes
and remote printers just need the "raw" flag set on the queue.
mike [Thu, 15 Sep 2005 14:13:19 +0000 (14:13 +0000)]
Change CUPS_PRINTER_SHARED to CUPS_PRINTER_NOT_SHARED so that we are still
compatible with older CUPS servers. Also fix some logic problems with the
browse checks.
scheduler/cups-polld.c:
- poll_server(): Check for CUPS_PRINTER_NOT_SHARED set to 0.
scheduler/dirsvc.c:
- UpdateCUPSBrowse(): Use the BrowseOrder setting to determine the
default allowed/denied setting, and check both the hostname and
port when determining whether to ignore the browse packet (this
needs further updating to just use the Listen hosts and ports)
scheduler/printers.c:
- SetPrinterAttrs(): Invert handling for CUPS_PRINTER_NOT_SHARED
(set when printer-is-shared is false)
mike [Wed, 14 Sep 2005 19:26:44 +0000 (19:26 +0000)]
Add httpGetDateString2() API to replace httpGetDateString(). The new
API accepts a string buffer pointer and length instead of returning
a value from static storage.
mike [Wed, 14 Sep 2005 19:21:51 +0000 (19:21 +0000)]
Rewrite httpGetDateTime() to not use mktime(), since that function uses
the current timezone setting instead of UTC.
cups/http.c:
- Rename days[] and months[] to http_days[] and http_months[] to
avoid namespace issues.
- httpGetDateString(): Use new http_days[] and http_months[].
- httpGetDateTime(): Convert string to UTC using some
relatively simple math instead of mktime().
cups/testhttp.c:
- main(): Add tests for httpGetDateString() and
httpGetDateTime() to verify that the new implementation
works.
mike [Wed, 14 Sep 2005 14:50:49 +0000 (14:50 +0000)]
Drop CUPS-Add-Device and CUPS-Delete-Device, and clean up bad operation
name code.
cups/ipp.h:
- Remove CUPS_ADD_DEVICE and CUPS_DELETE_DEVICE enumerations.
cups/ipp-support.c:
- Remove CUPS-Add-Device and CUPS-Delete-Device operation strings.
- ippOpString(): Last CUPS operation is CUPS_MOVE_JOB now.
scheduler/auth.c:
- AddName(), AllowHost(), AllowIP(), DenyHost(), DenyIP():
New debug2 log message.
- AllowIP(), DenyIP(): Copy all of address and netmask, not just
the sizeof(pointer)...
- cupsdIsAuthorized(): Cleanup and add debug2 log messages with
constant names to simplify debugging.
- cupsdIsAuthorized(): Don't special-case "no allow/deny lines"
configuration - just use Order directive to allow/deny by
default.
- cupsdIsAuthorized(): Use DefaultAuthType when no AuthType is
specified for a location.
scheduler/auth.h:
- Add DefaultAuthType (again)
scheduler/client.c:
- SendHeader(): Use DefaultAuthType when best authentication
type is not available or undefined.
scheduler/conf.c:
- ReadConfiguration(): Set DefaultAuthType, remove
CUPS_ADD_DEVICE and CUPS_DELETE_DEVICE from default policy.
- read_configuration(): Add DefaultAuthType parsing code.
mike [Fri, 9 Sep 2005 15:48:34 +0000 (15:48 +0000)]
Only add certificates for authenticated users and only add root
certificate if running as root...
scheduler/cert.c:
- InitCerts(): Only add root certificate when running as root.
scheduler/client.c:
- pipe_command(): Only add certificate for authenticated users.
scheduler/main.c:
- main(): Only add root certificate when running as root.
- select_timeout(): Only schedule time for root cert update when running as root.
scheduler/auth.c:
- cupsdCheckGroup(): Added.
- IsAuthorized(): Use new cupsdCheckGroup(), support @SYSTEM
group name when doing lookups, and use case-insensitive
comparisons for user and group names.
scheduler/auth.h:
- Add cupsdCheckGroup() function and <pwd.h> include.
scheduler/client.c:
- pipe_command(): Add CUPS_CACHEDIR env var.
scheduler/conf.c:
- ReadConfiguration(): Add CacheDir support and use @SYSTEM
instead of listing every system group.
- read_configuration(): Add CacheDir support, and use @SYSTEM
instead of listing every system group.
scheduler/ipp.c:
- check_quotas(): Use cupsdCheckGroup() function.
- get_ppds(): ppd-make is a text attribute, not a keyword
attribute.
- get_ppds(): Use URI escaping for spaces.
- user_allowed(): Use cupsdCheckGroup() function.
scheduler/job.c:
- StartJob(): Add CUPS_CACHEDIR env var.
scheduler/policy.c:
- check_group(): Removed.
- check_ok(): Use cupsdCheckGroup() function.
scheduler/util.c:
- cupsdSendIPPHeader(): Status code is only 2 bytes, not 4.
test/run-stp-tests.sh:
- Add CacheDir to sample config file.
mike [Thu, 1 Sep 2005 18:41:18 +0000 (18:41 +0000)]
Update default security configuration in cupsd.conf, add new
DefaultAuthType directive for policy-based authentication, and
fix cups-deviced invocation to use the run/root user.
cgi-bin/admin.c:
- Check and write /admin/conf location as well as /admin.
conf/cupsd.conf.in:
templates/edit-config.tmpl.in:
- Add /admin/conf location which requires authentication and
membership in the system group.
scheduler/auth.c:
- IsAuthorized(): Add logging of group checking.
scheduler/auth.h:
- Add DefaultAuthType variable.
scheduler/client.c:
- ReadClient(): Add "root" argument to SendCommand() calls.
- SendCommand(): Add "root" argument to function and to
pipe_command() calls.
- SendHeader(): Use DefaultAuthType for authentication
failures that don't match a location.
- pipe_command(): Add "root" argument to function and to
cupsdStartProcess() calls.
scheduler/client.h:
- Add "root" argument to SendCommand() function.
scheduler/conf.c:
- ReadConfiguration(): Add initialization of DefaultAuthType.
- read_configuration(): Add support for DefaultAuthType
directive.
- read_location(): Use DefaultAuthType as needed.
scheduler/ipp.c:
- get_devices(): Add root argument to SendCommand() call.
- get_ppds(): Add root argument to SendCommand() call.
- send_ipp_error(): Always return HTTP authentication error,
regardless of whether we have successfully authenticated
before.
scheduler/statbuf.c:
- cupsdStatBufUpdate(): Don't add prefix if the message
starts with a left bracket.
systemv/lppasswd.c:
- Update root user checks to allow for non-setuid
installations.
cups/tempfile.c:
- Default to /tmp instead of /var/tmp, to conform with the
FHS.
filter/raster.c:
- cupsRasterReadPixels(): remove extra definition of "byte"
variable.
Makedefs.in:
- Add CUPS_CACHEDIR definition.
scheduler/conf.c:
- ReadConfiguration(): Clean out TempDir if it is a
subdirectory of RequestRoot.
- ReadConfiguration(): Log the new value of MaxClients when
limiting.
scheduler/cups-deviced.c:
- Add function list to header.
scheduler/cups-driverd.c:
- Finish up "list" implementation, including new dynamic
driver PPD interface.
scheduler/ipp.c:
- get_ppds(): default ppd-make to "" instead of "all".
cups/ppd.c:
cups/ppd.h:
- Add ppdOpen2() function using cups_file_t *.
- Comment out current (unused) extended option code.
scheduler/Makefile:
- Add cups-driverd to build, remove ppds.o.
scheduler/banners.c:
- Use new cupsDir*() functions.
scheduler/conf.c:
- Create subdirs of RequestRoot and StateDir as needed.
scheduler/cups-deviced.c:
- Use new cupsDir*() functions.
- Add options argument to support requested-attributes and
other future options.
- Honor requested-attributes keywords.
scheduler/cupsd.h:
- Remove directory includes and PPDs variable.
scheduler/cups-driverd.c:
- Add incomplete code.
scheduler/ipp.c:
- add_printer(): Remove unused variables.
- get_devices(): Add requested-attributes support.
- get_ppds(): Change to use cups-driverd subprocess.
scheduler/job.c:
- Use new cupsDir*() functions.
scheduler/log.c:
- check_log_file(): Change argument name from "log" to "lf"
to eliminate a compiler warning (name shadowed).
mike [Fri, 26 Aug 2005 14:59:30 +0000 (14:59 +0000)]
Implement index search using regular expressions.
cgi-bin/help-index.c:
- helpSearchIndex(): Implement
- help_compile_search(): Add
- help_insert_node(): Fix binary insertion for 1-node case
- help_load_file(): Add whitespace to text when continuing
lines, and close the file at the end.
cgi-bin/help-index.h:
- Add filename argument to helpSearchIndex()
cgi-bin/testhi.c:
- Add tests for helpSearchIndex()
mike [Wed, 24 Aug 2005 21:09:34 +0000 (21:09 +0000)]
cups/cups.h:
- Add CUPS_PRINTER_SHARED printer type bit.
scheduler/classes.c:
- Load and save the shared attribute.
scheduler/cups-polld.c:
- Only poll for shared printers.
scheduler/dirsvc.c:
- Only broadcast shared printers.
scheduler/ipp.c:
- Support get/set of printer-is-shared attribute.
- Only allow remote print jobs on shared printers.
- CUPS-Get-Printers now includes all printers and
classes by default.
scheduler/job.c:
- Honor the error policy for a printer.
scheduler/printers.c:
- Load and save the shared attribute.
- Set/clear the shared printer type bit as needed.
mike [Wed, 24 Aug 2005 20:15:15 +0000 (20:15 +0000)]
cgi-bin/cgi.h:
cgi-bin/html.c:
cgi-bin/var.c:
- Add cgiStartHTML(), cgiEndHTML(), and cgiFormEncode()
functions from admin.c for general use.
- Add authentication hooks, such that a HTTP/IPP request that
requires authentication will kick out a 401 status header
instead of asking for a password. This functionality is
disabled after the HTML header is sent.
cgi-bin/admin.c:
- Move form_encode(), html_end(), and html_start() to CGI
library, and update code to use the new CGI calls.
cgi-bin/Dependencies:
cgi-bin/Makefile:
- Add html.c/o to library build.
mike [Wed, 24 Aug 2005 19:25:49 +0000 (19:25 +0000)]
*/Dependencies:
- Update dependencies.
cgi-bin/admin.c:
- Use new cupsTempFile2() API.
- Drop old get_line() function.
- Implement general URL redirector function, and use it for
all successful admin ops (2 second delay).
-
conf/mime.types:
- Add text/css MIME type for stylesheet.
cups/cups.h:
cups/tempfile.c:
- Add new cupsTempFile2() API (for CUPS files)
cups/file.h:
- Fix multiple include guard.
- Add <sys/types.h> include.
cups/ppd.h:
- Include "file.h".
doc/cups.css:
- Add "conflict" style.
- Don't force TD/TH to be left-aligned.
- Add padding to page style.
- Add "data" style for rounded info boxes.
conf/mime.types:
- Add image/x-icon MIME type for favicon.ico support.
doc/favicon.ico:
- Add "favorites" icon file with CUPS logo for web interface.
doc/images/*.gif:
- Add new buttons for server configuration/information pages.
scheduler/client.c:
scheduler/client.h:
- Add "sent_header" field to client structure.
- Delay sending of header until first HTTP header from
CGI script/program.
- Add support for Location: and Status: CGI headers.
templates/admin.tmpl:
- Add edit and view buttons.
templates/edit-config.tmpl:
- Added to support web-based config file editing.
templates/header.tmpl:
- Update support HTTP refresh meta attribute.
templates/restart.tmpl:
- Added to show "please stand by while server restarts" message.
mike [Thu, 4 Aug 2005 19:27:36 +0000 (19:27 +0000)]
The web interface now operates exclusively with the UTF-8
encoding, and sends the appropriate character set and header
information to the web browser (STR #919, STR #1007)