summaryrefslogtreecommitdiffstats
path: root/games/robots
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1997-09-01 00:34:51 +0000
committereivind <eivind@FreeBSD.org>1997-09-01 00:34:51 +0000
commitd8e95d8c1a6a0918fc9dda2ca247833ad222696d (patch)
tree42fed91af49ba9290d473dbe68d13f3f33e7545c /games/robots
parentff4b4c1d18cef70a372542d0a1a7a48e6543cf9e (diff)
downloadFreeBSD-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/robots')
-rw-r--r--games/robots/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/games/robots/main.c b/games/robots/main.c
index 9692295..00c4187 100644
--- a/games/robots/main.c
+++ b/games/robots/main.c
@@ -56,6 +56,10 @@ char **av;
extern int Max_per_uid;
void quit();
+ /* revoke */
+ setegid(getgid());
+ setgid(getgid());
+
show_only = FALSE;
if (ac > 1) {
bad_arg = FALSE;
@@ -64,8 +68,6 @@ char **av;
if (isdigit(av[0][0]))
Max_per_uid = atoi(av[0]);
else {
- setuid(getuid());
- setgid(getgid());
Scorefile = av[0];
# ifdef FANCY
sp = rindex(Scorefile, '/');
OpenPOWER on IntegriCloud