Merge removal of unpopular winbind client environment variable.
authorTim Potter <tpot@samba.org>
Fri, 20 Dec 2002 01:37:39 +0000 (01:37 +0000)
committerTim Potter <tpot@samba.org>
Fri, 20 Dec 2002 01:37:39 +0000 (01:37 +0000)
source/nsswitch/wb_common.c
source/nsswitch/winbindd_group.c
source/nsswitch/winbindd_user.c

index 51792f63fe2ef768b543032529bd75f81d1d4a74..89c751a4efb17ff5416fd5fa422f4910455bd23d 100644 (file)
@@ -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 */
index 507d5caf0f7d64289d2cf221cb8bbf4833102c6d..ab6268583f74d86c41db20f42544cd5c15b1ecbd 100644 (file)
@@ -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);
index 56bcb3d818a48c20579ffbe1ddaaa8167a9d1780..bb281463ce219d61949a4997ad86a58c539c151f 100644 (file)
@@ -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 */