summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/pcvt
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-04-27 11:18:52 +0000
committerphk <phk@FreeBSD.org>1999-04-27 11:18:52 +0000
commit16e3fbd2c114d665755299002f1c50dd11ba7245 (patch)
treed7f6bebfe177ae90b67d27603da4d211433088e5 /sys/i386/isa/pcvt
parentaba5e776bb95610ea3e3355cbf47aadb844773eb (diff)
downloadFreeBSD-src-16e3fbd2c114d665755299002f1c50dd11ba7245.zip
FreeBSD-src-16e3fbd2c114d665755299002f1c50dd11ba7245.tar.gz
Suser() simplification:
1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 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 <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
Diffstat (limited to 'sys/i386/isa/pcvt')
-rw-r--r--sys/i386/isa/pcvt/pcvt_drv.c4
-rw-r--r--sys/i386/isa/pcvt/pcvt_ext.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c
index 275fed0..a72bc32 100644
--- a/sys/i386/isa/pcvt/pcvt_drv.c
+++ b/sys/i386/isa/pcvt/pcvt_drv.c
@@ -513,7 +513,7 @@ pcopen(Dev_t dev, int flag, int mode, struct proc *p)
(*linesw[tp->t_line].l_modem)(tp, 1); /* fake connection */
winsz = 1; /* set winsize later */
}
- else if (tp->t_state & TS_XCLUDE && suser(p->p_ucred, &p->p_acflag))
+ else if (tp->t_state & TS_XCLUDE && suser(p))
return (EBUSY);
#if PCVT_NETBSD || (PCVT_FREEBSD >= 200)
@@ -1444,7 +1444,7 @@ pcvt_xmode_set(int on, struct proc *p)
* This prevents us from granting the potential security hole
* `IO priv' to insufficiently privileged processes.
*/
- error = suser(p->p_ucred, &p->p_acflag);
+ error = suser(p);
if (error != 0)
return (error);
if (securelevel > 0)
diff --git a/sys/i386/isa/pcvt/pcvt_ext.c b/sys/i386/isa/pcvt/pcvt_ext.c
index acf066a..c0b4a99 100644
--- a/sys/i386/isa/pcvt/pcvt_ext.c
+++ b/sys/i386/isa/pcvt/pcvt_ext.c
@@ -2680,7 +2680,7 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
struct syscframe *fp = (struct syscframe *)p->p_regs;
#endif
- error = suser(p->p_ucred, &p->p_acflag);
+ error = suser(p);
if (error != 0)
return (error);
if (securelevel > 0)
OpenPOWER on IntegriCloud