summaryrefslogtreecommitdiff
path: root/lib/librthread/rthread_sem.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2015-12-10 13:02:25 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2015-12-10 13:02:25 +0000
commit821d49002e8bf6542f469713b04fa88da446af53 (patch)
tree0c23ec6e79c7fdf8f99aafc99fe2e6c95a2f147d /lib/librthread/rthread_sem.c
parenta56d966314b542ca587698be45da2f6af7164c76 (diff)
use geteuid to allow root to communicate with others.
report from Jeunder Yu
Diffstat (limited to 'lib/librthread/rthread_sem.c')
-rw-r--r--lib/librthread/rthread_sem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/librthread/rthread_sem.c b/lib/librthread/rthread_sem.c
index ecba0d3be5e..bf9be17d484 100644
--- a/lib/librthread/rthread_sem.c
+++ b/lib/librthread/rthread_sem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread_sem.c,v 1.20 2015/01/16 16:48:52 deraadt Exp $ */
+/* $OpenBSD: rthread_sem.c,v 1.21 2015/12/10 13:02:24 tedu Exp $ */
/*
* Copyright (c) 2004,2005,2013 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
@@ -342,7 +342,7 @@ sem_open(const char *name, int oflag, ...)
errno = EINVAL;
return (SEM_FAILED);
}
- if (sb.st_uid != getuid()) {
+ if (sb.st_uid != geteuid()) {
close(fd);
errno = EPERM;
return (SEM_FAILED);