diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2015-12-10 13:03:23 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2015-12-10 13:03:23 +0000 |
commit | f47a3218294ddd6aab86691728fb59641e536127 (patch) | |
tree | 569a6e019cf31b9077a3a09af1d6c35211f3a60d /lib | |
parent | 821d49002e8bf6542f469713b04fa88da446af53 (diff) |
use geteuid to make it easier for root to communicate.
reported by Jeunder Yu
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/shm_open.c | 4 |
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; |