The branch, master has been updated via 31202a9... s3-selftest: enable RPC-SAMBA3-WINREG. via c2618d2... s3-rpcclient: allow to set offered size for enumkey command. via dc71d1c... s4-smbtorture: add more spoolss_EnumPrinterKey tests for local NDR test. from e92b034... s3: make own defines for ldap deref types
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 31202a9dab330ed939b4ea71349c816707adff95 Author: Günther Deschner <g...@samba.org> Date: Thu Dec 10 20:38:32 2009 +0100 s3-selftest: enable RPC-SAMBA3-WINREG. Very strange we didn't run it before. Guenther commit c2618d2c6f8657c30cd0f68777d3f37e64172191 Author: Günther Deschner <g...@samba.org> Date: Wed Dec 9 15:49:46 2009 +0100 s3-rpcclient: allow to set offered size for enumkey command. Guenther commit dc71d1c29de521c5034fd7ebf4657610d62c2c3c Author: Günther Deschner <g...@samba.org> Date: Thu Dec 3 00:35:03 2009 +0100 s4-smbtorture: add more spoolss_EnumPrinterKey tests for local NDR test. Guenther ----------------------------------------------------------------------- Summary of changes: source3/rpcclient/cmd_spoolss.c | 13 +++++++++---- source3/script/tests/test_posix_s3.sh | 2 +- source4/torture/ndr/README | 4 ++++ source4/torture/ndr/spoolss.c | 14 ++++++++++++++ 4 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 source4/torture/ndr/README Changeset truncated at 500 lines: diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 5393ba7..6101fc6 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -2906,18 +2906,23 @@ static WERROR cmd_spoolss_enum_printerkey(struct rpc_pipe_client *cli, struct policy_handle hnd; const char **key_buffer = NULL; int i; + uint32_t offered = 0; - if (argc < 2 || argc > 3) { - printf("Usage: %s printername [keyname]\n", argv[0]); + if (argc < 2 || argc > 4) { + printf("Usage: %s printername [keyname] [offered]\n", argv[0]); return WERR_OK; } - if (argc == 3) { + if (argc >= 3) { keyname = argv[2]; } else { keyname = ""; } + if (argc == 4) { + offered = atoi(argv[3]); + } + /* Open printer handle */ RPCCLIENT_PRINTERNAME(printername, cli, argv[1]); @@ -2936,7 +2941,7 @@ static WERROR cmd_spoolss_enum_printerkey(struct rpc_pipe_client *cli, &hnd, keyname, &key_buffer, - 0); + offered); if (!W_ERROR_IS_OK(result)) { goto done; diff --git a/source3/script/tests/test_posix_s3.sh b/source3/script/tests/test_posix_s3.sh index 07d2873..e5a51bf 100755 --- a/source3/script/tests/test_posix_s3.sh +++ b/source3/script/tests/test_posix_s3.sh @@ -38,7 +38,7 @@ raw="$raw RAW-SAMBA3CASEINSENSITIVE RAW-SAMBA3POSIXTIMEDLOCK" raw="$raw RAW-SAMBA3ROOTDIRFID RAW-SFILEINFO-END-OF-FILE" rpc="RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-SAMBA3-SRVSVC RPC-SAMBA3-SHARESEC" -rpc="$rpc RPC-SAMBA3-SPOOLSS RPC-SAMBA3-WKSSVC" +rpc="$rpc RPC-SAMBA3-SPOOLSS RPC-SAMBA3-WKSSVC RPC-SAMBA3-WINREG" rpc="$rpc RPC-NETLOGSAMBA3 RPC-SAMBA3SESSIONKEY RPC-SAMBA3-GETUSERNAME" rpc="$rpc RPC-SVCCTL RPC-SPOOLSS RPC-SPOOLSS-WIN RPC-NTSVCS" rpc="$rpc RPC-LSA-GETUSER RPC-LSA-LOOKUPSIDS RPC-LSA-LOOKUPNAMES" diff --git a/source4/torture/ndr/README b/source4/torture/ndr/README new file mode 100644 index 0000000..d17d0b2 --- /dev/null +++ b/source4/torture/ndr/README @@ -0,0 +1,4 @@ +use + hexdump -e '12/1 "0x%02x, " "\n"' infile|outfile + +to import ndr dumps diff --git a/source4/torture/ndr/spoolss.c b/source4/torture/ndr/spoolss.c index bcff814..bdab29f 100644 --- a/source4/torture/ndr/spoolss.c +++ b/source4/torture/ndr/spoolss.c @@ -219,6 +219,17 @@ static const uint8_t enumprinterdataex_out_data[] = { 0xea, 0x00, 0x00, 0x00 }; +static const uint8_t enumprinterkey_in_data2[] = { + 0x00, 0x00, 0x00, 0x00, 0x2a, 0xcc, 0x89, 0x90, 0x8a, 0xfc, 0xca, 0x4c, + 0xa5, 0x44, 0xdc, 0x30, 0x10, 0x20, 0xd9, 0x8f, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x00, + 0x00, 0x00, 0x00, 0x00 +}; + +static const uint8_t enumprinterkey_out_data2[] = { + 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00 +}; + static const uint8_t enumprinterkey_in_data[] = { 0x00, 0x00, 0x00, 0x00, 0x22, 0x5c, 0x46, 0xe5, 0x74, 0xa1, 0x9e, 0x46, 0x95, 0x80, 0x19, 0xf1, 0xaa, 0x63, 0xc9, 0x01, 0x01, 0x00, 0x00, 0x00, @@ -471,6 +482,9 @@ struct torture_suite *ndr_spoolss_suite(TALLOC_CTX *ctx) torture_suite_add_ndr_pull_fn_test(suite, spoolss_EnumPrinterKey, enumprinterkey_in_data, NDR_IN, NULL ); torture_suite_add_ndr_pull_fn_test(suite, spoolss_EnumPrinterKey, enumprinterkey_out_data, NDR_OUT, NULL ); + torture_suite_add_ndr_pull_fn_test(suite, spoolss_EnumPrinterKey, enumprinterkey_in_data2, NDR_IN, NULL ); + torture_suite_add_ndr_pull_fn_test(suite, spoolss_EnumPrinterKey, enumprinterkey_out_data2, NDR_OUT, NULL ); + torture_suite_add_ndr_pull_fn_test(suite, spoolss_FindClosePrinterNotify, FCPN_in_data, NDR_IN, NULL ); torture_suite_add_ndr_pull_fn_test(suite, spoolss_FindClosePrinterNotify, FCPN_out_data, NDR_OUT, NULL ); -- Samba Shared Repository