r24734: Move nss_err_str() to a more public place.
authorGünther Deschner <gd@samba.org>
Tue, 28 Aug 2007 12:49:46 +0000 (12:49 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:30:16 +0000 (12:30 -0500)
Guenther
(This used to be commit f62292c5a1bcae2bfa10632014c5ac06dd1f50bb)

source3/nsswitch/wb_common.c
source3/nsswitch/winbind_client.h
source3/nsswitch/winbind_nss_linux.c

index 5072b81515f3eef064c061d499847724f4e890ca..d717e9db7fad1bf0f7006c62f00754ba36ab98c7 100644 (file)
@@ -673,3 +673,23 @@ BOOL winbind_on( void )
        return putenv(s) != -1;
 }
 
+/*************************************************************************
+ ************************************************************************/
+
+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";
+               case NSS_STATUS_RETURN:
+                       return "NSS_STATUS_RETURN";
+               default:
+                       return "UNKNOWN RETURN CODE!!!!!!!";
+       }
+}
index d80aff37fa1d40f37b5e2c71945ced28730d99b1..423fa3005652375eeab0b24f40289077be73b079 100644 (file)
@@ -15,4 +15,5 @@ int write_sock(void *buffer, int count, int recursing, int need_priv);
 int read_reply(struct winbindd_response *response);
 void close_sock(void);
 void free_response(struct winbindd_response *response);
+const char *nss_err_str(NSS_STATUS ret);
 
index 84f8c3eadec64b7cbbb68a73c9d18c07d35be483..b732d96fd1a717825e2771fb5d54940530a2edfd 100644 (file)
@@ -67,25 +67,6 @@ NSS_STATUS _nss_winbind_gidtosid(gid_t gid, char **sid, char *buffer,
 
 extern int winbindd_fd;
 
-#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";
-               case NSS_STATUS_RETURN:
-                       return "NSS_STATUS_RETURN";
-               default:
-                       return "UNKNOWN RETURN CODE!!!!!!!";
-       }
-}
-#endif
-
 /* Allocate some space from the nss static buffer.  The buffer and buflen
    are the pointers passed in by the C library to the _nss_ntdom_*
    functions. */