]> git.ipfire.org Git - thirdparty/cups.git/log
thirdparty/cups.git
19 years agoFix domain socket handling (STR #1277)
mike [Fri, 23 Sep 2005 20:29:27 +0000 (20:29 +0000)] 
Fix domain socket handling (STR #1277)

cups/http.h:
    - Add httpAddrLength() function.

cups/http-addr.c:
    - httpAddrLength(): Added.

scheduler/conf.c:
    - get_address(): Return immediately if we have a domain
      socket address.
    - read_configuration(): Only default to IPv6 if the local
      system supports it and we are not using OpenBSD.

scheduler/listen.c:
    - StartListening(): Use httpAddrLength() for bind calls,
      and revamp the logging to be more useful.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4697 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoDon't set the default run group to the default system group, otherwise
mike [Fri, 23 Sep 2005 20:04:07 +0000 (20:04 +0000)] 
Don't set the default run group to the default system group, otherwise
the new web interface will always authenticate as root!

conf/cupsd.conf.in:
    - Add DefaultAuthType line.

scheduler/cert.c:
    - AddCert(): Use SystemGroupIDs[0] to initialize root
      certificate.

scheduler/conf.c:
    - ReadConfiguration(): Initialize SystemGroupIDs array, check
      for identical SystemGroup and Group IDs.
    - read_configuration(): Validate SystemGroups and set
      SystemGroupIDs.

scheduler/conf.h:
    - Add SystemGroupIDs array.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4696 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdd OSX compatibility functions for (private) MD5 functions in CUPS -
mike [Fri, 23 Sep 2005 17:07:14 +0000 (17:07 +0000)] 
Add OSX compatibility functions for (private) MD5 functions in CUPS -
otherwise some OSX components will stop working when you install CUPS
1.2...

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4695 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix MacOS X compile problems.
mike [Fri, 23 Sep 2005 16:59:47 +0000 (16:59 +0000)] 
Fix MacOS X compile problems.

config-scripts/cups-compiler.m4:
    - Only use -pie on Linux.

cups/language.c:
    - appleLangDefault(): apple_name_locale, not _apple_name_locale.

scheduler/job.c:
    - Remove old CFProcessPath references.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4694 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoUse getsockname(), not getpeername()...
mike [Fri, 23 Sep 2005 16:38:45 +0000 (16:38 +0000)] 
Use getsockname(), not getpeername()...

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4693 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoUse cups-driverd to get PPD (model) files.
mike [Fri, 23 Sep 2005 03:04:59 +0000 (03:04 +0000)] 
Use cups-driverd to get PPD (model) files.

scheduler/ipp.c:
    - copy_model(): Add client_t * parameter and run cups-driverd
      to get the PPD file for the specified model name.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4692 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoUpdate scheduler to use new environment variable API - this reduces code
mike [Thu, 22 Sep 2005 20:56:46 +0000 (20:56 +0000)] 
Update scheduler to use new environment variable API - this reduces code
size and will allow us to add the Apache PassEnv and SetEnv directives
without too much pain.

scheduler/client.c:
    - pipe_command(): Use new cupsdLoadEnv() function.

scheduler/conf.c:
    - ReadConfiguration(): Call cupsdInitEnv() after loading
      cupsd.conf.

scheduler/cupsd.h:
    - Drop TZ global.
    - Add cupsdClearEnv(), cupsdInitEnv(), cupsdLoadEnv(),
      cupsdSetEnv(), and cupsdSetEnvf() functions.

scheduler/dirsvc.c:
    - StartPolling(): Use new cupsdLoadEnv() function.

scheduler/env.c:
    - Added.

scheduler/job.c:
    - StartJob(): Use new cupsdLoadEnv() function.

scheduler/listen.c:
    - StartListening(): Set CUPS_SERVER, CUPS_ENCRYPTION, and
      IPP_PORT environment variables.

scheduler/main.c:
    - main(): Drop TZ environment variable stuff.

scheduler/process.c:
    - Sort functions.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4691 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agocups-driverd wrap-up.
mike [Thu, 22 Sep 2005 19:05:31 +0000 (19:05 +0000)] 
cups-driverd wrap-up.

scheduler/cups-driverd.c:
    - main(): Fix argument check
    - cat_ppd(): Implement.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4690 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix detection of "cancel-job" policy...
mike [Thu, 22 Sep 2005 18:22:35 +0000 (18:22 +0000)] 
Fix detection of "cancel-job" policy...

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4689 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoConvert Unicode (UTF-16) text to UTF-8 instead of just writing the low
mike [Thu, 22 Sep 2005 18:11:02 +0000 (18:11 +0000)] 
Convert Unicode (UTF-16) text to UTF-8 instead of just writing the low
order bytes.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4688 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdd Creator and Title DSC comments (STR #830)
mike [Thu, 22 Sep 2005 18:04:40 +0000 (18:04 +0000)] 
Add Creator and Title DSC comments (STR #830)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4687 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix non-threaded global stuff.
mike [Thu, 22 Sep 2005 15:27:03 +0000 (15:27 +0000)] 
Fix non-threaded global stuff.

Add missing libraries for test programs.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4686 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoMore work on on-line API help, testing.
mike [Thu, 22 Sep 2005 11:52:38 +0000 (11:52 +0000)] 
More work on on-line API help, testing.

cgi-bin/help.c:
    - main(): Add support for PATH_INFO to aid debugging.

cups/http.c:
    - http_write(), http_write_chunk(): Mark as static.

doc/help/api-filedir.html:
    - Updated.

doc/help/api-filter.html:
doc/help/api-httpipp.html:
    - Added.

scheduler/client.c:
    - WriteClient(): Flush output before final 0 chunk.

test/run-stp-tests.sh:
    - Valgrind 3.0 renamed --logfile option to --log-file.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4685 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoUpdate API references and web help.
mike [Thu, 22 Sep 2005 02:15:56 +0000 (02:15 +0000)] 
Update API references and web help.

cgi-bin/help.c:
    - main(): Add PATH_INFO support.

cups/normalize.c:
cups/normalize.h:
    - Rename cups__cups_break_class_t to cups_break_class_t.

doc/cups.css:
    - Update table and list styles for on-line help.

doc/help/api-array.html:
doc/help/api-filedir.html:
doc/help/api-ppd.html:
    - Added separated API help files.

doc/help/apirm.html:
    - Removed.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4684 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoCleanup namespace so that private APIs and types use a leading underscore.
mike [Wed, 21 Sep 2005 22:17:44 +0000 (22:17 +0000)] 
Cleanup namespace so that private APIs and types use a leading underscore.

Add CUPS API reference manual file.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4683 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdded a new cups_array_t and cupsArray*() functions to the CUPS
mike [Wed, 21 Sep 2005 20:59:01 +0000 (20:59 +0000)] 
Added a new cups_array_t and cupsArray*() functions to the CUPS
API to support sorted lists of data.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4682 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix up parsing of client.conf and ~/.cupsrc files.
mike [Wed, 21 Sep 2005 09:32:25 +0000 (09:32 +0000)] 
Fix up parsing of client.conf and ~/.cupsrc files.

cups/usersys.c:
    - cupsEncryption(): Use cupsFileGetConf() to read config
      lines, and strcasecmp() to look for Encryption option.
    - cupsServer(): Use strcasecmp() to look for ServerName
      option.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4681 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoMake CUPS API threadsafe (STR #1276), replace FILE's with
mike [Wed, 21 Sep 2005 09:28:39 +0000 (09:28 +0000)] 
Make CUPS API threadsafe (STR #1276), replace FILE's with
cups_file_t's in several places, and drop CUPS_STRFTIME_FORMAT
usage.

cgi-bin/ipp-var.c:
    - ippSetCGIVars(): Use "%c" instead of CUPS_STRFTIME_FORMAT.

config.h.in:
    - Add HAVE_PTHREAD_H define.
    - Remote CUPS_STRFTIME_FORMAT define.

config-scripts/cups-common.m4:
    - Remove CUPS_STRFTIME_FORMAT definitions.

config-scripts/cups-threads.m4:
    - Added.

configure.in:
    - Include config-scripts/cups-threads.m4.

cups/emit.c:
    - Make PS code string a constant character array instead of a
      string pointer.

cups/globals.c:
cups/globals.h:
    - Added.

cups/http-addr.c:
    - httpGetHostByName(): Use _cupsGlobals() to get thread-local
      data.

cups/http.c:
    - httpGetDateString(): Use _cupsGlobals() to get thread-local
      data.

cups/ipp.c:
    - General documentation cleanup.
    - ippDateToTime(): Use _cupsGlobals() to get thread-local
      data.
    - ippDeleteAttribute(): Implemented.

cups/ipp-support.c:
    - ippErrorString(), ippOpString(), ippPort(), ippSetPort():
      Use _cupsGlobals() to get thread-local data.

cups/language.c:
    - cupsLangFlush(), cupsLangGet(), appleLangDefault(): Use
      _cupsGlobals() to get thread-local data.

cups/normalize.c:
    - cupsNormalizeMapsGet(), cupsNormalizeMapsFree(),
      cupsNormalizeMapsFlush(), cupsUTF32Normalize(),
      cupsUTF32CaseFold(): Use _cupsGlobals() to get thread-local
      data.
    - get_general_category(), get_bidi_category(),
      get_combining_class(), get_break_class(), get_normmap(),
      get_foldmap(), get_propmap(), get_combmap(),
      get_breakmap(): Use _cupsGlobals() to get thread-local
      data, and use cups_file_t and associated functions instead
      of stdio.

cups/ppd.c:
    - ppdLastError(), ppdOpen2(), ppdOpenFd(),
      ppdSetConformance(): Use _cupsGlobals() to get thread-local
      data.
    - ppdOpenFile(): Use _cupsGlobals() to get thread-local data,
      and use cups_file_t and associated functions instead of
      stdio.
    - ppd_get_group(), ppd_read(): Add and use cups_globals_t
      pointer argument for thread-local data.

cups/tempfile.c:
    - cupsTempFd(): Drop allocation of static filename buffer.
    - cupsTempFile(): Use _cupsGlobals() to get thread-local
      filename buffer.

cups/transcode.c:
    - cupsCharmapFree(), cupsCharmapFlush(): Use _cupsGlobals()
      to get thread-local data.
    - get_sbcs_charmap(), get_vbcs_charmap(): Use _cupsGlobals()
      to get thread-local data, and use cups_file_t and
      associated functions instead of stdio.

cups/usersys.c:
    - cupsEncryption(), cupsServer(): Use _cupsGlobals() to get
      thread-local data, and use cups_file_t and associated
      functions instead of stdio.
    - cupsSetEncryption(), cupsSetPasswordCB(), cupsSetServer(),
      cupsSetUser(), cupsUser(): Use _cupsGlobals() to get
      thread-local data.

cups/util.c:
    - cupsCancelJob(), cupsDoFileRequest(), cupsGetClasses(),
      cupsGetDefault(), cupsGetDefault2(), cupsGetJobs(),
      cupsGetJobs2(), cupsGetPPD(), cupsGetPPD2(),
      cupsGetPrinters(), cupsPrintFiles(), cupsPrintFiles2(),
      cups_connect(): Use _cupsGlobals() to get thread-local
      data.

filter/hpgl-prolog.c:
    - OutputProlog(): Use "%c" instead of CUPS_STRFTIME_FORMAT.

filter/imagetops.c:
    - main(): Use "%c" instead of CUPS_STRFTIME_FORMAT.

filter/texttops.c:
    - WriteProlog(): Use "%c" instead of CUPS_STRFTIME_FORMAT.

scheduler/classes.c:
    - SaveAllClasses(): Use "%c" instead of CUPS_STRFTIME_FORMAT.

scheduler/printers.c:
    - SaveAllPrinters(): Use "%c" instead of CUPS_STRFTIME_FORMAT.

scheduler/subscriptions.c:
    - SaveAllSubscriptions(): Use "%c" instead of CUPS_STRFTIME_FORMAT.

systemv/lpstat.c:
    - show_jobs(): Use "%c" instead of CUPS_STRFTIME_FORMAT.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4680 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoUpdate sample cupsd.conf file and web interface to use the correct policy
mike [Tue, 20 Sep 2005 16:02:54 +0000 (16:02 +0000)] 
Update sample cupsd.conf file and web interface to use the correct policy
syntax, and fix some other bugs.

cgi-bin/admin.c:
    - do_config_server(): Update policy generation code to use
      new syntax, use "Listen *:631" instead of "Port 631", and
      add indentation support to the output for nicer config
      files.

conf/cupsd.conf.in:
templates/edit-config.tmpl.in:
    - Add Location /, Location /admin, and the default policy
      stuff to make setup easier and clearer.

scheduler/client.c:
    - AcceptClient(): Always set hostname pointer after a lookup.

scheduler/conf.c:
    - ReadConfiguration(): Change default policy to use "Order
      deny,allow" so that the access control limits can be set
      exclusively using the Location directive by default.

scheduler/listen.c:
    - StartListening(): Move IPv4 fallback code to the socket
      creation section - otherwise it doesn't actually get used
      on a system that is not configured with IPv6 support.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4679 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoCleanup code formatting...
mike [Tue, 20 Sep 2005 14:10:51 +0000 (14:10 +0000)] 
Cleanup code formatting...

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4678 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdded "media" option support for EFI EFMediaType option (STR
mike [Mon, 19 Sep 2005 03:04:49 +0000 (03:04 +0000)] 
Added "media" option support for EFI EFMediaType option (STR
#902)

cups/options.c:
    - cupsMarkOptions(): Add EFMediaType to list of media options.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4677 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix buffered write implementation...
mike [Mon, 19 Sep 2005 02:53:06 +0000 (02:53 +0000)] 
Fix buffered write implementation...

cups/http.c:
    - Sort functions by name...
    - httpFlushWrite(): Return the number of bytes flushed.
    - httpPrintf(): Do no cache printf's.
    - http_write(), http_write_chunk(): Add

cups/http.h:
    - Change httpFlushWrite() to return an int.

scheduler/client.c:
    - WriteClient(): Increase write buffer to 16k, and don't
      bother flushing the cache.
    - get_file(): Set data_remaining to the file size.

scheduler/printers.c:
    - LoadAllPrinters(): Fix typo (backends->backend)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4676 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdded write buffering to the HTTP code to improve performance
mike [Sun, 18 Sep 2005 23:58:56 +0000 (23:58 +0000)] 
Added write buffering to the HTTP code to improve performance
(STR #547)

The scheduler now uses the attributes-natural-language attribute
to localize banner pages (STR #386)

cups/http.c:
    - httpFlushWrite(): Added.
    - httpWrite(): Use write buffer for small writes.
    - httpPrintf(): Use write buffer for small writes.
    - httpUpdate(): Flush write buffer as needed.

cups/http.h:
    - Change buffer size to 1024 bytes.
    - Add wbuffer and wused fields to http_t structure.
    - Add httpFlushWrite() function.

scheduler/client.c:
    - CloseClient(): Flush write buffer as needed.
    - WriteClient(): Flush write buffer as needed.

scheduler/ipp.c:
    - copy_banner(): Use attributes-natural-language instead of
      con->language to localize banners.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4675 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe scheduler now returns the address that was used to connect to
mike [Sun, 18 Sep 2005 05:43:46 +0000 (05:43 +0000)] 
The scheduler now returns the address that was used to connect to
it (STR #1076)

scheduler/client.c:
    - AcceptClient(): Set servername and serverport.

scheduler/client.h:
    - Add servername and serverport to client_t.

scheduler/conf.c:
    - read_configuration(): Fix reporting of domain socket listen.

scheduler/ipp.c:
    - get_default(), get_printer_attrs(), get_printers(): Use
      servername and  serverport to create dynamic printer URI.

scheduler/printers.c:
    - SetPrinterAttrs(): only set printer-uri-supported for
      remote printers.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4674 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoDrop rastertortl filter (superceded by DDK driver...)
mike [Sun, 18 Sep 2005 04:28:54 +0000 (04:28 +0000)] 
Drop rastertortl filter (superceded by DDK driver...)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4673 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFixed a problem with N-up printing and OpenOffice (STR #576)
mike [Sun, 18 Sep 2005 04:25:46 +0000 (04:25 +0000)] 
Fixed a problem with N-up printing and OpenOffice (STR #576)

filter/pstops.c:
    - main(): Look for BeginFeature inside a page, and strip out
      feature code when N-up > 1.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4672 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdded support for the GCC position independent executable options
mike [Sun, 18 Sep 2005 04:12:48 +0000 (04:12 +0000)] 
Added support for the GCC position independent executable options
(STR #1209)

Fix missing reference to RGBW colorspace.

config-scripts/cups-compiler.m4:
    - Add configure check for -fpie compiler option when
      compiling with GCC.

filter/raster.c:
    - cups_update_raster(): Add RGBW colorspace.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4671 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdded new BrowseLocalProtocols and BrowseRemoteProtocols
mike [Sun, 18 Sep 2005 00:40:01 +0000 (00:40 +0000)] 
Added new BrowseLocalProtocols and BrowseRemoteProtocols
directives to cupsd.conf, allowing for different browse protocols
for local and remote printers (STR #877)

man/cupsd.conf.man:
    - Add new directives.

scheduler/conf.c:
    - ReadConfiguration(): Initialize BrowseLocalProtocols and
      BrowseRemoteProtocols.
    - read_configuration(): Add support for BrowseLocalProtocols
      and BrowseRemoteProtocols.

scheduler/dirsvc.c:
    - SendBrowseDelete(): Use BrowseLocalProtocols.
    - SendBrowseList(): Use BrowseLocalProtocols.
    - StartBrowsing(): Use BrowseLocalProtocols and
      BrowseRemoteProtocols.
    - StopBrowsing(): Use BrowseLocalProtocols and
      BrowseRemoteProtocols.

scheduler/dirsvc.h:
    - Add BrowseLocalProtocols and BrowseRemoteProtocols.
    - Remove BrowseProtocols.

scheduler/main.c:
    - main(): Use BrowseLocalProtocols and
      BrowseRemoteProtocols.
    - select_timeout(): Use BrowseLocalProtocols.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4670 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoPPD files can now contain strings up to 256k in length (STR
mike [Sun, 18 Sep 2005 00:00:35 +0000 (00:00 +0000)] 
PPD files can now contain strings up to 256k in length (STR
#1215)

cups/ppd.c:
    - ppd_read(): Dynamically allocate line array, capping at
      256k.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4669 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe pstops filter now supports the IncludeFeature DSC comment
mike [Sat, 17 Sep 2005 23:47:26 +0000 (23:47 +0000)] 
The pstops filter now supports the IncludeFeature DSC comment
(STR #1212)

filter/pstops.c:
    - main(): Call include_feature() as needed to handle DSC
      comments.
    - include_feature(): Added.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4668 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoQuick syslog cleanup.
mike [Sat, 17 Sep 2005 23:26:30 +0000 (23:26 +0000)] 
Quick syslog cleanup.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4667 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe pstops filter now disables the setpagedevice procedure when
mike [Sat, 17 Sep 2005 23:19:39 +0000 (23:19 +0000)] 
The pstops filter now disables the setpagedevice procedure when
doing N-up printing (STR #1161)

filter/pstops.c:
    - do_setup(): Disable setpagedevice if NUp > 1.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4666 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe serial backend now supports "stop=1", "stop=2",
mike [Sat, 17 Sep 2005 23:13:56 +0000 (23:13 +0000)] 
The serial backend now supports "stop=1", "stop=2",
"parity=space", and "parity=mark" options (STR #1155)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4665 7a7537e8-13f0-0310-91df-b6672ffda945

19 years ago"make install" no longer overwrites an existing PAM configuration
mike [Sat, 17 Sep 2005 22:56:56 +0000 (22:56 +0000)] 
"make install" no longer overwrites an existing PAM configuration
file (STR #1064)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4664 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe scheduler now closes all files on startup when run in daemon
mike [Sat, 17 Sep 2005 22:44:31 +0000 (22:44 +0000)] 
The scheduler now closes all files on startup when run in daemon
mode (STR #1009)

scheduler/main.c:
    - main(): Add loop to close all files (0 to current FD limit)
      instead of just closing FD's 0, 1, and 2.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4663 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdded a new RGBW colorspace to the CUPS raster format
mike [Sat, 17 Sep 2005 22:40:27 +0000 (22:40 +0000)] 
Added a new RGBW colorspace to the CUPS raster format
(STR #1071)

filter/imagetoraster.c:
    - main(): Add CUPS_CSPACE_RGBW support - works just like
      CUPS_CSPACE_RGBA for image printing.

filter/raster.h:
    - Add CUPS_CSPACE_RGBW colorspace value.
    - Update documentation/comments.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4662 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe pdftops filter now sets the page size based on the media box
mike [Sat, 17 Sep 2005 16:24:07 +0000 (16:24 +0000)] 
The pdftops filter now sets the page size based on the media box
when not scaling the output (STR #912)

The pdftops filter now supports masked images (STR #281)

The pdftops filter produced large output when rendering PDF files
containing lot of repeated images (STR #327)

pdftops/PSOutputDev.cxx:
    - startPage(): Set paperWidth and paperHeight if no scaling...

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4661 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe pdftops filter now minimizes print processing of PDF files
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.

pdftops/PSOutputDev.h:
    - startPage(): Change to return GBool.
    - PSOutputDev(), init(): Add pageRangesA argument.
    - Add pageRanges member.
    - Add checkRange() method.

pdftops/SplashOutputDev.cxx
    - startPage(): Return gTrue.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4660 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoMerge Xpdf 3.01 code.
mike [Sat, 17 Sep 2005 14:52:15 +0000 (14:52 +0000)] 
Merge Xpdf 3.01 code.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4659 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdded new cupsBackchannelRead() and cupsBackchannelWrite()
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.

backend/serial.c:
    - main(): Add backchannel support.

backend/socket.c:
    - main(): Add backchannel support.

backend/usb-unix.c:
    - print_device(): Add backchannel support, and check for
      ENOSPC error.

cups/backchannel.c:
    - Add cupsBackchannelRead() and cupsBackchannelWrite() functions.

cups/cups.h:
    - Add cupsBackchannelRead() and cupsBackchannelWrite() functions.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4658 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe "lpc" command now supports the "status all" command (STR
mike [Fri, 16 Sep 2005 21:50:48 +0000 (21:50 +0000)] 
The "lpc" command now supports the "status all" command (STR
#1004)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4657 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdd a workaround for Linux's buggy getaddrinfo() function.
mike [Fri, 16 Sep 2005 21:46:06 +0000 (21:46 +0000)] 
Add a workaround for Linux's buggy getaddrinfo() function.

cups/http-addr.c:
    - httpGetHostByName(): Limit AF_INET addresses to 4 bytes,
      even if getaddrinfo() says the address length is 16 bytes.

cups/testhttp.c:
    - main(): Add address function tests.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4656 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAllow IPv4 connections to IPv6 loopback and wildcard addresses.
mike [Fri, 16 Sep 2005 21:11:16 +0000 (21:11 +0000)] 
Allow IPv4 connections to IPv6 loopback and wildcard addresses.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4655 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoOSX compile fixes.
mike [Fri, 16 Sep 2005 20:51:20 +0000 (20:51 +0000)] 
OSX compile fixes.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4654 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix up IPv6 support, and remove remaining dirent checks.
mike [Fri, 16 Sep 2005 20:13:58 +0000 (20:13 +0000)] 
Fix up IPv6 support, and remove remaining dirent checks.

backend/lpd.c:
    - lpd_queue(): Use http_addr_t, httpAddrLoad(), and loop
      through addresses.

backend/socket.c:
    - main(): Use http_addr_t, httpAddrLoad(), and loop through
      addresses.

config.h.in:
    - Add HAVE_GETADDRINFO.
    - Replace HAVE_RRESVPORT with HAVE_RRESVPORT_AF.
    - Remove dirent defines.

config-scripts/cups-common.m4:
    - Remove AC_DIRENT.

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.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4653 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoippReadIO() did not read collections properly (STR #1249)
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.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4652 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe "make test" script now creates the test files in
mike [Fri, 16 Sep 2005 00:13:03 +0000 (00:13 +0000)] 
The "make test" script now creates the test files in
"/tmp/cups-$USER" instead of "/tmp/$USER" (STR #981)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4651 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAll backends now abort on error when printing a job to a class -
mike [Thu, 15 Sep 2005 20:30:42 +0000 (20:30 +0000)] 
All backends now abort on error when printing a job to a class -
this allows the next printer in the class to print the job (STR
#1084)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4650 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe scheduler now verifies that a printer supports Letter or A4
mike [Thu, 15 Sep 2005 20:16:59 +0000 (20:16 +0000)] 
The scheduler now verifies that a printer supports Letter or A4
media sizes before setting them as the initial default (STR
#1250)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4649 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe cupstestppd program now flags bad Resolution options (STR
mike [Thu, 15 Sep 2005 19:31:32 +0000 (19:31 +0000)] 
The cupstestppd program now flags bad Resolution options (STR
#1269)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4648 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe USB backend now retries printing when the printer is
mike [Thu, 15 Sep 2005 19:15:32 +0000 (19:15 +0000)] 
The USB backend now retries printing when the printer is
disconnected or turned off (STR #1267)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4647 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdded new httpGetHostname() function to CUPS API, and use it
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)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4646 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe scheduler now stops printers if the backend for the queue is
mike [Thu, 15 Sep 2005 18:56:05 +0000 (18:56 +0000)] 
The scheduler now stops printers if the backend for the queue is
missing on startup (STR #1265)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4645 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe configure script now supports "--disable-library" to disable
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.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4644 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix address/count netmask problem in 1.2 (STR #1257)
mike [Thu, 15 Sep 2005 18:09:46 +0000 (18:09 +0000)] 
Fix address/count netmask problem in 1.2 (STR #1257)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4643 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe IPP backend did not always report on the total number of
mike [Thu, 15 Sep 2005 17:27:19 +0000 (17:27 +0000)] 
The IPP backend did not always report on the total number of
pages that were printed (STR #1251)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4642 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe lpstat program could display garbage date and time values for
mike [Thu, 15 Sep 2005 17:23:36 +0000 (17:23 +0000)] 
The lpstat program could display garbage date and time values for
locales whose date format exceeded 31 characters (STR #1263)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4641 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoThe cupstestppd program would segfault when testing certain
mike [Thu, 15 Sep 2005 17:20:24 +0000 (17:20 +0000)] 
The cupstestppd program would segfault when testing certain
broken PPD files (STR #1268)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4640 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix inefficient class management issues.
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.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4639 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoChange CUPS_PRINTER_SHARED to CUPS_PRINTER_NOT_SHARED so that we are still
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.

cups/cups.h:
    - CUPS_PRINTER_SHARED -> CUPS_PRINTER_NOT_SHARED.

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)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4638 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdd httpGetDateString2() API to replace httpGetDateString(). The new
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.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4637 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoRewrite httpGetDateTime() to not use mktime(), since that function uses
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.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4636 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoDrop CUPS-Add-Device and CUPS-Delete-Device, and clean up bad operation
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.

scheduler/policy.c:
    - cupsdFindPolicyOp(): Add debug2 log messages.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4635 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoCheck for "All" operation in policy Limit separately.
mike [Wed, 14 Sep 2005 12:30:12 +0000 (12:30 +0000)] 
Check for "All" operation in policy Limit separately.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4634 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix config files with leading spaces, and do testing for new
mike [Wed, 14 Sep 2005 02:04:15 +0000 (02:04 +0000)] 
Fix config files with leading spaces, and do testing for new
auth/policy stuff.

cups/file.c:
    - cupsFileGetConf(): Support leading whitespace on a line.

scheduler/policy.c:
    - cupsdAddPolicyOp(): Fix AuthType inheritance.

scheduler/auth.c:
    - cupsdIsAuthorized(): Add more debug stuff, and handle optional
      authentication for IPP operations.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4633 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix test suite to work with new policy stuff.
mike [Wed, 14 Sep 2005 00:31:14 +0000 (00:31 +0000)] 
Fix test suite to work with new policy stuff.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4632 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFinish policy update (now compiles... :)
mike [Wed, 14 Sep 2005 00:12:05 +0000 (00:12 +0000)] 
Finish policy update (now compiles... :)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4631 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoSave work on upgraded policy stuff (warning, integration is not yet completed
mike [Tue, 13 Sep 2005 21:06:17 +0000 (21:06 +0000)] 
Save work on upgraded policy stuff (warning, integration is not yet completed
and will not compile...)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4630 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoOnly add certificates for authenticated users and only add root
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.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4629 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix compiles on MacOS X.
mike [Mon, 5 Sep 2005 14:20:55 +0000 (14:20 +0000)] 
Fix compiles on MacOS X.

cups/dir.c:
    - Make sure PATH_MAX is defined.

scheduler/client.c:
    - Add missing status variable.

scheduler/conf.c:
    - Make CDSA function global.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4628 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdd CacheDir support and fix some web interface and authentication issues.
mike [Thu, 1 Sep 2005 20:51:08 +0000 (20:51 +0000)] 
Add CacheDir support and fix some web interface and authentication issues.

cgi-bin/admin.c:
    - do_am_printer(): Set ppd-make or requested-attributes when
      showing the lists of makes and models; this is a lot more
      efficient...

cgi-bin/ipp-var.c:
    - ippSetCGIVars(): Add debug fprintf's.

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/conf.h:
    - Add CacheDir variable.

scheduler/cups-driverd.c:
    - main(): Fix command-line processing.
    - list_ppds(): Add debug fprintf's.

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.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4627 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoUpdate default security configuration in cupsd.conf, add new
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.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4626 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix some web interface authentication issues.
mike [Wed, 31 Aug 2005 21:02:35 +0000 (21:02 +0000)] 
Fix some web interface authentication issues.

cgi-bin/html.c:
cgi-bin/var.c:
    - Log when we are asked for a password.

scheduler/client.c:
    - ReadClient(): Use Basic authentication when there are no
      locations defined (need to add a "DefaultAuthType"
      directive...)

scheduler/ipp.c:
    - send_error(): Send HTTP_UNAUTHORIZED HTTP status when user
      hasn't yet authenticated...

scheduler/policy.c:
    - check_group(): Code cleanup.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4625 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdd tools subdir to hold script tools for testing and creating
mike [Wed, 31 Aug 2005 20:29:03 +0000 (20:29 +0000)] 
Add tools subdir to hold script tools for testing and creating
releases.

tools/testrpm:
    - Export the current WC and build RPMs.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4624 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoUse /tmp instead of %{__tmppath}, which isn't universally defined...
mike [Wed, 31 Aug 2005 19:47:05 +0000 (19:47 +0000)] 
Use /tmp instead of %{__tmppath}, which isn't universally defined...

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4623 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoUpdate RPM spec file with stuff to make it more compatible with
mike [Wed, 31 Aug 2005 19:44:28 +0000 (19:44 +0000)] 
Update RPM spec file with stuff to make it more compatible with
Red Hat's version...

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4622 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoSet version number to "1.2svn" until we do a release.
mike [Wed, 31 Aug 2005 19:15:09 +0000 (19:15 +0000)] 
Set version number to "1.2svn" until we do a release.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4621 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoscheduler/client.c:
mike [Wed, 31 Aug 2005 18:17:28 +0000 (18:17 +0000)] 
scheduler/client.c:
    - ReadClient(): Change "strcmp() == 0" to "!strcmp()"

scheduler/auth.c:
    - IsAuthorized: Allow access from local system when there is
      no matching location.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4620 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoMove /etc/cups/certs to /var/run/cups/certs.
mike [Tue, 30 Aug 2005 20:32:26 +0000 (20:32 +0000)] 
Move /etc/cups/certs to /var/run/cups/certs.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4619 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoMore "make install" fixes...
mike [Tue, 30 Aug 2005 20:30:14 +0000 (20:30 +0000)] 
More "make install" fixes...

Makedefs.in:
    - Add STATEDIR definition.

scheduler/Makefile:
    - Announce what is being installed.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4618 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoRemove the old one...
mike [Tue, 30 Aug 2005 20:21:04 +0000 (20:21 +0000)] 
Remove the old one...

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4617 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdd SLP include file (dunno why the "svn mv" didn't work for this one...)
mike [Tue, 30 Aug 2005 20:20:46 +0000 (20:20 +0000)] 
Add SLP include file (dunno why the "svn mv" didn't work for this one...)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4616 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoRename the SSL and SLP config scripts, since they are not
mike [Tue, 30 Aug 2005 20:13:19 +0000 (20:13 +0000)] 
Rename the SSL and SLP config scripts, since they are not
specific to a particular project.

Fix CUPS_FONTPATH and CUPS_LOCALEDIR definitions.

Default to supporting domain sockets, with the default domain socket
path = /var/run/cups/cups.sock, per FHS.

Properly install the state and cache directories, and ignore install
errors for the certs directory.

Change the encryption library check order to: CDSA, GNU TLS, and OpenSSL.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4615 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFinish up cups-driverd and fix some bugs.
mike [Tue, 30 Aug 2005 19:27:55 +0000 (19:27 +0000)] 
Finish up cups-driverd and fix some bugs.

cgi-bin/var.c:
    - Add missing include.

config.h.in:
config-scripts/cups-directories.m4:
    - Sort directory definitions and add CUPS_CACHEDIR.

cups/dir.c:
    - cupsDirRead(): Fix readdir_r() return value checks.
    - Add debug code.

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".

scheduler/printers.c:
    - SetPrinterAttrs(): Fix cupsPortMonitor loops.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4614 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoSave work on cups-driverd.c.
mike [Tue, 30 Aug 2005 12:41:48 +0000 (12:41 +0000)] 
Save work on cups-driverd.c.

Fix compile errors.

Set keyword substitution on all source files...

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4613 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoTweak file, directory, and PPD APIs, and save work on new cups-driverd.
mike [Tue, 30 Aug 2005 03:17:47 +0000 (03:17 +0000)] 
Tweak file, directory, and PPD APIs, and save work on new cups-driverd.

config-scripts/cups-compiler.m4:
    - Remove Wconversion option (too noisy)
    - Move -Wunused to additional development options.

cups/Makefile:
    - Remove current extended option code from build.

cups/dir.c:
cups/dir.h:
    - Change cups_dir_entry_t to cups_dentry_t.

cups/file.c:
cups/file.h:
    - Add cupsPeekChar() function.

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).

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4612 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdd new cupsDir*() functions, remove private file API header.
mike [Mon, 29 Aug 2005 07:19:08 +0000 (07:19 +0000)] 
Add new cupsDir*() functions, remove private file API header.

cups/dir.c:
cups/dir.h:
    - Added new cupsDir*() functions.

cups/file.c:
    - Move private definitions to this file and mark as private.

cups/file-private.h:
    - Removed.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4611 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdd port monitor support to scheduler.
mike [Sun, 28 Aug 2005 12:50:21 +0000 (12:50 +0000)] 
Add port monitor support to scheduler.

scheduler/ipp.c:
    - add_printer(): Validate port-monitor value against
      port-monitor-supported.

scheduler/job.c:
    - StartJob(): add CUPS_DOCROOT to environment and add port
      monitor to filter list, if configured.

scheduler/mime.h:
    - Fix mime_op_t comment formatting.

scheduler/printers.c:
    - DeletePrinter(): clear port monitor string.
    - LoadAllPrinters(): Read port monitor setting.
    - SaveAllPrinters(): Write port monitor setting.
    - SetPrinterAttrs(): Add port-monitor and port-monitor-supported
      attributes.

scheduler/printers.h:
    - printer_t: Add port_monitor member.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4610 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdd web interface for per-printer sharing via "Publish" and
mike [Sat, 27 Aug 2005 11:24:30 +0000 (11:24 +0000)] 
Add web interface for per-printer sharing via "Publish" and
"Unpublish" buttons.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4609 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix AND logic by adding reciprocal regex (word1 AND word2 OR word2 AND word1)
mike [Sat, 27 Aug 2005 03:40:05 +0000 (03:40 +0000)] 
Fix AND logic by adding reciprocal regex (word1 AND word2 OR word2 AND word1)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4608 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoAdd autoconf-generated RPM spec file.
mike [Sat, 27 Aug 2005 03:04:24 +0000 (03:04 +0000)] 
Add autoconf-generated RPM spec file.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4607 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoUse extended POSIX regular expressions.
mike [Fri, 26 Aug 2005 23:45:06 +0000 (23:45 +0000)] 
Use extended POSIX regular expressions.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4606 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoDon't install French man pages (for now)
mike [Fri, 26 Aug 2005 23:42:54 +0000 (23:42 +0000)] 
Don't install French man pages (for now)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4605 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix directories on Linux RPM installations.
mike [Fri, 26 Aug 2005 23:40:29 +0000 (23:40 +0000)] 
Fix directories on Linux RPM installations.

config-scripts/cups-directories.m4:
    - Prefer /etc/init.d over /etc/rc.d/init.d on Linux.

cups.spec:
    - enable and disable moved to /usr/sbin...
    - Remove French and Spanish man pages (for now)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4604 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFix "make install" target to install correct files.
mike [Fri, 26 Aug 2005 22:30:50 +0000 (22:30 +0000)] 
Fix "make install" target to install correct files.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4603 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoMake all HR's solid and thin.
mike [Fri, 26 Aug 2005 21:10:18 +0000 (21:10 +0000)] 
Make all HR's solid and thin.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4602 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoFinish up on-line help CGI...
mike [Fri, 26 Aug 2005 20:47:35 +0000 (20:47 +0000)] 
Finish up on-line help CGI...

cgi-bin/help.c:
    - Add file display, show links, and do searching.

cgi-bin/help-index.c:
    - Remove help_find_node().
    - Change helpFindNode() to return help_node_t **.
    - Cleanup helpSearchIndex() and use filename to limit search.
    - help_load_file(): Don't add empty targets,

cgi-bin/help-index.h:
    - Change helpFindNode() to return help_node_t **.

scheduler/client.c:
    - ReadClient(): fix /admin check.
    - get_file(): don't localize log files.

templates/help-header.tmpl
templates/help-trailer.tmpl
    - Added

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4601 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoImplement index search using regular expressions.
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()

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4600 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoSave work on help indexing, and remove use of NAMLEN macro.
mike [Fri, 26 Aug 2005 01:59:24 +0000 (01:59 +0000)] 
Save work on help indexing, and remove use of NAMLEN macro.

cgi-bin/help.c:
    - Remove old code.

cgi-bin/help-index.c:
    - Finish up implementation of all core routines except search.

cgi-bin/help-index.h:
    - Fix up includes.

cgi-bin/testhi.c:
    - Implement basic load tests.

cgi-bin/testhi.html:
    - Move anchors around to better test insertion sort.

scheduler/job.c:
scheduler/mime.c:
    - Use strlen() instead of NAMLEN macro.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4599 7a7537e8-13f0-0310-91df-b6672ffda945

19 years agoStart adding on-line help...
mike [Thu, 25 Aug 2005 21:36:26 +0000 (21:36 +0000)] 
Start adding on-line help...

Remove all of the workaround code for directory support - we'll stick
with the POSIX API on UNIX/Linux/OSX from now on...

cups/file.c:
cups/file.h:
    - Add cupsFileLock() and cupsFileUnlock() APIs.

cgi-bin/help.c:
cgi-bin/help-index.c:
cgi-bin/help-index.h:
cgi-bin/Makefile:
cgi-bin/testhi.c:
cgi-bin/testhi.html:
    - Add indexing code (still incomplete)
    - Add test program and data.

doc/help/*:
    - Add some basic reference files.

scheduler/banners.c:
scheduler/client.c:
scheduler/cups-deviced.c:
scheduler/cupsd.h:
scheduler/job.c:
scheduler/mime.c:
scheduler/ppds.c:
scheduler/util.h:
    - Use POSIX directory functions exclusively.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4598 7a7537e8-13f0-0310-91df-b6672ffda945