summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2015-12-10 13:03:23 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2015-12-10 13:03:23 +0000
commitf47a3218294ddd6aab86691728fb59641e536127 (patch)
tree569a6e019cf31b9077a3a09af1d6c35211f3a60d /lib/libc
parent821d49002e8bf6542f469713b04fa88da446af53 (diff)
use geteuid to make it easier for root to communicate.
reported by Jeunder Yu
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/shm_open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/shm_open.c b/lib/libc/gen/shm_open.c
index 59aca4b10a8..de17de65d22 100644
--- a/lib/libc/gen/shm_open.c
+++ b/lib/libc/gen/shm_open.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shm_open.c,v 1.7 2015/09/12 15:01:33 guenther Exp $ */
+/* $OpenBSD: shm_open.c,v 1.8 2015/12/10 13:03:22 tedu Exp $ */
/*
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
*
@@ -69,7 +69,7 @@ shm_open(const char *path, int flags, mode_t mode)
errno = EINVAL;
return -1;
}
- if (sb.st_uid != getuid()) {
+ if (sb.st_uid != geteuid()) {
close(fd);
errno = EPERM;
return -1;