summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/nsswitch/wb_common.c14
-rw-r--r--source3/nsswitch/winbindd.c2
-rw-r--r--source3/nsswitch/winbindd_group.c13
-rw-r--r--source3/nsswitch/winbindd_nss.h4
-rw-r--r--source3/nsswitch/winbindd_user.c17
5 files changed, 3 insertions, 47 deletions
diff --git a/source3/nsswitch/wb_common.c b/source3/nsswitch/wb_common.c
index 51792f63fe..e0cae0abe3 100644
--- a/source3/nsswitch/wb_common.c
+++ b/source3/nsswitch/wb_common.c
@@ -45,25 +45,11 @@ void free_response(struct winbindd_response *response)
void init_request(struct winbindd_request *request, int request_type)
{
- static char *domain_env;
- static BOOL initialised;
-
request->length = sizeof(struct winbindd_request);
request->cmd = (enum winbindd_cmd)request_type;
request->pid = getpid();
- request->domain[0] = '\0';
-
- if (!initialised) {
- initialised = True;
- domain_env = getenv(WINBINDD_DOMAIN_ENV);
- }
- if (domain_env) {
- strncpy(request->domain, domain_env,
- sizeof(request->domain) - 1);
- request->domain[sizeof(request->domain) - 1] = '\0';
- }
}
/* Initialise a response structure */
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index 773e3a84f3..57c1fc84b5 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -362,7 +362,7 @@ void winbind_process_packet(struct winbindd_cli_state *state)
/* Process request */
/* Ensure null termination of entire request */
- state->request.domain[sizeof(state->request.domain)-1]='\0';
+ state->request.null_term = '\0';
state->pid = state->request.pid;
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index 507d5caf0f..ab6268583f 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -356,13 +356,6 @@ enum winbindd_result winbindd_setgrent(struct winbindd_cli_state *state)
for (domain = domain_list(); domain != NULL; domain = domain->next) {
struct getent_state *domain_state;
- /* Skip domains other than WINBINDD_DOMAIN environment
- variable */
-
- if ((strcmp(state->request.domain, "") != 0) &&
- !check_domain_env(state->request.domain, domain->name))
- continue;
-
/* Create a state record for this domain */
if ((domain_state = (struct getent_state *)
@@ -748,12 +741,6 @@ enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state)
ZERO_STRUCT(groups);
- /* Skip domains other than WINBINDD_DOMAIN environment
- variable */
- if ((strcmp(state->request.domain, "") != 0) &&
- !check_domain_env(state->request.domain, domain->name))
- continue;
-
/* Get list of sam groups */
ZERO_STRUCT(groups);
fstrcpy(groups.domain_name, domain->name);
diff --git a/source3/nsswitch/winbindd_nss.h b/source3/nsswitch/winbindd_nss.h
index 368bf10cea..5c2db2ac2c 100644
--- a/source3/nsswitch/winbindd_nss.h
+++ b/source3/nsswitch/winbindd_nss.h
@@ -36,7 +36,7 @@
/* Update this when you change the interface. */
-#define WINBIND_INTERFACE_VERSION 5
+#define WINBIND_INTERFACE_VERSION 6
/* Socket commands */
@@ -156,7 +156,7 @@ struct winbindd_request {
} name;
uint32 num_entries; /* getpwent, getgrent */
} data;
- fstring domain; /* {set,get,end}{pw,gr}ent() */
+ char null_term;
};
/* Response values */
diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c
index 4f57fd2c72..bb281463ce 100644
--- a/source3/nsswitch/winbindd_user.c
+++ b/source3/nsswitch/winbindd_user.c
@@ -284,16 +284,6 @@ enum winbindd_result winbindd_setpwent(struct winbindd_cli_state *state)
for(domain = domain_list(); domain != NULL; domain = domain->next) {
struct getent_state *domain_state;
- /*
- * Skip domains other than WINBINDD_DOMAIN environment
- * variable.
- */
-
- if ((strcmp(state->request.domain, "") != 0) &&
- !check_domain_env(state->request.domain,
- domain->name))
- continue;
-
/* Create a state record for this domain */
if ((domain_state = (struct getent_state *)
@@ -551,13 +541,6 @@ enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state)
struct winbindd_methods *methods;
int i;
- /* Skip domains other than WINBINDD_DOMAIN environment
- variable */
-
- if ((strcmp(state->request.domain, "") != 0) &&
- !check_domain_env(state->request.domain, domain->name))
- continue;
-
methods = domain->methods;
/* Query display info */