Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/vacation use LOG_MAIL (instead of default, which is ...
details: https://anonhg.NetBSD.org/src/rev/446deaad4caf
branches: trunk
changeset: 502007:446deaad4caf
user: lukem <lukem%NetBSD.org@localhost>
date: Wed Jan 10 12:34:50 2001 +0000
description:
use LOG_MAIL (instead of default, which is LOG_USER)
log all fatal errors to LOG_ERR
diffstat:
usr.bin/vacation/vacation.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (71 lines):
diff -r 33a27c5b7569 -r 446deaad4caf usr.bin/vacation/vacation.c
--- a/usr.bin/vacation/vacation.c Wed Jan 10 12:30:19 2001 +0000
+++ b/usr.bin/vacation/vacation.c Wed Jan 10 12:34:50 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vacation.c,v 1.17 2000/07/21 01:21:31 mjl Exp $ */
+/* $NetBSD: vacation.c,v 1.18 2001/01/10 12:34:50 lukem Exp $ */
/*
* Copyright (c) 1983, 1987, 1993
@@ -44,7 +44,7 @@
#if 0
static char sccsid[] = "@(#)vacation.c 8.2 (Berkeley) 1/26/94";
#endif
-__RCSID("$NetBSD: vacation.c,v 1.17 2000/07/21 01:21:31 mjl Exp $");
+__RCSID("$NetBSD: vacation.c,v 1.18 2001/01/10 12:34:50 lukem Exp $");
#endif /* not lint */
/*
@@ -112,6 +112,7 @@
opterr = iflag = 0;
interval = -1;
+ openlog("vacation", 0, LOG_MAIL);
while ((ch = getopt(argc, argv, "a:Iir:")) != -1)
switch((char)ch) {
case 'a': /* alias */
@@ -155,7 +156,7 @@
exit(1);
}
if (chdir(pw->pw_dir)) {
- syslog(LOG_NOTICE,
+ syslog(LOG_ERR,
"vacation: no such directory %s.", pw->pw_dir);
exit(1);
}
@@ -163,7 +164,7 @@
db = dbopen(VDB, O_CREAT|O_RDWR | (iflag ? O_TRUNC : 0),
S_IRUSR|S_IWUSR, DB_HASH, NULL);
if (!db) {
- syslog(LOG_NOTICE, "vacation: %s: %m", VDB);
+ syslog(LOG_ERR, "vacation: %s: %m", VDB);
exit(1);
}
@@ -257,7 +258,7 @@
if (!tome)
exit(0);
if (!*from) {
- syslog(LOG_NOTICE, "vacation: no initial \"From\" line.");
+ syslog(LOG_ERR, "vacation: no initial \"From\" line.");
exit(1);
}
}
@@ -404,7 +405,7 @@
mfp = fopen(VMSG, "r");
if (mfp == NULL) {
- syslog(LOG_NOTICE, "vacation: no ~%s/%s file.", myname, VMSG);
+ syslog(LOG_ERR, "vacation: no ~%s/%s file.", myname, VMSG);
exit(1);
}
if (pipe(pvect) < 0) {
@@ -440,7 +441,7 @@
usage()
{
- syslog(LOG_NOTICE, "uid %u: usage: vacation [-i] [-a alias] login",
+ syslog(LOG_ERR, "uid %u: usage: vacation [-i] [-a alias] login",
getuid());
exit(1);
}
Home |
Main Index |
Thread Index |
Old Index