Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/iostat Drop the setgid'ness now that ../../usr.bin/...



details:   https://anonhg.NetBSD.org/src/rev/09b93799c9d0
branches:  trunk
changeset: 521315:09b93799c9d0
user:      simonb <simonb%NetBSD.org@localhost>
date:      Mon Jan 28 02:16:56 2002 +0000

description:
Drop the setgid'ness now that ../../usr.bin/vmstat/dkstats.c uses
sysctls now.

diffstat:

 usr.sbin/iostat/Makefile |  4 +---
 usr.sbin/iostat/iostat.c |  8 +++-----
 2 files changed, 4 insertions(+), 8 deletions(-)

diffs (53 lines):

diff -r 84c4580fbfc3 -r 09b93799c9d0 usr.sbin/iostat/Makefile
--- a/usr.sbin/iostat/Makefile  Mon Jan 28 02:15:15 2002 +0000
+++ b/usr.sbin/iostat/Makefile  Mon Jan 28 02:16:56 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.17 2001/02/04 14:42:31 mrg Exp $
+#      $NetBSD: Makefile,v 1.18 2002/01/28 02:16:56 simonb Exp $
 #      from: @(#)Makefile      8.1 (Berkeley) 6/6/93
 
 PROG=  iostat
@@ -17,7 +17,5 @@
 
 DPADD= ${LIBKVM}
 LDADD= -lkvm
-BINGRP=        kmem
-BINMODE=2555
 
 .include <bsd.prog.mk>
diff -r 84c4580fbfc3 -r 09b93799c9d0 usr.sbin/iostat/iostat.c
--- a/usr.sbin/iostat/iostat.c  Mon Jan 28 02:15:15 2002 +0000
+++ b/usr.sbin/iostat/iostat.c  Mon Jan 28 02:16:56 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iostat.c,v 1.24 2000/12/01 02:10:23 simonb Exp $       */
+/*     $NetBSD: iostat.c,v 1.25 2002/01/28 02:16:56 simonb Exp $       */
 
 /*
  * Copyright (c) 1996 John M. Vinopal
@@ -75,7 +75,7 @@
 #if 0
 static char sccsid[] = "@(#)iostat.c   8.3 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: iostat.c,v 1.24 2000/12/01 02:10:23 simonb Exp $");
+__RCSID("$NetBSD: iostat.c,v 1.25 2002/01/28 02:16:56 simonb Exp $");
 #endif
 #endif /* not lint */
 
@@ -125,8 +125,6 @@
 {
        int ch, hdrcnt;
        struct timeval  tv;
-       gid_t egid = getegid();
-       setegid(getgid());
 
        while ((ch = getopt(argc, argv, "Cc:dDIM:N:Tw:x")) != -1)
                switch(ch) {
@@ -186,7 +184,7 @@
        if (nlistf != NULL || memf != NULL)
                setgid(getgid());
 
-       dkinit(0, egid);
+       dkinit(0);
        dkreadstats();
        selectdrives(argc, argv);
 



Home | Main Index | Thread Index | Old Index