diff options
author | Tim Potter <tpot@samba.org> | 2001-12-14 02:17:18 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-12-14 02:17:18 +0000 |
commit | c5564c55fcf65060b4a4b098d6ccf9f0a61a402f (patch) | |
tree | d1c91f8647390b221c74a751c5a8c233e3592d1d /source3 | |
parent | 9f3b884d3f6d5e5bc4c3c3addd21bbed66af6c33 (diff) | |
download | samba-c5564c55fcf65060b4a4b098d6ccf9f0a61a402f.tar.gz samba-c5564c55fcf65060b4a4b098d6ccf9f0a61a402f.tar.bz2 samba-c5564c55fcf65060b4a4b098d6ccf9f0a61a402f.zip |
Merge from 2.2 to allow net rpc join -U to complete even if the workstation
account already exists.
# net rpc join --user=Administrator%password
It's kind of weird seeing the mix of NET.EXE style of options (net command
subcommand /arg:value) with the GNU-style long options. I think it works.
(This used to be commit 3789c8c707acd9a4078d656c8de9ce1f4be9e388)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/net_rpc_join.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index 73ec2e593d..c9fa52a734 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -138,13 +138,16 @@ int net_rpc_join(int argc, const char **argv) 0xe005000b, &user_pol, &user_rid); - /* We *must* do this.... don't ask... */ if (!NT_STATUS_IS_OK(result) && !NT_STATUS_EQUAL(result, NT_STATUS_USER_EXISTS)) { d_printf("Create of workstation account failed\n"); goto done; } - cli_samr_close(cli, mem_ctx, &user_pol); + + /* We *must* do this.... don't ask... */ + + if (NT_STATUS_IS_OK(result)) + cli_samr_close(cli, mem_ctx, &user_pol); names = (char *)&acct_name[0]; |