diff options
author | brian <brian@FreeBSD.org> | 1997-06-09 03:27:43 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-06-09 03:27:43 +0000 |
commit | 94d661ac8cb907e0a869759f76cd7134c9105e6c (patch) | |
tree | 5fa88c28cbdec0d4a0d3d118b33c1042dc49c526 /usr.sbin/ppp/loadalias.c | |
parent | 328d28c6502cfec45b8ead98e18b2d8638499efb (diff) | |
download | FreeBSD-src-94d661ac8cb907e0a869759f76cd7134c9105e6c.zip FreeBSD-src-94d661ac8cb907e0a869759f76cd7134c9105e6c.tar.gz |
Overhaul ppp:
o Use syslog
o Remove references to stdout/stderr (incl perror())
o Introduce VarTerm - the interactive terminal or zero
o Allow "set timeout" to affect current session
o Change "set debug" to "set log"
o Allow "set log [+|-]flag"
o Make MSEXT and PASSWDAUTH stuff the default
o Move all #ifdef DEBUG stuff into the code - this
shouldn't be too much overhead. It's now controlled
with "set log +debug"
o Add "set log command, debug, tun, warn, error, alert"
o Remove cdefs.h, and assume an ansi compiler.
o Improve all diagnostic output
o Don't trap SIGSEGV
o SIGHUP now terminates again (log files are controlled
by syslog)
o Call CloseModem() when changing devices
o Fix parsing of third arg of "delete"
I think this fixes the "magic is same" problems that some
people have been experiencing.
The man page is being rewritten. It'll follow soon.
Diffstat (limited to 'usr.sbin/ppp/loadalias.c')
-rw-r--r-- | usr.sbin/ppp/loadalias.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/usr.sbin/ppp/loadalias.c b/usr.sbin/ppp/loadalias.c index 5e26bd4..e0acf5e 100644 --- a/usr.sbin/ppp/loadalias.c +++ b/usr.sbin/ppp/loadalias.c @@ -41,7 +41,6 @@ int loadAliasHandlers(struct aliasHandlers *h) { char *path; char *env; - char *err; int i; path = _PATH_ALIAS; @@ -49,25 +48,22 @@ int loadAliasHandlers(struct aliasHandlers *h) if (env) if (OrigUid() == 0) path = env; - else { - logprintf("Ignoring environment _PATH_ALIAS value (%s)\n", env); - printf("Ignoring environment _PATH_ALIAS value (%s)\n", env); - } + else + LogPrintf(LogALERT, "Ignoring environment _PATH_ALIAS value (%s)", + env); dl = dlopen(path, RTLD_LAZY); if (dl == (void *)0) { - err = dlerror(); - logprintf("_PATH_ALIAS (%s): Invalid lib: %s\n", path, err); - printf("_PATH_ALIAS (%s): Invalid lib: %s\n", path, err); + LogPrintf(LogWARN, "_PATH_ALIAS (%s): Invalid lib: %s\n", + path, dlerror()); return -1; } for (i = 0; map[i].name; i++) { *(void **)((char *)h + map[i].offset) = dlsym(dl, map[i].name); if (*(void **)((char *)h + map[i].offset) == (void *)0) { - err = dlerror(); - logprintf("_PATH_ALIAS (%s): %s: %s\n", path, map[i].name, err); - printf("_PATH_ALIAS (%s): %s: %s\n", path, map[i].name, err); + LogPrintf(LogWARN, "_PATH_ALIAS (%s): %s: %s\n", path, + map[i].name, dlerror()); (void)dlclose(dl); dl = (void *)0; return -1; |