diff options
author | Karolin Seeger <kseeger@samba.org> | 2008-08-27 10:38:08 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-08-27 10:38:08 +0200 |
commit | 51828872b5b90cdbb800db0462a0d75b68e104a4 (patch) | |
tree | c2bb1bce82b8d65e090360563cdc897669ddb35b | |
parent | 41b0106bf0633d1b68aee3e22056aef0aa855c4a (diff) | |
download | samba-51828872b5b90cdbb800db0462a0d75b68e104a4.tar.gz |
Revert "nss_winbind: When returning NSS_UNAVAIL, squash errno to ENOENT"
This reverts commit 15e8e23466ae959bd0efc540c287338dbcd0b7a6.
-rw-r--r-- | source/nsswitch/wb_common.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/source/nsswitch/wb_common.c b/source/nsswitch/wb_common.c index 6e6d2bbbf84..b113fc3336e 100644 --- a/source/nsswitch/wb_common.c +++ b/source/nsswitch/wb_common.c @@ -176,13 +176,11 @@ static int winbind_named_pipe_sock(const char *dir) /* Check permissions on unix socket directory */ if (lstat(dir, &st) == -1) { - errno = ENOENT; return -1; } if (!S_ISDIR(st.st_mode) || (st.st_uid != 0 && st.st_uid != geteuid())) { - errno = ENOENT; return -1; } @@ -201,7 +199,6 @@ static int winbind_named_pipe_sock(const char *dir) the winbindd daemon is not running. */ if (lstat(path, &st) == -1) { - errno = ENOENT; SAFE_FREE(path); return -1; } @@ -211,7 +208,6 @@ static int winbind_named_pipe_sock(const char *dir) if (!S_ISSOCK(st.st_mode) || (st.st_uid != 0 && st.st_uid != geteuid())) { - errno = ENOENT; return -1; } @@ -372,7 +368,6 @@ int winbind_write_sock(void *buffer, int count, int recursing, int need_priv) restart: if (winbind_open_pipe_sock(recursing, need_priv) == -1) { - errno = ENOENT; return -1; } @@ -569,11 +564,7 @@ NSS_STATUS winbindd_send_request(int req_type, int need_priv, if (winbind_write_sock(request, sizeof(*request), request->wb_flags & WBFLAG_RECURSE, - need_priv) == -1) - { - /* Set ENOENT for consistency. Required by some apps */ - errno = ENOENT; - + need_priv) == -1) { return NSS_STATUS_UNAVAIL; } @@ -581,11 +572,7 @@ NSS_STATUS winbindd_send_request(int req_type, int need_priv, (winbind_write_sock(request->extra_data.data, request->extra_len, request->wb_flags & WBFLAG_RECURSE, - need_priv) == -1)) - { - /* Set ENOENT for consistency. Required by some apps */ - errno = ENOENT; - + need_priv) == -1)) { return NSS_STATUS_UNAVAIL; } @@ -609,9 +596,6 @@ NSS_STATUS winbindd_get_response(struct winbindd_response *response) /* Wait for reply */ if (winbindd_read_reply(response) == -1) { - /* Set ENOENT for consistency. Required by some apps */ - errno = ENOENT; - return NSS_STATUS_UNAVAIL; } |