s3-libsmbclient Use workgroup from libsmbclient caller for domain in credentials
authorAndrew Bartlett <abartlet@samba.org>
Wed, 8 Jun 2011 05:41:24 +0000 (15:41 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 9 Jun 2011 10:40:09 +0000 (12:40 +0200)
This previously set the workgroup, which is a different thing, but
would have been the default if no domain was specified).  This more
clearly sets the information from the credentials file into the
matching field in the credentials structure.

Andrew Bartlett

source3/libsmb/libsmb_context.c

index a7f236718a470c58e9ed4000c150c3116d7d7285..9d473d19b2fe1e37ee9420ba9d58da07e1819ac5 100644 (file)
@@ -750,6 +750,7 @@ void smbc_set_credentials_with_fallback(SMBCCTX *context,
        }
 
         set_cmdline_auth_info_username(auth_info, user);
+        set_cmdline_auth_info_domain(auth_info, workgroup);
         set_cmdline_auth_info_password(auth_info, password);
         set_cmdline_auth_info_use_kerberos(auth_info, use_kerberos);
         set_cmdline_auth_info_signing_state(auth_info, signing_state);
@@ -757,7 +758,6 @@ void smbc_set_credentials_with_fallback(SMBCCTX *context,
                smbc_getOptionFallbackAfterKerberos(context));
        set_cmdline_auth_info_use_ccache(
                auth_info, smbc_getOptionUseCCache(context));
-        set_global_myworkgroup(workgroup);
 
        TALLOC_FREE(context->internal->auth_info);