diff options
author | 2015-12-10 13:02:24 +0000 | |
---|---|---|
committer | 2015-12-10 13:02:24 +0000 | |
commit | 59e6ef93af588f8ca66c551f8a0ee9c0e3192c4b (patch) | |
tree | 3226992d18e183bd51b3eeb6d324d334b829b1d2 | |
parent | mark bnx_start as mpsafe. (diff) | |
download | wireguard-openbsd-59e6ef93af588f8ca66c551f8a0ee9c0e3192c4b.tar.xz wireguard-openbsd-59e6ef93af588f8ca66c551f8a0ee9c0e3192c4b.zip |
use geteuid to allow root to communicate with others.
report from Jeunder Yu
-rw-r--r-- | lib/librthread/rthread_sem.c | 4 |
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); |