summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/prompt.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-01-26 01:41:34 +0000
committerbrian <brian@FreeBSD.org>2001-01-26 01:41:34 +0000
commit63b65f9457011d370ef859a506f558b2731883d2 (patch)
tree694b69d9cd6e10dc4a8f60f6fc9ebc124e7875db /usr.sbin/ppp/prompt.c
parenta4be54702c06f4adfd819f74d6f5586d5362b361 (diff)
downloadFreeBSD-src-63b65f9457011d370ef859a506f558b2731883d2.zip
FreeBSD-src-63b65f9457011d370ef859a506f558b2731883d2.tar.gz
Allow ``set server closed'' to close the diagnostic socket.
Allow ``set server open'' to re-open the diagnostic socket. Handle SIGUSR1 by re-opening the diagnostic socket When receiving SIGUSR2 (and in ``set server none''), don't forget the socket details so that ``set server open'' and SIGUSR1 open it again. Don't create the diagnostic socket as uid 0 ! It's far to dangerous.
Diffstat (limited to 'usr.sbin/ppp/prompt.c')
-rw-r--r--usr.sbin/ppp/prompt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/prompt.c b/usr.sbin/ppp/prompt.c
index af333ee..46fb9ee 100644
--- a/usr.sbin/ppp/prompt.c
+++ b/usr.sbin/ppp/prompt.c
@@ -330,7 +330,7 @@ prompt_Create(struct server *s, struct bundle *bundle, int fd)
p->fd_in = p->fd_out = fd;
p->Term = fdopen(fd, "a+");
p->owner = s;
- p->auth = *s->passwd ? LOCAL_NO_AUTH : LOCAL_AUTH;
+ p->auth = *s->cfg.passwd ? LOCAL_NO_AUTH : LOCAL_AUTH;
p->src.type = "unknown";
*p->src.from = '\0';
}
@@ -518,7 +518,7 @@ PasswdCommand(struct cmdargs const *arg)
else
pass = arg->argv[arg->argn];
- if (!strcmp(arg->prompt->owner->passwd, pass))
+ if (!strcmp(arg->prompt->owner->cfg.passwd, pass))
arg->prompt->auth = LOCAL_AUTH;
else
arg->prompt->auth = LOCAL_NO_AUTH;
OpenPOWER on IntegriCloud