From 80d909b5a7d915164341c07d2a97f623c269b31d Mon Sep 17 00:00:00 2001 From: max Date: Thu, 30 Jan 1997 01:51:45 +0000 Subject: [PATCH] Oops, setreuid() also needed before and after opening/closing the recover file in recover(). 2.2 candidate. --- games/backgammon/common_source/save.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/games/backgammon/common_source/save.c b/games/backgammon/common_source/save.c index 61cdd8ec7ac4..80030e792a20 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; }