Source-Changes-HG archive

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

[src/trunk]: src/games Use setgid(), not setregid().



details:   https://anonhg.NetBSD.org/src/rev/35f5016b0afb
branches:  trunk
changeset: 485878:35f5016b0afb
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Mon May 08 07:55:59 2000 +0000

description:
Use setgid(), not setregid().

diffstat:

 games/adventure/main.c               |  6 +++---
 games/arithmetic/arithmetic.c        |  6 +++---
 games/atc/main.c                     |  6 +++---
 games/backgammon/backgammon/main.c   |  6 +++---
 games/backgammon/teachgammon/teach.c |  6 +++---
 games/battlestar/battlestar.c        |  6 +++---
 games/bcd/bcd.c                      |  6 +++---
 games/boggle/boggle/bog.c            |  6 +++---
 games/caesar/caesar.c                |  6 +++---
 games/canfield/canfield/canfield.c   |  6 +++---
 games/canfield/cfscores/cfscores.c   |  6 +++---
 games/cribbage/crib.c                |  6 +++---
 games/fish/fish.c                    |  6 +++---
 games/gomoku/main.c                  |  6 +++---
 games/hangman/main.c                 |  6 +++---
 games/mille/mille.c                  |  6 +++---
 games/monop/monop.c                  |  6 +++---
 games/morse/morse.c                  |  6 +++---
 games/ppt/ppt.c                      |  6 +++---
 games/quiz/quiz.c                    |  6 +++---
 games/robots/main.c                  |  6 +++---
 games/snake/snake/snake.c            |  6 +++---
 games/snake/snscore/snscore.c        |  6 +++---
 games/trek/main.c                    |  6 +++---
 games/worm/worm.c                    |  6 +++---
 games/wump/wump.c                    |  6 +++---
 26 files changed, 78 insertions(+), 78 deletions(-)

diffs (truncated from 702 to 300 lines):

diff -r 8a7045881188 -r 35f5016b0afb games/adventure/main.c
--- a/games/adventure/main.c    Mon May 08 07:31:20 2000 +0000
+++ b/games/adventure/main.c    Mon May 08 07:55:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.14 1999/07/16 01:38:20 hubertf Exp $        */
+/*     $NetBSD: main.c,v 1.15 2000/05/08 07:55:59 mycroft Exp $        */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -48,7 +48,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.1 (Berkeley) 6/2/93";
 #else
-__RCSID("$NetBSD: main.c,v 1.14 1999/07/16 01:38:20 hubertf Exp $");
+__RCSID("$NetBSD: main.c,v 1.15 2000/05/08 07:55:59 mycroft Exp $");
 #endif
 #endif /* not lint */
 
@@ -74,7 +74,7 @@
        struct text *kk;
 
        /* revoke setgid privileges from dm */
-       setregid(getgid(), getgid());
+       setgid(getgid());
 
        init();         /* Initialize everything */
        signal(SIGINT, trapdel);
diff -r 8a7045881188 -r 35f5016b0afb games/arithmetic/arithmetic.c
--- a/games/arithmetic/arithmetic.c     Mon May 08 07:31:20 2000 +0000
+++ b/games/arithmetic/arithmetic.c     Mon May 08 07:55:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arithmetic.c,v 1.14 2000/04/14 05:58:01 simonb Exp $   */
+/*     $NetBSD: arithmetic.c,v 1.15 2000/05/08 07:56:00 mycroft Exp $  */
 
 /*
  * Copyright (c) 1989, 1993
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)arithmetic.c       8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: arithmetic.c,v 1.14 2000/04/14 05:58:01 simonb Exp $");
+__RCSID("$NetBSD: arithmetic.c,v 1.15 2000/05/08 07:56:00 mycroft Exp $");
 #endif
 #endif /* not lint */
 
@@ -121,7 +121,7 @@
        int ch, cnt;
 
        /* Revoke setgid privileges */
-       setregid(getgid(), getgid());
+       setgid(getgid());
 
        while ((ch = getopt(argc, argv, "r:o:")) != -1)
                switch(ch) {
diff -r 8a7045881188 -r 35f5016b0afb games/atc/main.c
--- a/games/atc/main.c  Mon May 08 07:31:20 2000 +0000
+++ b/games/atc/main.c  Mon May 08 07:55:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.10 1999/07/24 15:50:44 mjl Exp $    */
+/*     $NetBSD: main.c,v 1.11 2000/05/08 07:56:01 mycroft Exp $        */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -55,7 +55,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: main.c,v 1.10 1999/07/24 15:50:44 mjl Exp $");
+__RCSID("$NetBSD: main.c,v 1.11 2000/05/08 07:56:01 mycroft Exp $");
 #endif
 #endif /* not lint */
 
@@ -80,7 +80,7 @@
 
        /* Open the score file then revoke setgid privileges */
        open_score_file();
-       setregid(getgid(), getgid());
+       setgid(getgid());
 
        start_time = seed = time(NULL);
 
diff -r 8a7045881188 -r 35f5016b0afb games/backgammon/backgammon/main.c
--- a/games/backgammon/backgammon/main.c        Mon May 08 07:31:20 2000 +0000
+++ b/games/backgammon/backgammon/main.c        Mon May 08 07:55:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.15 1999/09/17 17:07:11 jsm Exp $    */
+/*     $NetBSD: main.c,v 1.16 2000/05/08 07:56:01 mycroft Exp $        */
 
 /*
  * Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: main.c,v 1.15 1999/09/17 17:07:11 jsm Exp $");
+__RCSID("$NetBSD: main.c,v 1.16 2000/05/08 07:56:01 mycroft Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -102,7 +102,7 @@
        long    t;              /* time for random num generator */
 
        /* revoke setgid privileges */
-       setregid(getgid(), getgid());
+       setgid(getgid());
 
        /* initialization */
        bflag = 2;              /* default no board */
diff -r 8a7045881188 -r 35f5016b0afb games/backgammon/teachgammon/teach.c
--- a/games/backgammon/teachgammon/teach.c      Mon May 08 07:31:20 2000 +0000
+++ b/games/backgammon/teachgammon/teach.c      Mon May 08 07:55:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: teach.c,v 1.10 1999/08/14 16:29:23 tron Exp $  */
+/*     $NetBSD: teach.c,v 1.11 2000/05/08 07:56:01 mycroft Exp $       */
 
 /*
  * Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)teach.c    8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: teach.c,v 1.10 1999/08/14 16:29:23 tron Exp $");
+__RCSID("$NetBSD: teach.c,v 1.11 2000/05/08 07:56:01 mycroft Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -73,7 +73,7 @@
        int     i;
 
        /* revoke setgid privileges */
-       setregid(getgid(), getgid());
+       setgid(getgid());
 
        signal(SIGINT, getout);
        if (tcgetattr(0, &old) == -1)   /* get old tty mode */
diff -r 8a7045881188 -r 35f5016b0afb games/battlestar/battlestar.c
--- a/games/battlestar/battlestar.c     Mon May 08 07:31:20 2000 +0000
+++ b/games/battlestar/battlestar.c     Mon May 08 07:55:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: battlestar.c,v 1.9 1999/09/18 16:40:04 jsm Exp $       */
+/*     $NetBSD: battlestar.c,v 1.10 2000/05/08 07:56:01 mycroft Exp $  */
 
 /*
  * Copyright (c) 1983, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)battlestar.c       8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: battlestar.c,v 1.9 1999/09/18 16:40:04 jsm Exp $");
+__RCSID("$NetBSD: battlestar.c,v 1.10 2000/05/08 07:56:01 mycroft Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -68,7 +68,7 @@
 
        /* Open the score file then revoke setgid privileges */
        open_score_file();
-       setregid(getgid(), getgid());
+       setgid(getgid());
 
        initialize((argc < 2) ? NULL : (strcmp(argv[1], "-r") ? argv[1]
                                        : (argv[2] ? argv[2]
diff -r 8a7045881188 -r 35f5016b0afb games/bcd/bcd.c
--- a/games/bcd/bcd.c   Mon May 08 07:31:20 2000 +0000
+++ b/games/bcd/bcd.c   Mon May 08 07:55:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcd.c,v 1.9 1999/07/28 02:12:33 hubertf Exp $  */
+/*     $NetBSD: bcd.c,v 1.10 2000/05/08 07:56:02 mycroft Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)bcd.c      8.2 (Berkeley) 3/20/94";
 #else
-__RCSID("$NetBSD: bcd.c,v 1.9 1999/07/28 02:12:33 hubertf Exp $");
+__RCSID("$NetBSD: bcd.c,v 1.10 2000/05/08 07:56:02 mycroft Exp $");
 #endif
 #endif /* not lint */
 
@@ -138,7 +138,7 @@
        char cardline[80];
 
        /* revoke setgid privileges */
-       setregid(getgid(), getgid());
+       setgid(getgid());
 
        /*
         * The original bcd prompts with a "%" when reading from stdin,
diff -r 8a7045881188 -r 35f5016b0afb games/boggle/boggle/bog.c
--- a/games/boggle/boggle/bog.c Mon May 08 07:31:20 2000 +0000
+++ b/games/boggle/boggle/bog.c Mon May 08 07:55:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bog.c,v 1.15 1999/09/19 09:42:38 jsm Exp $     */
+/*     $NetBSD: bog.c,v 1.16 2000/05/08 07:56:02 mycroft 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.15 1999/09/19 09:42:38 jsm Exp $");
+__RCSID("$NetBSD: bog.c,v 1.16 2000/05/08 07:56:02 mycroft Exp $");
 #endif
 #endif /* not lint */
 
@@ -135,7 +135,7 @@
        char *bspec, *p;
 
        /* revoke setgid privileges */
-       setregid(getgid(), getgid());
+       setgid(getgid());
 
        seed = 0;
        batch = debug = reuse = selfuse = sflag = 0;
diff -r 8a7045881188 -r 35f5016b0afb games/caesar/caesar.c
--- a/games/caesar/caesar.c     Mon May 08 07:31:20 2000 +0000
+++ b/games/caesar/caesar.c     Mon May 08 07:55:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: caesar.c,v 1.10 2000/01/09 17:17:20 jsm Exp $  */
+/*     $NetBSD: caesar.c,v 1.11 2000/05/08 07:56:02 mycroft 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.10 2000/01/09 17:17:20 jsm Exp $");
+__RCSID("$NetBSD: caesar.c,v 1.11 2000/05/08 07:56:02 mycroft Exp $");
 #endif
 #endif /* not lint */
 
@@ -93,7 +93,7 @@
        int obs[26], try, winner;
 
        /* revoke setgid privileges */
-       setregid(getgid(), getgid());
+       setgid(getgid());
 
        winnerdot = 0;
        if (argc > 1)
diff -r 8a7045881188 -r 35f5016b0afb games/canfield/canfield/canfield.c
--- a/games/canfield/canfield/canfield.c        Mon May 08 07:31:20 2000 +0000
+++ b/games/canfield/canfield/canfield.c        Mon May 08 07:55:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: canfield.c,v 1.16 2000/04/27 00:30:52 jdc Exp $        */
+/*     $NetBSD: canfield.c,v 1.17 2000/05/08 07:56:02 mycroft Exp $    */
 
 /*
  * Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)canfield.c 8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: canfield.c,v 1.16 2000/04/27 00:30:52 jdc Exp $");
+__RCSID("$NetBSD: canfield.c,v 1.17 2000/05/08 07:56:02 mycroft Exp $");
 #endif
 #endif /* not lint */
 
@@ -1686,7 +1686,7 @@
        dbfd = open(_PATH_SCORE, O_RDWR);
 
        /* Revoke setgid privileges */
-       setregid(getgid(), getgid());
+       setgid(getgid());
 
        if (dbfd < 0)
                return;
diff -r 8a7045881188 -r 35f5016b0afb games/canfield/cfscores/cfscores.c
--- a/games/canfield/cfscores/cfscores.c        Mon May 08 07:31:20 2000 +0000
+++ b/games/canfield/cfscores/cfscores.c        Mon May 08 07:55:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cfscores.c,v 1.8 1999/09/12 09:02:20 jsm Exp $ */
+/*     $NetBSD: cfscores.c,v 1.9 2000/05/08 07:56:03 mycroft Exp $     */
 
 /*
  * Copyright (c) 1983, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)cfscores.c 8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: cfscores.c,v 1.8 1999/09/12 09:02:20 jsm Exp $");
+__RCSID("$NetBSD: cfscores.c,v 1.9 2000/05/08 07:56:03 mycroft Exp $");
 #endif
 #endif /* not lint */
 
@@ -80,7 +80,7 @@
        int uid;
 
        /* Revoke setgid privileges */
-       setregid(getgid(), getgid());
+       setgid(getgid());
 
        if (argc > 2) {
                printf("Usage: cfscores [user]\n");
diff -r 8a7045881188 -r 35f5016b0afb games/cribbage/crib.c
--- a/games/cribbage/crib.c     Mon May 08 07:31:20 2000 +0000
+++ b/games/cribbage/crib.c     Mon May 08 07:55:59 2000 +0000



Home | Main Index | Thread Index | Old Index