Date: Mon, 4 Jul 2005 11:03:34 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 79531 for review Message-ID: <200507041103.j64B3Yf0093714@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=79531 Change 79531 by rwatson@rwatson_paprika on 2005/07/04 11:03:25 Convert remaining suser() calls in tty.c into cap_check() calls. Not a perfect semantic match, but not too bad either. Affected files ... .. //depot/projects/trustedbsd/sebsd/sys/kern/tty.c#11 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/sys/kern/tty.c#11 (text+ko) ==== @@ -1028,7 +1028,7 @@ break; case TIOCMSDTRWAIT: /* must be root since the wait applies to following logins */ - error = suser(td); + error = cap_check(td, CAP_SYS_TTY_CONFIG); if (error) return (error); tp->t_dtr_wait = *(int *)data * hz / 100; @@ -3124,7 +3124,8 @@ goto out; goto open_top; } - if (tp->t_state & TS_XCLUDE && suser(td)) + if (tp->t_state & TS_XCLUDE && cap_check(td, + CAP_SYS_TTY_CONFIG)) return (EBUSY); } else { /* @@ -3353,7 +3354,7 @@ ct = dev->si_drv2; switch (cmd) { case TIOCSETA: - error = suser(td); + error = cap_check(td, CAP_SYS_TTY_CONFIG); if (error != 0) return (error); *ct = *(struct termios *)data;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507041103.j64B3Yf0093714>