From 9ea04b5811cd52878399fa2876539a2dc6d37e88 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Wed, 24 Sep 1997 21:29:58 +0000 Subject: [PATCH] Revoke properly by setgid, not by setuid, overlooked in games uid->gid change --- games/atc/input.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/games/atc/input.c b/games/atc/input.c index 0d1a0f7a7af6..2fd2ad32061c 100644 --- a/games/atc/input.c +++ b/games/atc/input.c @@ -47,6 +47,8 @@ static char sccsid[] = "@(#)input.c 8.1 (Berkeley) 5/31/93"; #endif not lint +#include +#include #include "include.h" #include "pathnames.h" @@ -319,9 +321,10 @@ gettoken() #endif if (fork() == 0) /* child */ { - char *shell, *base, *getenv(), *strrchr(); + char *shell, *base; - setuid(getuid()); /* turn off setuid bit */ + /* revoke */ + setgid(getgid()); done_screen(); /* run user's favorite shell */