-/* $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
#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 */
#include <unistd.h>
#include <err.h>
#include <time.h>
+#include <sys/types.h>
#include "trek.h"
#include "getpar.h"
# define PRIO 00 /* default priority */
-int Mother = 51 + (51 << 8);
+uid_t 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
char **av;
struct termios argp;
+ /* Revoke setgid privileges */
+ setgid(getgid());
+
av = argv;
ac = argc;
av++;