X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/ab3c8a4ae26dfeb68ae67ed33f39558915aa0c69..f8b06dd752473c66a6e6d145d601fcf3a7fa4c08:/adventure/main.c diff --git a/adventure/main.c b/adventure/main.c index e3112c12..794e5a3f 100644 --- a/adventure/main.c +++ b/adventure/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.12 1998/09/14 09:29:08 hubertf Exp $ */ +/* $NetBSD: main.c,v 1.14 1999/07/16 01:38:20 hubertf Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -48,7 +48,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\ #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/2/93"; #else -__RCSID("$NetBSD: main.c,v 1.12 1998/09/14 09:29:08 hubertf Exp $"); +__RCSID("$NetBSD: main.c,v 1.14 1999/07/16 01:38:20 hubertf Exp $"); #endif #endif /* not lint */ @@ -73,9 +73,8 @@ main(argc, argv) int rval, ll; struct text *kk; - /* adventure doesn't need setuid-ness, so, just get rid of it */ - if (setuid(getuid()) < 0) - warn("setuid"); + /* revoke setgid privileges from dm */ + setregid(getgid(), getgid()); init(); /* Initialize everything */ signal(SIGINT, trapdel); @@ -452,7 +451,7 @@ l4080: printf(" %d minutes before continuing.", latncy); if (!yes(200, 54, 54)) goto l2012; - datime(&saved, &savet); + datime(&saveday, &savet); ciao(); /* Do we quit? */ continue; /* Maybe not */ case 31: /* hours=8310 */