#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 */
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 */
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
*/