Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/boggle/boggle Drop setgid privs early. Via OpenBSD, re...



details:   https://anonhg.NetBSD.org/src/rev/4842ce8406ce
branches:  trunk
changeset: 474799:4842ce8406ce
user:      hubertf <hubertf%NetBSD.org@localhost>
date:      Wed Jul 21 04:02:29 1999 +0000

description:
Drop setgid privs early. Via OpenBSD, reported in PR 5970 by
Joseph Myers <jsm28%cam.ac.uk@localhost>

diffstat:

 games/boggle/boggle/bog.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r b0804c0f25f2 -r 4842ce8406ce games/boggle/boggle/bog.c
--- a/games/boggle/boggle/bog.c Wed Jul 21 03:59:41 1999 +0000
+++ b/games/boggle/boggle/bog.c Wed Jul 21 04:02:29 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bog.c,v 1.10 1999/07/14 17:23:53 hubertf Exp $ */
+/*     $NetBSD: bog.c,v 1.11 1999/07/21 04:02:29 hubertf Exp $ */
 
 /*-
  * Copyright (c) 1993
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)bog.c      8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: bog.c,v 1.10 1999/07/14 17:23:53 hubertf Exp $");
+__RCSID("$NetBSD: bog.c,v 1.11 1999/07/21 04:02:29 hubertf Exp $");
 #endif
 #endif /* not lint */
 
@@ -132,6 +132,9 @@
        int ch, done, i, selfuse, sflag;
        char *bspec, *p;
 
+       /* revoke setgid privileges */
+       setregid(getgid(), getgid());
+
        seed = 0;
        batch = debug = reuse = selfuse = sflag = 0;
        bspec = NULL;



Home | Main Index | Thread Index | Old Index