summaryrefslogtreecommitdiffstats
path: root/libexec/tftpd/tftpd.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-10-22 01:55:40 +0000
committerobrien <obrien@FreeBSD.org>2001-10-22 01:55:40 +0000
commitb4cb5029c7eb3feedbefb10995c9ca878e63081f (patch)
tree045172a18647ad0f77840b21c3451c14036c8864 /libexec/tftpd/tftpd.c
parent009e6f2073d8c34186044bd95dae7d7aa754b6ac (diff)
downloadFreeBSD-src-b4cb5029c7eb3feedbefb10995c9ca878e63081f.zip
FreeBSD-src-b4cb5029c7eb3feedbefb10995c9ca878e63081f.tar.gz
When we set our UID to `nobody', set an appropriate group also.
Submitted by: peter
Diffstat (limited to 'libexec/tftpd/tftpd.c')
-rw-r--r--libexec/tftpd/tftpd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c
index 8740fd1..8b32f24 100644
--- a/libexec/tftpd/tftpd.c
+++ b/libexec/tftpd/tftpd.c
@@ -265,6 +265,7 @@ main(argc, argv)
}
chdir( "/" );
setuid(nobody->pw_uid);
+ setgroups(1, &nobody->pw_gid);
}
from.sin_family = AF_INET;
OpenPOWER on IntegriCloud