projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use new form of suser()
[unix-history]
/
usr
/
src
/
sys
/
kern
/
tty.c
diff --git
a/usr/src/sys/kern/tty.c
b/usr/src/sys/kern/tty.c
index
9efe23a
..
40758f0
100644
(file)
--- a/
usr/src/sys/kern/tty.c
+++ b/
usr/src/sys/kern/tty.c
@@
-3,7
+3,7
@@
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)tty.c 7.1
4
(Berkeley) %G%
+ * @(#)tty.c 7.1
5
(Berkeley) %G%
*/
#include "param.h"
*/
#include "param.h"
@@
-235,7
+235,7
@@
ttioctl(tp, com, data, flag)
extern int nldisp;
int softset = 0;
int soft;
extern int nldisp;
int softset = 0;
int soft;
- int s;
+ int s
, error
;
/*
/*
@@
-465,8
+465,8
@@
ttioctl(tp, com, data, flag)
if (constty != NULL)
return (EBUSY);
#ifndef UCONSOLE
if (constty != NULL)
return (EBUSY);
#ifndef UCONSOLE
- if (
!suser(
))
- return (
EPERM
);
+ if (
error = suser(u.u_cred, &u.u_acflag
))
+ return (
error
);
#endif
constty = tp;
} else if (tp == constty)
#endif
constty = tp;
} else if (tp == constty)