diff options
author | eivind <eivind@FreeBSD.org> | 1997-09-01 00:34:51 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1997-09-01 00:34:51 +0000 |
commit | d8e95d8c1a6a0918fc9dda2ca247833ad222696d (patch) | |
tree | 42fed91af49ba9290d473dbe68d13f3f33e7545c /games/backgammon | |
parent | ff4b4c1d18cef70a372542d0a1a7a48e6543cf9e (diff) | |
download | FreeBSD-src-d8e95d8c1a6a0918fc9dda2ca247833ad222696d.zip FreeBSD-src-d8e95d8c1a6a0918fc9dda2ca247833ad222696d.tar.gz |
Change games from setuid games to setgid games.
Reviewed by: maybe@yes.no
Obtained from: OpenBSD (mostly deraadt@openbsd.org)
Diffstat (limited to 'games/backgammon')
-rw-r--r-- | games/backgammon/backgammon/main.c | 4 | ||||
-rw-r--r-- | games/backgammon/teachgammon/teach.c | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/games/backgammon/backgammon/main.c b/games/backgammon/backgammon/main.c index 97f0c6a..270e1f5 100644 --- a/games/backgammon/backgammon/main.c +++ b/games/backgammon/backgammon/main.c @@ -110,6 +110,10 @@ char **argv; uid = getuid(); setreuid (uid,uid); + /* revoke privs */ + setegid(getgid()); + setgid(getgid()); + /* initialization */ bflag = 2; /* default no board */ acnt = 1; /* Nuber of args */ diff --git a/games/backgammon/teachgammon/teach.c b/games/backgammon/teachgammon/teach.c index bae186c..1c70b04 100644 --- a/games/backgammon/teachgammon/teach.c +++ b/games/backgammon/teachgammon/teach.c @@ -80,11 +80,10 @@ char **argv; { register int i; - uid_t uid; - /*Drop the privilege.*/ - uid = getuid(); - setreuid (uid,uid); + /* revoke privs */ + setegid(getgid()); + setgid(getgid()); acnt = 1; signal (2,getout); |