diff options
author | 1999-07-19 00:33:58 +0000 | |
---|---|---|
committer | 1999-07-19 00:33:58 +0000 | |
commit | 7ae38090caddde3c6044d1f39f57caaaaa56a632 (patch) | |
tree | 301e4cfd2af61b1a7eb841c3f2b04f20b15a5cfd /backgammon/teachgammon/teach.c | |
parent | c654f6306c2258caaeac67d83dbd770d17cc7561 (diff) | |
download | bsdgames-darwin-7ae38090caddde3c6044d1f39f57caaaaa56a632.tar.gz bsdgames-darwin-7ae38090caddde3c6044d1f39f57caaaaa56a632.tar.zst bsdgames-darwin-7ae38090caddde3c6044d1f39f57caaaaa56a632.zip |
As in previously sent patches: backgammon(6) does not need setgid
games privileges from dm, so should revoke them on startup.
Patch submitteed in PR 8024 bye Joseph Myers <jsm28@cam.ac.uk>
Diffstat (limited to 'backgammon/teachgammon/teach.c')
-rw-r--r-- | backgammon/teachgammon/teach.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/backgammon/teachgammon/teach.c b/backgammon/teachgammon/teach.c index c6c7c30a..b0130d26 100644 --- a/backgammon/teachgammon/teach.c +++ b/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)"); |