summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1995-08-26 04:33:59 +0000
committerDavid Greenman <dg@FreeBSD.org>1995-08-26 04:33:59 +0000
commit5998ebada6a4932a820bdcdcfaa2af4223775fa9 (patch)
tree93db2814fdfc5efe395cc45f846298d1d256fdc5 /libexec
parent5c4eff16b83a292a023252351cb6c370bf89db4b (diff)
Notes
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rexecd/rexecd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libexec/rexecd/rexecd.c b/libexec/rexecd/rexecd.c
index cd94b68a6748..5fc36175c296 100644
--- a/libexec/rexecd/rexecd.c
+++ b/libexec/rexecd/rexecd.c
@@ -258,6 +258,8 @@ doit(f, fromp)
pwd->pw_shell = _PATH_BSHELL;
if (f > 2)
(void) close(f);
+ if (setlogin(pwd->pw_name) < 0)
+ syslog(LOG_ERR, "setlogin() failed: %m");
(void) setgid((gid_t)pwd->pw_gid);
initgroups(pwd->pw_name, pwd->pw_gid);
(void) setuid((uid_t)pwd->pw_uid);