summaryrefslogtreecommitdiff
path: root/source3/utils/net_util.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
commit6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch)
tree850c71039563c16a5d563c47e7ba2ab645baf198 /source3/utils/net_util.c
parent6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff)
parent2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff)
downloadsamba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/utils/net_util.c')
-rw-r--r--source3/utils/net_util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c
index ffcda14e7f..0b8bd839d1 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,
@@ -359,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;
@@ -381,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;
@@ -585,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);
}
}