summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/chap.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2000-08-18 00:01:44 +0000
committerbrian <brian@FreeBSD.org>2000-08-18 00:01:44 +0000
commitbac59a32d06fce1477c920a3c8aad60f73ae9af9 (patch)
tree7688894f80a2ddf31d01f87489e92fffb7e1953c /usr.sbin/ppp/chap.c
parentc0049c3df2bfda77644542cc72cd5d7949841805 (diff)
downloadFreeBSD-src-bac59a32d06fce1477c920a3c8aad60f73ae9af9.zip
FreeBSD-src-bac59a32d06fce1477c920a3c8aad60f73ae9af9.tar.gz
Make -DNOSUID (or -DPPP_NOSUID) possible to build ppp without SUID
capabilities.
Diffstat (limited to 'usr.sbin/ppp/chap.c')
-rw-r--r--usr.sbin/ppp/chap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/ppp/chap.c b/usr.sbin/ppp/chap.c
index 1eec6c3..277b728 100644
--- a/usr.sbin/ppp/chap.c
+++ b/usr.sbin/ppp/chap.c
@@ -254,7 +254,9 @@ chap_StartChild(struct chap *chap, char *prog, const char *name)
}
for (fd = getdtablesize(); fd > STDERR_FILENO; fd--)
fcntl(fd, F_SETFD, 1);
+#ifndef NOSUID
setuid(ID0realuid());
+#endif
command_Expand(nargv, argc, (char const *const *)argv,
chap->auth.physical->dl->bundle, 0, pid);
execvp(nargv[0], nargv);
OpenPOWER on IntegriCloud