[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Wed Feb 2 11:51:01 MST 2011
The branch, master has been updated
via 586b2ee s3-epmap: use correct dcerpc client header in dcerpc_ep.c
via 00478b0 s3-net: prefer dcerpc_lsa_X functions in "net rpc".
via eab0049 s3-net: prefer dcerpc_lsa_X functions in "net rpc rights".
via 8055bc8 s3-net: use status variable in "net rpc rights".
via 3206434 s3-net: prefer dcerpc_lsa_X functions in net_util.c
via 63de60c s3-net: prefer dcerpc_lsa_X functions in "net rpc join".
via 61d18b7 s3-net: prefer dcerpc_lsa_X functions in "net rpc audit".
via d38d743 s3-net: use status variable in "net rpc audit".
via fe6c535 s3-rpcclient: prefer dcerpc_lsa_X functions.
via 204eeac s3-rpcclient: prefer dcerpc_lsa_X functions.
via 36cd79f s3-rpcclient: prefer dcerpc_lsa_X functions.
via 707d572 s3-rpcclient: use status variable.
via fcaba0f s3-libsmb: prefer dcerpc_lsa_X functions.
via 95cf60a s3-libnet: prefer dcerpc_lsa_X functions.
via e32b508 s3-libnetapi: prefer dcerpc_lsa_X functions.
from ee5de71 s3-waf: remove RPCCLI_SAMR subsystem.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 586b2ee82655d5849c8483eb787f5ba77c80f478
Author: Günther Deschner <gd at samba.org>
Date: Wed Feb 2 18:50:39 2011 +0100
s3-epmap: use correct dcerpc client header in dcerpc_ep.c
Guenther
Autobuild-User: Günther Deschner <gd at samba.org>
Autobuild-Date: Wed Feb 2 19:50:02 CET 2011 on sn-devel-104
commit 00478b0559023d6e54e07053cb21c6e6e6936f35
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 17:25:02 2011 +0100
s3-net: prefer dcerpc_lsa_X functions in "net rpc".
Guenther
commit eab00491f3d25085aa3ba55c137acb1c87c4066b
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 16:46:39 2011 +0100
s3-net: prefer dcerpc_lsa_X functions in "net rpc rights".
Guenther
commit 8055bc82b0949473e3defa3cd419713525967424
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 16:37:05 2011 +0100
s3-net: use status variable in "net rpc rights".
Guenther
commit 32064346f08ee936f41a6114c2226664055e036e
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 16:35:14 2011 +0100
s3-net: prefer dcerpc_lsa_X functions in net_util.c
Guenther
commit 63de60c2bc7049866cb8233817b6342ec4ce970b
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 16:24:12 2011 +0100
s3-net: prefer dcerpc_lsa_X functions in "net rpc join".
Guenther
commit 61d18b7f086eef4e9a6366306dfc441710d57209
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 16:21:24 2011 +0100
s3-net: prefer dcerpc_lsa_X functions in "net rpc audit".
Guenther
commit d38d7431660e36628a1edebdf1557d4eae0f981c
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 16:14:35 2011 +0100
s3-net: use status variable in "net rpc audit".
Guenther
commit fe6c5353a085bb295bafb28feedcd571abed09ff
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 16:29:16 2011 +0100
s3-rpcclient: prefer dcerpc_lsa_X functions.
Guenther
commit 204eeacfc51bd3fae7c1a349c5d03dbdd8a00f68
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 16:11:46 2011 +0100
s3-rpcclient: prefer dcerpc_lsa_X functions.
Guenther
commit 36cd79f14b31b571b3be01656190210a8171e281
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 16:08:05 2011 +0100
s3-rpcclient: prefer dcerpc_lsa_X functions.
Guenther
commit 707d572f622b2144702d1c616ad9662382dfda82
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 15:42:47 2011 +0100
s3-rpcclient: use status variable.
Guenther
commit fcaba0fb59a883baff3ee6608d377d73addd6deb
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 14:59:20 2011 +0100
s3-libsmb: prefer dcerpc_lsa_X functions.
Guenther
commit 95cf60a2e5aadeb75a680bedaa6090817caa8276
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 14:55:48 2011 +0100
s3-libnet: prefer dcerpc_lsa_X functions.
Guenther
commit e32b50894ba6e163c1c483fff668ff6161414541
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 18 14:48:58 2011 +0100
s3-libnetapi: prefer dcerpc_lsa_X functions.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source3/lib/netapi/localgroup.c | 11 +-
source3/libnet/libnet_join.c | 25 +-
source3/librpc/rpc/dcerpc_ep.c | 2 +-
source3/libsmb/trusts_util.c | 36 ++-
source3/rpcclient/cmd_lsarpc.c | 792 +++++++++++++++++++++++++--------------
source3/rpcclient/cmd_test.c | 13 +-
source3/rpcclient/rpcclient.c | 18 +-
source3/utils/net_rpc.c | 155 ++++++--
source3/utils/net_rpc_audit.c | 123 ++++---
source3/utils/net_rpc_join.c | 14 +-
source3/utils/net_rpc_rights.c | 251 +++++++------
source3/utils/net_util.c | 29 +-
12 files changed, 935 insertions(+), 534 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/netapi/localgroup.c b/source3/lib/netapi/localgroup.c
index 7955ce5..ce9df27 100644
--- a/source3/lib/netapi/localgroup.c
+++ b/source3/lib/netapi/localgroup.c
@@ -24,7 +24,7 @@
#include "lib/netapi/netapi_private.h"
#include "lib/netapi/libnetapi.h"
#include "../librpc/gen_ndr/ndr_samr_c.h"
-#include "../librpc/gen_ndr/cli_lsa.h"
+#include "../librpc/gen_ndr/ndr_lsa_c.h"
#include "rpc_client/cli_lsarpc.h"
#include "rpc_client/init_lsa.h"
#include "../libcli/security/security.h"
@@ -999,8 +999,9 @@ static NTSTATUS libnetapi_lsa_lookup_names3(TALLOC_CTX *mem_ctx,
const char *name,
struct dom_sid *sid)
{
- NTSTATUS status;
+ NTSTATUS status, result;
struct policy_handle lsa_handle;
+ struct dcerpc_binding_handle *b = lsa_pipe->binding_handle;
struct lsa_RefDomainList *domains = NULL;
struct lsa_TransSidArray3 sids;
@@ -1025,7 +1026,7 @@ static NTSTATUS libnetapi_lsa_lookup_names3(TALLOC_CTX *mem_ctx,
&lsa_handle);
NT_STATUS_NOT_OK_RETURN(status);
- status = rpccli_lsa_LookupNames3(lsa_pipe, mem_ctx,
+ status = dcerpc_lsa_LookupNames3(b, mem_ctx,
&lsa_handle,
num_names,
&names,
@@ -1033,8 +1034,10 @@ static NTSTATUS libnetapi_lsa_lookup_names3(TALLOC_CTX *mem_ctx,
&sids,
LSA_LOOKUP_NAMES_ALL, /* sure ? */
&count,
- 0, 0);
+ 0, 0,
+ &result);
NT_STATUS_NOT_OK_RETURN(status);
+ NT_STATUS_NOT_OK_RETURN(result);
if (count != 1 || sids.count != 1) {
return NT_STATUS_NONE_MAPPED;
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index c0150f2..6c85608 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -25,7 +25,7 @@
#include "libcli/auth/libcli_auth.h"
#include "../librpc/gen_ndr/ndr_samr_c.h"
#include "rpc_client/init_samr.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_netlogon.h"
#include "rpc_client/cli_netlogon.h"
@@ -710,8 +710,9 @@ static NTSTATUS libnet_join_lookup_dc_rpc(TALLOC_CTX *mem_ctx,
{
struct rpc_pipe_client *pipe_hnd = NULL;
struct policy_handle lsa_pol;
- NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
+ NTSTATUS status, result;
union lsa_PolicyInformation *info = NULL;
+ struct dcerpc_binding_handle *b;
status = libnet_join_connect_dc_ipc(r->in.dc_name,
r->in.admin_account,
@@ -730,17 +731,20 @@ static NTSTATUS libnet_join_lookup_dc_rpc(TALLOC_CTX *mem_ctx,
goto done;
}
+ b = pipe_hnd->binding_handle;
+
status = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true,
SEC_FLAG_MAXIMUM_ALLOWED, &lsa_pol);
if (!NT_STATUS_IS_OK(status)) {
goto done;
}
- status = rpccli_lsa_QueryInfoPolicy2(pipe_hnd, mem_ctx,
+ status = dcerpc_lsa_QueryInfoPolicy2(b, mem_ctx,
&lsa_pol,
LSA_POLICY_INFO_DNS,
- &info);
- if (NT_STATUS_IS_OK(status)) {
+ &info,
+ &result);
+ if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(result)) {
r->out.domain_is_ad = true;
r->out.netbios_domain_name = info->dns.name.string;
r->out.dns_domain_name = info->dns.dns_domain.string;
@@ -750,20 +754,25 @@ static NTSTATUS libnet_join_lookup_dc_rpc(TALLOC_CTX *mem_ctx,
}
if (!NT_STATUS_IS_OK(status)) {
- status = rpccli_lsa_QueryInfoPolicy(pipe_hnd, mem_ctx,
+ status = dcerpc_lsa_QueryInfoPolicy(b, mem_ctx,
&lsa_pol,
LSA_POLICY_INFO_ACCOUNT_DOMAIN,
- &info);
+ &info,
+ &result);
if (!NT_STATUS_IS_OK(status)) {
goto done;
}
+ if (!NT_STATUS_IS_OK(result)) {
+ status = result;
+ goto done;
+ }
r->out.netbios_domain_name = info->account_domain.name.string;
r->out.domain_sid = dom_sid_dup(mem_ctx, info->account_domain.sid);
NT_STATUS_HAVE_NO_MEMORY(r->out.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:
diff --git a/source3/librpc/rpc/dcerpc_ep.c b/source3/librpc/rpc/dcerpc_ep.c
index ffe372c..b0c9104 100644
--- a/source3/librpc/rpc/dcerpc_ep.c
+++ b/source3/librpc/rpc/dcerpc_ep.c
@@ -20,7 +20,7 @@
#include "includes.h"
#include "librpc/rpc/dcerpc.h"
#include "librpc/rpc/dcerpc_ep.h"
-#include "librpc/gen_ndr/cli_epmapper.h"
+#include "../librpc/gen_ndr/ndr_epmapper_c.h"
#define EPM_MAX_ANNOTATION_SIZE 64
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c
index c7db679..a9794ed 100644
--- a/source3/libsmb/trusts_util.c
+++ b/source3/libsmb/trusts_util.c
@@ -20,7 +20,7 @@
#include "includes.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 "rpc_client/cli_netlogon.h"
#include "../librpc/gen_ndr/ndr_netlogon.h"
@@ -142,7 +142,7 @@ bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
struct dom_sid **sids )
{
struct policy_handle pol;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ NTSTATUS status, result;
fstring dc_name;
struct sockaddr_storage dc_ss;
uint32 enum_ctx = 0;
@@ -150,6 +150,7 @@ bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
struct rpc_pipe_client *lsa_pipe = NULL;
struct lsa_DomainList dom_list;
int i;
+ struct dcerpc_binding_handle *b = NULL;
*domain_names = NULL;
*num_domains = 0;
@@ -165,47 +166,54 @@ bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
/* setup the anonymous connection */
- result = cli_full_connection( &cli, global_myname(), dc_name, &dc_ss, 0, "IPC$", "IPC",
+ status = cli_full_connection( &cli, global_myname(), dc_name, &dc_ss, 0, "IPC$", "IPC",
"", "", "", 0, Undefined);
- if ( !NT_STATUS_IS_OK(result) )
+ if ( !NT_STATUS_IS_OK(status) )
goto done;
/* open the LSARPC_PIPE */
- result = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
&lsa_pipe);
- if (!NT_STATUS_IS_OK(result)) {
+ if (!NT_STATUS_IS_OK(status)) {
goto done;
}
+ b = lsa_pipe->binding_handle;
+
/* get a handle */
- result = rpccli_lsa_open_policy(lsa_pipe, mem_ctx, True,
+ status = rpccli_lsa_open_policy(lsa_pipe, mem_ctx, True,
LSA_POLICY_VIEW_LOCAL_INFORMATION, &pol);
- if ( !NT_STATUS_IS_OK(result) )
+ if ( !NT_STATUS_IS_OK(status) )
goto done;
/* Lookup list of trusted domains */
- result = rpccli_lsa_EnumTrustDom(lsa_pipe, mem_ctx,
+ status = dcerpc_lsa_EnumTrustDom(b, mem_ctx,
&pol,
&enum_ctx,
&dom_list,
- (uint32_t)-1);
- if ( !NT_STATUS_IS_OK(result) )
+ (uint32_t)-1,
+ &result);
+ if ( !NT_STATUS_IS_OK(status) )
goto done;
+ if (!NT_STATUS_IS_OK(result)) {
+ status = result;
+ goto done;
+ }
*num_domains = dom_list.count;
*domain_names = TALLOC_ZERO_ARRAY(mem_ctx, char *, *num_domains);
if (!*domain_names) {
- result = NT_STATUS_NO_MEMORY;
+ status = NT_STATUS_NO_MEMORY;
goto done;
}
*sids = TALLOC_ZERO_ARRAY(mem_ctx, struct dom_sid, *num_domains);
if (!*sids) {
- result = NT_STATUS_NO_MEMORY;
+ status = NT_STATUS_NO_MEMORY;
goto done;
}
@@ -221,7 +229,7 @@ done:
cli_shutdown( cli );
}
- return NT_STATUS_IS_OK(result);
+ return NT_STATUS_IS_OK(status);
}
NTSTATUS change_trust_account_password( const char *domain, const char *remote_machine)
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index f55400d..4b065d0 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -24,7 +24,7 @@
#include "rpcclient.h"
#include "../libcli/auth/libcli_auth.h"
#include "../librpc/gen_ndr/ndr_lsa.h"
-#include "../librpc/gen_ndr/cli_lsa.h"
+#include "../librpc/gen_ndr/ndr_lsa_c.h"
#include "rpc_client/cli_lsarpc.h"
#include "rpc_client/init_lsa.h"
#include "../libcli/security/security.h"
@@ -37,8 +37,9 @@ static NTSTATUS name_to_sid(struct rpc_pipe_client *cli,
{
struct policy_handle pol;
enum lsa_SidType *sid_types;
- NTSTATUS result;
+ NTSTATUS status, result;
struct dom_sid *sids;
+ struct dcerpc_binding_handle *b = cli->binding_handle;
/* maybe its a raw SID */
if (strncmp(name, "S-", 2) == 0 &&
@@ -46,22 +47,22 @@ static NTSTATUS name_to_sid(struct rpc_pipe_client *cli,
return NT_STATUS_OK;
}
- result = rpccli_lsa_open_policy(cli, mem_ctx, True,
+ status = rpccli_lsa_open_policy(cli, mem_ctx, True,
SEC_FLAG_MAXIMUM_ALLOWED,
&pol);
- if (!NT_STATUS_IS_OK(result))
+ if (!NT_STATUS_IS_OK(status))
goto done;
- result = rpccli_lsa_lookup_names(cli, mem_ctx, &pol, 1, &name, NULL, 1, &sids, &sid_types);
- if (!NT_STATUS_IS_OK(result))
+ status = rpccli_lsa_lookup_names(cli, mem_ctx, &pol, 1, &name, NULL, 1, &sids, &sid_types);
+ if (!NT_STATUS_IS_OK(status))
goto done;
- rpccli_lsa_Close(cli, mem_ctx, &pol);
+ dcerpc_lsa_Close(b, mem_ctx, &pol, &result);
*sid = sids[0];
done:
- return result;
+ return status;
}
static void display_query_info_1(struct lsa_AuditLogInfo *r)
@@ -156,8 +157,9 @@ static NTSTATUS cmd_lsa_query_info_policy(struct rpc_pipe_client *cli,
const char **argv)
{
struct policy_handle pol;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ NTSTATUS status, result;
union lsa_PolicyInformation *info = NULL;
+ struct dcerpc_binding_handle *b = cli->binding_handle;
uint32 info_class = 3;
@@ -171,40 +173,46 @@ static NTSTATUS cmd_lsa_query_info_policy(struct rpc_pipe_client *cli,
switch (info_class) {
case 12:
- result = rpccli_lsa_open_policy2(cli, mem_ctx, True,
+ status = rpccli_lsa_open_policy2(cli, mem_ctx, True,
SEC_FLAG_MAXIMUM_ALLOWED,
&pol);
- if (!NT_STATUS_IS_OK(result))
+ if (!NT_STATUS_IS_OK(status))
goto done;
- result = rpccli_lsa_QueryInfoPolicy2(cli, mem_ctx,
+ status = dcerpc_lsa_QueryInfoPolicy2(b, mem_ctx,
&pol,
info_class,
- &info);
+ &info,
+ &result);
break;
default:
- result = rpccli_lsa_open_policy(cli, mem_ctx, True,
+ status = rpccli_lsa_open_policy(cli, mem_ctx, True,
SEC_FLAG_MAXIMUM_ALLOWED,
&pol);
- if (!NT_STATUS_IS_OK(result))
+ if (!NT_STATUS_IS_OK(status))
goto done;
- result = rpccli_lsa_QueryInfoPolicy(cli, mem_ctx,
+ status = dcerpc_lsa_QueryInfoPolicy(b, mem_ctx,
&pol,
info_class,
- &info);
+ &info,
+ &result);
}
+ if (!NT_STATUS_IS_OK(status)) {
+ goto done;
+ }
+ status = result;
if (NT_STATUS_IS_OK(result)) {
display_lsa_query_info(info, info_class);
}
- rpccli_lsa_Close(cli, mem_ctx, &pol);
+ dcerpc_lsa_Close(b, mem_ctx, &pol, &result);
done:
- return result;
+ return status;
}
/* Resolve a list of names to a list of sids */
@@ -214,31 +222,32 @@ static NTSTATUS cmd_lsa_lookup_names(struct rpc_pipe_client *cli,
const char **argv)
{
struct policy_handle pol;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ NTSTATUS status, result;
struct dom_sid *sids;
enum lsa_SidType *types;
int i;
+ struct dcerpc_binding_handle *b = cli->binding_handle;
if (argc == 1) {
printf("Usage: %s [name1 [name2 [...]]]\n", argv[0]);
return NT_STATUS_OK;
}
- result = rpccli_lsa_open_policy(cli, mem_ctx, True,
+ status = rpccli_lsa_open_policy(cli, mem_ctx, True,
SEC_FLAG_MAXIMUM_ALLOWED,
&pol);
- if (!NT_STATUS_IS_OK(result))
+ if (!NT_STATUS_IS_OK(status))
goto done;
- result = rpccli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 1,
+ status = rpccli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 1,
(const char**)(argv + 1), NULL, 1, &sids, &types);
- if (!NT_STATUS_IS_OK(result) && NT_STATUS_V(result) !=
+ if (!NT_STATUS_IS_OK(status) && NT_STATUS_V(status) !=
NT_STATUS_V(STATUS_SOME_UNMAPPED))
goto done;
- result = NT_STATUS_OK;
+ status = NT_STATUS_OK;
/* Print results */
@@ -249,10 +258,10 @@ static NTSTATUS cmd_lsa_lookup_names(struct rpc_pipe_client *cli,
sid_type_lookup(types[i]), types[i]);
}
- rpccli_lsa_Close(cli, mem_ctx, &pol);
+ dcerpc_lsa_Close(b, mem_ctx, &pol, &result);
done:
- return result;
+ return status;
}
/* Resolve a list of names to a list of sids */
@@ -262,33 +271,34 @@ static NTSTATUS cmd_lsa_lookup_names_level(struct rpc_pipe_client *cli,
const char **argv)
{
struct policy_handle pol;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ NTSTATUS status, result;
struct dom_sid *sids;
enum lsa_SidType *types;
int i, level;
+ struct dcerpc_binding_handle *b = cli->binding_handle;
if (argc < 3) {
printf("Usage: %s [level] [name1 [name2 [...]]]\n", argv[0]);
return NT_STATUS_OK;
}
- result = rpccli_lsa_open_policy(cli, mem_ctx, True,
+ status = rpccli_lsa_open_policy(cli, mem_ctx, True,
SEC_FLAG_MAXIMUM_ALLOWED,
&pol);
- if (!NT_STATUS_IS_OK(result))
+ if (!NT_STATUS_IS_OK(status))
goto done;
level = atoi(argv[1]);
- result = rpccli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 2,
+ status = rpccli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 2,
(const char**)(argv + 2), NULL, level, &sids, &types);
- if (!NT_STATUS_IS_OK(result) && NT_STATUS_V(result) !=
+ if (!NT_STATUS_IS_OK(status) && NT_STATUS_V(status) !=
NT_STATUS_V(STATUS_SOME_UNMAPPED))
goto done;
- result = NT_STATUS_OK;
+ status = NT_STATUS_OK;
/* Print results */
@@ -299,17 +309,17 @@ static NTSTATUS cmd_lsa_lookup_names_level(struct rpc_pipe_client *cli,
sid_type_lookup(types[i]), types[i]);
}
- rpccli_lsa_Close(cli, mem_ctx, &pol);
+ dcerpc_lsa_Close(b, mem_ctx, &pol, &result);
done:
- return result;
+ return status;
}
static NTSTATUS cmd_lsa_lookup_names4(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx, int argc,
const char **argv)
{
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ NTSTATUS status, result;
uint32_t num_names;
struct lsa_String *names;
@@ -317,6 +327,7 @@ static NTSTATUS cmd_lsa_lookup_names4(struct rpc_pipe_client *cli,
struct lsa_TransSidArray3 sids;
uint32_t count = 0;
int i;
+ struct dcerpc_binding_handle *b = cli->binding_handle;
if (argc == 1) {
printf("Usage: %s [name1 [name2 [...]]]\n", argv[0]);
@@ -333,7 +344,7 @@ static NTSTATUS cmd_lsa_lookup_names4(struct rpc_pipe_client *cli,
init_lsa_String(&names[i], argv[i+1]);
}
- result = rpccli_lsa_LookupNames4(cli, mem_ctx,
+ status = dcerpc_lsa_LookupNames4(b, mem_ctx,
num_names,
names,
&domains,
@@ -341,7 +352,11 @@ static NTSTATUS cmd_lsa_lookup_names4(struct rpc_pipe_client *cli,
1,
&count,
0,
- 0);
+ 0,
+ &result);
+ if (!NT_STATUS_IS_OK(status)) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list