summaryrefslogtreecommitdiff
path: root/sys/compat/common
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2003-08-15 20:32:22 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2003-08-15 20:32:22 +0000
commita1ee01486d4d2da0dce2fd97a58ca548a402d598 (patch)
treeeb06f4625b973fc701bb62d6902e4f1eb40bb4f2 /sys/compat/common
parent1a3299929d48eae52404e0b75267c111d07d2af4 (diff)
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/common')
-rw-r--r--sys/compat/common/kern_info_09.c4
-rw-r--r--sys/compat/common/kern_info_43.c6
-rw-r--r--sys/compat/common/vfs_syscalls_25.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/compat/common/kern_info_09.c b/sys/compat/common/kern_info_09.c
index 4579dfc5c7e..38889b8757a 100644
--- a/sys/compat/common/kern_info_09.c
+++ b/sys/compat/common/kern_info_09.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_info_09.c,v 1.10 2003/06/02 23:27:59 millert Exp $ */
+/* $OpenBSD: kern_info_09.c,v 1.11 2003/08/15 20:32:15 tedu Exp $ */
/* $NetBSD: kern_info_09.c,v 1.5 1996/02/21 00:10:59 cgd Exp $ */
/*
@@ -84,7 +84,7 @@ compat_09_sys_setdomainname(p, v, retval)
int name;
int error;
- if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
+ if ((error = suser(p, 0)) != 0)
return (error);
name = KERN_DOMAINNAME;
return (kern_sysctl(&name, 1, 0, 0, SCARG(uap, domainname),
diff --git a/sys/compat/common/kern_info_43.c b/sys/compat/common/kern_info_43.c
index 1fb199f999a..d8441601c09 100644
--- a/sys/compat/common/kern_info_43.c
+++ b/sys/compat/common/kern_info_43.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_info_43.c,v 1.14 2003/06/02 23:27:59 millert Exp $ */
+/* $OpenBSD: kern_info_43.c,v 1.15 2003/08/15 20:32:15 tedu Exp $ */
/* $NetBSD: kern_info_43.c,v 1.5 1996/02/04 02:02:22 christos Exp $ */
/*
@@ -344,7 +344,7 @@ compat_43_sys_sethostid(p, v, retval)
} */ *uap = v;
int error;
- if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
+ if ((error = suser(p, 0)) != 0)
return (error);
hostid = SCARG(uap, hostid);
return (0);
@@ -362,7 +362,7 @@ compat_43_sys_sethostname(p, v, retval)
int name;
int error;
- if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
+ if ((error = suser(p, 0)) != 0)
return (error);
name = KERN_HOSTNAME;
return (kern_sysctl(&name, 1, 0, 0, SCARG(uap, hostname),
diff --git a/sys/compat/common/vfs_syscalls_25.c b/sys/compat/common/vfs_syscalls_25.c
index 52583aae22c..7d129b040ee 100644
--- a/sys/compat/common/vfs_syscalls_25.c
+++ b/sys/compat/common/vfs_syscalls_25.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls_25.c,v 1.5 2003/06/02 23:27:59 millert Exp $ */
+/* $OpenBSD: vfs_syscalls_25.c,v 1.6 2003/08/15 20:32:15 tedu Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -76,7 +76,7 @@ statfs_to_ostatfs(p, mp, sp, osp)
osp->f_files = sp->f_files;
osp->f_ffree = sp->f_ffree;
/* Don't let non-root see filesystem id (for NFS security) */
- if (suser(p->p_ucred, &p->p_acflag))
+ if (suser(p, 0))
osp->f_fsid.val[0] = osp->f_fsid.val[1] = 0;
else
bcopy(&sp->f_fsid, &osp->f_fsid, sizeof(osp->f_fsid));