From 64369fc926e439937460296f9d60f0714b86a538 Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 24 Sep 1997 21:29:58 +0000 Subject: 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(-) (limited to 'games') diff --git a/games/atc/input.c b/games/atc/input.c index 0d1a0f7..2fd2ad3 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 */ -- cgit v1.1