diff --git a/games/backgammon/backgammon/main.c b/games/backgammon/backgammon/main.c index 8c93ed932204..e603346a0c0b 100644 --- a/games/backgammon/backgammon/main.c +++ b/games/backgammon/backgammon/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.10 1999/07/14 22:46:21 hubertf Exp $ */ +/* $NetBSD: main.c,v 1.11 1999/07/19 00:33:58 hubertf 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.10 1999/07/14 22:46:21 hubertf Exp $"); +__RCSID("$NetBSD: main.c,v 1.11 1999/07/19 00:33:58 hubertf Exp $"); #endif #endif /* not lint */ @@ -99,6 +99,9 @@ main(argc, argv) char c; /* non-descript character storage */ long t; /* time for random num generator */ + /* revoke setgid privileges */ + setregid(getgid(), getgid()); + /* initialization */ bflag = 2; /* default no board */ signal(SIGINT, getout); /* trap interrupts */ diff --git a/games/backgammon/teachgammon/teach.c b/games/backgammon/teachgammon/teach.c index c6c7c30a6526..b0130d260255 100644 --- a/games/backgammon/teachgammon/teach.c +++ b/games/backgammon/teachgammon/teach.c @@ -1,4 +1,4 @@ -/* $NetBSD: teach.c,v 1.8 1999/02/10 12:29:48 hubertf Exp $ */ +/* $NetBSD: teach.c,v 1.9 1999/07/19 00:34:00 hubertf Exp $ */ /* * Copyright (c) 1980, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\ #if 0 static char sccsid[] = "@(#)teach.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: teach.c,v 1.8 1999/02/10 12:29:48 hubertf Exp $"); +__RCSID("$NetBSD: teach.c,v 1.9 1999/07/19 00:34:00 hubertf Exp $"); #endif #endif /* not lint */ @@ -72,6 +72,9 @@ main(argc, argv) { int i; + /* revoke setgid privileges */ + setregid(getgid(), getgid()); + signal(SIGINT, getout); if (tcgetattr(0, &old) == -1) /* get old tty mode */ errexit("teachgammon(gtty)");