diff options
author | ache <ache@FreeBSD.org> | 1997-09-24 21:29:58 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-09-24 21:29:58 +0000 |
commit | 64369fc926e439937460296f9d60f0714b86a538 (patch) | |
tree | f64b8a4f9f0abe0e6dbee5ff1e77194918cfb131 /games | |
parent | 44591d995ad84c008eccb1c3dccede2b59044142 (diff) | |
download | FreeBSD-src-64369fc926e439937460296f9d60f0714b86a538.zip FreeBSD-src-64369fc926e439937460296f9d60f0714b86a538.tar.gz |
Revoke properly by setgid, not by setuid, overlooked in games
uid->gid change
Diffstat (limited to 'games')
-rw-r--r-- | games/atc/input.c | 7 |
1 files changed, 5 insertions, 2 deletions
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 <stdlib.h> +#include <string.h> #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 */ |