summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-01-18 16:24:12 +0100
committerGünther Deschner <gd@samba.org>2011-02-02 19:03:06 +0100
commit63de60c2bc7049866cb8233817b6342ec4ce970b (patch)
treeed565e2e57f902ac3bc2c028741722569e5f133f /source3
parent61d18b7f086eef4e9a6366306dfc441710d57209 (diff)
downloadsamba-63de60c2bc7049866cb8233817b6342ec4ce970b.tar.gz
samba-63de60c2bc7049866cb8233817b6342ec4ce970b.tar.bz2
samba-63de60c2bc7049866cb8233817b6342ec4ce970b.zip
s3-net: prefer dcerpc_lsa_X functions in "net rpc join".
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_rpc_join.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index 7759bdeccf..88bbd6691e 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -21,7 +21,7 @@
#include "includes.h"
#include "utils/net.h"
#include "../libcli/auth/libcli_auth.h"
-#include "../librpc/gen_ndr/cli_lsa.h"
+#include "../librpc/gen_ndr/ndr_lsa_c.h"
#include "rpc_client/cli_lsarpc.h"
#include "../librpc/gen_ndr/ndr_samr_c.h"
#include "rpc_client/init_samr.h"
@@ -248,22 +248,24 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
goto done;
}
+ b = pipe_hnd->binding_handle;
CHECK_RPC_ERR(rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true,
SEC_FLAG_MAXIMUM_ALLOWED,
&lsa_pol),
"error opening lsa policy handle");
- CHECK_RPC_ERR(rpccli_lsa_QueryInfoPolicy(pipe_hnd, mem_ctx,
- &lsa_pol,
- LSA_POLICY_INFO_ACCOUNT_DOMAIN,
- &info),
+ CHECK_DCERPC_ERR(dcerpc_lsa_QueryInfoPolicy(b, mem_ctx,
+ &lsa_pol,
+ LSA_POLICY_INFO_ACCOUNT_DOMAIN,
+ &info,
+ &result),
"error querying info policy");
domain = info->account_domain.name.string;
domain_sid = info->account_domain.sid;
- rpccli_lsa_Close(pipe_hnd, mem_ctx, &lsa_pol);
+ dcerpc_lsa_Close(b, mem_ctx, &lsa_pol, &result);
TALLOC_FREE(pipe_hnd); /* Done with this pipe */
/* Bail out if domain didn't get set. */