~ubuntu-branches/ubuntu/wily/cups/wily

« back to all changes in this revision

Viewing changes to .pc/cups-1.6.4-changes.patch/scheduler/conf.h

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2013-09-24 22:15:01 UTC
  • mfrom: (99.1.28 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130924221501-115ywce51xe7hhok
* debian/patches/cups-1.6.4-changes.patch: Merged latest fixes from upstream,
  taken from CUPS 1.6.4, as there is no public repository of CUPS any more
  and due to Apple policies the next 1.7.x release, 1.7.0 final, happens
  only with the next release of Mac OS X. Fixes:
   - Removed some duplicate page size definitions for some ISO sizes that were
     causing problems
   - The IPP backend did not add the "last-document" attribute
   - Added a SyncOnClose directive to cups-files.conf to force cupsd to
     call fsync before closing any configuration/state files it writes
     (LP: #1157972, Red Hat bug #984883).
   - Added USB quirk rule for Lexmark E238
   - Closed server connections were still not always detected
   - The libusb-based USB backend now loads its list of quirks from files
     in /usr/share/cups/usb instead of using a hardcoded table, this
     makes spotting and fixing USB problems much easier.
   - The scheduler did not properly register ICC color profiles with
     colord
* debian/patches/usb-backend-more-quirk-rules.patch,
  debian/patches/handle-server-terminating-connection.patch,
  debian/patches/colord-add-profile-fix.patch: Removed, included upstream.
* debian/patches/pidfile.patch,
  debian/patches/rootbackends-worldreadable.patch,
  debian/patches/airprint-support.patch,
  debian/patches/do-not-broadcast-with-hostnames.patch,
  debian/patches/mention-rfc2911-in-ipptoolfile-for-clarity.patch,
  debian/patches/add-ipp-backend-of-cups-1.4.patch,
  debian/patches/confdirperms.patch,
  debian/patches/show-compile-command-lines.patch,
  debian/patches/log-debug-history-nearly-unlimited.patch: Refreshed with
  quilt.
* debian/local/apparmor-profile: Silenced AppArmor noise in syslog
  (LP: #1229766).
* debian/local/cupsd-sync-files-on-close.patch: Activate CUPS daemon
  syncing files when closing, so that config files (like printers.conf)
  do not mysteriously disappear (LP: #1157972, Red Hat bug #984883).
* debian/cups-server-common.install: Install /usr/share/cups/usb/ with the
  USB backend quirk rules file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * "$Id: conf.h 10996 2013-05-29 11:51:34Z msweet $"
 
3
 *
 
4
 *   Configuration file definitions for the CUPS scheduler.
 
5
 *
 
6
 *   Copyright 2007-2012 by Apple Inc.
 
7
 *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
 
8
 *
 
9
 *   These coded instructions, statements, and computer programs are the
 
10
 *   property of Apple Inc. and are protected by Federal copyright
 
11
 *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
 
12
 *   which should have been included with this file.  If this file is
 
13
 *   file is missing or damaged, see the license at "http://www.cups.org/".
 
14
 */
 
15
 
 
16
 
 
17
/*
 
18
 * Log levels...
 
19
 */
 
20
 
 
21
typedef enum
 
22
{
 
23
  CUPSD_LOG_PPD = -5,                   /* Used internally for PPD keywords */
 
24
  CUPSD_LOG_ATTR,                       /* Used internally for attributes */
 
25
  CUPSD_LOG_STATE,                      /* Used internally for printer-state-reasons */
 
26
  CUPSD_LOG_JOBSTATE,                   /* Used internally for job-state-reasons */
 
27
  CUPSD_LOG_PAGE,                       /* Used internally for page logging */
 
28
  CUPSD_LOG_NONE,
 
29
  CUPSD_LOG_EMERG,                      /* Emergency issues */
 
30
  CUPSD_LOG_ALERT,                      /* Something bad happened that needs attention */
 
31
  CUPSD_LOG_CRIT,                       /* Critical error but server continues */
 
32
  CUPSD_LOG_ERROR,                      /* Error condition */
 
33
  CUPSD_LOG_WARN,                       /* Warning */
 
34
  CUPSD_LOG_NOTICE,                     /* Normal condition that needs logging */
 
35
  CUPSD_LOG_INFO,                       /* General information */
 
36
  CUPSD_LOG_DEBUG,                      /* General debugging */
 
37
  CUPSD_LOG_DEBUG2                      /* Detailed debugging */
 
38
} cupsd_loglevel_t;
 
39
 
 
40
typedef enum
 
41
{
 
42
  CUPSD_ACCESSLOG_CONFIG,               /* Log config requests */
 
43
  CUPSD_ACCESSLOG_ACTIONS,              /* Log config, print, and job management requests */
 
44
  CUPSD_ACCESSLOG_ALL                   /* Log everything */
 
45
} cupsd_accesslog_t;
 
46
 
 
47
typedef enum
 
48
{
 
49
  CUPSD_TIME_STANDARD,                  /* "Standard" Apache/CLF format */
 
50
  CUPSD_TIME_USECS                      /* Standard format with microseconds */
 
51
} cupsd_time_t;
 
52
 
 
53
 
 
54
/*
 
55
 * FatalErrors flags...
 
56
 */
 
57
 
 
58
#define CUPSD_FATAL_NONE        0       /* No errors are fatal */
 
59
#define CUPSD_FATAL_BROWSE      1       /* Browse bind errors are fatal */
 
60
#define CUPSD_FATAL_CONFIG      2       /* Config file syntax errors are fatal */
 
61
#define CUPSD_FATAL_LISTEN      4       /* Listen/Port bind errors are fatal */
 
62
#define CUPSD_FATAL_LOG         8       /* Log file errors are fatal */
 
63
#define CUPSD_FATAL_PERMISSIONS 16      /* File permission errors are fatal */
 
64
#define CUPSD_FATAL_ALL         ~0      /* All errors are fatal */
 
65
 
 
66
 
 
67
/*
 
68
 * Printcap formats...
 
69
 */
 
70
 
 
71
#define PRINTCAP_BSD            0       /* Berkeley LPD format */
 
72
#define PRINTCAP_SOLARIS        1       /* Solaris lpsched format */
 
73
#define PRINTCAP_PLIST          2       /* OS X plist format */
 
74
 
 
75
 
 
76
/*
 
77
 * SSL options (bits)...
 
78
 */
 
79
 
 
80
#define CUPSD_SSL_NONE          0       /* No special options */
 
81
#define CUPSD_SSL_NOEMPTY       1       /* Do not insert empty fragments */
 
82
 
 
83
 
 
84
/*
 
85
 * ServerAlias data...
 
86
 */
 
87
 
 
88
typedef struct
 
89
{
 
90
  size_t        namelen;                /* Length of alias name */
 
91
  char          name[1];                /* Alias name */
 
92
} cupsd_alias_t;
 
93
 
 
94
 
 
95
/*
 
96
 * Globals...
 
97
 */
 
98
 
 
99
VAR char                *ConfigurationFile      VALUE(NULL),
 
100
                                        /* cupsd.conf file to use */
 
101
                        *CupsFilesFile          VALUE(NULL),
 
102
                                        /* cups-files.conf file to use */
 
103
                        *ServerName             VALUE(NULL),
 
104
                                        /* FQDN for server */
 
105
                        *ServerAdmin            VALUE(NULL),
 
106
                                        /* Administrator's email */
 
107
                        *ServerRoot             VALUE(NULL),
 
108
                                        /* Root directory for scheduler */
 
109
                        *ServerBin              VALUE(NULL),
 
110
                                        /* Root directory for binaries */
 
111
                        *StateDir               VALUE(NULL),
 
112
                                        /* Root directory for state data */
 
113
                        *RequestRoot            VALUE(NULL),
 
114
                                        /* Directory for request files */
 
115
                        *DocumentRoot           VALUE(NULL);
 
116
                                        /* Root directory for documents */
 
117
VAR cups_array_t        *ServerAlias            VALUE(NULL);
 
118
                                        /* Alias names for server */
 
119
VAR int                 ServerNameIsIP          VALUE(0);
 
120
                                        /* Is the ServerName an IP address? */
 
121
VAR int                 NumSystemGroups         VALUE(0);
 
122
                                        /* Number of system group names */
 
123
VAR char                *SystemGroups[MAX_SYSTEM_GROUPS]
 
124
                                                VALUE({0});
 
125
                                        /* System group names */
 
126
VAR gid_t               SystemGroupIDs[MAX_SYSTEM_GROUPS]
 
127
                                                VALUE({0});
 
128
                                        /* System group IDs */
 
129
VAR char                *AccessLog              VALUE(NULL),
 
130
                                        /* Access log filename */
 
131
                        *ErrorLog               VALUE(NULL),
 
132
                                        /* Error log filename */
 
133
                        *PageLog                VALUE(NULL),
 
134
                                        /* Page log filename */
 
135
                        *CacheDir               VALUE(NULL),
 
136
                                        /* Cache file directory */
 
137
                        *DataDir                VALUE(NULL),
 
138
                                        /* Data file directory */
 
139
                        *DefaultLanguage        VALUE(NULL),
 
140
                                        /* Default language encoding */
 
141
                        *DefaultLocale          VALUE(NULL),
 
142
                                        /* Default locale */
 
143
                        *DefaultPaperSize       VALUE(NULL),
 
144
                                        /* Default paper size */
 
145
                        *ErrorPolicy            VALUE(NULL),
 
146
                                        /* Default printer-error-policy */
 
147
                        *RIPCache               VALUE(NULL),
 
148
                                        /* Amount of memory for RIPs */
 
149
                        *TempDir                VALUE(NULL),
 
150
                                        /* Temporary directory */
 
151
                        *Printcap               VALUE(NULL),
 
152
                                        /* Printcap file */
 
153
                        *FontPath               VALUE(NULL),
 
154
                                        /* Font search path */
 
155
                        *RemoteRoot             VALUE(NULL),
 
156
                                        /* Remote root user */
 
157
                        *Classification         VALUE(NULL);
 
158
                                        /* Classification of system */
 
159
VAR uid_t               User                    VALUE(1);
 
160
                                        /* User ID for server */
 
161
VAR gid_t               Group                   VALUE(0);
 
162
                                        /* Group ID for server */
 
163
VAR cupsd_accesslog_t   AccessLogLevel          VALUE(CUPSD_ACCESSLOG_ACTIONS);
 
164
                                        /* Access log level */
 
165
VAR int                 ClassifyOverride        VALUE(0),
 
166
                                        /* Allow overrides? */
 
167
                        ConfigFilePerm          VALUE(0640),
 
168
                                        /* Permissions for config files */
 
169
                        LogDebugHistory         VALUE(200),
 
170
                                        /* Amount of automatic debug history */
 
171
                        FatalErrors             VALUE(CUPSD_FATAL_CONFIG),
 
172
                                        /* Which errors are fatal? */
 
173
                        StrictConformance       VALUE(FALSE),
 
174
                                        /* Require strict IPP conformance? */
 
175
                        LogFilePerm             VALUE(0644);
 
176
                                        /* Permissions for log files */
 
177
VAR cupsd_loglevel_t    LogLevel                VALUE(CUPSD_LOG_WARN);
 
178
                                        /* Error log level */
 
179
VAR cupsd_time_t        LogTimeFormat           VALUE(CUPSD_TIME_STANDARD);
 
180
                                        /* Log file time format */
 
181
VAR int                 MaxClients              VALUE(100),
 
182
                                        /* Maximum number of clients */
 
183
                        MaxClientsPerHost       VALUE(0),
 
184
                                        /* Maximum number of clients per host */
 
185
                        MaxCopies               VALUE(CUPS_DEFAULT_MAX_COPIES),
 
186
                                        /* Maximum number of copies per job */
 
187
                        MaxLogSize              VALUE(1024 * 1024),
 
188
                                        /* Maximum size of log files */
 
189
                        MaxRequestSize          VALUE(0),
 
190
                                        /* Maximum size of IPP requests */
 
191
                        HostNameLookups         VALUE(FALSE),
 
192
                                        /* Do we do reverse lookups? */
 
193
                        Timeout                 VALUE(DEFAULT_TIMEOUT),
 
194
                                        /* Timeout during requests */
 
195
                        KeepAlive               VALUE(TRUE),
 
196
                                        /* Support the Keep-Alive option? */
 
197
                        KeepAliveTimeout        VALUE(DEFAULT_KEEPALIVE),
 
198
                                        /* Timeout between requests */
 
199
                        FileDevice              VALUE(FALSE),
 
200
                                        /* Allow file: devices? */
 
201
                        FilterLimit             VALUE(0),
 
202
                                        /* Max filter cost at any time */
 
203
                        FilterLevel             VALUE(0),
 
204
                                        /* Current filter level */
 
205
                        FilterNice              VALUE(0),
 
206
                                        /* Nice value for filters */
 
207
                        ReloadTimeout           VALUE(DEFAULT_KEEPALIVE),
 
208
                                        /* Timeout before reload from SIGHUP */
 
209
                        RootCertDuration        VALUE(300),
 
210
                                        /* Root certificate update interval */
 
211
                        RunUser                 VALUE(0),
 
212
                                        /* User to run as, used for files */
 
213
                        PrintcapFormat          VALUE(PRINTCAP_BSD),
 
214
                                        /* Format of printcap file? */
 
215
                        DefaultShared           VALUE(TRUE),
 
216
                                        /* Share printers by default? */
 
217
                        MultipleOperationTimeout VALUE(DEFAULT_TIMEOUT),
 
218
                                        /* multiple-operation-time-out value */
 
219
                        WebInterface            VALUE(CUPS_DEFAULT_WEBIF);
 
220
                                        /* Enable the web interface? */
 
221
VAR cups_file_t         *AccessFile             VALUE(NULL),
 
222
                                        /* Access log file */
 
223
                        *ErrorFile              VALUE(NULL),
 
224
                                        /* Error log file */
 
225
                        *PageFile               VALUE(NULL);
 
226
                                        /* Page log file */
 
227
VAR char                *PageLogFormat          VALUE(NULL);
 
228
                                        /* Page log format */
 
229
VAR mime_t              *MimeDatabase           VALUE(NULL);
 
230
                                        /* MIME type database */
 
231
VAR int                 NumMimeTypes            VALUE(0);
 
232
                                        /* Number of MIME types */
 
233
VAR const char          **MimeTypes             VALUE(NULL);
 
234
                                        /* Array of MIME types */
 
235
 
 
236
#ifdef HAVE_SSL
 
237
VAR char                *ServerCertificate      VALUE(NULL);
 
238
                                        /* Server certificate file */
 
239
#  if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
 
240
VAR char                *ServerKey              VALUE(NULL);
 
241
                                        /* Server key file */
 
242
#  endif /* HAVE_LIBSSL || HAVE_GNUTLS */
 
243
VAR int                 SSLOptions              VALUE(CUPSD_SSL_NONE);
 
244
                                        /* SSL/TLS options */
 
245
#endif /* HAVE_SSL */
 
246
 
 
247
#ifdef HAVE_LAUNCHD
 
248
VAR int                 LaunchdTimeout          VALUE(10);
 
249
                                        /* Time after which an idle cupsd will exit */
 
250
#endif /* HAVE_LAUNCHD */
 
251
 
 
252
#ifdef HAVE_AUTHORIZATION_H
 
253
VAR char                *SystemGroupAuthKey     VALUE(NULL);
 
254
                                        /* System group auth key */
 
255
#endif /* HAVE_AUTHORIZATION_H */
 
256
 
 
257
#ifdef HAVE_GSSAPI
 
258
VAR char                *GSSServiceName         VALUE(NULL);
 
259
                                        /* GSS service name */
 
260
int                     HaveServerCreds         VALUE(0);
 
261
                                        /* Do we have server credentials? */
 
262
gss_cred_id_t           ServerCreds;    /* Server's GSS credentials */
 
263
#endif /* HAVE_GSSAPI */
 
264
 
 
265
 
 
266
/*
 
267
 * Prototypes...
 
268
 */
 
269
 
 
270
extern void     cupsdAddAlias(cups_array_t *aliases, const char *name);
 
271
extern int      cupsdCheckLogFile(cups_file_t **lf, const char *logname);
 
272
extern int      cupsdCheckPermissions(const char *filename,
 
273
                                      const char *suffix, int mode,
 
274
                                      int user, int group, int is_dir,
 
275
                                      int create_dir);
 
276
extern int      cupsdCheckProgram(const char *filename, cupsd_printer_t *p);
 
277
extern int      cupsdDefaultAuthType(void);
 
278
extern void     cupsdFreeAliases(cups_array_t *aliases);
 
279
extern char     *cupsdGetDateTime(struct timeval *t, cupsd_time_t format);
 
280
extern void     cupsdLogFCMessage(void *context, _cups_fc_result_t result,
 
281
                                  const char *message);
 
282
#ifdef HAVE_GSSAPI
 
283
extern int      cupsdLogGSSMessage(int level, int major_status,
 
284
                                   int minor_status,
 
285
                                   const char *message, ...);
 
286
#endif /* HAVE_GSSAPI */
 
287
extern int      cupsdLogJob(cupsd_job_t *job, int level, const char *message,
 
288
                            ...) __attribute__((__format__(__printf__, 3, 4)));
 
289
extern int      cupsdLogMessage(int level, const char *message, ...)
 
290
                __attribute__ ((__format__ (__printf__, 2, 3)));
 
291
extern int      cupsdLogPage(cupsd_job_t *job, const char *page);
 
292
extern int      cupsdLogRequest(cupsd_client_t *con, http_status_t code);
 
293
extern int      cupsdReadConfiguration(void);
 
294
extern int      cupsdWriteErrorLog(int level, const char *message);
 
295
 
 
296
 
 
297
/*
 
298
 * End of "$Id: conf.h 10996 2013-05-29 11:51:34Z msweet $".
 
299
 */