X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/841b491f968c54e5a99d713163aa381d827a6516..d53a08d3fa6a2db3b438535bd41ebe4cdb2b149a:/trek/main.c?ds=sidebyside diff --git a/trek/main.c b/trek/main.c index db9c85e0..cfec1a7b 100644 --- a/trek/main.c +++ b/trek/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.6 1997/10/13 22:18:32 cjs Exp $ */ +/* $NetBSD: main.c,v 1.10 2001/07/22 13:34:01 wiz Exp $ */ /* * Copyright (c) 1980, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\ #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: main.c,v 1.6 1997/10/13 22:18:32 cjs Exp $"); +__RCSID("$NetBSD: main.c,v 1.10 2001/07/22 13:34:01 wiz Exp $"); #endif #endif /* not lint */ @@ -54,12 +54,13 @@ __RCSID("$NetBSD: main.c,v 1.6 1997/10/13 22:18:32 cjs Exp $"); #include #include #include +#include #include "trek.h" #include "getpar.h" # define PRIO 00 /* default priority */ -int Mother = 51 + (51 << 8); +uid_t Mother = 51 + (51 << 8); /* ** #### ##### # #### ##### #### ##### # # @@ -135,7 +136,7 @@ int Mother = 51 + (51 << 8); ** ** Many things in trek are not as clear as they might be, but are ** done to reduce space. I compile with the -f and -O flags. I -** am constrained to running with non-seperated I/D space, since +** am constrained to running with non-separated I/D space, since ** we don't have doubleing point hardware here; even if we did, I ** would like trek to be available to the large number of people ** who either have an 11/40 or do not have FP hardware. I also @@ -175,6 +176,9 @@ char **argv; char **av; struct termios argp; + /* Revoke setgid privileges */ + setgid(getgid()); + av = argv; ac = argc; av++;