Author: gd
Date: 2007-08-28 12:49:46 +0000 (Tue, 28 Aug 2007)
New Revision: 24734

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24734

Log:
Move nss_err_str() to a more public place.

Guenther

Modified:
   branches/SAMBA_3_2/source/nsswitch/wb_common.c
   branches/SAMBA_3_2/source/nsswitch/winbind_client.h
   branches/SAMBA_3_2/source/nsswitch/winbind_nss_linux.c
   branches/SAMBA_3_2_0/source/nsswitch/wb_common.c
   branches/SAMBA_3_2_0/source/nsswitch/winbind_client.h
   branches/SAMBA_3_2_0/source/nsswitch/winbind_nss_linux.c


Changeset:
Modified: branches/SAMBA_3_2/source/nsswitch/wb_common.c
===================================================================
--- branches/SAMBA_3_2/source/nsswitch/wb_common.c      2007-08-28 12:40:01 UTC 
(rev 24733)
+++ branches/SAMBA_3_2/source/nsswitch/wb_common.c      2007-08-28 12:49:46 UTC 
(rev 24734)
@@ -673,3 +673,23 @@
        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!!!!!!!";
+       }
+}

Modified: branches/SAMBA_3_2/source/nsswitch/winbind_client.h
===================================================================
--- branches/SAMBA_3_2/source/nsswitch/winbind_client.h 2007-08-28 12:40:01 UTC 
(rev 24733)
+++ branches/SAMBA_3_2/source/nsswitch/winbind_client.h 2007-08-28 12:49:46 UTC 
(rev 24734)
@@ -15,4 +15,5 @@
 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);
 

Modified: branches/SAMBA_3_2/source/nsswitch/winbind_nss_linux.c
===================================================================
--- branches/SAMBA_3_2/source/nsswitch/winbind_nss_linux.c      2007-08-28 
12:40:01 UTC (rev 24733)
+++ branches/SAMBA_3_2/source/nsswitch/winbind_nss_linux.c      2007-08-28 
12:49:46 UTC (rev 24734)
@@ -67,25 +67,6 @@
 
 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. */

Modified: branches/SAMBA_3_2_0/source/nsswitch/wb_common.c
===================================================================
--- branches/SAMBA_3_2_0/source/nsswitch/wb_common.c    2007-08-28 12:40:01 UTC 
(rev 24733)
+++ branches/SAMBA_3_2_0/source/nsswitch/wb_common.c    2007-08-28 12:49:46 UTC 
(rev 24734)
@@ -673,3 +673,23 @@
        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!!!!!!!";
+       }
+}

Modified: branches/SAMBA_3_2_0/source/nsswitch/winbind_client.h
===================================================================
--- branches/SAMBA_3_2_0/source/nsswitch/winbind_client.h       2007-08-28 
12:40:01 UTC (rev 24733)
+++ branches/SAMBA_3_2_0/source/nsswitch/winbind_client.h       2007-08-28 
12:49:46 UTC (rev 24734)
@@ -15,4 +15,5 @@
 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);
 

Modified: branches/SAMBA_3_2_0/source/nsswitch/winbind_nss_linux.c
===================================================================
--- branches/SAMBA_3_2_0/source/nsswitch/winbind_nss_linux.c    2007-08-28 
12:40:01 UTC (rev 24733)
+++ branches/SAMBA_3_2_0/source/nsswitch/winbind_nss_linux.c    2007-08-28 
12:49:46 UTC (rev 24734)
@@ -67,25 +67,6 @@
 
 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. */

Reply via email to