diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source3/utils/net_rpc_join.c | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2 samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/utils/net_rpc_join.c')
-rw-r--r-- | source3/utils/net_rpc_join.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index 1ca213d155..d228f92804 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -30,6 +30,7 @@ #include "rpc_client/cli_netlogon.h" #include "secrets.h" #include "rpc_client/init_lsa.h" +#include "libsmb/libsmb.h" /* Macro for checking RPC error codes to make things more readable */ @@ -306,7 +307,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv) "could not open domain"); /* Create domain user */ - if ((acct_name = talloc_asprintf(mem_ctx, "%s$", global_myname())) == NULL) { + if ((acct_name = talloc_asprintf(mem_ctx, "%s$", lp_netbios_name())) == NULL) { status = NT_STATUS_NO_MEMORY; goto done; } @@ -442,8 +443,8 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv) status = rpccli_netlogon_setup_creds(pipe_hnd, cli->desthost, /* server name */ domain, /* domain */ - global_myname(), /* client name */ - global_myname(), /* machine account name */ + lp_netbios_name(), /* client name */ + lp_netbios_name(), /* machine account name */ md4_trust_password, sec_channel_type, &neg_flags); @@ -457,7 +458,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv) d_fprintf(stderr, _("Please make sure that no computer " "account\nnamed like this machine " "(%s) exists in the domain\n"), - global_myname()); + lp_netbios_name()); } goto done; @@ -486,7 +487,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv) "computer account\nnamed " "like this machine (%s) " "exists in the domain\n"), - global_myname()); + lp_netbios_name()); } goto done; @@ -498,7 +499,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv) /* Now store the secret in the secrets database */ - strupper_m(CONST_DISCARD(char *, domain)); + strupper_m(discard_const_p(char, domain)); if (!secrets_store_domain_sid(domain, domain_sid)) { DEBUG(0, ("error storing domain sid for %s\n", domain)); |