diff options
author | Volker Lendecke <vl@samba.org> | 2010-01-23 18:20:36 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-01-23 19:14:50 +0100 |
commit | 756444566f60fca62ae5f5a17ddbf5267c25dad2 (patch) | |
tree | 009cb6b3a18d38ed6097fb8e79fa4d583fd94784 /nsswitch | |
parent | c821be415b6798d0eaf182e18234513c36d42336 (diff) | |
download | samba-756444566f60fca62ae5f5a17ddbf5267c25dad2.tar.gz samba-756444566f60fca62ae5f5a17ddbf5267c25dad2.tar.bz2 samba-756444566f60fca62ae5f5a17ddbf5267c25dad2.zip |
nsswitch: Move nss_err_str to its only caller
Diffstat (limited to 'nsswitch')
-rw-r--r-- | nsswitch/wb_common.c | 23 | ||||
-rw-r--r-- | nsswitch/winbind_client.h | 3 | ||||
-rw-r--r-- | nsswitch/winbind_nss_linux.c | 25 |
3 files changed, 25 insertions, 26 deletions
diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c index f989d194e1..fbb550f139 100644 --- a/nsswitch/wb_common.c +++ b/nsswitch/wb_common.c @@ -667,26 +667,3 @@ NSS_STATUS winbindd_priv_request_response(int req_type, return status; } - -/************************************************************************* - ************************************************************************/ - -const char *nss_err_str(NSS_STATUS ret) -{ - switch (ret) { - case NSS_STATUS_TRYAGAIN: - return "NSS_STATUS_TRYAGAIN"; - case NSS_STATUS_SUCCESS: - return "NSS_STATUS_SUCCESS"; - case NSS_STATUS_NOTFOUND: - return "NSS_STATUS_NOTFOUND"; - case NSS_STATUS_UNAVAIL: - return "NSS_STATUS_UNAVAIL"; -#ifdef NSS_STATUS_RETURN - case NSS_STATUS_RETURN: - return "NSS_STATUS_RETURN"; -#endif - default: - return "UNKNOWN RETURN CODE!!!!!!!"; - } -} diff --git a/nsswitch/winbind_client.h b/nsswitch/winbind_client.h index d4f60a2f9c..ed1c81ddb2 100644 --- a/nsswitch/winbind_client.h +++ b/nsswitch/winbind_client.h @@ -19,6 +19,3 @@ NSS_STATUS winbindd_priv_request_response(int req_type, #define winbind_on() \ (setenv(WINBINDD_DONT_ENV, "0", 1) == 0) - - -const char *nss_err_str(NSS_STATUS ret); diff --git a/nsswitch/winbind_nss_linux.c b/nsswitch/winbind_nss_linux.c index 4a7943278e..7b16752043 100644 --- a/nsswitch/winbind_nss_linux.c +++ b/nsswitch/winbind_nss_linux.c @@ -71,6 +71,31 @@ NSS_STATUS _nss_winbind_uidtosid(uid_t uid, char **sid, char *buffer, NSS_STATUS _nss_winbind_gidtosid(gid_t gid, char **sid, char *buffer, size_t buflen, int *errnop); +/************************************************************************* + ************************************************************************/ + +#ifdef DEBUG_NSS +static const char *nss_err_str(NSS_STATUS ret) +{ + switch (ret) { + case NSS_STATUS_TRYAGAIN: + return "NSS_STATUS_TRYAGAIN"; + case NSS_STATUS_SUCCESS: + return "NSS_STATUS_SUCCESS"; + case NSS_STATUS_NOTFOUND: + return "NSS_STATUS_NOTFOUND"; + case NSS_STATUS_UNAVAIL: + return "NSS_STATUS_UNAVAIL"; +#ifdef NSS_STATUS_RETURN + case NSS_STATUS_RETURN: + return "NSS_STATUS_RETURN"; +#endif + default: + return "UNKNOWN RETURN CODE!!!!!!!"; + } +} +#endif + /* Prototypes from wb_common.c */ /* Allocate some space from the nss static buffer. The buffer and buflen |