summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/prompt.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2001-01-26 01:41:34 +0000
committerBrian Somers <brian@FreeBSD.org>2001-01-26 01:41:34 +0000
commit74457d3d4327f7169df5e5596a955d1862b76270 (patch)
treec5876cfc6e97e914157e276d25a3081c8b4a0a39 /usr.sbin/ppp/prompt.c
parent283028861ea3d2bb5497dcdbd9064d83bc5863ff (diff)
downloadsrc-test2-74457d3d4327f7169df5e5596a955d1862b76270.tar.gz
src-test2-74457d3d4327f7169df5e5596a955d1862b76270.zip
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.
Notes
Notes: svn path=/head/; revision=71657
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 af333eef130c..46fb9ee16506 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;