[SCM] Samba Shared Repository - branch master updated -
2fbdf22541497b56143083863bf1ffe5af7487fd
Günther Deschner
gd at samba.org
Mon Nov 17 12:14:22 GMT 2008
The branch, master has been updated
via 2fbdf22541497b56143083863bf1ffe5af7487fd (commit)
via fea323bdf3e4b87af87a8b69e9e528e04e34fe07 (commit)
via 7d5f3f51b0f576d99e22fdb95e013b857071f978 (commit)
from f09231254e2777dd8a1bb5555897139eec2d0b5b (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 2fbdf22541497b56143083863bf1ffe5af7487fd
Author: Günther Deschner <gd at samba.org>
Date: Fri Nov 14 00:52:50 2008 +0100
s3-rpcclient: fill in unknowns in cmd_ntsvcs_get_hw_prof_info.
Guenther
commit fea323bdf3e4b87af87a8b69e9e528e04e34fe07
Author: Günther Deschner <gd at samba.org>
Date: Fri Nov 14 00:30:11 2008 +0100
s4-smbtorture: add PNP_GetDeviceRegProp test for ntsvcs testsuite.
Guenther
commit 7d5f3f51b0f576d99e22fdb95e013b857071f978
Author: Günther Deschner <gd at samba.org>
Date: Fri Nov 14 09:48:56 2008 +0100
ntsvcs: remove todo from PNP_GetDeviceList.
Guenther
-----------------------------------------------------------------------
Summary of changes:
librpc/idl/ntsvcs.idl | 2 +-
source3/rpcclient/cmd_ntsvcs.c | 6 +++---
source4/torture/rpc/ntsvcs.c | 40 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 44 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/librpc/idl/ntsvcs.idl b/librpc/idl/ntsvcs.idl
index d502435..be7fcdf 100644
--- a/librpc/idl/ntsvcs.idl
+++ b/librpc/idl/ntsvcs.idl
@@ -70,7 +70,7 @@ interface ntsvcs
/******************/
/* Function: 0x0a */
- [todo] WERROR PNP_GetDeviceList(
+ WERROR PNP_GetDeviceList(
[in,unique] [string,charset(UTF16)] uint16 *filter,
[out,ref] [size_is(*length),length_is(*length)] uint16 *buffer,
[in,out,ref] uint32 *length,
diff --git a/source3/rpcclient/cmd_ntsvcs.c b/source3/rpcclient/cmd_ntsvcs.c
index 7a25352..11f16d3 100644
--- a/source3/rpcclient/cmd_ntsvcs.c
+++ b/source3/rpcclient/cmd_ntsvcs.c
@@ -122,15 +122,15 @@ static WERROR cmd_ntsvcs_get_hw_prof_info(struct rpc_pipe_client *cli,
WERROR werr;
uint32_t idx = 0;
struct PNP_HwProfInfo info;
- uint32_t unknown1 = 0, unknown2 = 0;
+ uint32_t size = 0, flags = 0;
ZERO_STRUCT(info);
status = rpccli_PNP_GetHwProfInfo(cli, mem_ctx,
idx,
&info,
- unknown1,
- unknown2,
+ size,
+ flags,
&werr);
if (!NT_STATUS_IS_OK(status)) {
return ntstatus_to_werror(status);
diff --git a/source4/torture/rpc/ntsvcs.c b/source4/torture/rpc/ntsvcs.c
index 3db79ac..5453102 100644
--- a/source4/torture/rpc/ntsvcs.c
+++ b/source4/torture/rpc/ntsvcs.c
@@ -108,6 +108,44 @@ static bool test_PNP_GetDeviceList(struct torture_context *tctx,
return true;
}
+static bool test_PNP_GetDeviceRegProp(struct torture_context *tctx,
+ struct dcerpc_pipe *p)
+{
+ NTSTATUS status;
+ struct PNP_GetDeviceRegProp r;
+
+ enum winreg_Type reg_data_type = REG_NONE;
+ uint32_t buffer_size = 0;
+ uint32_t needed = 0;
+ uint8_t *buffer;
+
+ buffer = talloc(tctx, uint8_t);
+
+ r.in.devicepath = "ACPI\\ACPI0003\\1";
+ r.in.property = DEV_REGPROP_DESC;
+ r.in.flags = 0;
+ r.in.reg_data_type = ®_data_type;
+ r.in.buffer_size = &buffer_size;
+ r.in.needed = &needed;
+ r.out.buffer = buffer;
+ r.out.reg_data_type = ®_data_type;
+ r.out.buffer_size = &buffer_size;
+ r.out.needed = &needed;
+
+ status = dcerpc_PNP_GetDeviceRegProp(p, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, status, "PNP_GetDeviceRegProp");
+
+ if (W_ERROR_EQUAL(r.out.result, WERR_CM_BUFFER_SMALL)) {
+
+ buffer = talloc_array(tctx, uint8_t, needed);
+ r.in.buffer_size = &needed;
+
+ status = dcerpc_PNP_GetDeviceRegProp(p, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, status, "PNP_GetDeviceRegProp");
+ }
+
+ return true;
+}
struct torture_suite *torture_rpc_ntsvcs(TALLOC_CTX *mem_ctx)
{
@@ -118,6 +156,8 @@ struct torture_suite *torture_rpc_ntsvcs(TALLOC_CTX *mem_ctx)
tcase = torture_suite_add_rpc_iface_tcase(suite, "ntsvcs",
&ndr_table_ntsvcs);
+ test = torture_rpc_tcase_add_test(tcase, "PNP_GetDeviceRegProp",
+ test_PNP_GetDeviceRegProp);
test = torture_rpc_tcase_add_test(tcase, "PNP_GetDeviceList",
test_PNP_GetDeviceList);
test = torture_rpc_tcase_add_test(tcase, "PNP_GetDeviceListSize",
--
Samba Shared Repository
More information about the samba-cvs
mailing list