From 16e3fbd2c114d665755299002f1c50dd11ba7245 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 27 Apr 1999 11:18:52 +0000 Subject: Suser() simplification: 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in . 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include , but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code. --- sys/kern/sys_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern/sys_process.c') diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 711132b..62e6736 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sys_process.c,v 1.42 1999/01/27 21:49:57 dillon Exp $ + * $Id: sys_process.c,v 1.43 1999/03/29 08:29:22 dfr Exp $ */ #include @@ -239,7 +239,7 @@ ptrace(curp, uap) /* not owned by you, has done setuid (unless you're root) */ if ((p->p_cred->p_ruid != curp->p_cred->p_ruid) || (p->p_flag & P_SUGID)) { - if ((error = suser(curp->p_ucred, &curp->p_acflag)) != 0) + if ((error = suser(curp)) != 0) return error; } -- cgit v1.1