diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-08-12 21:08:50 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-08-12 21:08:50 +0000 |
commit | dead85a45055178f98057c7d5faaf26f5ab85a44 (patch) | |
tree | c652664c2f630114305d9a0c6dcaa161aedbedf4 /sys | |
parent | 3324f39134268853f05c7590761bcb0675159ab7 (diff) |
Fail TIOCSFLAGS if non-root, like all other serial drivers do.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/luna88k/dev/siotty.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/luna88k/dev/siotty.c b/sys/arch/luna88k/dev/siotty.c index b465daed79c..f91db409c0b 100644 --- a/sys/arch/luna88k/dev/siotty.c +++ b/sys/arch/luna88k/dev/siotty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siotty.c,v 1.3 2006/01/10 18:56:11 miod Exp $ */ +/* $OpenBSD: siotty.c,v 1.4 2006/08/12 21:08:49 miod Exp $ */ /* $NetBSD: siotty.c,v 1.9 2002/03/17 19:40:43 atatat Exp $ */ /*- @@ -537,6 +537,9 @@ sioioctl(dev, cmd, data, flag, p) siomctl(sc, *(int *)data, DMBIC); break; case TIOCSFLAGS: /* Instruct how serial port behaves */ + error = suser(p, 0); + if (error != 0) + return EPERM; sc->sc_flags = *(int *)data; break; case TIOCGFLAGS: /* Return current serial port state */ |