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/utils/net_util.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net_util.c') diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index ffcda14e7fd..cc5171f0141 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -27,6 +27,7 @@ #include "../librpc/gen_ndr/ndr_dssetup_c.h" #include "secrets.h" #include "../libcli/security/security.h" +#include "libsmb/libsmb.h" NTSTATUS net_rpc_lookup_name(struct net_context *c, TALLOC_CTX *mem_ctx, struct cli_state *cli, -- cgit From c615ebed6e3d273a682806b952d543e834e5630d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 13 May 2011 20:21:30 +0200 Subject: s3-lib Replace StrCaseCmp() with strcasecmp_m() strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett --- source3/utils/net_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/utils/net_util.c') diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index cc5171f0141..09c0b8fc764 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -586,7 +586,7 @@ int net_run_function(struct net_context *c, int argc, const char **argv, if (argc != 0) { for (i=0; table[i].funcname != NULL; i++) { - if (StrCaseCmp(argv[0], table[i].funcname) == 0) + if (strcasecmp_m(argv[0], table[i].funcname) == 0) return table[i].fn(c, argc-1, argv+1); } } -- 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/utils/net_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/utils/net_util.c') diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index 09c0b8fc764..0b8bd839d1b 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -360,7 +360,7 @@ int net_use_krb_machine_account(struct net_context *c) c->opt_password = secrets_fetch_machine_password( c->opt_target_workgroup, NULL, NULL); - if (asprintf(&user_name, "%s$@%s", global_myname(), lp_realm()) == -1) { + if (asprintf(&user_name, "%s$@%s", lp_netbios_name(), lp_realm()) == -1) { return -1; } c->opt_user_name = user_name; @@ -382,7 +382,7 @@ int net_use_machine_account(struct net_context *c) c->opt_password = secrets_fetch_machine_password( c->opt_target_workgroup, NULL, NULL); - if (asprintf(&user_name, "%s$", global_myname()) == -1) { + if (asprintf(&user_name, "%s$", lp_netbios_name()) == -1) { return -1; } c->opt_user_name = user_name; -- cgit