summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2012-12-24 19:41:15 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2012-12-24 19:41:15 +0000
commitc2f3be329a4cfc81d31e597384c26b2992c2c3e8 (patch)
tree7a9af9ca4a3bae3eb16cfa7695ca79150ff5ac7f /sys/dev/acpi
parent3efd477b5c201c94a2332fc9849a74d85eb8d2e2 (diff)
In acpiioctl(), Return though the splx() path if suser() returns an error
ok deraadt@
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r--sys/dev/acpi/acpi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index 5bd1162cf6a..0690a46cb8b 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.241 2012/10/08 21:47:50 deraadt Exp $ */
+/* $OpenBSD: acpi.c,v 1.242 2012/12/24 19:41:14 guenther Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -2503,8 +2503,8 @@ acpiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
break;
#ifdef HIBERNATE
case APM_IOC_HIBERNATE:
- if (suser(p, 0) != 0)
- return (EPERM);
+ if ((error = suser(p, 0)) != 0)
+ break;
if ((flag & FWRITE) == 0) {
error = EBADF;
break;