nsswitch: Move nss_err_str to its only caller
authorVolker Lendecke <vl@samba.org>
Sat, 23 Jan 2010 17:20:36 +0000 (18:20 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 23 Jan 2010 18:14:50 +0000 (19:14 +0100)
nsswitch/wb_common.c
nsswitch/winbind_client.h
nsswitch/winbind_nss_linux.c

index f989d194e1d008445a4d2826617270eb96fd3d9e..fbb550f139aedbb0f1e16e32fea3173ee0d92bcc 100644 (file)
@@ -667,26 +667,3 @@ NSS_STATUS winbindd_priv_request_response(int req_type,
 
        return status;
 }
 
        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!!!!!!!";
-       }
-}
index d4f60a2f9cea6003c4b3749545c6c2a902308a16..ed1c81ddb2b5c4fb949d05315ea70f6182276706 100644 (file)
@@ -19,6 +19,3 @@ NSS_STATUS winbindd_priv_request_response(int req_type,
 
 #define winbind_on() \
        (setenv(WINBINDD_DONT_ENV, "0", 1) == 0)
 
 #define winbind_on() \
        (setenv(WINBINDD_DONT_ENV, "0", 1) == 0)
-
-
-const char *nss_err_str(NSS_STATUS ret);
index 4a7943278ea9f1b71730d0e8b75827956ddc3812..7b1675204342e55d665bf619985ff79f6b86b8c1 100644 (file)
@@ -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);
 
 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
 /* Prototypes from wb_common.c */
 
 /* Allocate some space from the nss static buffer.  The buffer and buflen