diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2009-10-31 12:00:09 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2009-10-31 12:00:09 +0000 |
commit | 04783f7109699fb1efc94f9822ac1e849dc0b7ff (patch) | |
tree | 11514d25f29a5322b91cbc57e3b913945809976a /sys/kern/kern_ktrace.c | |
parent | 4a9bd3706fe9ef219f0658e9acc9ab43b2bfd422 (diff) |
Use suser when possible. Suggested by miod@.
miod@ deraadt@ ok.
Diffstat (limited to 'sys/kern/kern_ktrace.c')
-rw-r--r-- | sys/kern/kern_ktrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 828cf614d14..f0f8d6da6f8 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_ktrace.c,v 1.47 2009/07/09 22:29:56 thib Exp $ */ +/* $OpenBSD: kern_ktrace.c,v 1.48 2009/10/31 12:00:08 fgsch Exp $ */ /* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */ /* @@ -390,7 +390,7 @@ ktrops(struct proc *curp, struct proc *p, int ops, int facs, struct vnode *vp) if (ops == KTROP_SET) { ktrsettracevnode(p, vp); p->p_traceflag |= facs; - if (curp->p_ucred->cr_uid == 0) + if (suser(curp, 0) == 0) p->p_traceflag |= KTRFAC_ROOT; } else { /* KTROP_CLEAR */ |