vfs_syscalls.c (3511) | vfs_syscalls.c (3602) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 |
39 * $Id: vfs_syscalls.c,v 1.12 1994/10/08 22:33:43 phk Exp $ | 39 * $Id: vfs_syscalls.c,v 1.13 1994/10/11 20:40:12 sos Exp $ |
40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/namei.h> 45#include <sys/filedesc.h> 46#include <sys/kernel.h> 47#include <sys/file.h> --- 41 unchanged lines hidden (view full) --- 89 */ 90 error = suser(p->p_ucred, &p->p_acflag); 91 if (error) 92 return (error); 93 /* 94 * Get vnode to be covered 95 */ 96 NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, uap->path, p); | 40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/namei.h> 45#include <sys/filedesc.h> 46#include <sys/kernel.h> 47#include <sys/file.h> --- 41 unchanged lines hidden (view full) --- 89 */ 90 error = suser(p->p_ucred, &p->p_acflag); 91 if (error) 92 return (error); 93 /* 94 * Get vnode to be covered 95 */ 96 NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, uap->path, p); |
97 namei(&nd); | 97 error = namei(&nd); |
98 if (error) 99 return (error); 100 vp = nd.ni_vp; 101 if (uap->flags & MNT_UPDATE) { 102 if ((vp->v_flag & VROOT) == 0) { 103 vput(vp); 104 return (EINVAL); 105 } --- 2151 unchanged lines hidden --- | 98 if (error) 99 return (error); 100 vp = nd.ni_vp; 101 if (uap->flags & MNT_UPDATE) { 102 if ((vp->v_flag & VROOT) == 0) { 103 vput(vp); 104 return (EINVAL); 105 } --- 2151 unchanged lines hidden --- |