summaryrefslogtreecommitdiffstats
path: root/snake/snscore/snscore.c
diff options
context:
space:
mode:
Diffstat (limited to 'snake/snscore/snscore.c')
-rw-r--r--snake/snscore/snscore.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/snake/snscore/snscore.c b/snake/snscore/snscore.c
index e50fed75..65b6b228 100644
--- a/snake/snscore/snscore.c
+++ b/snake/snscore/snscore.c
@@ -1,4 +1,4 @@
-/* $NetBSD: snscore.c,v 1.10 1999/09/09 17:28:00 jsm Exp $ */
+/* $NetBSD: snscore.c,v 1.11 1999/09/12 09:02:23 jsm Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
#if 0
static char sccsid[] = "@(#)snscore.c 8.1 (Berkeley) 7/19/93";
#else
-__RCSID("$NetBSD: snscore.c,v 1.10 1999/09/09 17:28:00 jsm Exp $");
+__RCSID("$NetBSD: snscore.c,v 1.11 1999/09/12 09:02:23 jsm Exp $");
#endif
#endif /* not lint */
@@ -53,6 +53,7 @@ __RCSID("$NetBSD: snscore.c,v 1.10 1999/09/09 17:28:00 jsm Exp $");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include "pathnames.h"
const char *recfile = _PATH_RAWSCORES;
@@ -77,6 +78,9 @@ main()
const char *q;
struct passwd *p;
+ /* Revoke setgid privileges */
+ setregid(getgid(), getgid());
+
fd = fopen(recfile, "r");
if (fd == NULL)
err(1, "opening `%s'", recfile);