[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Sat Jan 23 11:15:21 MST 2010
The branch, master has been updated
via 7564445... nsswitch: Move nss_err_str to its only caller
via c821be4... nsswitch: Make some functions static
from dff03b6... s3: Make string_to_sid a wrapper around dom_sid_parse
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 756444566f60fca62ae5f5a17ddbf5267c25dad2
Author: Volker Lendecke <vl at samba.org>
Date: Sat Jan 23 18:20:36 2010 +0100
nsswitch: Move nss_err_str to its only caller
commit c821be415b6798d0eaf182e18234513c36d42336
Author: Volker Lendecke <vl at samba.org>
Date: Sat Jan 23 18:06:53 2010 +0100
nsswitch: Make some functions static
-----------------------------------------------------------------------
Summary of changes:
nsswitch/wb_common.c | 35 +++++++----------------------------
nsswitch/winbind_client.h | 9 ---------
nsswitch/winbind_nss_linux.c | 25 +++++++++++++++++++++++++
3 files changed, 32 insertions(+), 37 deletions(-)
Changeset truncated at 500 lines:
diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c
index d0dfcb8..fbb550f 100644
--- a/nsswitch/wb_common.c
+++ b/nsswitch/wb_common.c
@@ -41,7 +41,8 @@ void winbindd_free_response(struct winbindd_response *response)
/* Initialise a request structure */
-void winbindd_init_request(struct winbindd_request *request, int request_type)
+static void winbindd_init_request(struct winbindd_request *request,
+ int request_type)
{
request->length = sizeof(struct winbindd_request);
@@ -61,7 +62,7 @@ static void init_response(struct winbindd_response *response)
/* Close established socket */
-void winbind_close_sock(void)
+static void winbind_close_sock(void)
{
if (winbindd_fd != -1) {
close(winbindd_fd);
@@ -363,7 +364,8 @@ static int winbind_open_pipe_sock(int recursing, int need_priv)
/* Write data to winbindd socket */
-int winbind_write_sock(void *buffer, int count, int recursing, int need_priv)
+static int winbind_write_sock(void *buffer, int count, int recursing,
+ int need_priv)
{
int result, nwritten;
@@ -430,7 +432,7 @@ int winbind_write_sock(void *buffer, int count, int recursing, int need_priv)
/* Read data from winbindd socket */
-int winbind_read_sock(void *buffer, int count)
+static int winbind_read_sock(void *buffer, int count)
{
int nread = 0;
int total_time = 0, selret;
@@ -496,7 +498,7 @@ int winbind_read_sock(void *buffer, int count)
/* Read reply */
-int winbindd_read_reply(struct winbindd_response *response)
+static int winbindd_read_reply(struct winbindd_response *response)
{
int result1, result2 = 0;
@@ -665,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 b004d9c..ed1c81d 100644
--- a/nsswitch/winbind_client.h
+++ b/nsswitch/winbind_client.h
@@ -1,7 +1,6 @@
#include "winbind_nss_config.h"
#include "winbind_struct_protocol.h"
-void winbindd_init_request(struct winbindd_request *req,int rq_type);
void winbindd_free_response(struct winbindd_response *response);
NSS_STATUS winbindd_send_request(int req_type, int need_priv,
struct winbindd_request *request);
@@ -12,8 +11,6 @@ NSS_STATUS winbindd_request_response(int req_type,
NSS_STATUS winbindd_priv_request_response(int req_type,
struct winbindd_request *request,
struct winbindd_response *response);
-int winbindd_read_reply(struct winbindd_response *response);
-
#define winbind_env_set() \
(strcmp(getenv(WINBINDD_DONT_ENV)?getenv(WINBINDD_DONT_ENV):"0","1") == 0)
@@ -22,9 +19,3 @@ int winbindd_read_reply(struct winbindd_response *response);
#define winbind_on() \
(setenv(WINBINDD_DONT_ENV, "0", 1) == 0)
-
-int winbind_write_sock(void *buffer, int count, int recursing, int need_priv);
-int winbind_read_sock(void *buffer, int count);
-void winbind_close_sock(void);
-
-const char *nss_err_str(NSS_STATUS ret);
diff --git a/nsswitch/winbind_nss_linux.c b/nsswitch/winbind_nss_linux.c
index 4a79432..7b16752 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
--
Samba Shared Repository
More information about the samba-cvs
mailing list