summaryrefslogtreecommitdiffstats
path: root/sys/compat/netbsd/netbsd_stat.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2003-08-15 20:32:12 +0000
committertedu <tedu@openbsd.org>2003-08-15 20:32:12 +0000
commitad3929582283d514f8a756b217534515032a07e8 (patch)
tree30aa183b2cade76ae4380c09553a730be7ab184b /sys/compat/netbsd/netbsd_stat.c
parentxr pci (diff)
downloadwireguard-openbsd-ad3929582283d514f8a756b217534515032a07e8.tar.xz
wireguard-openbsd-ad3929582283d514f8a756b217534515032a07e8.zip
change arguments to suser. suser now takes the process, and a flags
argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
Diffstat (limited to 'sys/compat/netbsd/netbsd_stat.c')
-rw-r--r--sys/compat/netbsd/netbsd_stat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/compat/netbsd/netbsd_stat.c b/sys/compat/netbsd/netbsd_stat.c
index ba730321f2e..e9b8aaa63e5 100644
--- a/sys/compat/netbsd/netbsd_stat.c
+++ b/sys/compat/netbsd/netbsd_stat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netbsd_stat.c,v 1.15 2003/06/02 23:28:00 millert Exp $ */
+/* $OpenBSD: netbsd_stat.c,v 1.16 2003/08/15 20:32:16 tedu Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -123,7 +123,7 @@ netbsd_sys___stat13(p, v, retval)
if (error)
return (error);
/* Don't let non-root see generation numbers (for NFS security) */
- if (suser(p->p_ucred, &p->p_acflag))
+ if (suser(p, 0))
sb.st_gen = 0;
openbsd_to_netbsd_stat(&sb, &nsb);
error = copyout(&nsb, SCARG(uap, ub), sizeof(nsb));
@@ -160,7 +160,7 @@ netbsd_sys___lstat13(p, v, retval)
if (error)
return (error);
/* Don't let non-root see generation numbers (for NFS security) */
- if (suser(p->p_ucred, &p->p_acflag))
+ if (suser(p, 0))
sb.st_gen = 0;
openbsd_to_netbsd_stat(&sb, &nsb);
error = copyout(&nsb, SCARG(uap, ub), sizeof(nsb));