summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpi/acpi.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2012-12-24 19:41:14 +0000
committerguenther <guenther@openbsd.org>2012-12-24 19:41:14 +0000
commita78a816d31e72b7247c515f75bc33fc01b0b8fc2 (patch)
tree02ec7bc2e7052a9248fc34f898d12dcdf85cbe2e /sys/dev/acpi/acpi.c
parentRegister cleanup handler passed by ld.so with atexit(3). (diff)
downloadwireguard-openbsd-a78a816d31e72b7247c515f75bc33fc01b0b8fc2.tar.xz
wireguard-openbsd-a78a816d31e72b7247c515f75bc33fc01b0b8fc2.zip
In acpiioctl(), Return though the splx() path if suser() returns an error
ok deraadt@
Diffstat (limited to 'sys/dev/acpi/acpi.c')
-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;