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