From da2c43d625bd4c8347edc5d16f29955f9ddd08a8 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Wed, 31 Aug 2005 20:41:24 +0000 Subject: [PATCH] Fixed OpenBSD --- unix/mbuseradd.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/unix/mbuseradd.c b/unix/mbuseradd.c index de3182c1..5fc421c0 100644 --- a/unix/mbuseradd.c +++ b/unix/mbuseradd.c @@ -229,6 +229,13 @@ int main(int argc, char *argv[]) exit(1); } + /* + * We don't log into MBSE BBS logfiles but to the system logfiles, + * because we are modifying system files not belonging to MBSE BBS. + */ + openlog("mbuseradd", LOG_PID|LOG_CONS|LOG_NOWAIT, LOG_AUTH); + syslog(LOG_WARNING, "mbuseradd %s %s %s %s", argv[1], argv[2], argv[3], argv[4]); + /* * Find out the name of our parent. */ @@ -250,6 +257,7 @@ int main(int argc, char *argv[]) if (sysctl(mib, 4, s, &siz, NULL, 0) == -1) { perror(""); fprintf(stderr, "mbuseradd: sysctl call failed\n"); + syslog(LOG_WARNING, "sysctl call failed"); exit(1); } buf[0] = '\0'; @@ -258,6 +266,7 @@ int main(int argc, char *argv[]) strlcat(buf, " ", sizeof(buf)); strlcat(buf, *p, sizeof(buf)); } +syslog(LOG_WARNING, "\"%s\"", buf); printf("%s\n", buf); parent = xstrcpy(buf); #else