diff options
-rw-r--r-- | source3/nsswitch/wb_common.c | 17 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_group.c | 13 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_user.c | 18 |
3 files changed, 1 insertions, 47 deletions
diff --git a/source3/nsswitch/wb_common.c b/source3/nsswitch/wb_common.c index 51792f63fe..89c751a4ef 100644 --- a/source3/nsswitch/wb_common.c +++ b/source3/nsswitch/wb_common.c @@ -24,8 +24,7 @@ Boston, MA 02111-1307, USA. */ -#include "winbind_nss_config.h" -#include "winbindd_nss.h" +#include "winbind_client.h" /* Global variables. These are effectively the client state information */ @@ -45,25 +44,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_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_user.c b/source3/nsswitch/winbindd_user.c index 56bcb3d818..bb281463ce 100644 --- a/source3/nsswitch/winbindd_user.c +++ b/source3/nsswitch/winbindd_user.c @@ -73,7 +73,6 @@ static BOOL winbindd_fill_pwent(char *dom_name, char *user_name, by lp_string() calling standard_sub_basic(). */ fstrcpy(current_user_info.smb_name, user_name); - sub_set_smb_name(user_name); fstrcpy(current_user_info.domain, dom_name); pstrcpy(homedir, lp_template_homedir()); @@ -285,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 *) @@ -552,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 */ |