2 * "$Id: conf.h 7935 2008-09-11 01:54:11Z mike $"
4 * Configuration file definitions for the Common UNIX Printing System (CUPS)
7 * Copyright 2007-2009 by Apple Inc.
8 * Copyright 1997-2007 by Easy Software Products, all rights reserved.
10 * These coded instructions, statements, and computer programs are the
11 * property of Apple Inc. and are protected by Federal copyright
12 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
13 * which should have been included with this file. If this file is
14 * file is missing or damaged, see the license at "http://www.cups.org/".
24 CUPSD_LOG_PPD
= -4, /* Used internally for PPD keywords */
25 CUPSD_LOG_ATTR
, /* Used internally for attributes */
26 CUPSD_LOG_STATE
, /* Used internally for state-reasons */
27 CUPSD_LOG_PAGE
, /* Used internally for page logging */
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 */
42 CUPSD_ACCESSLOG_CONFIG
, /* Log config requests */
43 CUPSD_ACCESSLOG_ACTIONS
, /* Log config, print, and job management requests */
44 CUPSD_ACCESSLOG_ALL
/* Log everything */
49 CUPSD_TIME_STANDARD
, /* "Standard" Apache/CLF format */
50 CUPSD_TIME_USECS
/* Standard format with microseconds */
55 * FatalErrors flags...
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 */
71 #define PRINTCAP_BSD 0 /* Berkeley LPD format */
72 #define PRINTCAP_SOLARIS 1 /* Solaris lpsched format */
73 #define PRINTCAP_PLIST 2 /* Mac OS X plist format */
77 * SSL options (bits)...
80 #define CUPSD_SSL_NONE 0 /* No special options */
81 #define CUPSD_SSL_NOEMPTY 1 /* Do not insert empty fragments */
88 VAR
char *ConfigurationFile
VALUE(NULL
),
89 /* Configuration file to use */
90 *ServerName
VALUE(NULL
),
92 *ServerAdmin
VALUE(NULL
),
93 /* Administrator's email */
94 *ServerRoot
VALUE(NULL
),
95 /* Root directory for scheduler */
96 *ServerBin
VALUE(NULL
),
97 /* Root directory for binaries */
98 *StateDir
VALUE(NULL
),
99 /* Root directory for state data */
100 *RequestRoot
VALUE(NULL
),
101 /* Directory for request files */
102 *DocumentRoot
VALUE(NULL
);
103 /* Root directory for documents */
104 VAR
int RemoteAccessEnabled
VALUE(0),
105 /* Are we listening on non-local addresses? */
106 ServerNameIsIP
VALUE(0);
107 /* Is the ServerName an IP address? */
108 VAR
int NumSystemGroups
VALUE(0);
109 /* Number of system group names */
110 VAR
char *SystemGroups
[MAX_SYSTEM_GROUPS
]
112 /* System group names */
113 VAR gid_t SystemGroupIDs
[MAX_SYSTEM_GROUPS
]
115 /* System group IDs */
116 VAR
char *AccessLog
VALUE(NULL
),
117 /* Access log filename */
118 *ErrorLog
VALUE(NULL
),
119 /* Error log filename */
120 *PageLog
VALUE(NULL
),
121 /* Page log filename */
122 *CacheDir
VALUE(NULL
),
123 /* Cache file directory */
124 *DataDir
VALUE(NULL
),
125 /* Data file directory */
126 *DefaultLanguage
VALUE(NULL
),
127 /* Default language encoding */
128 *DefaultCharset
VALUE(NULL
),
129 /* Default charset */
130 *DefaultLocale
VALUE(NULL
),
132 *DefaultPaperSize
VALUE(NULL
),
133 /* Default paper size */
134 *ErrorPolicy
VALUE(NULL
),
135 /* Default printer-error-policy */
136 *RIPCache
VALUE(NULL
),
137 /* Amount of memory for RIPs */
138 *TempDir
VALUE(NULL
),
139 /* Temporary directory */
140 *Printcap
VALUE(NULL
),
142 *PrintcapGUI
VALUE(NULL
),
143 /* GUI program to use for IRIX */
144 *FontPath
VALUE(NULL
),
145 /* Font search path */
146 *RemoteRoot
VALUE(NULL
),
147 /* Remote root user */
148 *Classification
VALUE(NULL
);
149 /* Classification of system */
151 VAR
char *GSSServiceName
VALUE(NULL
);
152 /* GSS service name */
153 VAR
char *Krb5Keytab
VALUE(NULL
);
154 /* Kerberos Keytab */
155 #endif /* HAVE_GSSAPI */
156 VAR uid_t User
VALUE(1);
157 /* User ID for server */
158 VAR gid_t Group
VALUE(0);
159 /* Group ID for server */
160 VAR cupsd_accesslog_t AccessLogLevel
VALUE(CUPSD_ACCESSLOG_ACTIONS
);
161 /* Access log level */
162 VAR
int ClassifyOverride
VALUE(0),
163 /* Allow overrides? */
164 ConfigFilePerm
VALUE(0640),
165 /* Permissions for config files */
166 FatalErrors
VALUE(CUPSD_FATAL_CONFIG
),
167 /* Which errors are fatal? */
168 LogFilePerm
VALUE(0644);
169 /* Permissions for log files */
170 VAR cupsd_loglevel_t LogLevel
VALUE(CUPSD_LOG_WARN
);
171 /* Error log level */
172 VAR cupsd_time_t LogTimeFormat
VALUE(CUPSD_TIME_STANDARD
);
173 /* Log file time format */
174 VAR
int MaxClients
VALUE(100),
175 /* Maximum number of clients */
176 MaxClientsPerHost
VALUE(0),
177 /* Maximum number of clients per host */
178 MaxCopies
VALUE(CUPS_DEFAULT_MAX_COPIES
),
179 /* Maximum number of copies per job */
180 MaxLogSize
VALUE(1024 * 1024),
181 /* Maximum size of log files */
182 MaxPrinterHistory
VALUE(10),
183 /* Maximum printer state history */
184 MaxRequestSize
VALUE(0),
185 /* Maximum size of IPP requests */
186 HostNameLookups
VALUE(FALSE
),
187 /* Do we do reverse lookups? */
188 Timeout
VALUE(DEFAULT_TIMEOUT
),
189 /* Timeout during requests */
190 KeepAlive
VALUE(TRUE
),
191 /* Support the Keep-Alive option? */
192 KeepAliveTimeout
VALUE(DEFAULT_KEEPALIVE
),
193 /* Timeout between requests */
194 ImplicitClasses
VALUE(TRUE
),
195 /* Are classes implicitly created? */
196 ImplicitAnyClasses
VALUE(FALSE
),
197 /* Create AnyPrinter classes? */
198 HideImplicitMembers
VALUE(TRUE
),
199 /* Hide implicit class members? */
200 FileDevice
VALUE(FALSE
),
201 /* Allow file: devices? */
202 FilterLimit
VALUE(0),
203 /* Max filter cost at any time */
204 FilterLevel
VALUE(0),
205 /* Current filter level */
207 /* Nice value for filters */
208 ReloadTimeout
VALUE(DEFAULT_KEEPALIVE
),
209 /* Timeout before reload from SIGHUP */
210 RootCertDuration
VALUE(300),
211 /* Root certificate update interval */
213 /* User to run as, used for files */
214 PrintcapFormat
VALUE(PRINTCAP_BSD
),
215 /* Format of printcap file? */
216 DefaultShared
VALUE(TRUE
),
217 /* Share printers by default? */
218 MultipleOperationTimeout
VALUE(DEFAULT_TIMEOUT
);
219 /* multiple-operation-time-out value */
220 VAR cups_file_t
*AccessFile
VALUE(NULL
),
221 /* Access log file */
222 *ErrorFile
VALUE(NULL
),
224 *PageFile
VALUE(NULL
);
226 VAR
char *PageLogFormat
VALUE(NULL
);
227 /* Page log format */
228 VAR mime_t
*MimeDatabase
VALUE(NULL
);
229 /* MIME type database */
230 VAR
int NumMimeTypes
VALUE(0);
231 /* Number of MIME types */
232 VAR
const char **MimeTypes
VALUE(NULL
);
233 /* Array of MIME types */
236 VAR
char *ServerCertificate
VALUE(NULL
);
237 /* Server certificate file */
238 # if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
239 VAR
char *ServerKey
VALUE(NULL
);
240 /* Server key file */
241 # endif /* HAVE_LIBSSL || HAVE_GNUTLS */
242 VAR
int SSLOptions
VALUE(CUPSD_SSL_NONE
);
243 /* SSL/TLS options */
244 #endif /* HAVE_SSL */
247 VAR
int LaunchdTimeout
VALUE(DEFAULT_KEEPALIVE
);
248 /* Time after which an idle cupsd will exit */
249 VAR
char *LaunchdConf
VALUE(NULL
);
250 /* launchd(8) configuration file */
251 #endif /* HAVE_LAUNCHD */
254 VAR
int AppleQuotas
VALUE(TRUE
);
255 /* Use Apple PrintService Quotas instead of CUPS quotas */
256 #endif /* __APPLE__ */
258 #ifdef HAVE_AUTHORIZATION_H
259 VAR
char *SystemGroupAuthKey
VALUE(NULL
);
260 /* System group auth key */
261 #endif /* HAVE_AUTHORIZATION_H */
268 extern int cupsdCheckPermissions(const char *filename
,
269 const char *suffix
, int mode
,
270 int user
, int group
, int is_dir
,
272 extern char *cupsdGetDateTime(struct timeval
*t
, cupsd_time_t format
);
274 extern int cupsdLogGSSMessage(int level
, int major_status
,
276 const char *message
, ...);
277 #endif /* HAVE_GSSAPI */
278 extern int cupsdLogJob(cupsd_job_t
*job
, int level
, const char *message
, ...)
280 __attribute__ ((__format__ (__printf__
, 3, 4)))
281 #endif /* __GNUC__ */
283 extern int cupsdLogMessage(int level
, const char *message
, ...)
285 __attribute__ ((__format__ (__printf__
, 2, 3)))
286 #endif /* __GNUC__ */
288 extern int cupsdLogPage(cupsd_job_t
*job
, const char *page
);
289 extern int cupsdLogRequest(cupsd_client_t
*con
, http_status_t code
);
290 extern int cupsdReadConfiguration(void);
291 extern int cupsdWriteErrorLog(int level
, const char *message
);
295 * End of "$Id: conf.h 7935 2008-09-11 01:54:11Z mike $".