vfs_vnops.c (42900) | vfs_vnops.c (43426) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 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_vnops.c 8.2 (Berkeley) 1/21/94 | 1/* 2 * Copyright (c) 1982, 1986, 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_vnops.c 8.2 (Berkeley) 1/21/94 |
39 * $Id: vfs_vnops.c,v 1.61 1999/01/05 18:49:56 eivind Exp $ | 39 * $Id: vfs_vnops.c,v 1.62 1999/01/20 14:49:11 eivind Exp $ |
40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/fcntl.h> 45#include <sys/file.h> 46#include <sys/stat.h> 47#include <sys/proc.h> --- 370 unchanged lines hidden (view full) --- 418 sb->st_gid = vap->va_gid; 419 sb->st_rdev = vap->va_rdev; 420 sb->st_size = vap->va_size; 421 sb->st_atimespec = vap->va_atime; 422 sb->st_mtimespec = vap->va_mtime; 423 sb->st_ctimespec = vap->va_ctime; 424 sb->st_blksize = vap->va_blocksize; 425 sb->st_flags = vap->va_flags; | 40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/fcntl.h> 45#include <sys/file.h> 46#include <sys/stat.h> 47#include <sys/proc.h> --- 370 unchanged lines hidden (view full) --- 418 sb->st_gid = vap->va_gid; 419 sb->st_rdev = vap->va_rdev; 420 sb->st_size = vap->va_size; 421 sb->st_atimespec = vap->va_atime; 422 sb->st_mtimespec = vap->va_mtime; 423 sb->st_ctimespec = vap->va_ctime; 424 sb->st_blksize = vap->va_blocksize; 425 sb->st_flags = vap->va_flags; |
426 if (p->p_ucred->cr_uid != 0) | 426 if (suser(p->p_ucred, (u_short *)NULL)) |
427 sb->st_gen = 0; 428 else 429 sb->st_gen = vap->va_gen; 430 431#if (S_BLKSIZE == 512) 432 /* Optimize this case */ 433 sb->st_blocks = vap->va_bytes >> 9; 434#else --- 128 unchanged lines hidden --- | 427 sb->st_gen = 0; 428 else 429 sb->st_gen = vap->va_gen; 430 431#if (S_BLKSIZE == 512) 432 /* Optimize this case */ 433 sb->st_blocks = vap->va_bytes >> 9; 434#else --- 128 unchanged lines hidden --- |