diff options
author | mpp <mpp@FreeBSD.org> | 1997-02-06 05:42:49 +0000 |
---|---|---|
committer | mpp <mpp@FreeBSD.org> | 1997-02-06 05:42:49 +0000 |
commit | dd8002bd0b8adf197f4814156b2346292f6c77ca (patch) | |
tree | 9def3a50c85253e2b7cd51e6f2e229252e028e3c /usr.bin/calendar/calendar.c | |
parent | be04db9817af89fcc843c3a47023d0a334187810 (diff) | |
download | FreeBSD-src-dd8002bd0b8adf197f4814156b2346292f6c77ca.zip FreeBSD-src-dd8002bd0b8adf197f4814156b2346292f6c77ca.tar.gz |
Initialize the group list when we switch uids when run as
root with "calendar -a". Drop all privs when execing other
programs.
Obtained from: OpenBSD
Diffstat (limited to 'usr.bin/calendar/calendar.c')
-rw-r--r-- | usr.bin/calendar/calendar.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/calendar/calendar.c b/usr.bin/calendar/calendar.c index 95ecebd..3d7d326 100644 --- a/usr.bin/calendar/calendar.c +++ b/usr.bin/calendar/calendar.c @@ -117,6 +117,7 @@ main(argc, argv) if (doall) while ((pw = getpwent()) != NULL) { (void)setegid(pw->pw_gid); + (void)initgroups(pw->pw_name, pw->pw_gid); (void)seteuid(pw->pw_uid); if (!chdir(pw->pw_dir)) cal(); |