Fixed OpenBSD

This commit is contained in:
Michiel Broek 2005-08-31 20:41:24 +00:00
parent 0a8f7e6476
commit da2c43d625

View File

@ -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