Source-Changes-HG archive

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

[src/trunk]: src/sys/miscfs/procfs don't produce different output if we are s...



details:   https://anonhg.NetBSD.org/src/rev/8587c8a8821e
branches:  trunk
changeset: 772113:8587c8a8821e
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Dec 19 03:02:31 2011 +0000

description:
don't produce different output if we are super user.

diffstat:

 sys/miscfs/procfs/procfs_linux.c |  13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diffs (44 lines):

diff -r 94f9e05b9b45 -r 8587c8a8821e sys/miscfs/procfs/procfs_linux.c
--- a/sys/miscfs/procfs/procfs_linux.c  Sun Dec 18 22:51:00 2011 +0000
+++ b/sys/miscfs/procfs/procfs_linux.c  Mon Dec 19 03:02:31 2011 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: procfs_linux.c,v 1.63 2011/12/16 20:45:07 christos Exp $      */
+/*      $NetBSD: procfs_linux.c,v 1.64 2011/12/19 03:02:31 christos Exp $      */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.63 2011/12/16 20:45:07 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.64 2011/12/19 03:02:31 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -593,12 +593,9 @@
        char *bf, *mtab = NULL;
        size_t mtabsz = 0;
        struct mount *mp, *nmp;
-       int error = 0, suser, root = 0;
+       int error = 0, root = 0;
        struct cwdinfo *cwdi = curl->l_proc->p_cwdi;
 
-       suser = kauth_authorize_generic(curl->l_cred,
-           KAUTH_GENERIC_ISSUSER, NULL) == 0;
-
        bf = malloc(LBFSZ, M_TEMP, M_WAITOK);
 
        mutex_enter(&mountlist_lock);
@@ -609,9 +606,9 @@
                if (vfs_busy(mp, &nmp))
                        continue;
 
-               if ((error = dostatvfs(mp, &sfs, curl, MNT_WAIT, suser)) == 0)
+               if ((error = dostatvfs(mp, &sfs, curl, MNT_WAIT, 0)) == 0)
                        root |= procfs_format_sfs(&mtab, &mtabsz, bf, LBFSZ,
-                           &sfs, curl, suser);
+                           &sfs, curl, 0);
 
                vfs_unbusy(mp, false, &nmp);
        }



Home | Main Index | Thread Index | Old Index