vacation.c revision 1.26 1 1.26 christos /* $NetBSD: vacation.c,v 1.26 2004/04/03 23:57:32 christos Exp $ */
2 1.5 jtc
3 1.1 cgd /*
4 1.5 jtc * Copyright (c) 1983, 1987, 1993
5 1.5 jtc * The Regents of the University of California. All rights reserved.
6 1.1 cgd *
7 1.1 cgd * Redistribution and use in source and binary forms, with or without
8 1.1 cgd * modification, are permitted provided that the following conditions
9 1.1 cgd * are met:
10 1.1 cgd * 1. Redistributions of source code must retain the above copyright
11 1.1 cgd * notice, this list of conditions and the following disclaimer.
12 1.1 cgd * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 cgd * notice, this list of conditions and the following disclaimer in the
14 1.1 cgd * documentation and/or other materials provided with the distribution.
15 1.24 agc * 3. Neither the name of the University nor the names of its contributors
16 1.1 cgd * may be used to endorse or promote products derived from this software
17 1.1 cgd * without specific prior written permission.
18 1.1 cgd *
19 1.1 cgd * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 1.1 cgd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 1.1 cgd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 1.1 cgd * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 1.1 cgd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 1.1 cgd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 1.1 cgd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 1.1 cgd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 1.1 cgd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 1.1 cgd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 1.1 cgd * SUCH DAMAGE.
30 1.1 cgd */
31 1.1 cgd
32 1.10 mikel #include <sys/cdefs.h>
33 1.10 mikel
34 1.1 cgd #ifndef lint
35 1.10 mikel __COPYRIGHT("@(#) Copyright (c) 1983, 1987, 1993\n\
36 1.10 mikel The Regents of the University of California. All rights reserved.\n");
37 1.1 cgd #endif /* not lint */
38 1.1 cgd
39 1.1 cgd #ifndef lint
40 1.5 jtc #if 0
41 1.5 jtc static char sccsid[] = "@(#)vacation.c 8.2 (Berkeley) 1/26/94";
42 1.5 jtc #endif
43 1.26 christos __RCSID("$NetBSD: vacation.c,v 1.26 2004/04/03 23:57:32 christos Exp $");
44 1.1 cgd #endif /* not lint */
45 1.1 cgd
46 1.1 cgd /*
47 1.1 cgd ** Vacation
48 1.1 cgd ** Copyright (c) 1983 Eric P. Allman
49 1.1 cgd ** Berkeley, California
50 1.1 cgd */
51 1.1 cgd
52 1.1 cgd #include <sys/param.h>
53 1.1 cgd #include <sys/stat.h>
54 1.10 mikel
55 1.10 mikel #include <ctype.h>
56 1.10 mikel #include <db.h>
57 1.22 christos #include <err.h>
58 1.10 mikel #include <errno.h>
59 1.1 cgd #include <fcntl.h>
60 1.10 mikel #include <paths.h>
61 1.1 cgd #include <pwd.h>
62 1.10 mikel #include <stdio.h>
63 1.10 mikel #include <stdlib.h>
64 1.10 mikel #include <string.h>
65 1.10 mikel #include <syslog.h>
66 1.1 cgd #include <time.h>
67 1.1 cgd #include <tzfile.h>
68 1.1 cgd #include <unistd.h>
69 1.1 cgd
70 1.1 cgd /*
71 1.1 cgd * VACATION -- return a message to the sender when on vacation.
72 1.1 cgd *
73 1.1 cgd * This program is invoked as a message receiver. It returns a
74 1.1 cgd * message specified by the user to whomever sent the mail, taking
75 1.1 cgd * care not to return a message too often to prevent "I am on
76 1.1 cgd * vacation" loops.
77 1.1 cgd */
78 1.1 cgd
79 1.1 cgd #define MAXLINE 1024 /* max line from mail header */
80 1.1 cgd #define VDB ".vacation.db" /* dbm's database */
81 1.1 cgd #define VMSG ".vacation.msg" /* vacation message */
82 1.1 cgd
83 1.1 cgd typedef struct alias {
84 1.1 cgd struct alias *next;
85 1.15 mycroft const char *name;
86 1.17 mjl } alias_t;
87 1.17 mjl alias_t *names;
88 1.1 cgd
89 1.1 cgd DB *db;
90 1.6 jtc char from[MAXLINE];
91 1.22 christos static int tflag = 0;
92 1.25 christos #define APPARENTLY_TO 1
93 1.25 christos #define DELIVERED_TO 2
94 1.25 christos static int fflag = 0;
95 1.25 christos #define FROM_FROM 1
96 1.25 christos #define RETURN_PATH_FROM 2
97 1.25 christos #define SENDER_FROM 4
98 1.1 cgd
99 1.17 mjl int main(int, char **);
100 1.17 mjl int junkmail(void);
101 1.17 mjl int nsearch(const char *, const char *);
102 1.17 mjl void readheaders(void);
103 1.17 mjl int recent(void);
104 1.25 christos void getfrom(char *);
105 1.17 mjl void sendmessage(const char *);
106 1.17 mjl void setinterval(time_t);
107 1.17 mjl void setreply(void);
108 1.17 mjl void usage(void);
109 1.1 cgd
110 1.6 jtc int
111 1.17 mjl main(int argc, char **argv)
112 1.1 cgd {
113 1.1 cgd struct passwd *pw;
114 1.17 mjl alias_t *cur;
115 1.1 cgd time_t interval;
116 1.1 cgd int ch, iflag;
117 1.22 christos char *p;
118 1.1 cgd
119 1.1 cgd opterr = iflag = 0;
120 1.1 cgd interval = -1;
121 1.25 christos openlog(getprogname(), 0, LOG_USER);
122 1.25 christos while ((ch = getopt(argc, argv, "a:f:Iir:t:")) != -1)
123 1.1 cgd switch((char)ch) {
124 1.1 cgd case 'a': /* alias */
125 1.17 mjl if (!(cur = (alias_t *)malloc((size_t)sizeof(alias_t))))
126 1.1 cgd break;
127 1.1 cgd cur->name = optarg;
128 1.1 cgd cur->next = names;
129 1.1 cgd names = cur;
130 1.1 cgd break;
131 1.25 christos case 'f':
132 1.25 christos for (p = optarg; *p; p++)
133 1.25 christos switch (*p) {
134 1.25 christos case 'F':
135 1.25 christos fflag |= FROM_FROM;
136 1.25 christos break;
137 1.25 christos case 'R':
138 1.25 christos fflag |= RETURN_PATH_FROM;
139 1.25 christos break;
140 1.25 christos case 'S':
141 1.25 christos fflag |= SENDER_FROM;
142 1.25 christos break;
143 1.25 christos default:
144 1.25 christos errx(1, "Unknown -f option `%c'", *p);
145 1.25 christos }
146 1.25 christos break;
147 1.1 cgd case 'I': /* backward compatible */
148 1.1 cgd case 'i': /* init the database */
149 1.1 cgd iflag = 1;
150 1.1 cgd break;
151 1.1 cgd case 'r':
152 1.16 christos if (isdigit((unsigned char)*optarg)) {
153 1.1 cgd interval = atol(optarg) * SECSPERDAY;
154 1.1 cgd if (interval < 0)
155 1.1 cgd usage();
156 1.1 cgd }
157 1.1 cgd else
158 1.7 cgd interval = (time_t)LONG_MAX; /* XXX */
159 1.1 cgd break;
160 1.22 christos case 't':
161 1.22 christos for (p = optarg; *p; p++)
162 1.22 christos switch (*p) {
163 1.22 christos case 'A':
164 1.22 christos tflag |= APPARENTLY_TO;
165 1.22 christos break;
166 1.22 christos case 'D':
167 1.22 christos tflag |= DELIVERED_TO;
168 1.22 christos break;
169 1.22 christos default:
170 1.22 christos errx(1, "Unknown -t option `%c'", *p);
171 1.22 christos }
172 1.22 christos break;
173 1.1 cgd case '?':
174 1.1 cgd default:
175 1.1 cgd usage();
176 1.1 cgd }
177 1.1 cgd argc -= optind;
178 1.1 cgd argv += optind;
179 1.1 cgd
180 1.1 cgd if (argc != 1) {
181 1.1 cgd if (!iflag)
182 1.1 cgd usage();
183 1.1 cgd if (!(pw = getpwuid(getuid()))) {
184 1.1 cgd syslog(LOG_ERR,
185 1.13 mikel "vacation: no such user uid %u.", getuid());
186 1.1 cgd exit(1);
187 1.1 cgd }
188 1.1 cgd }
189 1.1 cgd else if (!(pw = getpwnam(*argv))) {
190 1.13 mikel syslog(LOG_ERR, "vacation: no such user %s.", *argv);
191 1.1 cgd exit(1);
192 1.1 cgd }
193 1.1 cgd if (chdir(pw->pw_dir)) {
194 1.18 lukem syslog(LOG_ERR,
195 1.13 mikel "vacation: no such directory %s.", pw->pw_dir);
196 1.1 cgd exit(1);
197 1.1 cgd }
198 1.1 cgd
199 1.2 proven db = dbopen(VDB, O_CREAT|O_RDWR | (iflag ? O_TRUNC : 0),
200 1.5 jtc S_IRUSR|S_IWUSR, DB_HASH, NULL);
201 1.1 cgd if (!db) {
202 1.18 lukem syslog(LOG_ERR, "vacation: %s: %m", VDB);
203 1.1 cgd exit(1);
204 1.1 cgd }
205 1.1 cgd
206 1.1 cgd if (interval != -1)
207 1.1 cgd setinterval(interval);
208 1.1 cgd
209 1.1 cgd if (iflag) {
210 1.1 cgd (void)(db->close)(db);
211 1.1 cgd exit(0);
212 1.1 cgd }
213 1.1 cgd
214 1.17 mjl if (!(cur = malloc((size_t)sizeof(alias_t))))
215 1.1 cgd exit(1);
216 1.1 cgd cur->name = pw->pw_name;
217 1.1 cgd cur->next = names;
218 1.1 cgd names = cur;
219 1.1 cgd
220 1.1 cgd readheaders();
221 1.1 cgd if (!recent()) {
222 1.1 cgd setreply();
223 1.1 cgd (void)(db->close)(db);
224 1.1 cgd sendmessage(pw->pw_name);
225 1.1 cgd }
226 1.5 jtc else
227 1.5 jtc (void)(db->close)(db);
228 1.1 cgd exit(0);
229 1.1 cgd /* NOTREACHED */
230 1.1 cgd }
231 1.1 cgd
232 1.1 cgd /*
233 1.1 cgd * readheaders --
234 1.1 cgd * read mail headers
235 1.1 cgd */
236 1.6 jtc void
237 1.20 perry readheaders(void)
238 1.1 cgd {
239 1.17 mjl alias_t *cur;
240 1.10 mikel char *p;
241 1.1 cgd int tome, cont;
242 1.1 cgd char buf[MAXLINE];
243 1.1 cgd
244 1.1 cgd cont = tome = 0;
245 1.1 cgd while (fgets(buf, sizeof(buf), stdin) && *buf != '\n')
246 1.1 cgd switch(*buf) {
247 1.25 christos case 'F': /* "From " or "From:" */
248 1.1 cgd cont = 0;
249 1.25 christos if (!strncmp(buf, "From ", 5))
250 1.25 christos getfrom(buf + 5);
251 1.26 christos if ((fflag & FROM_FROM) != 0 &&
252 1.26 christos strncmp(buf, "From:", 5) == 0)
253 1.25 christos getfrom(buf + 5);
254 1.1 cgd break;
255 1.1 cgd case 'P': /* "Precedence:" */
256 1.1 cgd cont = 0;
257 1.1 cgd if (strncasecmp(buf, "Precedence", 10) ||
258 1.10 mikel (buf[10] != ':' && buf[10] != ' ' &&
259 1.10 mikel buf[10] != '\t'))
260 1.1 cgd break;
261 1.10 mikel if (!(p = strchr(buf, ':')))
262 1.1 cgd break;
263 1.25 christos while (*++p && isspace((unsigned char)*p))
264 1.25 christos continue;
265 1.1 cgd if (!*p)
266 1.1 cgd break;
267 1.1 cgd if (!strncasecmp(p, "junk", 4) ||
268 1.5 jtc !strncasecmp(p, "bulk", 4) ||
269 1.5 jtc !strncasecmp(p, "list", 4))
270 1.1 cgd exit(0);
271 1.1 cgd break;
272 1.1 cgd case 'C': /* "Cc:" */
273 1.1 cgd if (strncmp(buf, "Cc:", 3))
274 1.1 cgd break;
275 1.1 cgd cont = 1;
276 1.1 cgd goto findme;
277 1.1 cgd case 'T': /* "To:" */
278 1.1 cgd if (strncmp(buf, "To:", 3))
279 1.21 christos break;
280 1.21 christos cont = 1;
281 1.21 christos goto findme;
282 1.25 christos case 'A': /* "Apparently-To:" */
283 1.22 christos if ((tflag & APPARENTLY_TO) == 0 ||
284 1.25 christos strncmp(buf, "Apparently-To:", 14))
285 1.21 christos break;
286 1.21 christos cont = 1;
287 1.21 christos goto findme;
288 1.25 christos case 'D': /* "Delivered-To:" */
289 1.22 christos if ((tflag & DELIVERED_TO) == 0 ||
290 1.25 christos strncmp(buf, "Delivered-To:", 13))
291 1.1 cgd break;
292 1.1 cgd cont = 1;
293 1.1 cgd goto findme;
294 1.25 christos case 'R': /* "Return-Path:" */
295 1.25 christos cont = 0;
296 1.26 christos if ((fflag & RETURN_PATH_FROM) != 0 &&
297 1.26 christos strncmp(buf, "Return-Path:", 12) == 0)
298 1.25 christos getfrom(buf + 12);
299 1.25 christos break;
300 1.25 christos case 'S': /* "Sender:" */
301 1.25 christos cont = 0;
302 1.26 christos if ((fflag & SENDER_FROM) != 0 &&
303 1.26 christos strncmp(buf, "Sender:", 7) == 0)
304 1.25 christos getfrom(buf + 7);
305 1.25 christos break;
306 1.1 cgd default:
307 1.16 christos if (!isspace((unsigned char)*buf) || !cont || tome) {
308 1.1 cgd cont = 0;
309 1.1 cgd break;
310 1.1 cgd }
311 1.1 cgd findme: for (cur = names; !tome && cur; cur = cur->next)
312 1.1 cgd tome += nsearch(cur->name, buf);
313 1.1 cgd }
314 1.1 cgd if (!tome)
315 1.1 cgd exit(0);
316 1.1 cgd if (!*from) {
317 1.18 lukem syslog(LOG_ERR, "vacation: no initial \"From\" line.");
318 1.1 cgd exit(1);
319 1.1 cgd }
320 1.1 cgd }
321 1.1 cgd
322 1.1 cgd /*
323 1.1 cgd * nsearch --
324 1.1 cgd * do a nice, slow, search of a string for a substring.
325 1.1 cgd */
326 1.6 jtc int
327 1.17 mjl nsearch(const char *name, const char *str)
328 1.1 cgd {
329 1.10 mikel size_t len;
330 1.1 cgd
331 1.1 cgd for (len = strlen(name); *str; ++str)
332 1.17 mjl if (!strncasecmp(name, str, len))
333 1.1 cgd return(1);
334 1.1 cgd return(0);
335 1.1 cgd }
336 1.1 cgd
337 1.1 cgd /*
338 1.25 christos * getfrom --
339 1.25 christos * return the first string in the buffer, stripping leading and trailing
340 1.25 christos * blanks and <>.
341 1.25 christos */
342 1.25 christos void
343 1.25 christos getfrom(char *buf)
344 1.25 christos {
345 1.25 christos char *s, *p;
346 1.25 christos
347 1.25 christos for (s = buf; *s && isspace((unsigned char)*s); s++)
348 1.25 christos continue;
349 1.25 christos if (*s == '<')
350 1.25 christos *s++;
351 1.25 christos for (p = s; *p && !isspace((unsigned char)*p); p++)
352 1.25 christos continue;
353 1.25 christos if (*--p == '>')
354 1.25 christos *p = '\0';
355 1.25 christos else
356 1.25 christos *p = '\0';
357 1.25 christos (void)strlcpy(from, s, sizeof(from));
358 1.25 christos if (junkmail())
359 1.25 christos exit(0);
360 1.25 christos }
361 1.25 christos
362 1.25 christos /*
363 1.1 cgd * junkmail --
364 1.5 jtc * read the header and return if automagic/junk/bulk/list mail
365 1.1 cgd */
366 1.6 jtc int
367 1.20 perry junkmail(void)
368 1.1 cgd {
369 1.1 cgd static struct ignore {
370 1.1 cgd char *name;
371 1.1 cgd int len;
372 1.1 cgd } ignore[] = {
373 1.8 pk { "-request", 8 },
374 1.8 pk { "postmaster", 10 },
375 1.8 pk { "uucp", 4 },
376 1.8 pk { "mailer-daemon", 13 },
377 1.8 pk { "mailer", 6 },
378 1.8 pk { "-relay", 6 },
379 1.8 pk {NULL, 0 }
380 1.1 cgd };
381 1.10 mikel struct ignore *cur;
382 1.10 mikel int len;
383 1.10 mikel char *p;
384 1.1 cgd
385 1.1 cgd /*
386 1.1 cgd * This is mildly amusing, and I'm not positive it's right; trying
387 1.1 cgd * to find the "real" name of the sender, assuming that addresses
388 1.1 cgd * will be some variant of:
389 1.1 cgd *
390 1.1 cgd * From site!site!SENDER%site.domain%site.domain (at) site.domain
391 1.1 cgd */
392 1.10 mikel if (!(p = strchr(from, '%')))
393 1.10 mikel if (!(p = strchr(from, '@'))) {
394 1.10 mikel if ((p = strrchr(from, '!')))
395 1.1 cgd ++p;
396 1.1 cgd else
397 1.1 cgd p = from;
398 1.1 cgd for (; *p; ++p);
399 1.1 cgd }
400 1.1 cgd len = p - from;
401 1.1 cgd for (cur = ignore; cur->name; ++cur)
402 1.1 cgd if (len >= cur->len &&
403 1.1 cgd !strncasecmp(cur->name, p - cur->len, cur->len))
404 1.1 cgd return(1);
405 1.1 cgd return(0);
406 1.1 cgd }
407 1.1 cgd
408 1.1 cgd #define VIT "__VACATION__INTERVAL__TIMER__"
409 1.1 cgd
410 1.1 cgd /*
411 1.1 cgd * recent --
412 1.1 cgd * find out if user has gotten a vacation message recently.
413 1.11 lukem * use memmove for machines with alignment restrictions
414 1.1 cgd */
415 1.6 jtc int
416 1.20 perry recent(void)
417 1.1 cgd {
418 1.1 cgd DBT key, data;
419 1.1 cgd time_t then, next;
420 1.1 cgd
421 1.1 cgd /* get interval time */
422 1.1 cgd key.data = VIT;
423 1.1 cgd key.size = sizeof(VIT);
424 1.1 cgd if ((db->get)(db, &key, &data, 0))
425 1.1 cgd next = SECSPERDAY * DAYSPERWEEK;
426 1.1 cgd else
427 1.11 lukem memmove(&next, data.data, sizeof(next));
428 1.1 cgd
429 1.1 cgd /* get record for this address */
430 1.1 cgd key.data = from;
431 1.1 cgd key.size = strlen(from);
432 1.1 cgd if (!(db->get)(db, &key, &data, 0)) {
433 1.11 lukem memmove(&then, data.data, sizeof(then));
434 1.7 cgd if (next == (time_t)LONG_MAX || /* XXX */
435 1.7 cgd then + next > time(NULL))
436 1.1 cgd return(1);
437 1.1 cgd }
438 1.1 cgd return(0);
439 1.1 cgd }
440 1.1 cgd
441 1.1 cgd /*
442 1.1 cgd * setinterval --
443 1.1 cgd * store the reply interval
444 1.1 cgd */
445 1.6 jtc void
446 1.17 mjl setinterval(time_t interval)
447 1.1 cgd {
448 1.1 cgd DBT key, data;
449 1.1 cgd
450 1.1 cgd key.data = VIT;
451 1.1 cgd key.size = sizeof(VIT);
452 1.1 cgd data.data = &interval;
453 1.1 cgd data.size = sizeof(interval);
454 1.3 mycroft (void)(db->put)(db, &key, &data, 0);
455 1.1 cgd }
456 1.1 cgd
457 1.1 cgd /*
458 1.1 cgd * setreply --
459 1.1 cgd * store that this user knows about the vacation.
460 1.1 cgd */
461 1.6 jtc void
462 1.20 perry setreply(void)
463 1.1 cgd {
464 1.1 cgd DBT key, data;
465 1.1 cgd time_t now;
466 1.1 cgd
467 1.1 cgd key.data = from;
468 1.1 cgd key.size = strlen(from);
469 1.1 cgd (void)time(&now);
470 1.1 cgd data.data = &now;
471 1.1 cgd data.size = sizeof(now);
472 1.3 mycroft (void)(db->put)(db, &key, &data, 0);
473 1.1 cgd }
474 1.1 cgd
475 1.1 cgd /*
476 1.1 cgd * sendmessage --
477 1.1 cgd * exec sendmail to send the vacation file to sender
478 1.1 cgd */
479 1.6 jtc void
480 1.17 mjl sendmessage(const char *myname)
481 1.1 cgd {
482 1.5 jtc FILE *mfp, *sfp;
483 1.5 jtc int i;
484 1.5 jtc int pvect[2];
485 1.5 jtc char buf[MAXLINE];
486 1.5 jtc
487 1.5 jtc mfp = fopen(VMSG, "r");
488 1.5 jtc if (mfp == NULL) {
489 1.18 lukem syslog(LOG_ERR, "vacation: no ~%s/%s file.", myname, VMSG);
490 1.1 cgd exit(1);
491 1.1 cgd }
492 1.5 jtc if (pipe(pvect) < 0) {
493 1.13 mikel syslog(LOG_ERR, "vacation: pipe: %m");
494 1.5 jtc exit(1);
495 1.5 jtc }
496 1.5 jtc i = vfork();
497 1.5 jtc if (i < 0) {
498 1.13 mikel syslog(LOG_ERR, "vacation: fork: %m");
499 1.5 jtc exit(1);
500 1.5 jtc }
501 1.5 jtc if (i == 0) {
502 1.5 jtc dup2(pvect[0], 0);
503 1.5 jtc close(pvect[0]);
504 1.5 jtc close(pvect[1]);
505 1.14 cgd close(fileno(mfp));
506 1.9 mrg execl(_PATH_SENDMAIL, "sendmail", "-f", myname, "--", from,
507 1.9 mrg NULL);
508 1.13 mikel syslog(LOG_ERR, "vacation: can't exec %s: %m",
509 1.13 mikel _PATH_SENDMAIL);
510 1.12 thorpej _exit(1);
511 1.5 jtc }
512 1.5 jtc close(pvect[0]);
513 1.5 jtc sfp = fdopen(pvect[1], "w");
514 1.5 jtc fprintf(sfp, "To: %s\n", from);
515 1.5 jtc while (fgets(buf, sizeof buf, mfp))
516 1.5 jtc fputs(buf, sfp);
517 1.5 jtc fclose(mfp);
518 1.5 jtc fclose(sfp);
519 1.1 cgd }
520 1.1 cgd
521 1.6 jtc void
522 1.20 perry usage(void)
523 1.1 cgd {
524 1.10 mikel
525 1.22 christos syslog(LOG_ERR, "uid %u: usage: %s [-i] [-a alias] [-t A|D] login",
526 1.22 christos getuid(), getprogname());
527 1.1 cgd exit(1);
528 1.1 cgd }
529