From 4f41be356a4e6b311d30de3b2e36e4c33aa72ca3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 5 May 2011 10:41:59 -0700 Subject: Fix many const compiler warnings. --- source3/libsmb/libsmb_context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/libsmb/libsmb_context.c') diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index 9c8429aab4..f81631e5f6 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -456,11 +456,11 @@ smbc_option_get(SMBCCTX *context, switch(smbc_getOptionSmbEncryptionLevel(context)) { case 0: - return (void *) "none"; + return discard_const_p(void, "none"); case 1: - return (void *) "request"; + return discard_const_p(void, "request"); case 2: - return (void *) "require"; + return discard_const_p(void, "require"); } } else if (strcmp(option_name, "smb_encrypt_on") == 0) { -- cgit From 27022587e31769718ab53f4d114e03ac2f205f27 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 6 May 2011 11:47:43 +0200 Subject: s3-libsmb: move protos to libsmb/proto.h Guenther --- source3/libsmb/libsmb_context.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/libsmb/libsmb_context.c') diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index f81631e5f6..a7f236718a 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -23,6 +23,7 @@ */ #include "includes.h" +#include "libsmb/libsmb.h" #include "libsmbclient.h" #include "libsmb_internal.h" #include "secrets.h" -- cgit From acdf5b0d4c188c0ca9ac17caedd1b53ae241acd6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 8 Jun 2011 15:41:24 +1000 Subject: s3-libsmbclient Use workgroup from libsmbclient caller for domain in credentials 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libsmb/libsmb_context.c') diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index a7f236718a..9d473d19b2 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -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); -- cgit From 74eed8f3ed5c333728350df1d23a4318e9104909 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 9 Jun 2011 15:31:03 +1000 Subject: s3-param Remove special case for global_myname(), rename to lp_netbios_name() There is no reason this can't be a normal constant string in the loadparm system, now that we have lp_set_cmdline() to handle overrides correctly. Andrew Bartlett --- source3/libsmb/libsmb_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/libsmb/libsmb_context.c') diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index 9d473d19b2..dbf70e02c8 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -599,8 +599,8 @@ smbc_init_context(SMBCCTX *context) * our hostname etc */ char *netbios_name; - if (global_myname()) { - netbios_name = SMB_STRDUP(global_myname()); + if (lp_netbios_name()) { + netbios_name = SMB_STRDUP(lp_netbios_name()); } else { /* * Hmmm, I want to get hostname as well, but I am too -- cgit