diff options
Diffstat (limited to 'larn/main.c')
-rw-r--r-- | larn/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/larn/main.c b/larn/main.c index a17c2099..e691471d 100644 --- a/larn/main.c +++ b/larn/main.c @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "$NetBSD: main.c,v 1.8 1996/05/21 23:19:20 mrg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.9 1996/05/22 00:36:09 mrg Exp $"; #endif /* not lint */ /* main.c */ @@ -13,6 +13,7 @@ int srcount=0; /* line counter for showstr() */ int dropflag=0; /* if 1 then don't lookforobject() next round */ int rmst=80; /* random monster creation counter */ int userid; /* the players login user id number */ +uid_t uid, euid; /* used for security */ char nowelcome=0,nomove=0; /* if (nomove) then don't count next iteration as a move */ static char viewflag=0; /* if viewflag then we have done a 99 stay here and don't showcell in the main loop */ @@ -48,7 +49,9 @@ main(argc,argv) char *ptr=0,*ttype; struct passwd *pwe; - setuid(getuid()); /* give up "games" if we have it */ + euid = geteuid(); + uid = getuid(); + seteuid(uid); /* give up "games" if we have it */ /* * first task is to identify the player */ |