Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/miscfs/procfs Pull up revision 1.28 (via patch, req...



details:   https://anonhg.NetBSD.org/src/rev/dc7f3db77380
branches:  netbsd-1-4
changeset: 470247:dc7f3db77380
user:      he <he%NetBSD.org@localhost>
date:      Tue Feb 01 22:56:20 2000 +0000

description:
Pull up revision 1.28 (via patch, requested by fvdl):
  Close procfs security hole.  Fixes SA#2000-001.

diffstat:

 sys/miscfs/procfs/procfs.h |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 7ba68b3c6b8f -r dc7f3db77380 sys/miscfs/procfs/procfs.h
--- a/sys/miscfs/procfs/procfs.h        Tue Feb 01 22:55:58 2000 +0000
+++ b/sys/miscfs/procfs/procfs.h        Tue Feb 01 22:56:20 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: procfs.h,v 1.26 1999/03/24 05:51:27 mrg Exp $  */
+/*     $NetBSD: procfs.h,v 1.26.2.1 2000/02/01 22:56:20 he Exp $       */
 
 /*
  * Copyright (c) 1993 Jan-Simon Pendry
@@ -62,7 +62,7 @@
  * control data for the proc file system.
  */
 struct pfsnode {
-       struct pfsnode  *pfs_next;      /* next on list */
+       LIST_ENTRY(pfsnode) pfs_hash;   /* hash chain */
        struct vnode    *pfs_vnode;     /* vnode associated with this pfsnode */
        pfstype         pfs_type;       /* type of procfs node */
        pid_t           pfs_pid;        /* associated process */
@@ -89,6 +89,14 @@
                        ((type) + 2) : \
                        ((((pid)+1) << 4) + ((int) (type))))
 
+struct procfsmount {
+       void *pmnt_exechook;
+       struct mount *pmnt_mp;
+};
+
+#define VFSTOPROC(mp)  ((struct procfsmount *)(mp)->mnt_data)
+#define PROCTOVFS(pp)  ((pp)->pmnt_mp)
+
 /*
  * Convert between pfsnode vnode
  */
@@ -126,6 +134,8 @@
     struct uio *));
 
 int procfs_checkioperm __P((struct proc *, struct proc *));
+void procfs_revoke_vnodes __P((struct proc *, void *));
+void procfs_hashinit __P((void));
 
 /* functions to check whether or not files should be displayed */
 int procfs_validfile __P((struct proc *));



Home | Main Index | Thread Index | Old Index