summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-11-23 00:14:50 +0000
committerbrian <brian@FreeBSD.org>1999-11-23 00:14:50 +0000
commit0490237359168cdf80cd0cb32ed68534dcf37f89 (patch)
tree88d1621bc056e615c3219a44798c7321f0a62281
parentfe6a86187cd648995de5a5be2d7d43f68daa1739 (diff)
downloadFreeBSD-src-0490237359168cdf80cd0cb32ed68534dcf37f89.zip
FreeBSD-src-0490237359168cdf80cd0cb32ed68534dcf37f89.tar.gz
Don't setuid() 'till we've called ID0setproctitle()
-rw-r--r--usr.sbin/ppp/bundle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c
index 18a0ff1..94340143 100644
--- a/usr.sbin/ppp/bundle.c
+++ b/usr.sbin/ppp/bundle.c
@@ -1654,7 +1654,6 @@ bundle_setsid(struct bundle *bundle, int holdsession)
signal(SIGQUIT, SIG_DFL);
for (fd = getdtablesize(); fd >= 0; fd--)
close(fd);
- setuid(geteuid());
/*
* Reap the intermediate process. As we're not exiting but the
* intermediate is, we don't want it to become defunct.
@@ -1662,6 +1661,7 @@ bundle_setsid(struct bundle *bundle, int holdsession)
waitpid(pid, &status, 0);
/* Tweak our process arguments.... */
ID0setproctitle("session owner");
+ setuid(geteuid());
/*
* Hang around for a HUP. This should happen as soon as the
* ppp that we passed our ctty descriptor to closes it.
OpenPOWER on IntegriCloud