Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/kern Pull up revision 1.158 (requested by pooka):



details:   https://anonhg.NetBSD.org/src/rev/15478151e108
branches:  netbsd-1-4
changeset: 470687:15478151e108
user:      he <he%NetBSD.org@localhost>
date:      Tue Jun 27 15:30:46 2000 +0000

description:
Pull up revision 1.158 (requested by pooka):
  Do not leave a vnode around when trying (and failing) to mount
  a file system with securelevel 2.  A second attempt would freeze
  the system.

diffstat:

 sys/kern/vfs_syscalls.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 110245ed4208 -r 15478151e108 sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c   Tue Jun 27 15:27:04 2000 +0000
+++ b/sys/kern/vfs_syscalls.c   Tue Jun 27 15:30:46 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_syscalls.c,v 1.133.2.1 2000/02/01 23:10:54 he Exp $        */
+/*     $NetBSD: vfs_syscalls.c,v 1.133.2.2 2000/06/27 15:30:46 he Exp $        */
 
 /*
  * Copyright (c) 1989, 1993
@@ -210,8 +210,10 @@
                VOP_UNLOCK(vp, 0);
                goto update;
        } else {
-               if (securelevel >= 2)
+               if (securelevel >= 2) {
+                       vput(vp);
                        return (EPERM);
+               }
        }
        /*
         * If the user is not root, ensure that they own the directory



Home | Main Index | Thread Index | Old Index