]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Import CUPS 1.4svn-r7041.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 22 Oct 2007 20:33:34 +0000 (20:33 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 22 Oct 2007 20:33:34 +0000 (20:33 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@520 a1ca3aef-8c08-0410-bb20-df032aa958be

23 files changed:
CHANGES-1.3.txt
Makedefs.in
conf/snmp.conf.in
cups/adminutil.h
cups/array.h
cups/backend.h
cups/cups.h
cups/dir.h
cups/file.h
cups/http-support.c
cups/http.h
cups/ipp.h
cups/ppd.h
cups/sidechannel.h
cups/transcode.h
doc/help/network.html
filter/image.h
filter/raster.h
man/cupsfilter.man
scheduler/auth.c
scheduler/client.h
scheduler/ipp.c
systemv/cupsaddsmb.c

index c71003c66449d95ae35396cdc73e22918abadcf4..a85d714221d063a261cab8a58d934f63eedd658c 100644 (file)
@@ -3,6 +3,17 @@ CHANGES-1.3.txt
 
 CHANGES IN CUPS V1.3.4
 
+       - Documentation updates (STR #2560, STR #2563)
+       - Multiple AuthTypes in cupsd.conf did not work (STR
+         #2545)
+       - The snmp.conf file referenced the wrong man page (STR
+         #2564)
+       - The cupsaddsmb program didn't handle domain sockets
+         properly (STR #2556)
+       - The scheduler now validates device URIs when adding
+         printers.
+       - Updated httpSeparateURI() to support hostnames with
+         the backslash character.
        - Updated the Japanese localization (STR #2546)
        - The parallel backend now gets the current IEEE-1284
          device ID string on Linux (STR #2553)
index 258d577b431e07aa41972c3e5864b8d2115ec8f0..c48f013f714ed1d40c4a07cb848db4b3967378e0 100644 (file)
@@ -113,11 +113,11 @@ ALL_CFLAGS        =       $(CFLAGS) $(SSLFLAGS) @LARGEFILE@ @PTHREAD_FLAGS@ \
 ARCHFLAGS      =       @ARCHFLAGS@
 ARFLAGS                =       @ARFLAGS@
 BACKLIBS       =       @BACKLIBS@
-CFLAGS         =       -I.. @CPPFLAGS@ @CFLAGS@ \
+CFLAGS         =       -I.. -D_CUPS_SOURCE @CPPFLAGS@ @CFLAGS@ \
                        @LARGEFILE@ @PTHREAD_FLAGS@ $(OPTIONS)
 COMMONLIBS     =       @LIBS@
 CUPSDLIBS      =       @CUPSDLIBS@
-CXXFLAGS       =       -I.. $(SSLFLAGS) @CPPFLAGS@ @CXXFLAGS@ \
+CXXFLAGS       =       -I.. -D_CUPS_SOURCE $(SSLFLAGS) @CPPFLAGS@ @CXXFLAGS@ \
                        @LARGEFILE@ @PTHREAD_FLAGS@ $(OPTIONS)
 CXXLIBS                =       @CXXLIBS@
 DSOFLAGS       =       @DSOFLAGS@
index a85dbc7c84cf95012cfbed0aa0693bac804b7bc5..af9aada8d9689d9662d39b833ecfaf61c75b3dc9 100644 (file)
@@ -1,7 +1,7 @@
 #
 # "$Id$"
 #
-#   Sample SNMP configuration file for CUPS.  See "man smnp.conf" for a
+#   Sample SNMP configuration file for CUPS.  See "man cups-smnp.conf" for a
 #   complete description of this file.
 #
 
index 94484fcc884f80c1999555aad685a1b29ae6ba5e..8613a3be4a2fa5e0bb8f9772a111859dab5ebe02 100644 (file)
@@ -58,16 +58,16 @@ extern int  cupsAdminExportSamba(const char *dest, const char *ppd,
                                     const char *samba_server,
                                     const char *samba_user,
                                     const char *samba_password,
-                                    FILE *logfile);
+                                    FILE *logfile) _CUPS_API_1_2;
 extern char    *cupsAdminCreateWindowsPPD(http_t *http, const char *dest,
-                                          char *buffer, int bufsize);
+                                          char *buffer, int bufsize) _CUPS_API_1_2;
 
 extern int     cupsAdminGetServerSettings(http_t *http,
                                           int *num_settings,
-                                          cups_option_t **settings);
+                                          cups_option_t **settings) _CUPS_API_1_3;
 extern int     cupsAdminSetServerSettings(http_t *http,
                                           int num_settings,
-                                          cups_option_t *settings);
+                                          cups_option_t *settings) _CUPS_API_1_3;
 
 
 #  ifdef __cplusplus
index 2d1b89f47fd5caecea0e6d4257d00cac07acedf6..74785a4c6929a2e3897a1bdaffcdc6561713220c 100644 (file)
@@ -22,6 +22,7 @@
  * Include necessary headers...
  */
 
+#  include "versioning.h"
 #  include <stdlib.h>
 
 
@@ -50,28 +51,28 @@ typedef int (*cups_ahash_func_t)(void *element, void *data);
  * Functions...
  */
 
-extern int             cupsArrayAdd(cups_array_t *a, void *e);
-extern void            cupsArrayClear(cups_array_t *a);
-extern int             cupsArrayCount(cups_array_t *a);
-extern void            *cupsArrayCurrent(cups_array_t *a);
-extern void            cupsArrayDelete(cups_array_t *a);
-extern cups_array_t    *cupsArrayDup(cups_array_t *a);
-extern void            *cupsArrayFind(cups_array_t *a, void *e);
-extern void            *cupsArrayFirst(cups_array_t *a);
-extern int             cupsArrayGetIndex(cups_array_t *a);
-extern int             cupsArrayGetInsert(cups_array_t *a);
-extern void            *cupsArrayIndex(cups_array_t *a, int n);
-extern int             cupsArrayInsert(cups_array_t *a, void *e);
-extern void            *cupsArrayLast(cups_array_t *a);
-extern cups_array_t    *cupsArrayNew(cups_array_func_t f, void *d);
+extern int             cupsArrayAdd(cups_array_t *a, void *e) _CUPS_API_1_2;
+extern void            cupsArrayClear(cups_array_t *a) _CUPS_API_1_2;
+extern int             cupsArrayCount(cups_array_t *a) _CUPS_API_1_2;
+extern void            *cupsArrayCurrent(cups_array_t *a) _CUPS_API_1_2;
+extern void            cupsArrayDelete(cups_array_t *a) _CUPS_API_1_2;
+extern cups_array_t    *cupsArrayDup(cups_array_t *a) _CUPS_API_1_2;
+extern void            *cupsArrayFind(cups_array_t *a, void *e) _CUPS_API_1_2;
+extern void            *cupsArrayFirst(cups_array_t *a) _CUPS_API_1_2;
+extern int             cupsArrayGetIndex(cups_array_t *a) _CUPS_API_1_3;
+extern int             cupsArrayGetInsert(cups_array_t *a) _CUPS_API_1_3;
+extern void            *cupsArrayIndex(cups_array_t *a, int n) _CUPS_API_1_2;
+extern int             cupsArrayInsert(cups_array_t *a, void *e) _CUPS_API_1_2;
+extern void            *cupsArrayLast(cups_array_t *a) _CUPS_API_1_2;
+extern cups_array_t    *cupsArrayNew(cups_array_func_t f, void *d) _CUPS_API_1_2;
 extern cups_array_t    *cupsArrayNew2(cups_array_func_t f, void *d,
-                                      cups_ahash_func_t h, int hsize);
-extern void            *cupsArrayNext(cups_array_t *a);
-extern void            *cupsArrayPrev(cups_array_t *a);
-extern int             cupsArrayRemove(cups_array_t *a, void *e);
-extern void            *cupsArrayRestore(cups_array_t *a);
-extern int             cupsArraySave(cups_array_t *a);
-extern void            *cupsArrayUserData(cups_array_t *a);
+                                      cups_ahash_func_t h, int hsize) _CUPS_API_1_3;
+extern void            *cupsArrayNext(cups_array_t *a) _CUPS_API_1_2;
+extern void            *cupsArrayPrev(cups_array_t *a) _CUPS_API_1_2;
+extern int             cupsArrayRemove(cups_array_t *a, void *e) _CUPS_API_1_2;
+extern void            *cupsArrayRestore(cups_array_t *a) _CUPS_API_1_2;
+extern int             cupsArraySave(cups_array_t *a) _CUPS_API_1_2;
+extern void            *cupsArrayUserData(cups_array_t *a) _CUPS_API_1_2;
 
 #  ifdef __cplusplus
 }
index 78081d4e5077f194ce765f4852e62db787fbf67b..5057f086fb5366917ad9057e57000907e8b0bd2c 100644 (file)
 #  define _CUPS_BACKEND_H_
 
 
+/*
+ * Include necessary headers...
+ */
+
+#  include "versioning.h"
+
+
 /*
  * Constants...
  */
@@ -38,7 +45,7 @@ typedef enum cups_backend_e           /**** Backend exit codes ****/
  * Prototypes...
  */
 
-extern const char      *cupsBackendDeviceURI(char **argv);
+extern const char      *cupsBackendDeviceURI(char **argv) _CUPS_API_1_2;
 
 
 #endif /* !_CUPS_BACKEND_H_ */
index 25807ab0acf45c600d6e9fef59f7859361a53f0d..7e48ea3af7aec0501cd2e50034ae979ffebd98f0 100644 (file)
@@ -194,64 +194,64 @@ extern const char *cupsUser(void);
 
 /**** New in CUPS 1.1.20 ****/
 extern int             cupsDoAuthentication(http_t *http, const char *method,
-                                            const char *resource);
+                                            const char *resource) _CUPS_API_1_1_20;
 extern http_status_t   cupsGetFile(http_t *http, const char *resource,
-                                   const char *filename);
+                                   const char *filename) _CUPS_API_1_1_20;
 extern http_status_t   cupsGetFd(http_t *http, const char *resource, int fd);
 extern http_status_t   cupsPutFile(http_t *http, const char *resource,
-                                   const char *filename);
-extern http_status_t   cupsPutFd(http_t *http, const char *resource, int fd);
+                                   const char *filename) _CUPS_API_1_1_20;
+extern http_status_t   cupsPutFd(http_t *http, const char *resource, int fd) _CUPS_API_1_1_20;
 
 /**** New in CUPS 1.1.21 ****/
-extern const char      *cupsGetDefault2(http_t *http);
-extern int             cupsGetDests2(http_t *http, cups_dest_t **dests);
+extern const char      *cupsGetDefault2(http_t *http) _CUPS_API_1_1_21;
+extern int             cupsGetDests2(http_t *http, cups_dest_t **dests) _CUPS_API_1_1_21;
 extern int             cupsGetJobs2(http_t *http, cups_job_t **jobs,
                                     const char *dest, int myjobs,
-                                    int completed);
-extern const char      *cupsGetPPD2(http_t *http, const char *printer);
+                                    int completed) _CUPS_API_1_1_21;
+extern const char      *cupsGetPPD2(http_t *http, const char *printer) _CUPS_API_1_1_21;
 extern int             cupsPrintFile2(http_t *http, const char *printer,
                                       const char *filename,
                                       const char *title, int num_options,
-                                      cups_option_t *options);
+                                      cups_option_t *options) _CUPS_API_1_1_21;
 extern int             cupsPrintFiles2(http_t *http, const char *printer,
                                        int num_files, const char **files,
                                        const char *title, int num_options,
-                                       cups_option_t *options);
+                                       cups_option_t *options) _CUPS_API_1_1_21;
 extern int             cupsSetDests2(http_t *http, int num_dests,
-                                     cups_dest_t *dests);
+                                     cups_dest_t *dests) _CUPS_API_1_1_21;
 
 /**** New in CUPS 1.2 ****/
 extern ssize_t         cupsBackChannelRead(char *buffer, size_t bytes,
-                                           double timeout);
+                                           double timeout) _CUPS_API_1_2;
 extern ssize_t         cupsBackChannelWrite(const char *buffer, size_t bytes,
-                                            double timeout);
+                                            double timeout) _CUPS_API_1_2;
 extern void            cupsEncodeOptions2(ipp_t *ipp, int num_options,
                                           cups_option_t *options,
-                                          ipp_tag_t group_tag);
-extern const char      *cupsLastErrorString(void);
-extern char            *cupsNotifySubject(cups_lang_t *lang, ipp_t *event);
-extern char            *cupsNotifyText(cups_lang_t *lang, ipp_t *event);
+                                          ipp_tag_t group_tag) _CUPS_API_1_2;
+extern const char      *cupsLastErrorString(void) _CUPS_API_1_2;
+extern char            *cupsNotifySubject(cups_lang_t *lang, ipp_t *event) _CUPS_API_1_2;
+extern char            *cupsNotifyText(cups_lang_t *lang, ipp_t *event) _CUPS_API_1_2;
 extern int             cupsRemoveOption(const char *name, int num_options,
-                                        cups_option_t **options);
-extern cups_file_t     *cupsTempFile2(char *filename, int len);
+                                        cups_option_t **options) _CUPS_API_1_2;
+extern cups_file_t     *cupsTempFile2(char *filename, int len) _CUPS_API_1_2;
 
 /**** New in CUPS 1.3 ****/
 extern ipp_t           *cupsDoIORequest(http_t *http, ipp_t *request,
                                         const char *resource, int infile,
-                                        int outfile);
-extern char            *cupsGetServerPPD(http_t *http, const char *name);
+                                        int outfile) _CUPS_API_1_3;
+extern char            *cupsGetServerPPD(http_t *http, const char *name) _CUPS_API_1_3;
 extern int             cupsRemoveDest(const char *name,
                                       const char *instance,
-                                      int num_dests, cups_dest_t **dests);
+                                      int num_dests, cups_dest_t **dests) _CUPS_API_1_3;
 extern void            cupsSetDefaultDest(const char *name,
                                           const char *instance,
                                           int num_dests,
-                                          cups_dest_t *dests);
+                                          cups_dest_t *dests) _CUPS_API_1_3;
 
 /**** New in CUPS 1.4 ****/
 extern http_status_t   cupsGetPPD3(http_t *http, const char *name,
                                    time_t *modtime, char *buffer,
-                                   size_t bufsize);
+                                   size_t bufsize) _CUPS_API_1_4;
 
 #  ifdef __cplusplus
 }
index 9b5eb3ceffe0bb6eae6bcf8ce4e540d487e23b6b..5a4f8d6d00bac8c37b93025df7b9bf0748dc101f 100644 (file)
@@ -23,6 +23,7 @@
  * Include necessary headers...
  */
 
+#  include "versioning.h"
 #  include <sys/stat.h>
 
 
@@ -52,10 +53,10 @@ typedef struct cups_dentry_s                /**** Directory entry type ****/
  * Prototypes...
  */
 
-extern void            cupsDirClose(cups_dir_t *dp);
-extern cups_dir_t      *cupsDirOpen(const char *directory);
-extern cups_dentry_t   *cupsDirRead(cups_dir_t *dp);
-extern void            cupsDirRewind(cups_dir_t *dp);
+extern void            cupsDirClose(cups_dir_t *dp) _CUPS_API_1_2;
+extern cups_dir_t      *cupsDirOpen(const char *directory) _CUPS_API_1_2;
+extern cups_dentry_t   *cupsDirRead(cups_dir_t *dp) _CUPS_API_1_2;
+extern void            cupsDirRewind(cups_dir_t *dp) _CUPS_API_1_2;
 
 
 #  ifdef __cplusplus
index 89b6c4079d0e25e9c81aa08f40f4d4643f121f50..a73d8fa58529f38d7cab311911afac1ed1ad9966 100644 (file)
@@ -26,6 +26,7 @@
  * Include necessary headers...
  */
 
+#  include "versioning.h"
 #  include <sys/types.h>
 #  if defined(WIN32) && !defined(__CUPS_SSIZE_T_DEFINED)
 #    define __CUPS_SSIZE_T_DEFINED
@@ -62,36 +63,36 @@ typedef struct _cups_file_s cups_file_t;/**** CUPS file type ****/
  * Prototypes...
  */
 
-extern int             cupsFileClose(cups_file_t *fp);
-extern int             cupsFileCompression(cups_file_t *fp);
-extern int             cupsFileEOF(cups_file_t *fp);
+extern int             cupsFileClose(cups_file_t *fp) _CUPS_API_1_2;
+extern int             cupsFileCompression(cups_file_t *fp) _CUPS_API_1_2;
+extern int             cupsFileEOF(cups_file_t *fp) _CUPS_API_1_2;
 extern const char      *cupsFileFind(const char *filename, const char *path,
                                      int executable, char *buffer,
-                                     int bufsize);
-extern int             cupsFileFlush(cups_file_t *fp);
-extern int             cupsFileGetChar(cups_file_t *fp);
+                                     int bufsize) _CUPS_API_1_2;
+extern int             cupsFileFlush(cups_file_t *fp) _CUPS_API_1_2;
+extern int             cupsFileGetChar(cups_file_t *fp) _CUPS_API_1_2;
 extern char            *cupsFileGetConf(cups_file_t *fp, char *buf, size_t buflen,
-                                        char **value, int *linenum);
+                                        char **value, int *linenum) _CUPS_API_1_2;
 extern size_t          cupsFileGetLine(cups_file_t *fp, char *buf,
-                                       size_t buflen);
-extern char            *cupsFileGets(cups_file_t *fp, char *buf, size_t buflen);
-extern int             cupsFileLock(cups_file_t *fp, int block);
-extern int             cupsFileNumber(cups_file_t *fp);
-extern cups_file_t     *cupsFileOpen(const char *filename, const char *mode);
-extern cups_file_t     *cupsFileOpenFd(int fd, const char *mode);
-extern int             cupsFilePeekChar(cups_file_t *fp);
-extern int             cupsFilePrintf(cups_file_t *fp, const char *format, ...);
-extern int             cupsFilePutChar(cups_file_t *fp, int c);
-extern int             cupsFilePuts(cups_file_t *fp, const char *s);
-extern ssize_t         cupsFileRead(cups_file_t *fp, char *buf, size_t bytes);
-extern off_t           cupsFileRewind(cups_file_t *fp);
-extern off_t           cupsFileSeek(cups_file_t *fp, off_t pos);
-extern cups_file_t     *cupsFileStderr(void);
-extern cups_file_t     *cupsFileStdin(void);
-extern cups_file_t     *cupsFileStdout(void);
-extern off_t           cupsFileTell(cups_file_t *fp);
-extern int             cupsFileUnlock(cups_file_t *fp);
-extern ssize_t         cupsFileWrite(cups_file_t *fp, const char *buf, size_t bytes);
+                                       size_t buflen) _CUPS_API_1_2;
+extern char            *cupsFileGets(cups_file_t *fp, char *buf, size_t buflen) _CUPS_API_1_2;
+extern int             cupsFileLock(cups_file_t *fp, int block) _CUPS_API_1_2;
+extern int             cupsFileNumber(cups_file_t *fp) _CUPS_API_1_2;
+extern cups_file_t     *cupsFileOpen(const char *filename, const char *mode) _CUPS_API_1_2;
+extern cups_file_t     *cupsFileOpenFd(int fd, const char *mode) _CUPS_API_1_2;
+extern int             cupsFilePeekChar(cups_file_t *fp) _CUPS_API_1_2;
+extern int             cupsFilePrintf(cups_file_t *fp, const char *format, ...) _CUPS_API_1_2;
+extern int             cupsFilePutChar(cups_file_t *fp, int c) _CUPS_API_1_2;
+extern int             cupsFilePuts(cups_file_t *fp, const char *s) _CUPS_API_1_2;
+extern ssize_t         cupsFileRead(cups_file_t *fp, char *buf, size_t bytes) _CUPS_API_1_2;
+extern off_t           cupsFileRewind(cups_file_t *fp) _CUPS_API_1_2;
+extern off_t           cupsFileSeek(cups_file_t *fp, off_t pos) _CUPS_API_1_2;
+extern cups_file_t     *cupsFileStderr(void) _CUPS_API_1_2;
+extern cups_file_t     *cupsFileStdin(void) _CUPS_API_1_2;
+extern cups_file_t     *cupsFileStdout(void) _CUPS_API_1_2;
+extern off_t           cupsFileTell(cups_file_t *fp) _CUPS_API_1_2;
+extern int             cupsFileUnlock(cups_file_t *fp) _CUPS_API_1_2;
+extern ssize_t         cupsFileWrite(cups_file_t *fp, const char *buf, size_t bytes) _CUPS_API_1_2;
 
 
 #  ifdef __cplusplus
index 3382d483d89693a1637cd6559efc8d7af676269a..3a6aee436385374a1faea0f4c4ca5c7e5fe88ba2 100644 (file)
@@ -1016,7 +1016,7 @@ httpSeparateURI(
                         "0123456789"
                         "-._~"
                         "%"
-                        "!$&'()*+,;=", *ptr))
+                        "!$&'()*+,;=\\", *ptr))
        {
          *host = '\0';
          return (HTTP_URI_BAD_HOSTNAME);
index 2e765c40e00a82271ab18b21984a501354510cc4..552bab98afcff7cf42c6099a877829ceee28dfec 100644 (file)
@@ -23,6 +23,7 @@
  * Include necessary headers...
  */
 
+#  include "versioning.h"
 #  include <string.h>
 #  include <time.h>
 #  include <sys/types.h>
@@ -60,17 +61,6 @@ typedef off_t ssize_t;                       /* @private@ */
 #    endif /* LOCAL_PEERCRED && !SO_PEERCRED */
 #  endif /* WIN32 */
 
-/*
- * With GCC 3.0 and higher, we can mark old APIs "deprecated" so you get
- * a warning at compile-time.
- */
-
-#  if defined(__GNUC__) && __GNUC__ > 2
-#    define _HTTP_DEPRECATED __attribute__ ((__deprecated__))
-#  else
-#    define _HTTP_DEPRECATED
-#  endif /* __GNUC__ && __GNUC__ > 2 */
-
 
 /*
  * C++ magic...
@@ -358,20 +348,20 @@ __attribute__ ((__format__ (__printf__, 2, 3)))
 #  endif /* __GNUC__ */
 ;
 extern int             httpPut(http_t *http, const char *uri);
-extern int             httpRead(http_t *http, char *buffer, int length) _HTTP_DEPRECATED;
+extern int             httpRead(http_t *http, char *buffer, int length) _CUPS_DEPRECATED;
 extern int             httpReconnect(http_t *http);
 extern void            httpSeparate(const char *uri, char *method,
                                     char *username, char *host, int *port,
-                                    char *resource) _HTTP_DEPRECATED;
+                                    char *resource) _CUPS_DEPRECATED;
 extern void            httpSetField(http_t *http, http_field_t field,
                                     const char *value);
 extern const char      *httpStatus(http_status_t status);
 extern int             httpTrace(http_t *http, const char *uri);
 extern http_status_t   httpUpdate(http_t *http);
-extern int             httpWrite(http_t *http, const char *buffer, int length) _HTTP_DEPRECATED;
-extern char            *httpEncode64(char *out, const char *in) _HTTP_DEPRECATED;
-extern char            *httpDecode64(char *out, const char *in) _HTTP_DEPRECATED;
-extern int             httpGetLength(http_t *http) _HTTP_DEPRECATED;
+extern int             httpWrite(http_t *http, const char *buffer, int length) _CUPS_DEPRECATED;
+extern char            *httpEncode64(char *out, const char *in) _CUPS_DEPRECATED;
+extern char            *httpDecode64(char *out, const char *in) _CUPS_DEPRECATED;
+extern int             httpGetLength(http_t *http) _CUPS_DEPRECATED;
 extern char            *httpMD5(const char *, const char *, const char *,
                                 char [33]);
 extern char            *httpMD5Final(const char *, const char *, const char *,
@@ -379,73 +369,73 @@ extern char               *httpMD5Final(const char *, const char *, const char *,
 extern char            *httpMD5String(const unsigned char *, char [33]);
 
 /**** New in CUPS 1.1.19 ****/
-extern void            httpClearCookie(http_t *http);
-extern const char      *httpGetCookie(http_t *http);
-extern void            httpSetCookie(http_t *http, const char *cookie);
-extern int             httpWait(http_t *http, int msec);
+extern void            httpClearCookie(http_t *http) _CUPS_API_1_1_19;
+extern const char      *httpGetCookie(http_t *http) _CUPS_API_1_1_19;
+extern void            httpSetCookie(http_t *http, const char *cookie) _CUPS_API_1_1_19;
+extern int             httpWait(http_t *http, int msec) _CUPS_API_1_1_19;
 
 /**** New in CUPS 1.1.21 ****/
-extern char            *httpDecode64_2(char *out, int *outlen, const char *in);
+extern char            *httpDecode64_2(char *out, int *outlen, const char *in) _CUPS_API_1_1_21;
 extern char            *httpEncode64_2(char *out, int outlen, const char *in,
-                                       int inlen);
+                                       int inlen) _CUPS_API_1_1_21;
 extern void            httpSeparate2(const char *uri,
                                      char *method, int methodlen,
                                      char *username, int usernamelen,
                                      char *host, int hostlen, int *port,
-                                     char *resource, int resourcelen) _HTTP_DEPRECATED;
+                                     char *resource, int resourcelen) _CUPS_DEPRECATED;
 
 /**** New in CUPS 1.2 ****/
-extern int             httpAddrAny(const http_addr_t *addr);
-extern http_addrlist_t *httpAddrConnect(http_addrlist_t *addrlist, int *sock);
+extern int             httpAddrAny(const http_addr_t *addr) _CUPS_API_1_2;
+extern http_addrlist_t *httpAddrConnect(http_addrlist_t *addrlist, int *sock) _CUPS_API_1_2;
 extern int             httpAddrEqual(const http_addr_t *addr1,
-                                     const http_addr_t *addr2);
-extern void            httpAddrFreeList(http_addrlist_t *addrlist);
+                                     const http_addr_t *addr2) _CUPS_API_1_2;
+extern void            httpAddrFreeList(http_addrlist_t *addrlist) _CUPS_API_1_2;
 extern http_addrlist_t *httpAddrGetList(const char *hostname, int family,
-                                        const char *service);
-extern int             httpAddrLength(const http_addr_t *addr);
-extern int             httpAddrLocalhost(const http_addr_t *addr);
+                                        const char *service) _CUPS_API_1_2;
+extern int             httpAddrLength(const http_addr_t *addr) _CUPS_API_1_2;
+extern int             httpAddrLocalhost(const http_addr_t *addr) _CUPS_API_1_2;
 extern char            *httpAddrLookup(const http_addr_t *addr,
-                                        char *name, int namelen);
+                                        char *name, int namelen) _CUPS_API_1_2;
 extern char            *httpAddrString(const http_addr_t *addr,
-                                       char *s, int slen);
+                                       char *s, int slen) _CUPS_API_1_2;
 extern http_uri_status_t httpAssembleURI(http_uri_coding_t encoding,
                                         char *uri, int urilen,
                                         const char *scheme,
                                         const char *username,
                                         const char *host, int port,
-                                        const char *resource);
+                                        const char *resource) _CUPS_API_1_2;
 extern http_uri_status_t httpAssembleURIf(http_uri_coding_t encoding,
                                          char *uri, int urilen,
                                          const char *scheme,
                                          const char *username,
                                          const char *host, int port,
-                                         const char *resourcef, ...);
-extern int             httpFlushWrite(http_t *http);
-extern int             httpGetBlocking(http_t *http);
-extern const char      *httpGetDateString2(time_t t, char *s, int slen);
-extern int             httpGetFd(http_t *http);
-extern const char      *httpGetHostname(http_t *http, char *s, int slen);
-extern off_t           httpGetLength2(http_t *http);
-extern http_status_t   httpGetStatus(http_t *http);
+                                         const char *resourcef, ...) _CUPS_API_1_2;
+extern int             httpFlushWrite(http_t *http) _CUPS_API_1_2;
+extern int             httpGetBlocking(http_t *http) _CUPS_API_1_2;
+extern const char      *httpGetDateString2(time_t t, char *s, int slen) _CUPS_API_1_2;
+extern int             httpGetFd(http_t *http) _CUPS_API_1_2;
+extern const char      *httpGetHostname(http_t *http, char *s, int slen) _CUPS_API_1_2;
+extern off_t           httpGetLength2(http_t *http) _CUPS_API_1_2;
+extern http_status_t   httpGetStatus(http_t *http) _CUPS_API_1_2;
 extern char            *httpGetSubField2(http_t *http, http_field_t field,
                                          const char *name, char *value,
-                                         int valuelen);
-extern ssize_t         httpRead2(http_t *http, char *buffer, size_t length);
+                                         int valuelen) _CUPS_API_1_2;
+extern ssize_t         httpRead2(http_t *http, char *buffer, size_t length) _CUPS_API_1_2;
 extern http_uri_status_t httpSeparateURI(http_uri_coding_t decoding,
                                         const char *uri,
                                         char *scheme, int schemelen,
                                         char *username, int usernamelen,
                                         char *host, int hostlen, int *port,
-                                        char *resource, int resourcelen);
-extern void            httpSetExpect(http_t *http, http_status_t expect);
-extern void            httpSetLength(http_t *http, size_t length);
+                                        char *resource, int resourcelen) _CUPS_API_1_2;
+extern void            httpSetExpect(http_t *http, http_status_t expect) _CUPS_API_1_2;
+extern void            httpSetLength(http_t *http, size_t length) _CUPS_API_1_2;
 extern ssize_t         httpWrite2(http_t *http, const char *buffer,
-                                  size_t length);
+                                  size_t length) _CUPS_API_1_2;
 
 /**** New in CUPS 1.3 ****/
-extern char            *httpGetAuthString(http_t *http);
+extern char            *httpGetAuthString(http_t *http) _CUPS_API_1_3;
 extern void            httpSetAuthString(http_t *http, const char *scheme,
-                                         const char *data);
+                                         const char *data) _CUPS_API_1_3;
 
 /*
  * C++ magic...
index 804bc95669add157370e1b87d9bb6a42f829b726..04f689a914a6b180688dad29f03b8e891278be2a 100644 (file)
@@ -461,26 +461,26 @@ extern void               ippSetPort(int p);
 
 /**** New in CUPS 1.1.19 ****/
 extern ipp_attribute_t *ippAddCollection(ipp_t *ipp, ipp_tag_t group,
-                                         const char *name, ipp_t *value);
+                                         const char *name, ipp_t *value) _CUPS_API_1_1_19;
 extern ipp_attribute_t *ippAddCollections(ipp_t *ipp, ipp_tag_t group,
                                           const char *name, int num_values,
-                                          const ipp_t **values);
-extern void            ippDeleteAttribute(ipp_t *ipp, ipp_attribute_t *attr);
-extern ipp_state_t     ippReadFile(int fd, ipp_t *ipp);
-extern ipp_state_t     ippWriteFile(int fd, ipp_t *ipp);
+                                          const ipp_t **values) _CUPS_API_1_1_19;
+extern void            ippDeleteAttribute(ipp_t *ipp, ipp_attribute_t *attr) _CUPS_API_1_1_19;
+extern ipp_state_t     ippReadFile(int fd, ipp_t *ipp) _CUPS_API_1_1_19;
+extern ipp_state_t     ippWriteFile(int fd, ipp_t *ipp) _CUPS_API_1_1_19;
 
 /**** New in CUPS 1.2 ****/
 extern ipp_attribute_t *ippAddOctetString(ipp_t *ipp, ipp_tag_t group,
                                           const char *name,
-                                          const void *data, int datalen);
-extern ipp_status_t    ippErrorValue(const char *name);
-extern ipp_t           *ippNewRequest(ipp_op_t op);
-extern const char      *ippOpString(ipp_op_t op);
-extern ipp_op_t                ippOpValue(const char *name);
+                                          const void *data, int datalen) _CUPS_API_1_2;
+extern ipp_status_t    ippErrorValue(const char *name) _CUPS_API_1_2;
+extern ipp_t           *ippNewRequest(ipp_op_t op) _CUPS_API_1_2;
+extern const char      *ippOpString(ipp_op_t op) _CUPS_API_1_2;
+extern ipp_op_t                ippOpValue(const char *name) _CUPS_API_1_2;
 extern ipp_state_t     ippReadIO(void *src, ipp_iocb_t cb, int blocking,
-                                 ipp_t *parent, ipp_t *ipp);
+                                 ipp_t *parent, ipp_t *ipp) _CUPS_API_1_2;
 extern ipp_state_t     ippWriteIO(void *dst, ipp_iocb_t cb, int blocking,
-                                  ipp_t *parent, ipp_t *ipp);
+                                  ipp_t *parent, ipp_t *ipp) _CUPS_API_1_2;
 
 
 /*
index cd67a51fc084f2b13ac18c2b5bfc405a4fd40025..f154c6ba3f1d71fa984dfb6d3f8cc085d602f40c 100644 (file)
@@ -358,41 +358,41 @@ extern ppd_size_t *ppdPageSize(ppd_file_t *ppd, const char *name);
 extern float           ppdPageWidth(ppd_file_t *ppd, const char *name);
 
 /**** New in CUPS 1.1.19 ****/
-extern const char      *ppdErrorString(ppd_status_t status);
+extern const char      *ppdErrorString(ppd_status_t status) _CUPS_API_1_1_19;
 extern ppd_attr_t      *ppdFindAttr(ppd_file_t *ppd, const char *name,
-                                    const char *spec);
+                                    const char *spec) _CUPS_API_1_1_19;
 extern ppd_attr_t      *ppdFindNextAttr(ppd_file_t *ppd, const char *name,
-                                        const char *spec);
-extern ppd_status_t    ppdLastError(int *line);
+                                        const char *spec) _CUPS_API_1_1_19;
+extern ppd_status_t    ppdLastError(int *line) _CUPS_API_1_1_19;
 
 /**** New in CUPS 1.1.20 ****/
-extern void            ppdSetConformance(ppd_conform_t c);
+extern void            ppdSetConformance(ppd_conform_t c) _CUPS_API_1_1_20;
 
 /**** New in CUPS 1.2 ****/
 extern int             ppdCollect2(ppd_file_t *ppd, ppd_section_t section,
-                                   float min_order, ppd_choice_t  ***choices);
+                                   float min_order, ppd_choice_t  ***choices) _CUPS_API_1_2;
 extern int             ppdEmitAfterOrder(ppd_file_t *ppd, FILE *fp,
                                          ppd_section_t section, int limit,
-                                         float min_order);
-extern int             ppdEmitJCLEnd(ppd_file_t *ppd, FILE *fp);
+                                         float min_order) _CUPS_API_1_2;
+extern int             ppdEmitJCLEnd(ppd_file_t *ppd, FILE *fp) _CUPS_API_1_2;
 extern char            *ppdEmitString(ppd_file_t *ppd, ppd_section_t section,
-                                      float min_order);
+                                      float min_order) _CUPS_API_1_2;
 extern ppd_coption_t   *ppdFindCustomOption(ppd_file_t *ppd,
-                                            const char *keyword);
+                                            const char *keyword) _CUPS_API_1_2;
 extern ppd_cparam_t    *ppdFindCustomParam(ppd_coption_t *opt,
-                                           const char *name);
-extern ppd_cparam_t    *ppdFirstCustomParam(ppd_coption_t *opt);
-extern ppd_option_t    *ppdFirstOption(ppd_file_t *ppd);
-extern ppd_cparam_t    *ppdNextCustomParam(ppd_coption_t *opt);
-extern ppd_option_t    *ppdNextOption(ppd_file_t *ppd);
-extern int             ppdLocalize(ppd_file_t *ppd);
-extern ppd_file_t      *ppdOpen2(cups_file_t *fp);
+                                           const char *name) _CUPS_API_1_2;
+extern ppd_cparam_t    *ppdFirstCustomParam(ppd_coption_t *opt) _CUPS_API_1_2;
+extern ppd_option_t    *ppdFirstOption(ppd_file_t *ppd) _CUPS_API_1_2;
+extern ppd_cparam_t    *ppdNextCustomParam(ppd_coption_t *opt) _CUPS_API_1_2;
+extern ppd_option_t    *ppdNextOption(ppd_file_t *ppd) _CUPS_API_1_2;
+extern int             ppdLocalize(ppd_file_t *ppd) _CUPS_API_1_2;
+extern ppd_file_t      *ppdOpen2(cups_file_t *fp) _CUPS_API_1_2;
 
 /**** New in CUPS 1.3 ****/
 extern const char      *ppdLocalizeIPPReason(ppd_file_t *ppd,
                                              const char *reason,
                                              const char *scheme,
-                                             char *buffer, size_t bufsize);
+                                             char *buffer, size_t bufsize) _CUPS_API_1_3;
 
 
 /*
index 35b0de9dc9a913642e33db4cb7adb4b7184d53af..bfe3cc0d6fe45c331702870c81d9d61292438272 100644 (file)
 #ifndef _CUPS_SIDECHANNEL_H_
 #  define _CUPS_SIDECHANNEL_H_
 
+/*
+ * Include necessary headers...
+ */
+
+#  include "versioning.h"
+
+
 /*
  * C++ magic...
  */
@@ -84,15 +91,15 @@ typedef enum                                /**** Response status codes ****/
 
 extern cups_sc_status_t        cupsSideChannelDoRequest(cups_sc_command_t command,
                                                 char *data, int *datalen,
-                                                double timeout);
+                                                double timeout) _CUPS_API_1_3;
 extern int             cupsSideChannelRead(cups_sc_command_t *command,
                                            cups_sc_status_t *status,
                                            char *data, int *datalen,
-                                           double timeout);
+                                           double timeout) _CUPS_API_1_3;
 extern int             cupsSideChannelWrite(cups_sc_command_t command,
                                             cups_sc_status_t status,
                                             const char *data, int datalen,
-                                            double timeout);
+                                            double timeout) _CUPS_API_1_3;
 
 
 #  ifdef __cplusplus
index 92782685522a1ed0b878046ae4058310aa70e3f1..8c8cd5005258edbb7fdc10964a0dcb5d18cd9e46 100644 (file)
@@ -57,17 +57,17 @@ typedef unsigned long  cups_vbcs_t; /* VBCS Legacy 32-bit unit */
 extern int     cupsCharsetToUTF8(cups_utf8_t *dest,
                                  const char *src,
                                  const int maxout,
-                                 const cups_encoding_t encoding);
+                                 const cups_encoding_t encoding) _CUPS_API_1_2;
 extern int     cupsUTF8ToCharset(char *dest,
                                  const cups_utf8_t *src,
                                  const int maxout,
-                                 const cups_encoding_t encoding);
+                                 const cups_encoding_t encoding) _CUPS_API_1_2;
 extern int     cupsUTF8ToUTF32(cups_utf32_t *dest,
                                const cups_utf8_t *src,
-                               const int maxout);
+                               const int maxout) _CUPS_API_1_2;
 extern int     cupsUTF32ToUTF8(cups_utf8_t *dest,
                                const cups_utf32_t *src,
-                               const int maxout);
+                               const int maxout) _CUPS_API_1_2;
 
 #  ifdef __cplusplus
 }
index e2cc3618397dc591a366e42af214be5ea52bf5d5..0d1e1766eb62beaac66abc1ff305e03874a29aef 100644 (file)
@@ -99,7 +99,7 @@ socket://<i>ip-address-or-hostname</i>:<i>port-number</i>?waiteof=false
 
 <H3><A NAME="IPP">Internet Printing Protocol (IPP)</A></H3>
 
-<P>IPP is the only protocol that CUPS supports natively, and is also supported by many network printers. We recommend using this protocol over others whenever the printer or server supports it. IPP printing normally happens over port 631 and uses the <tt>http</tt> and <tt>ipp</tt> URI schemes:</P>
+<P>IPP is the only protocol that CUPS supports natively and is supported by some network printers and print servers. However, since many printers do not implement IPP properly, only use IPP when the vendor actually documents official support for it. IPP printing normally happens over port 631 and uses the <tt>http</tt> and <tt>ipp</tt> URI schemes:</P>
 
 <PRE>
 http://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>
@@ -322,18 +322,11 @@ lpd://<i>ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&option=value</i
        lpd://<I>address</I>/pr3</TD>
 </TR>
 <TR>
-       <TD>Hewlett Packard JetDirect w/o IPP</TD>
+       <TD>Hewlett Packard JetDirect</TD>
        <TD>socket://<I>address</I>:9100<BR>
        socket://<I>address</I>:9101<BR>
        socket://<I>address</I>:9102</TD>
 </TR>
-<TR>
-       <TD>Hewlett Packard JetDirect w/IPP</TD>
-       <TD>ipp://<I>address</I>/ipp<BR>
-       ipp://<I>address</I>/ipp/port1<BR>
-       ipp://<I>address</I>/ipp/port2<BR>
-       ipp://<I>address</I>/ipp/port3</TD>
-</TR>
 <TR>
        <TD>Intel&reg; NetportExpress XL, PRO/100</TD>
        <TD>lpd://<I>address</I>/LPT1_PASSTHRU<BR>
index e05694ce4bd6a401bf3ae2ec9f9860c1605244c2..6dcba98388e666760a7d3d8098cd66bca7dc9985 100644 (file)
@@ -63,60 +63,60 @@ typedef struct cups_izoom_s cups_izoom_t;
  * Prototypes...
  */
 
-extern void            cupsImageClose(cups_image_t *img);
+extern void            cupsImageClose(cups_image_t *img) _CUPS_API_1_2;
 extern void            cupsImageCMYKToBlack(const cups_ib_t *in,
-                                            cups_ib_t *out, int count);
+                                            cups_ib_t *out, int count) _CUPS_API_1_2;
 extern void            cupsImageCMYKToCMY(const cups_ib_t *in,
-                                          cups_ib_t *out, int count);
+                                          cups_ib_t *out, int count) _CUPS_API_1_2;
 extern void            cupsImageCMYKToCMYK(const cups_ib_t *in,
-                                           cups_ib_t *out, int count);
+                                           cups_ib_t *out, int count) _CUPS_API_1_2;
 extern void            cupsImageCMYKToRGB(const cups_ib_t *in,
-                                          cups_ib_t *out, int count);
+                                          cups_ib_t *out, int count) _CUPS_API_1_2;
 extern void            cupsImageCMYKToWhite(const cups_ib_t *in,
-                                            cups_ib_t *out, int count);
+                                            cups_ib_t *out, int count) _CUPS_API_1_2;
 extern int             cupsImageGetCol(cups_image_t *img, int x, int y,
-                                       int height, cups_ib_t *pixels);
-extern cups_icspace_t  cupsImageGetColorSpace(cups_image_t *img);
-extern int             cupsImageGetDepth(cups_image_t *img);
-extern unsigned                cupsImageGetHeight(cups_image_t *img);
+                                       int height, cups_ib_t *pixels) _CUPS_API_1_2;
+extern cups_icspace_t  cupsImageGetColorSpace(cups_image_t *img) _CUPS_API_1_2;
+extern int             cupsImageGetDepth(cups_image_t *img) _CUPS_API_1_2;
+extern unsigned                cupsImageGetHeight(cups_image_t *img) _CUPS_API_1_2;
 extern int             cupsImageGetRow(cups_image_t *img, int x, int y,
-                                       int width, cups_ib_t *pixels);
-extern unsigned                cupsImageGetWidth(cups_image_t *img);
-extern unsigned                cupsImageGetXPPI(cups_image_t *img);
-extern unsigned                cupsImageGetYPPI(cups_image_t *img);
+                                       int width, cups_ib_t *pixels) _CUPS_API_1_2;
+extern unsigned                cupsImageGetWidth(cups_image_t *img) _CUPS_API_1_2;
+extern unsigned                cupsImageGetXPPI(cups_image_t *img) _CUPS_API_1_2;
+extern unsigned                cupsImageGetYPPI(cups_image_t *img) _CUPS_API_1_2;
 extern void            cupsImageLut(cups_ib_t *pixels, int count,
-                                    const cups_ib_t *lut);
+                                    const cups_ib_t *lut) _CUPS_API_1_2;
 extern cups_image_t    *cupsImageOpen(const char *filename,
                                       cups_icspace_t primary,
                                       cups_icspace_t secondary,
                                       int saturation, int hue,
-                                      const cups_ib_t *lut);
+                                      const cups_ib_t *lut) _CUPS_API_1_2;
 extern void            cupsImageRGBAdjust(cups_ib_t *pixels, int count,
-                                          int saturation, int hue);
+                                          int saturation, int hue) _CUPS_API_1_2;
 extern void            cupsImageRGBToBlack(const cups_ib_t *in,
-                                           cups_ib_t *out, int count);
+                                           cups_ib_t *out, int count) _CUPS_API_1_2;
 extern void            cupsImageRGBToCMY(const cups_ib_t *in,
-                                         cups_ib_t *out, int count);
+                                         cups_ib_t *out, int count) _CUPS_API_1_2;
 extern void            cupsImageRGBToCMYK(const cups_ib_t *in,
-                                          cups_ib_t *out, int count);
+                                          cups_ib_t *out, int count) _CUPS_API_1_2;
 extern void            cupsImageRGBToRGB(const cups_ib_t *in,
-                                         cups_ib_t *out, int count);
+                                         cups_ib_t *out, int count) _CUPS_API_1_2;
 extern void            cupsImageRGBToWhite(const cups_ib_t *in,
-                                           cups_ib_t *out, int count);
-extern void            cupsImageSetMaxTiles(cups_image_t *img, int max_tiles);
+                                           cups_ib_t *out, int count) _CUPS_API_1_2;
+extern void            cupsImageSetMaxTiles(cups_image_t *img, int max_tiles) _CUPS_API_1_2;
 extern void            cupsImageSetProfile(float d, float g,
-                                           float matrix[3][3]);
-extern void            cupsImageSetRasterColorSpace(cups_cspace_t cs);
+                                           float matrix[3][3]) _CUPS_API_1_2;
+extern void            cupsImageSetRasterColorSpace(cups_cspace_t cs) _CUPS_API_1_2;
 extern void            cupsImageWhiteToBlack(const cups_ib_t *in,
-                                             cups_ib_t *out, int count);
+                                             cups_ib_t *out, int count) _CUPS_API_1_2;
 extern void            cupsImageWhiteToCMY(const cups_ib_t *in,
-                                           cups_ib_t *out, int count);
+                                           cups_ib_t *out, int count) _CUPS_API_1_2;
 extern void            cupsImageWhiteToCMYK(const cups_ib_t *in,
-                                            cups_ib_t *out, int count);
+                                            cups_ib_t *out, int count) _CUPS_API_1_2;
 extern void            cupsImageWhiteToRGB(const cups_ib_t *in,
-                                           cups_ib_t *out, int count);
+                                           cups_ib_t *out, int count) _CUPS_API_1_2;
 extern void            cupsImageWhiteToWhite(const cups_ib_t *in,
-                                             cups_ib_t *out, int count);
+                                             cups_ib_t *out, int count) _CUPS_API_1_2;
 
 
 #  ifdef __cplusplus
index 0d408987f89195c2dc319df47bd19a47515b0c0c..4092dfa0d89b882e84cb0875d8a17777d18bb50e 100644 (file)
@@ -317,14 +317,14 @@ extern int                cupsRasterInterpretPPD(cups_page_header2_t *h,
                                               ppd_file_t *ppd,
                                               int num_options,
                                               cups_option_t *options,
-                                              cups_interpret_cb_t func);
+                                              cups_interpret_cb_t func) _CUPS_API_1_2;
 extern unsigned                cupsRasterReadHeader2(cups_raster_t *r,
-                                             cups_page_header2_t *h);
+                                             cups_page_header2_t *h) _CUPS_API_1_2;
 extern unsigned                cupsRasterWriteHeader2(cups_raster_t *r,
-                                              cups_page_header2_t *h);
+                                              cups_page_header2_t *h) _CUPS_API_1_2;
 
 /**** New in CUPS 1.3 ****/
-extern const char      *cupsRasterErrorString(void);
+extern const char      *cupsRasterErrorString(void) _CUPS_API_1_3;
 
 #  ifdef __cplusplus
 }
index d13973c7b0030ed05fef7f1757fac873a805b81f..0ccddc88a14b499109069fc5db17cab81b247dbe 100644 (file)
@@ -11,7 +11,7 @@
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH cupsfilter 8 "Common UNIX Printing System" "29 August 2007" "Apple Inc."
+.TH cupsfilter 8 "Common UNIX Printing System" "19 October 2007" "Apple Inc."
 .SH NAME
 cupsfilter \- convert a file to another format using cups filters
 .SH SYNOPSIS
@@ -20,9 +20,9 @@ cupsfilter \- convert a file to another format using cups filters
 .I config-file
 ] -j
 .I job-id[,N]
--m
+-m
 .I mime/type
-[ -n
+[ -n
 .I copies
 ] [ -o
 .I name=value
@@ -35,7 +35,7 @@ cupsfilter \- convert a file to another format using cups filters
 .SH DESCRIPTION
 \fIcupsfilter\fR is a front-end to the CUPS filter subsystem which allows you
 to convert a file to a specific format, just as if you had printed the file
-through CUPS.
+through CUPS. By default, \fIcupsfilter\fR generates a PDF file.
 .SH OPTIONS
 .TP 5
 -c config-file
@@ -49,7 +49,7 @@ converted.
 .TP 5
 -m mime/type
 .br
-Specifies the destination file type.
+Specifies the destination file type. The default file type is application/pdf.
 .TP 5
 -n copies
 .br
@@ -66,6 +66,9 @@ Specifies the PPD file to use.
 -t title
 .br
 Specifies the document title.
+.SH KNOWN ISSUES
+\fIcupsfilter\fR currently does not use the filters defined in the PPD file.
+This will be addressed in a future CUPS release.
 .SH SEE ALSO
 \fIcupsd.conf(5)\fR
 .br
index d77d075d61566d87cc6b38fb6fc677be262bc8d9..3d487ab2e3326152a610ed2c7ecb5b1398e88377 100644 (file)
@@ -363,6 +363,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
   */
 
   con->best = cupsdFindBest(con->uri, con->http.state);
+  con->type = AUTH_NONE;
 
   cupsdLogMessage(CUPSD_LOG_DEBUG2,
                   "cupsdAuthorize: con->uri=\"%s\", con->best=%p(%s)",
@@ -398,17 +399,7 @@ cupsdAuthorize(cupsd_client_t *con)        /* I - Client connection */
   }
 #endif /* HAVE_AUTHORIZATION_H */
 
-  if (type == AUTH_NONE)
-  {
-   /*
-    * No authorization required, return early...
-    */
-
-    cupsdLogMessage(CUPSD_LOG_DEBUG,
-                    "cupsdAuthorize: No authentication required.");
-    return;
-  }
-  else if (!*authorization)
+  if (!*authorization)
   {
    /*
     * No authorization data provided, return early...
@@ -471,6 +462,8 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
                    username);
 
     AuthorizationFreeItemSet(authinfo);
+
+    con->type = AUTH_BASIC;
   }
 #endif /* HAVE_AUTHORIZATION_H */
 #if defined(SO_PEERCRED) && defined(AF_LOCAL)
@@ -526,6 +519,8 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
     cupsdLogMessage(CUPSD_LOG_DEBUG,
                     "cupsdAuthorize: Authorized as %s using PeerCred",
                    username);
+
+    con->type = AUTH_BASIC;
   }
 #endif /* SO_PEERCRED && AF_LOCAL */
   else if (!strncmp(authorization, "Local", 5) &&
@@ -554,9 +549,10 @@ cupsdAuthorize(cupsd_client_t *con)        /* I - Client connection */
                      "found!");
       return;
     }
+
+    con->type = AUTH_BASIC;
   }
-  else if (!strncmp(authorization, "Basic", 5) &&
-           (type == AUTH_BASIC || type == AUTH_BASICDIGEST))
+  else if (!strncmp(authorization, "Basic", 5))
   {
    /*
     * Get the Basic authentication data...
@@ -615,6 +611,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
 
     switch (type)
     {
+      default :
       case AUTH_BASIC :
           {
 #if HAVE_LIBPAM
@@ -842,8 +839,10 @@ cupsdAuthorize(cupsd_client_t *con)        /* I - Client connection */
                          username);
          break;
     }
+
+    con->type = type;
   }
-  else if (!strncmp(authorization, "Digest", 6) && type == AUTH_DIGEST)
+  else if (!strncmp(authorization, "Digest", 6))
   {
    /*
     * Get the username, password, and nonce from the Digest attributes...
@@ -915,6 +914,8 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
     cupsdLogMessage(CUPSD_LOG_DEBUG,
                     "cupsdAuthorize: Authorized as %s using Digest",
                    username);
+
+    con->type = AUTH_DIGEST;
   }
 #ifdef HAVE_GSSAPI
   else if (!strncmp(authorization, "Negotiate", 9)) 
@@ -1054,30 +1055,23 @@ cupsdAuthorize(cupsd_client_t *con)     /* I - Client connection */
       gss_delete_sec_context(&minor_status, &context, GSS_C_NO_BUFFER);
 
       con->gss_have_creds = 1;
+
+      con->type = AUTH_NEGOTIATE;
     }
     else
       gss_release_name(&minor_status, &client_name);
   }
 #endif /* HAVE_GSSAPI */
-  else if (type != AUTH_NONE)
+  else
   {
     char       scheme[256];            /* Auth scheme... */
-    static const char * const types[] =        /* Auth types */
-    {
-      "None",
-      "Basic",
-      "Digest",
-      "BasicDigest",
-      "Negotiate"
-    };
 
 
     if (sscanf(authorization, "%255s", scheme) != 1)
       strcpy(scheme, "UNKNOWN");
 
-    cupsdLogMessage(CUPSD_LOG_ERROR,
-                    "Bad authentication data \"%s ...\", expected \"%s ...\"",
-                    scheme, types[type]);
+    cupsdLogMessage(CUPSD_LOG_ERROR, "Bad authentication data \"%s ...\"",
+                    scheme);
     return;
   }
 
@@ -1793,7 +1787,8 @@ cupsdIsAuthorized(cupsd_client_t *con,    /* I - Connection */
                   const char     *owner)/* I - Owner of object */
 {
   int                  i, j,           /* Looping vars */
-                       auth;           /* Authorization status */
+                       auth,           /* Authorization status */
+                       type;           /* Type of authentication */
   unsigned             address[4];     /* Authorization address */
   cupsd_location_t     *best;          /* Best match for location so far */
   int                  hostlen;        /* Length of hostname */
@@ -1809,11 +1804,11 @@ cupsdIsAuthorized(cupsd_client_t *con,  /* I - Connection */
                };
   static const char * const types[] =  /* Auth types */
                {
-                 "NONE",
-                 "BASIC",
-                 "DIGEST",
-                 "BASICDIGEST",
-                 "KERBEROS"
+                 "None",
+                 "Basic",
+                 "Digest",
+                 "BasicDigest",
+                 "Negotiate"
                };
 
 
@@ -1842,10 +1837,13 @@ cupsdIsAuthorized(cupsd_client_t *con,  /* I - Connection */
 
   best = con->best;
 
+  if ((type = best->type) == AUTH_DEFAULT)
+    type = DefaultAuthType;
+
   cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                  "cupsdIsAuthorized: level=AUTH_%s, type=AUTH_%s, "
+                  "cupsdIsAuthorized: level=AUTH_%s, type=%s, "
                  "satisfy=AUTH_SATISFY_%s, num_names=%d",
-                  levels[best->level], types[best->type],
+                  levels[best->level], types[type],
                  best->satisfy ? "ANY" : "ALL", best->num_names);
 
   if (best->limit == AUTH_LIMIT_IPP)
@@ -1946,8 +1944,8 @@ cupsdIsAuthorized(cupsd_client_t *con,    /* I - Connection */
   if ((best->encryption >= HTTP_ENCRYPT_REQUIRED && !con->http.tls &&
       strcasecmp(con->http.hostname, "localhost") &&
       best->satisfy == AUTH_SATISFY_ALL) &&
-      !(best->type == AUTH_NEGOTIATE || 
-        (best->type == AUTH_NONE && DefaultAuthType == AUTH_NEGOTIATE)))
+      !(type == AUTH_NEGOTIATE || 
+        (type == AUTH_NONE && DefaultAuthType == AUTH_NEGOTIATE)))
   {
     cupsdLogMessage(CUPSD_LOG_DEBUG,
                     "cupsdIsAuthorized: Need upgrade to TLS...");
@@ -1960,10 +1958,10 @@ cupsdIsAuthorized(cupsd_client_t *con,  /* I - Connection */
   */
 
   if (best->level == AUTH_ANON ||      /* Anonymous access - allow it */
-      (best->type == AUTH_NONE && best->num_names == 0))
+      (type == AUTH_NONE && best->num_names == 0))
     return (HTTP_OK);
 
-  if (!con->username[0] && best->type == AUTH_NONE &&
+  if (!con->username[0] && type == AUTH_NONE &&
       best->limit == AUTH_LIMIT_IPP)
   {
    /*
@@ -2003,6 +2001,15 @@ cupsdIsAuthorized(cupsd_client_t *con,   /* I - Connection */
        return (HTTP_OK);               /* unless overridden with Satisfy */
     }
 
+    if (con->type != type && type != AUTH_NONE &&
+        (con->type != AUTH_BASIC || type != AUTH_BASICDIGEST))
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR, "Authorized using %s, expected %s!",
+                      types[con->type], types[type]);
+
+      return (HTTP_UNAUTHORIZED);
+    }
+
     strlcpy(username, con->username, sizeof(username));
   }
 
index c92a5f02cb9f6e6176d92699d4ddff14fa2e07c0..f185c1e919500c5686be322a95669758f272864b 100644 (file)
@@ -30,6 +30,7 @@ struct cupsd_client_s
   time_t               start;          /* Request start time */
   http_state_t         operation;      /* Request operation */
   off_t                        bytes;          /* Bytes transferred for this request */
+  int                  type;           /* AuthType for username */
   char                 username[256],  /* Username from Authorization: line */
                        password[33],   /* Password from Authorization: line */
                        uri[HTTP_MAX_URI],
index b5a839c0770002cf9b6a108d79b9d6ae4123387c..9f50ef812475e8aa2f31830c9a14351a19bfdf8a 100644 (file)
@@ -964,7 +964,7 @@ add_class(cupsd_client_t  *con,             /* I - Client connection */
   else if (pclass->type & CUPS_PRINTER_IMPLICIT)
   {
    /*
-    * Check the default policy, then tename the implicit class to "AnyClass"
+    * Check the default policy, then rename the implicit class to "AnyClass"
     * or remove it...
     */
 
@@ -1014,7 +1014,7 @@ add_class(cupsd_client_t  *con,           /* I - Client connection */
   else if ((status = cupsdCheckPolicy(pclass->op_policy_ptr, con,
                                       NULL)) != HTTP_OK)
   {
-    send_http_error(con, status, NULL);
+    send_http_error(con, status, pclass);
     return;
   }
   else
@@ -2303,7 +2303,7 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
   else if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con,
                                       NULL)) != HTTP_OK)
   {
-    send_http_error(con, status, NULL);
+    send_http_error(con, status, printer);
     return;
   }
   else
@@ -2332,11 +2332,26 @@ add_printer(cupsd_client_t  *con,       /* I - Client connection */
     * Do we have a valid device URI?
     */
 
+    http_uri_status_t uri_status;      /* URI separation status */
+
+
     need_restart_job = 1;
 
-    httpSeparateURI(HTTP_URI_CODING_ALL, attr->values[0].string.text, scheme,
-                    sizeof(scheme), username, sizeof(username), host,
-                   sizeof(host), &port, resource, sizeof(resource));
+    uri_status = httpSeparateURI(HTTP_URI_CODING_ALL,
+                                attr->values[0].string.text,
+                                scheme, sizeof(scheme),
+                                username, sizeof(username),
+                                host, sizeof(host), &port,
+                                resource, sizeof(resource));
+
+    if (uri_status < HTTP_URI_OK)
+    {
+      send_ipp_status(con, IPP_NOT_POSSIBLE, _("Bad device-uri \"%s\"!"),
+                     attr->values[0].string.text);
+      cupsdLogMessage(CUPSD_LOG_DEBUG,
+                      "add_printer: httpSeparateURI returned %d", uri_status);
+      return;
+    }
 
     if (!strcmp(scheme, "file"))
     {
@@ -2953,7 +2968,7 @@ authenticate_job(cupsd_client_t  *con,    /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_http_error(con, HTTP_UNAUTHORIZED, NULL);
+    send_http_error(con, HTTP_UNAUTHORIZED, cupsdFindDest(job->dest));
     return;
   }
 
@@ -3270,7 +3285,7 @@ cancel_job(cupsd_client_t  *con,  /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_http_error(con, HTTP_UNAUTHORIZED, NULL);
+    send_http_error(con, HTTP_UNAUTHORIZED, cupsdFindDest(job->dest));
     return;
   }
 
@@ -6326,7 +6341,7 @@ get_ppd(cupsd_client_t  *con,             /* I - Client connection */
 
     if ((status = cupsdCheckPolicy(dest->op_policy_ptr, con, NULL)) != HTTP_OK)
     {
-      send_http_error(con, status, NULL);
+      send_http_error(con, status, dest);
       return;
     }
 
@@ -7063,7 +7078,7 @@ hold_job(cupsd_client_t  *con,            /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_http_error(con, HTTP_UNAUTHORIZED, NULL);
+    send_http_error(con, HTTP_UNAUTHORIZED, cupsdFindDest(job->dest));
     return;
   }
 
@@ -7321,7 +7336,7 @@ move_job(cupsd_client_t  *con,            /* I - Client connection */
 
     if (!validate_user(job, con, job->username, username, sizeof(username)))
     {
-      send_http_error(con, HTTP_UNAUTHORIZED, NULL);
+      send_http_error(con, HTTP_UNAUTHORIZED, cupsdFindDest(job->dest));
       return;
     }
 
@@ -8067,7 +8082,7 @@ release_job(cupsd_client_t  *con, /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_http_error(con, HTTP_UNAUTHORIZED, NULL);
+    send_http_error(con, HTTP_UNAUTHORIZED, cupsdFindDest(job->dest));
     return;
   }
 
@@ -8309,7 +8324,7 @@ restart_job(cupsd_client_t  *con, /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_http_error(con, HTTP_UNAUTHORIZED, NULL);
+    send_http_error(con, HTTP_UNAUTHORIZED, cupsdFindDest(job->dest));
     return;
   }
 
@@ -8681,7 +8696,7 @@ send_document(cupsd_client_t  *con,       /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_http_error(con, HTTP_UNAUTHORIZED, NULL);
+    send_http_error(con, HTTP_UNAUTHORIZED, cupsdFindDest(job->dest));
     return;
   }
 
@@ -8973,6 +8988,23 @@ send_http_error(
       printer && printer->num_auth_info_required > 0 &&
       !strcmp(printer->auth_info_required[0], "negotiate"))
     cupsdSendError(con, status, AUTH_NEGOTIATE);
+  else if (printer)
+  {
+    char       resource[HTTP_MAX_URI]; /* Resource portion of URI */
+    cupsd_location_t *auth;            /* Pointer to authentication element */
+
+
+    if (printer->type & CUPS_PRINTER_CLASS)
+      snprintf(resource, sizeof(resource), "/classes/%s", printer->name);
+    else
+      snprintf(resource, sizeof(resource), "/printers/%s", printer->name);
+
+    if ((auth = cupsdFindBest(resource, HTTP_POST)) == NULL ||
+        auth->type == AUTH_NONE)
+      auth = cupsdFindPolicyOp(printer->op_policy_ptr, IPP_PRINT_JOB);
+
+    cupsdSendError(con, status, auth ? auth->type : AUTH_NONE);
+  }
   else
     cupsdSendError(con, status, AUTH_NONE);
 
@@ -9200,7 +9232,7 @@ set_job_attrs(cupsd_client_t  *con,       /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_http_error(con, HTTP_UNAUTHORIZED, NULL);
+    send_http_error(con, HTTP_UNAUTHORIZED, cupsdFindDest(job->dest));
     return;
   }
 
index 3e48e8fa0beb9813f24865dc989d0eae89ca8f6d..2ce5f84a1c79c607d431224444ec76fc38952419 100644 (file)
@@ -152,8 +152,13 @@ main(int  argc,                            /* I - Number of command-line arguments */
       }
 
       if (SAMBAServer == NULL)
+      {
        SAMBAServer = cupsServer();
 
+       if (SAMBAServer[0] == '/')      /* Use localhost instead of domain socket */
+         SAMBAServer = "localhost";
+      }
+
       if ((status = export_dest(http, argv[i])) != 0)
        return (status);
     }
@@ -182,8 +187,13 @@ main(int  argc,                            /* I - Number of command-line arguments */
     */
 
     if (SAMBAServer == NULL)
+    {
       SAMBAServer = cupsServer();
 
+      if (SAMBAServer[0] == '/')       /* Use localhost instead of domain socket */
+       SAMBAServer = "localhost";
+    }
+
     num_dests = cupsGetDests2(http, &dests);
 
     for (j = 0, status = 0; j < num_dests; j ++)