diff options
author | max <max@FreeBSD.org> | 1997-01-30 01:51:45 +0000 |
---|---|---|
committer | max <max@FreeBSD.org> | 1997-01-30 01:51:45 +0000 |
commit | c2172b20d217b3568a8a91da3035439fe161d385 (patch) | |
tree | 5991a2374418da5d596218a3a0eb60e02c8bdebb /games/backgammon | |
parent | 9abde98e48517e3405eb80002fc52d9a1fd27bb5 (diff) | |
download | FreeBSD-src-c2172b20d217b3568a8a91da3035439fe161d385.zip FreeBSD-src-c2172b20d217b3568a8a91da3035439fe161d385.tar.gz |
Oops, setreuid() also needed before and after opening/closing the recover file
in recover().
2.2 candidate.
Diffstat (limited to 'games/backgammon')
-rw-r--r-- | games/backgammon/common_source/save.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/games/backgammon/common_source/save.c b/games/backgammon/common_source/save.c index 61cdd8e..80030e7 100644 --- a/games/backgammon/common_source/save.c +++ b/games/backgammon/common_source/save.c @@ -150,6 +150,7 @@ char *s; register int i; int fdesc; + setreuid(geteuid(), getuid()); if ((fdesc = open (s,0)) == -1) norec (s); read (fdesc,board,sizeof board); @@ -164,6 +165,7 @@ char *s; read (fdesc,&gvalue,sizeof gvalue); read (fdesc,&raflag,sizeof raflag); close (fdesc); + setreuid(geteuid(), getuid()); rflag = 1; } |