diff options
Diffstat (limited to 'source3/nsswitch/wb_common.c')
-rw-r--r-- | source3/nsswitch/wb_common.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/nsswitch/wb_common.c b/source3/nsswitch/wb_common.c index 8376007424..ed0075a358 100644 --- a/source3/nsswitch/wb_common.c +++ b/source3/nsswitch/wb_common.c @@ -99,7 +99,8 @@ static int open_pipe_sock(void) return -1; } - if (!S_ISDIR(st.st_mode) || (st.st_uid != 0)) { + if (!S_ISDIR(st.st_mode) || + (st.st_uid != 0 && st.st_uid != geteuid())) { return -1; } @@ -128,7 +129,8 @@ static int open_pipe_sock(void) /* Check permissions on unix socket file */ - if (!S_ISSOCK(st.st_mode) || (st.st_uid != 0)) { + if (!S_ISSOCK(st.st_mode) || + (st.st_uid != 0 && st.st_uid != geteuid())) { return -1; } |