]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | /* |
75bd9771 | 2 | * "$Id: conf.h 7674 2008-06-18 23:18:32Z mike $" |
ef416fc2 | 3 | * |
4 | * Configuration file definitions for the Common UNIX Printing System (CUPS) | |
5 | * scheduler. | |
6 | * | |
1f0275e3 | 7 | * Copyright 2007-2008 by Apple Inc. |
7594b224 | 8 | * Copyright 1997-2007 by Easy Software Products, all rights reserved. |
ef416fc2 | 9 | * |
10 | * These coded instructions, statements, and computer programs are the | |
bc44d920 | 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/". | |
ef416fc2 | 15 | */ |
16 | ||
17 | ||
18 | /* | |
19 | * Log levels... | |
20 | */ | |
21 | ||
22 | typedef enum | |
23 | { | |
c9fc04c6 MS |
24 | CUPSD_LOG_PPD = -4, /* Used internally for PPD keywords */ |
25 | CUPSD_LOG_ATTR, /* Used internally for attributes */ | |
f7deaa1a | 26 | CUPSD_LOG_STATE, /* Used internally for state-reasons */ |
27 | CUPSD_LOG_PAGE, /* Used internally for page logging */ | |
ef416fc2 | 28 | CUPSD_LOG_NONE, |
f7deaa1a | 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 */ | |
ef416fc2 | 38 | } cupsd_loglevel_t; |
39 | ||
1f0275e3 MS |
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 | ||
ef416fc2 | 47 | |
48 | /* | |
49 | * Printcap formats... | |
50 | */ | |
51 | ||
f7deaa1a | 52 | #define PRINTCAP_BSD 0 /* Berkeley LPD format */ |
53 | #define PRINTCAP_SOLARIS 1 /* Solaris lpsched format */ | |
ef416fc2 | 54 | |
55 | ||
56 | /* | |
57 | * Globals... | |
58 | */ | |
59 | ||
60 | VAR char *ConfigurationFile VALUE(NULL), | |
61 | /* Configuration file to use */ | |
62 | *ServerName VALUE(NULL), | |
63 | /* FQDN for server */ | |
64 | *ServerAdmin VALUE(NULL), | |
65 | /* Administrator's email */ | |
66 | *ServerRoot VALUE(NULL), | |
67 | /* Root directory for scheduler */ | |
68 | *ServerBin VALUE(NULL), | |
69 | /* Root directory for binaries */ | |
70 | *StateDir VALUE(NULL), | |
71 | /* Root directory for state data */ | |
72 | *RequestRoot VALUE(NULL), | |
73 | /* Directory for request files */ | |
74 | *DocumentRoot VALUE(NULL); | |
75 | /* Root directory for documents */ | |
8ca02f3c | 76 | VAR int ServerNameIsIP VALUE(0); |
ef416fc2 | 77 | VAR int NumSystemGroups VALUE(0); |
78 | /* Number of system group names */ | |
ac884b6a MS |
79 | VAR char *SystemGroups[MAX_SYSTEM_GROUPS] |
80 | VALUE({0}); | |
ef416fc2 | 81 | /* System group names */ |
ac884b6a MS |
82 | VAR gid_t SystemGroupIDs[MAX_SYSTEM_GROUPS] |
83 | VALUE({0}); | |
ef416fc2 | 84 | /* System group IDs */ |
85 | VAR char *AccessLog VALUE(NULL), | |
86 | /* Access log filename */ | |
87 | *ErrorLog VALUE(NULL), | |
88 | /* Error log filename */ | |
89 | *PageLog VALUE(NULL), | |
90 | /* Page log filename */ | |
91 | *CacheDir VALUE(NULL), | |
92 | /* Cache file directory */ | |
93 | *DataDir VALUE(NULL), | |
94 | /* Data file directory */ | |
95 | *DefaultLanguage VALUE(NULL), | |
96 | /* Default language encoding */ | |
97 | *DefaultCharset VALUE(NULL), | |
98 | /* Default charset */ | |
99 | *DefaultLocale VALUE(NULL), | |
100 | /* Default locale */ | |
323c5de1 | 101 | *ErrorPolicy VALUE(NULL), |
102 | /* Default printer-error-policy */ | |
ef416fc2 | 103 | *RIPCache VALUE(NULL), |
104 | /* Amount of memory for RIPs */ | |
105 | *TempDir VALUE(NULL), | |
106 | /* Temporary directory */ | |
107 | *Printcap VALUE(NULL), | |
108 | /* Printcap file */ | |
109 | *PrintcapGUI VALUE(NULL), | |
110 | /* GUI program to use for IRIX */ | |
111 | *FontPath VALUE(NULL), | |
112 | /* Font search path */ | |
113 | *RemoteRoot VALUE(NULL), | |
114 | /* Remote root user */ | |
115 | *Classification VALUE(NULL); | |
116 | /* Classification of system */ | |
f7deaa1a | 117 | #ifdef HAVE_GSSAPI |
118 | VAR char *GSSServiceName VALUE(NULL); | |
119 | /* GSS service name */ | |
120 | VAR char *Krb5Keytab VALUE(NULL); | |
121 | /* Kerberos Keytab */ | |
122 | #endif /* HAVE_GSSAPI */ | |
ef416fc2 | 123 | VAR uid_t User VALUE(1); |
124 | /* User ID for server */ | |
125 | VAR gid_t Group VALUE(0); | |
126 | /* Group ID for server */ | |
1f0275e3 MS |
127 | VAR int AccessLogLevel VALUE(CUPSD_ACCESSLOG_ACTIONS), |
128 | /* Access log level */ | |
129 | ClassifyOverride VALUE(0), | |
ef416fc2 | 130 | /* Allow overrides? */ |
131 | ConfigFilePerm VALUE(0640), | |
132 | /* Permissions for config files */ | |
133 | LogFilePerm VALUE(0644), | |
134 | /* Permissions for log files */ | |
1f0275e3 MS |
135 | LogLevel VALUE(CUPSD_LOG_WARN), |
136 | /* Error log level */ | |
ef416fc2 | 137 | MaxClients VALUE(0), |
138 | /* Maximum number of clients */ | |
139 | MaxClientsPerHost VALUE(0), | |
140 | /* Maximum number of clients per host */ | |
f7deaa1a | 141 | MaxCopies VALUE(CUPS_DEFAULT_MAX_COPIES), |
ef416fc2 | 142 | /* Maximum number of copies per job */ |
143 | MaxLogSize VALUE(1024 * 1024), | |
144 | /* Maximum size of log files */ | |
145 | MaxPrinterHistory VALUE(10), | |
146 | /* Maximum printer state history */ | |
147 | MaxRequestSize VALUE(0), | |
148 | /* Maximum size of IPP requests */ | |
149 | HostNameLookups VALUE(FALSE), | |
150 | /* Do we do reverse lookups? */ | |
151 | Timeout VALUE(DEFAULT_TIMEOUT), | |
152 | /* Timeout during requests */ | |
153 | KeepAlive VALUE(TRUE), | |
154 | /* Support the Keep-Alive option? */ | |
155 | KeepAliveTimeout VALUE(DEFAULT_KEEPALIVE), | |
156 | /* Timeout between requests */ | |
157 | ImplicitClasses VALUE(TRUE), | |
158 | /* Are classes implicitly created? */ | |
159 | ImplicitAnyClasses VALUE(FALSE), | |
160 | /* Create AnyPrinter classes? */ | |
161 | HideImplicitMembers VALUE(TRUE), | |
162 | /* Hide implicit class members? */ | |
163 | FileDevice VALUE(FALSE), | |
164 | /* Allow file: devices? */ | |
165 | FilterLimit VALUE(0), | |
166 | /* Max filter cost at any time */ | |
167 | FilterLevel VALUE(0), | |
168 | /* Current filter level */ | |
169 | FilterNice VALUE(0), | |
170 | /* Nice value for filters */ | |
171 | ReloadTimeout VALUE(0), | |
172 | /* Timeout before reload from SIGHUP */ | |
173 | RootCertDuration VALUE(300), | |
174 | /* Root certificate update interval */ | |
ac884b6a MS |
175 | RunUser VALUE(0), |
176 | /* User to run as, used for files */ | |
fa73b229 | 177 | PrintcapFormat VALUE(PRINTCAP_BSD), |
ef416fc2 | 178 | /* Format of printcap file? */ |
fa73b229 | 179 | DefaultShared VALUE(TRUE); |
180 | /* Share printers by default? */ | |
ef416fc2 | 181 | VAR cups_file_t *AccessFile VALUE(NULL), |
182 | /* Access log file */ | |
183 | *ErrorFile VALUE(NULL), | |
184 | /* Error log file */ | |
185 | *PageFile VALUE(NULL); | |
186 | /* Page log file */ | |
01ce6322 MS |
187 | VAR char *PageLogFormat VALUE(NULL); |
188 | /* Page log format */ | |
ef416fc2 | 189 | VAR mime_t *MimeDatabase VALUE(NULL); |
190 | /* MIME type database */ | |
191 | VAR int NumMimeTypes VALUE(0); | |
192 | /* Number of MIME types */ | |
193 | VAR const char **MimeTypes VALUE(NULL); | |
194 | /* Array of MIME types */ | |
195 | ||
196 | #ifdef HAVE_SSL | |
197 | VAR char *ServerCertificate VALUE(NULL); | |
198 | /* Server certificate file */ | |
199 | # if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS) | |
200 | VAR char *ServerKey VALUE(NULL); | |
201 | /* Server key file */ | |
ef416fc2 | 202 | # endif /* HAVE_LIBSSL || HAVE_GNUTLS */ |
203 | #endif /* HAVE_SSL */ | |
204 | ||
a4d04587 | 205 | #ifdef HAVE_LAUNCHD |
206 | VAR int LaunchdTimeout VALUE(DEFAULT_TIMEOUT); | |
207 | /* Time after which an idle cupsd will exit */ | |
208 | VAR char *LaunchdConf VALUE(NULL); | |
209 | /* launchd(8) configuration file */ | |
210 | #endif /* HAVE_LAUNCHD */ | |
ef416fc2 | 211 | |
7594b224 | 212 | #ifdef __APPLE__ |
213 | VAR int AppleQuotas VALUE(TRUE); | |
214 | /* Use Apple PrintService Quotas instead of CUPS quotas */ | |
215 | #endif /* __APPLE__ */ | |
216 | ||
f7deaa1a | 217 | #ifdef HAVE_AUTHORIZATION_H |
218 | VAR char *SystemGroupAuthKey VALUE(NULL); | |
219 | /* System group auth key */ | |
220 | #endif /* HAVE_AUTHORIZATION_H */ | |
221 | ||
222 | ||
ef416fc2 | 223 | /* |
224 | * Prototypes... | |
225 | */ | |
226 | ||
b94498cf | 227 | extern int cupsdCheckPermissions(const char *filename, |
228 | const char *suffix, int mode, | |
229 | int user, int group, int is_dir, | |
230 | int create_dir); | |
ef416fc2 | 231 | extern char *cupsdGetDateTime(time_t t); |
f7deaa1a | 232 | #ifdef HAVE_GSSAPI |
233 | extern int cupsdLogGSSMessage(int level, int major_status, | |
234 | int minor_status, | |
235 | const char *message, ...); | |
236 | #endif /* HAVE_GSSAPI */ | |
75bd9771 MS |
237 | extern int cupsdLogJob(cupsd_job_t *job, int level, const char *message, ...) |
238 | #ifdef __GNUC__ | |
239 | __attribute__ ((__format__ (__printf__, 3, 4))) | |
240 | #endif /* __GNUC__ */ | |
241 | ; | |
ef416fc2 | 242 | extern int cupsdLogMessage(int level, const char *message, ...) |
243 | #ifdef __GNUC__ | |
244 | __attribute__ ((__format__ (__printf__, 2, 3))) | |
245 | #endif /* __GNUC__ */ | |
246 | ; | |
247 | extern int cupsdLogPage(cupsd_job_t *job, const char *page); | |
f7deaa1a | 248 | extern int cupsdLogRequest(cupsd_client_t *con, http_status_t code); |
b94498cf | 249 | extern int cupsdReadConfiguration(void); |
75bd9771 | 250 | extern int cupsdWriteErrorLog(int level, const char *message); |
ef416fc2 | 251 | |
252 | ||
253 | /* | |
75bd9771 | 254 | * End of "$Id: conf.h 7674 2008-06-18 23:18:32Z mike $". |
ef416fc2 | 255 | */ |