Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/caesar Drop setgid privs early, via OpenBSD
details: https://anonhg.NetBSD.org/src/rev/46432964cdf0
branches: trunk
changeset: 474800:46432964cdf0
user: hubertf <hubertf%NetBSD.org@localhost>
date: Wed Jul 21 04:04:21 1999 +0000
description:
Drop setgid privs early, via OpenBSD
Reported in PR 5970 by Joseph Myers <jsm%octomino.demon.co.uk@localhost>
diffstat:
games/caesar/caesar.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 4842ce8406ce -r 46432964cdf0 games/caesar/caesar.c
--- a/games/caesar/caesar.c Wed Jul 21 04:02:29 1999 +0000
+++ b/games/caesar/caesar.c Wed Jul 21 04:04:21 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: caesar.c,v 1.7 1998/09/13 15:27:27 hubertf Exp $ */
+/* $NetBSD: caesar.c,v 1.8 1999/07/21 04:04:21 hubertf Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -51,7 +51,7 @@
#if 0
static char sccsid[] = "@(#)caesar.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: caesar.c,v 1.7 1998/09/13 15:27:27 hubertf Exp $");
+__RCSID("$NetBSD: caesar.c,v 1.8 1999/07/21 04:04:21 hubertf Exp $");
#endif
#endif /* not lint */
@@ -92,6 +92,9 @@
char *inbuf;
int obs[26], try, winner;
+ /* revoke setgid privileges */
+ setregid(getgid(), getgid());
+
winnerdot = 0;
if (argc > 1)
printit(argv[1]);
Home |
Main Index |
Thread Index |
Old Index