summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-08-12 21:08:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-08-12 21:08:50 +0000
commitdead85a45055178f98057c7d5faaf26f5ab85a44 (patch)
treec652664c2f630114305d9a0c6dcaa161aedbedf4 /sys
parent3324f39134268853f05c7590761bcb0675159ab7 (diff)
Fail TIOCSFLAGS if non-root, like all other serial drivers do.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/luna88k/dev/siotty.c5
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 */