Added NT_USER_TOKEN into server_info to fix extra groups problem.
[kamenim/samba.git] / source3 / nsswitch / winbindd_misc.c
index 618dd6f1c9d79e8a568f00bb7ef9600c1f83a250..34c340f258c37062a2d755b49e8ff3501cd98e0c 100644 (file)
@@ -55,7 +55,7 @@ static BOOL _get_trust_account_password(char *domain, unsigned char *ret_pwd,
 
        if (pass_last_set_time) *pass_last_set_time = pass->mod_time;
        memcpy(ret_pwd, pass->hash, 16);
-       free(pass);
+       SAFE_FREE(pass);
        return True;
 }
 
@@ -67,7 +67,6 @@ enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *stat
        uchar trust_passwd[16];
        struct in_addr *ip_list = NULL;
        int count;
-       uint16 validation_level;
        fstring controller, trust_account;
         int num_retries = 0;
 
@@ -101,9 +100,12 @@ enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *stat
                  global_myname);
 
 #if 0 /* XXX */
+       {
+               uint16 validation_level;
         status = cli_nt_setup_creds(controller, lp_workgroup(), global_myname,
                                     trust_account, trust_passwd, 
                                     SEC_CHAN_WKSTA, &validation_level);        
+       }
 #endif
 
         /* There is a race condition between fetching the trust account
@@ -152,7 +154,7 @@ enum winbindd_result winbindd_list_trusted_domains(struct winbindd_cli_state
 
                if (!ted) {
                        DEBUG(0,("winbindd_list_trusted_domains: failed to enlarge buffer!\n"));
-                       if (extra_data) free(extra_data);
+                       SAFE_FREE(extra_data);
                        return WINBINDD_ERROR;
                }
                else extra_data = ted;