summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-09-24 20:52:59 +0000
committerache <ache@FreeBSD.org>1997-09-24 20:52:59 +0000
commit4b745741b34f3f473d680694765a66cf3a73aa8a (patch)
treeb2cbd31f657af55a0327948b5d1ecb5b5d4ac58e /games
parent2fcd0934d396f58f77f7c2dec14f771aa62700e7 (diff)
downloadFreeBSD-src-4b745741b34f3f473d680694765a66cf3a73aa8a.zip
FreeBSD-src-4b745741b34f3f473d680694765a66cf3a73aa8a.tar.gz
Fix revoke to use setgid instead of setuid,since games uid changed to
gid and this place overlooked
Diffstat (limited to 'games')
-rw-r--r--games/rogue/save.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/games/rogue/save.c b/games/rogue/save.c
index 2ca5cc3..8d0881a 100644
--- a/games/rogue/save.c
+++ b/games/rogue/save.c
@@ -108,7 +108,8 @@ char *sfile;
sfile = name_buffer;
}
}
- setuid(getuid());
+ /* revoke */
+ setgid(getgid());
if ( ((fp = fopen(sfile, "w")) == NULL) ||
((file_id = md_get_file_id(sfile)) == -1)) {
message("problem accessing the save file", 0);
@@ -166,7 +167,8 @@ static char save_name[80];
static del_save_file()
{
- setuid(getuid());
+ /* revoke */
+ setgid(getgid());
md_df(save_name);
}
OpenPOWER on IntegriCloud