From 8daa83a594a2e98f39d764422bfbdbc62c9efd44 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 19:20:00 +0200 Subject: Adding upstream version 2:4.20.0+dfsg. Signed-off-by: Daniel Baumann --- testprogs/blackbox/b15464-testcase.sh | 21 + testprogs/blackbox/bogus.sh | 28 + testprogs/blackbox/common-links.sh | 211 ++ testprogs/blackbox/common_test_fns.inc | 155 + testprogs/blackbox/dbcheck-links.sh | 1003 ++++++ testprogs/blackbox/dbcheck-oldrelease.sh | 547 ++++ testprogs/blackbox/dbcheck.sh | 72 + testprogs/blackbox/demote-saveddb.sh | 77 + testprogs/blackbox/dfree.sh | 8 + testprogs/blackbox/dom_parse.sh | 27 + testprogs/blackbox/functionalprep.sh | 183 ++ testprogs/blackbox/join_ldapcmp.sh | 51 + testprogs/blackbox/ldapcmp_restoredc.sh | 73 + testprogs/blackbox/nsstest.sh | 22 + testprogs/blackbox/renamedc.sh | 103 + testprogs/blackbox/runtime-links.sh | 82 + testprogs/blackbox/schemaupgrade.sh | 131 + testprogs/blackbox/subunit.sh | 212 ++ testprogs/blackbox/test_alias_membership.sh | 194 ++ testprogs/blackbox/test_chgdcpass.sh | 115 + testprogs/blackbox/test_client_etypes.sh | 82 + testprogs/blackbox/test_client_kerberos.sh | 286 ++ testprogs/blackbox/test_kinit.sh | 555 ++++ testprogs/blackbox/test_kinit_export_keytab.sh | 263 ++ testprogs/blackbox/test_kinit_trusts.sh | 247 ++ testprogs/blackbox/test_kpasswd_heimdal.sh | 245 ++ testprogs/blackbox/test_kpasswd_mit.sh | 224 ++ testprogs/blackbox/test_ktpass.sh | 38 + testprogs/blackbox/test_ldap_tls_reload.sh | 64 + testprogs/blackbox/test_ldb.sh | 230 ++ testprogs/blackbox/test_ldb_simple.sh | 40 + testprogs/blackbox/test_net_ads.sh | 364 +++ testprogs/blackbox/test_net_ads_dns.sh | 195 ++ testprogs/blackbox/test_net_ads_fips.sh | 43 + testprogs/blackbox/test_net_ads_search_server.sh | 37 + testprogs/blackbox/test_net_offline.sh | 162 + testprogs/blackbox/test_net_rpc_user.sh | 56 + testprogs/blackbox/test_offline_logon.sh | 43 + testprogs/blackbox/test_old_enctypes.sh | 61 + testprogs/blackbox/test_password_settings.sh | 251 ++ testprogs/blackbox/test_pdbtest.sh | 116 + testprogs/blackbox/test_pkinit_pac.sh | 61 + testprogs/blackbox/test_pkinit_simple.sh | 331 ++ testprogs/blackbox/test_primary_group.sh | 93 + testprogs/blackbox/test_rpcclient_schannel.sh | 94 + testprogs/blackbox/test_s4u_heimdal.sh | 90 + testprogs/blackbox/test_samba-tool_ntacl.sh | 264 ++ testprogs/blackbox/test_samba_upgradedns.sh | 36 + testprogs/blackbox/test_smbtorture_test_names.sh | 43 + testprogs/blackbox/test_special_group.sh | 58 + testprogs/blackbox/test_trust_ntlm.sh | 205 ++ testprogs/blackbox/test_trust_token.sh | 91 + testprogs/blackbox/test_trust_user_account.sh | 58 + testprogs/blackbox/test_trust_utils.sh | 144 + testprogs/blackbox/test_weak_crypto.sh | 51 + testprogs/blackbox/test_weak_crypto_server.sh | 64 + .../blackbox/test_weak_disable_ntlmssp_ldap.sh | 41 + testprogs/blackbox/test_wintest.sh | 43 + testprogs/blackbox/tfork.sh | 15 + testprogs/blackbox/tombstones-expunge.sh | 246 ++ testprogs/blackbox/upgradeprovision-oldrelease.sh | 234 ++ testprogs/blackbox/wintest/wintest.conf | 7 + testprogs/win32/midltests/Makefile | 16 + testprogs/win32/midltests/Makefile.simple | 27 + testprogs/win32/midltests/Makefile.tcp | 22 + testprogs/win32/midltests/invalid/README.txt | 3 + .../invalid/midltests_pipe_struct_union_01.idl | 279 ++ .../invalid/midltests_pipe_struct_union_01.txt | 17 + testprogs/win32/midltests/midltests.acf | 6 + testprogs/win32/midltests/midltests.idl | 51 + testprogs/win32/midltests/midltests_c_m.c | 2 + testprogs/win32/midltests/midltests_marshall.c | 125 + testprogs/win32/midltests/midltests_marshall.h | 19 + testprogs/win32/midltests/midltests_s_m.c | 2 + testprogs/win32/midltests/midltests_simple.c | 42 + testprogs/win32/midltests/midltests_tcp.c | 646 ++++ .../win32/midltests/todo/midltests-array-range.idl | 39 + .../win32/midltests/todo/midltests-pipe-02.idl | 153 + .../midltests/todo/midltests-pipe-03-hyper.idl | 205 ++ .../midltests/todo/midltests-pipe-04-struct.idl | 272 ++ .../win32/midltests/todo/midltests-pipe-first.idl | 233 ++ .../midltests-pipe-sync-ndr32-downgrade-02.idl | 296 ++ .../midltests/todo/midltests-string-in-out-ref.idl | 33 + .../win32/midltests/todo/midltests-transmit-as.idl | 59 + .../midltests/todo/midltests_pointer_default.idl | 20 + testprogs/win32/midltests/utils.c | 32 + testprogs/win32/midltests/valid/README.txt | 6 + .../midltests-pipe-sync-ndr32-downgrade-01.idl | 296 ++ .../midltests-pipe-sync-ndr32-downgrade-01.txt | 138 + .../midltests-pipe-sync-ndr32-downgrade-02.idl | 300 ++ .../midltests-pipe-sync-ndr32-downgrade-02.txt | 3266 ++++++++++++++++++++ .../midltests/valid/midltests_DRS_EXTENSIONS.idl | 64 + .../midltests/valid/midltests_DRS_EXTENSIONS.out | 43 + .../valid/midltests_fixed_size_in_array_01.idl | 29 + .../valid/midltests_fixed_size_in_array_01.txt | 6 + .../valid/midltests_strings_array_01.err.txt | 13 + .../midltests/valid/midltests_strings_array_01.idl | 44 + .../midltests/valid/midltests_strings_array_02.idl | 44 + .../midltests/valid/midltests_strings_array_02.txt | 9 + .../midltests/valid/midltests_union_align_01.idl | 42 + .../midltests/valid/midltests_union_align_01.txt | 24 + .../midltests/valid/midltests_union_align_02.idl | 61 + .../midltests/valid/midltests_union_align_02.txt | 37 + .../midltests/valid/midltests_union_align_03.idl | 64 + .../midltests/valid/midltests_union_align_03.txt | 37 + .../midltests/valid/midltests_union_align_04.idl | 64 + .../midltests/valid/midltests_union_align_04.txt | 37 + .../midltests/valid/midltests_union_align_05.idl | 61 + .../midltests/valid/midltests_union_align_05.txt | 37 + .../midltests/valid/midltests_union_align_06.idl | 61 + .../midltests/valid/midltests_union_align_06.txt | 37 + .../midltests/valid/midltests_union_align_07.idl | 61 + .../midltests/valid/midltests_union_align_07.txt | 38 + .../midltests/valid/midltests_union_align_08.idl | 68 + .../midltests/valid/midltests_union_align_08.txt | 129 + .../midltests/valid/midltests_union_align_09.idl | 69 + .../midltests/valid/midltests_union_align_09.txt | 129 + .../midltests/valid/midltests_union_align_10.idl | 71 + .../midltests/valid/midltests_union_align_10.txt | 129 + .../midltests/valid/midltests_union_align_11.idl | 70 + .../midltests/valid/midltests_union_align_11.txt | 129 + .../midltests/valid/midltests_union_align_12.idl | 70 + .../midltests/valid/midltests_union_align_12.txt | 129 + .../midltests/valid/midltests_union_align_13.idl | 71 + .../midltests/valid/midltests_union_align_13.txt | 129 + .../midltests/valid/midltests_union_align_14.idl | 71 + .../midltests/valid/midltests_union_align_14.txt | 131 + .../midltests/valid/midltests_union_align_15.idl | 72 + .../midltests/valid/midltests_union_align_15.txt | 131 + .../midltests/valid/midltests_union_align_16.idl | 93 + .../midltests/valid/midltests_union_align_16.txt | 137 + .../midltests/valid/midltests_union_align_17.idl | 94 + .../midltests/valid/midltests_union_align_17.txt | 137 + .../midltests/valid/midltests_union_align_18.idl | 93 + .../midltests/valid/midltests_union_align_18.txt | 137 + .../midltests/valid/midltests_union_align_19.idl | 90 + .../midltests/valid/midltests_union_align_19.txt | 137 + .../midltests/valid/midltests_union_align_20.idl | 91 + .../midltests/valid/midltests_union_align_20.txt | 137 + .../win32/midltests/valid/midltests_v1_enum_01.idl | 56 + .../win32/midltests/valid/midltests_v1_enum_01.txt | 37 + testprogs/win32/npecho/GNUmakefile | 24 + testprogs/win32/npecho/NMakefile | 26 + testprogs/win32/npecho/npecho_client.c | 50 + testprogs/win32/npecho/npecho_client2.c | 117 + testprogs/win32/npecho/npecho_server2.c | 76 + testprogs/win32/prepare_dcpromo/GNUmakefile | 21 + testprogs/win32/prepare_dcpromo/NMakefile | 16 + testprogs/win32/prepare_dcpromo/prepare_dcpromo.c | 1074 +++++++ testprogs/win32/rpcecho/Makefile | 23 + testprogs/win32/rpcecho/README | 46 + testprogs/win32/rpcecho/client.c | 367 +++ testprogs/win32/rpcecho/rpcecho.acf | 26 + testprogs/win32/rpcecho/rpcecho.idl | 146 + testprogs/win32/rpcecho/server.c | 208 ++ testprogs/win32/rpcecho/utils.c | 32 + testprogs/win32/spoolss/GNUmakefile | 23 + testprogs/win32/spoolss/NMakefile | 43 + testprogs/win32/spoolss/README.win32 | 65 + testprogs/win32/spoolss/error.c | 137 + testprogs/win32/spoolss/error.h | 36 + testprogs/win32/spoolss/printlib.c | 1386 +++++++++ testprogs/win32/spoolss/printlib_proto.h | 67 + testprogs/win32/spoolss/string.h | 15 + testprogs/win32/spoolss/testspoolss.c | 1842 +++++++++++ testprogs/win32/spoolss/testspoolss.h | 51 + testprogs/win32/spoolss/testspoolss.sln | 20 + testprogs/win32/spoolss/testspoolss.vcproj | 224 ++ testprogs/win32/spoolss/torture.c | 106 + testprogs/win32/spoolss/torture.h | 92 + testprogs/win32/spoolss/torture_proto.h | 32 + testprogs/win32/testmailslot/GNUmakefile | 16 + testprogs/win32/testmailslot/NMakefile | 13 + testprogs/win32/testmailslot/testmailslot.c | 80 + testprogs/win32/vs2010-metze.cmd | 24 + testprogs/win32/wmi/echoprocessor.vbs | 10 + 176 files changed, 26075 insertions(+) create mode 100755 testprogs/blackbox/b15464-testcase.sh create mode 100755 testprogs/blackbox/bogus.sh create mode 100644 testprogs/blackbox/common-links.sh create mode 100755 testprogs/blackbox/common_test_fns.inc create mode 100755 testprogs/blackbox/dbcheck-links.sh create mode 100755 testprogs/blackbox/dbcheck-oldrelease.sh create mode 100755 testprogs/blackbox/dbcheck.sh create mode 100755 testprogs/blackbox/demote-saveddb.sh create mode 100755 testprogs/blackbox/dfree.sh create mode 100755 testprogs/blackbox/dom_parse.sh create mode 100755 testprogs/blackbox/functionalprep.sh create mode 100755 testprogs/blackbox/join_ldapcmp.sh create mode 100755 testprogs/blackbox/ldapcmp_restoredc.sh create mode 100755 testprogs/blackbox/nsstest.sh create mode 100755 testprogs/blackbox/renamedc.sh create mode 100755 testprogs/blackbox/runtime-links.sh create mode 100755 testprogs/blackbox/schemaupgrade.sh create mode 100755 testprogs/blackbox/subunit.sh create mode 100755 testprogs/blackbox/test_alias_membership.sh create mode 100755 testprogs/blackbox/test_chgdcpass.sh create mode 100755 testprogs/blackbox/test_client_etypes.sh create mode 100755 testprogs/blackbox/test_client_kerberos.sh create mode 100755 testprogs/blackbox/test_kinit.sh create mode 100755 testprogs/blackbox/test_kinit_export_keytab.sh create mode 100755 testprogs/blackbox/test_kinit_trusts.sh create mode 100755 testprogs/blackbox/test_kpasswd_heimdal.sh create mode 100755 testprogs/blackbox/test_kpasswd_mit.sh create mode 100755 testprogs/blackbox/test_ktpass.sh create mode 100755 testprogs/blackbox/test_ldap_tls_reload.sh create mode 100755 testprogs/blackbox/test_ldb.sh create mode 100755 testprogs/blackbox/test_ldb_simple.sh create mode 100755 testprogs/blackbox/test_net_ads.sh create mode 100755 testprogs/blackbox/test_net_ads_dns.sh create mode 100755 testprogs/blackbox/test_net_ads_fips.sh create mode 100755 testprogs/blackbox/test_net_ads_search_server.sh create mode 100755 testprogs/blackbox/test_net_offline.sh create mode 100755 testprogs/blackbox/test_net_rpc_user.sh create mode 100755 testprogs/blackbox/test_offline_logon.sh create mode 100755 testprogs/blackbox/test_old_enctypes.sh create mode 100755 testprogs/blackbox/test_password_settings.sh create mode 100755 testprogs/blackbox/test_pdbtest.sh create mode 100755 testprogs/blackbox/test_pkinit_pac.sh create mode 100755 testprogs/blackbox/test_pkinit_simple.sh create mode 100755 testprogs/blackbox/test_primary_group.sh create mode 100755 testprogs/blackbox/test_rpcclient_schannel.sh create mode 100755 testprogs/blackbox/test_s4u_heimdal.sh create mode 100755 testprogs/blackbox/test_samba-tool_ntacl.sh create mode 100755 testprogs/blackbox/test_samba_upgradedns.sh create mode 100755 testprogs/blackbox/test_smbtorture_test_names.sh create mode 100755 testprogs/blackbox/test_special_group.sh create mode 100755 testprogs/blackbox/test_trust_ntlm.sh create mode 100755 testprogs/blackbox/test_trust_token.sh create mode 100755 testprogs/blackbox/test_trust_user_account.sh create mode 100755 testprogs/blackbox/test_trust_utils.sh create mode 100755 testprogs/blackbox/test_weak_crypto.sh create mode 100755 testprogs/blackbox/test_weak_crypto_server.sh create mode 100755 testprogs/blackbox/test_weak_disable_ntlmssp_ldap.sh create mode 100755 testprogs/blackbox/test_wintest.sh create mode 100755 testprogs/blackbox/tfork.sh create mode 100755 testprogs/blackbox/tombstones-expunge.sh create mode 100755 testprogs/blackbox/upgradeprovision-oldrelease.sh create mode 100644 testprogs/blackbox/wintest/wintest.conf create mode 100644 testprogs/win32/midltests/Makefile create mode 100644 testprogs/win32/midltests/Makefile.simple create mode 100644 testprogs/win32/midltests/Makefile.tcp create mode 100644 testprogs/win32/midltests/invalid/README.txt create mode 100644 testprogs/win32/midltests/invalid/midltests_pipe_struct_union_01.idl create mode 100644 testprogs/win32/midltests/invalid/midltests_pipe_struct_union_01.txt create mode 100644 testprogs/win32/midltests/midltests.acf create mode 100644 testprogs/win32/midltests/midltests.idl create mode 100644 testprogs/win32/midltests/midltests_c_m.c create mode 100644 testprogs/win32/midltests/midltests_marshall.c create mode 100644 testprogs/win32/midltests/midltests_marshall.h create mode 100644 testprogs/win32/midltests/midltests_s_m.c create mode 100644 testprogs/win32/midltests/midltests_simple.c create mode 100644 testprogs/win32/midltests/midltests_tcp.c create mode 100644 testprogs/win32/midltests/todo/midltests-array-range.idl create mode 100644 testprogs/win32/midltests/todo/midltests-pipe-02.idl create mode 100644 testprogs/win32/midltests/todo/midltests-pipe-03-hyper.idl create mode 100644 testprogs/win32/midltests/todo/midltests-pipe-04-struct.idl create mode 100755 testprogs/win32/midltests/todo/midltests-pipe-first.idl create mode 100644 testprogs/win32/midltests/todo/midltests-pipe-sync-ndr32-downgrade-02.idl create mode 100644 testprogs/win32/midltests/todo/midltests-string-in-out-ref.idl create mode 100755 testprogs/win32/midltests/todo/midltests-transmit-as.idl create mode 100755 testprogs/win32/midltests/todo/midltests_pointer_default.idl create mode 100644 testprogs/win32/midltests/utils.c create mode 100644 testprogs/win32/midltests/valid/README.txt create mode 100644 testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-01.idl create mode 100644 testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-01.txt create mode 100644 testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-02.idl create mode 100644 testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-02.txt create mode 100644 testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.idl create mode 100644 testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.out create mode 100644 testprogs/win32/midltests/valid/midltests_fixed_size_in_array_01.idl create mode 100644 testprogs/win32/midltests/valid/midltests_fixed_size_in_array_01.txt create mode 100644 testprogs/win32/midltests/valid/midltests_strings_array_01.err.txt create mode 100644 testprogs/win32/midltests/valid/midltests_strings_array_01.idl create mode 100644 testprogs/win32/midltests/valid/midltests_strings_array_02.idl create mode 100644 testprogs/win32/midltests/valid/midltests_strings_array_02.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_01.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_01.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_02.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_02.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_03.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_03.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_04.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_04.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_05.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_05.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_06.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_06.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_07.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_07.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_08.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_08.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_09.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_09.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_10.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_10.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_11.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_11.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_12.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_12.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_13.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_13.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_14.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_14.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_15.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_15.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_16.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_16.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_17.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_17.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_18.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_18.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_19.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_19.txt create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_20.idl create mode 100644 testprogs/win32/midltests/valid/midltests_union_align_20.txt create mode 100644 testprogs/win32/midltests/valid/midltests_v1_enum_01.idl create mode 100644 testprogs/win32/midltests/valid/midltests_v1_enum_01.txt create mode 100755 testprogs/win32/npecho/GNUmakefile create mode 100755 testprogs/win32/npecho/NMakefile create mode 100755 testprogs/win32/npecho/npecho_client.c create mode 100755 testprogs/win32/npecho/npecho_client2.c create mode 100755 testprogs/win32/npecho/npecho_server2.c create mode 100755 testprogs/win32/prepare_dcpromo/GNUmakefile create mode 100755 testprogs/win32/prepare_dcpromo/NMakefile create mode 100755 testprogs/win32/prepare_dcpromo/prepare_dcpromo.c create mode 100644 testprogs/win32/rpcecho/Makefile create mode 100644 testprogs/win32/rpcecho/README create mode 100644 testprogs/win32/rpcecho/client.c create mode 100644 testprogs/win32/rpcecho/rpcecho.acf create mode 100644 testprogs/win32/rpcecho/rpcecho.idl create mode 100644 testprogs/win32/rpcecho/server.c create mode 100644 testprogs/win32/rpcecho/utils.c create mode 100644 testprogs/win32/spoolss/GNUmakefile create mode 100644 testprogs/win32/spoolss/NMakefile create mode 100644 testprogs/win32/spoolss/README.win32 create mode 100644 testprogs/win32/spoolss/error.c create mode 100644 testprogs/win32/spoolss/error.h create mode 100644 testprogs/win32/spoolss/printlib.c create mode 100644 testprogs/win32/spoolss/printlib_proto.h create mode 100644 testprogs/win32/spoolss/string.h create mode 100644 testprogs/win32/spoolss/testspoolss.c create mode 100644 testprogs/win32/spoolss/testspoolss.h create mode 100644 testprogs/win32/spoolss/testspoolss.sln create mode 100644 testprogs/win32/spoolss/testspoolss.vcproj create mode 100644 testprogs/win32/spoolss/torture.c create mode 100644 testprogs/win32/spoolss/torture.h create mode 100644 testprogs/win32/spoolss/torture_proto.h create mode 100644 testprogs/win32/testmailslot/GNUmakefile create mode 100644 testprogs/win32/testmailslot/NMakefile create mode 100644 testprogs/win32/testmailslot/testmailslot.c create mode 100644 testprogs/win32/vs2010-metze.cmd create mode 100755 testprogs/win32/wmi/echoprocessor.vbs (limited to 'testprogs') diff --git a/testprogs/blackbox/b15464-testcase.sh b/testprogs/blackbox/b15464-testcase.sh new file mode 100755 index 0000000..b0c8826 --- /dev/null +++ b/testprogs/blackbox/b15464-testcase.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# Blackbox wrapper for bug 15464 +# Copyright (C) 2023 Stefan Metzmacher + +if [ $# -lt 2 ]; then + cat <&1) + status=$? + if [ x$status = x0 ]; then + subunit_pass_test "$name" + else + printf '%s' "$output" | subunit_fail_test "$name" + fi + return $status +} + +test_smbclient_expect_failure() +{ + name="$1" + cmd="$2" + unc="$3" + shift + shift + shift + subunit_start_test "$name" + output=$($VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" "$@" 2>&1) + status=$? + if [ x$status = x0 ]; then + printf '%s' "$output" | subunit_fail_test "$name" + return 1 + else + subunit_pass_test "$name" + return 0 + fi +} + +test_rpcclient_grep() +{ + name="$1" + cmd="$2" + srv="$3" + grep="$4" + shift + shift + shift + shift + subunit_start_test "$name" + output=$($VALGRIND $rpcclient $CONFIGURATION "$srv" -c "$cmd" "$@" 2>&1) + status=$? + if [ x$status != x0 ]; then + printf '%s' "$output" | subunit_fail_test "$name" + return $status + fi + printf '%s' "$output" | grep -q "$grep" + gstatus=$? + if [ x$gstatus = x0 ]; then + subunit_pass_test "$name" + else + printf '%s' "$output" | subunit_fail_test "$name" + fi + return $gstatus +} + +test_rpcclient_expect_failure_grep() +{ + name="$1" + cmd="$2" + srv="$3" + grep="$4" + shift + shift + shift + shift + subunit_start_test "$name" + output=$($VALGRIND $rpcclient $CONFIGURATION "$srv" -c "$cmd" "$@" 2>&1) + status=$? + if [ x$status = x0 ]; then + printf '%s' "$output" | subunit_fail_test "$name" + return 1 + fi + printf '%s' "$output" | grep -q "$grep" + gstatus=$? + if [ x$gstatus = x0 ]; then + subunit_pass_test "$name" + else + printf '%s' "$output" | subunit_fail_test "$name" + fi + return $gstatus +} + +kerberos_kinit() +{ + kinit_tool="${1}" + principal="${2}" + password="${3}" + shift 3 + kbase=$(basename ${kinit_tool}) + if [ "${kbase}" = "samba4kinit" ]; then + kpassfile=$(mktemp) + echo $password >${kpassfile} + $kinit_tool -c ${KRB5CCNAME} --password-file=${kpassfile} "$@" $principal + status=$? + rm -f ${kpassfile} + else + echo $password | $kinit_tool "$@" $principal + status=$? + fi + return $status +} + +remove_directory() +{ + local xdir=${1} + shift + + if [ "$xdir" = "/" ] || [ ! -d "$xdir" ] || [ -z "$(ls -A "$xdir")" ]; then + return + fi + + rm -rf "$xdir" +} + +# This function should be used to either use a system tool or one of our +# build dir if available. +# +# Examples: +# +# system_or_builddir_binary ldbsearch ${BUILDDIR} +# system_or_builddir_binary kinit ${BUILDDIR} samba4kinit +# +system_or_builddir_binary() +{ + _bin_name="${1}" + _build_dir="${2}" + _alt_bin_name="${3}" + + _bin="$(command -v ${_bin_name})" + _bin_build_path="${_build_dir}/${_bin_name}" + + if [ -n "${_alt_bin_name}" ]; then + _bin_build_path="${_build_dir}/${_alt_bin_name}" + fi + + if [ -x "${_bin_build_path}" ]; then + _bin="${_bin_build_path}" + fi + + echo "${_bin}" +} diff --git a/testprogs/blackbox/dbcheck-links.sh b/testprogs/blackbox/dbcheck-links.sh new file mode 100755 index 0000000..63ad8db --- /dev/null +++ b/testprogs/blackbox/dbcheck-links.sh @@ -0,0 +1,1003 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + cat <$tmpldif1 + + $PYTHON $BINDIR/samba-tool dbcheck -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $3 --fix --yes >$tmpfile + if [ "$?" != "$2" ]; then + return 1 + fi + sort $tmpfile | grep -v "^INFO:" >$tmpfile.sorted + sort $release_dir/expected-dbcheck-link-output${1}.txt >$tmpfile.expected + diff -u $tmpfile.sorted $tmpfile.expected + if [ "$?" != "0" ]; then + return 1 + fi + + tmpldif2=$PREFIX_ABS/$RELEASE/expected-dbcheck-output${1}2.txt.tmp2 + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --scope=base -b '' | grep highestCommittedUSN >$tmpldif2 + + diff -u $tmpldif1 $tmpldif2 + if [ "$?" != "0" ]; then + return 1 + fi +} + +dbcheck_acl_reset() +{ + $PYTHON $BINDIR/samba-tool dbcheck -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --cross-ncs --fix --yes --attrs=nTSecurityDescriptor +} + +dbcheck_acl_clean() +{ + $PYTHON $BINDIR/samba-tool dbcheck -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --cross-ncs --attrs=nTSecurityDescriptor +} + +dbcheck_dangling() +{ + dbcheck "" "1" "--selftest-check-expired-tombstones" + return $? +} + +dbcheck_one_way() +{ + dbcheck "_one_way" "0" "CN=Configuration,DC=release-4-5-0-pre1,DC=samba,DC=corp --selftest-check-expired-tombstones" + return $? +} + +dbcheck_clean() +{ + tmpldif1=$PREFIX_ABS/$RELEASE/expected-dbcheck-output2.txt.tmp1 + + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --scope=base -b '' | grep highestCommittedUSN >$tmpldif1 + + $PYTHON $BINDIR/samba-tool dbcheck -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb + if [ "$?" != "0" ]; then + return 1 + fi + tmpldif2=$PREFIX_ABS/$RELEASE/expected-dbcheck-output2.txt.tmp2 + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --scope=base -b '' | grep highestCommittedUSN >$tmpldif2 + + diff -u $tmpldif1 $tmpldif2 + if [ "$?" != "0" ]; then + return 1 + fi +} + +check_expected_after_links() +{ + tmpldif=$PREFIX_ABS/$RELEASE/expected-links-after-link-dbcheck.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(|(cn=swimmers)(cn=leaders)(cn=helpers))' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --sorted member >$tmpldif + diff -u $tmpldif $release_dir/expected-links-after-link-dbcheck.ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +check_expected_after_deleted_links() +{ + tmpldif=$PREFIX_ABS/$RELEASE/expected-deleted-links-after-link-dbcheck.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(|(cn=swimmers)(cn=leaders)(cn=helpers))' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted member >$tmpldif + diff -u $tmpldif $release_dir/expected-deleted-links-after-link-dbcheck.ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +check_expected_after_objects() +{ + tmpldif=$PREFIX_ABS/$RELEASE/expected-objects-after-link-dbcheck.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(|(samaccountname=fred)(samaccountname=ddg)(samaccountname=usg)(samaccountname=user1)(samaccountname=user1x)(samaccountname=user2))' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted samAccountName | grep sAMAccountName >$tmpldif + diff -u $tmpldif $release_dir/expected-objects-after-link-dbcheck.ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +duplicate_member() +{ + # We use an existing group so we have a stable GUID in the + # dbcheck output + LDIF1=$(TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb -b 'CN=Enterprise Admins,CN=users,DC=release-4-5-0-pre1,DC=samba,DC=corp' --scope=base --reveal --extended-dn member) + DN=$(echo "${LDIF1}" | grep '^dn: ') + MSG=$(echo "${LDIF1}" | grep -v '^dn: ' | grep -v '^#' | grep -v '^$') + ldif=$PREFIX_ABS/${RELEASE}/duplicate-member-multi.ldif + { + echo "${DN}" + echo "changetype: modify" + echo "replace: member" + echo "${MSG}" + echo "${MSG}" | sed -e 's!RMD_LOCAL_USN=[1-9][0-9]*!RMD_LOCAL_USN=0!' + } >$ldif + + TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb $ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +dbcheck_duplicate_member() +{ + dbcheck "_duplicate_member" "1" "--selftest-check-expired-tombstones" + return $? +} + +check_expected_after_duplicate_links() +{ + tmpldif=$PREFIX_ABS/$RELEASE/expected-duplicates-after-link-dbcheck.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(|(cn=administrator)(cn=enterprise admins))' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --sorted memberOf member >$tmpldif + diff -u $tmpldif $release_dir/expected-duplicates-after-link-dbcheck.ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +missing_link_sid_corruption() +{ + # Step1: add user "missingsidu1" + # + ldif=$PREFIX_ABS/${RELEASE}/missing_link_sid_corruption1.ldif + cat >$ldif <$ldif <$ldif <$ldif <;!!g' \ + -e 's!;!!g' \ + -e 's!RMD_ADDTIME=[1-9][0-9]*!RMD_ADDTIME=123456789000000000!g' \ + -e 's!RMD_CHANGETIME=[1-9][0-9]*!RMD_CHANGETIME=123456789000000000!g' | + cat + } >$ldif + + out=$(TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb $ldif) + if [ "$?" != "0" ]; then + echo "ldbmodify returned:\n$out" + return 1 + fi + + return 0 +} + +dbcheck_missing_link_sid_corruption() +{ + dbcheck "-missing-link-sid-corruption" "1" "--selftest-check-expired-tombstones" + return $? +} + +add_lost_deleted_user1() +{ + ldif=$PREFIX_ABS/${RELEASE}/add_lost_deleted_user1.ldif + cat >$ldif <;OU=removed,DC=rel + ease-4-5-0-pre1,DC=samba,DC=corp +isRecycled: TRUE +cn:: ZnJlZApERUw6MjMwMWE2NGMtMTIzNC01Njc4LTg1MWUtMTJkNGE3MTFjZmI0 +name:: ZnJlZApERUw6MjMwMWE2NGMtMTIzNC01Njc4LTg1MWUtMTJkNGE3MTFjZmI0 +replPropertyMetaData:: AQAAAAAAAAAXAAAAAAAAAAAAAAABAAAAVuGDDQMAAACjlkROuH+XT4o + z0jjbi14tnA4AAAAAAACcDgAAAAAAAAMAAAACAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4A + AAAAAACiDgAAAAAAAAEAAgABAAAAVuGDDQMAAACjlkROuH+XT4oz0jjbi14tnA4AAAAAAACcDgAAA + AAAAAIAAgABAAAAVuGDDQMAAACjlkROuH+XT4oz0jjbi14tnA4AAAAAAACcDgAAAAAAADAAAgABAA + AAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAAAAABkBAgABAAAAVuGDDQMAAAC + jlkROuH+XT4oz0jjbi14tnA4AAAAAAACcDgAAAAAAAAEACQACAAAAV+GDDQMAAACjlkROuH+XT4oz + 0jjbi14tog4AAAAAAACiDgAAAAAAAAgACQADAAAAVuGDDQMAAACjlkROuH+XT4oz0jjbi14tng4AA + AAAAACeDgAAAAAAABAACQACAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAA + AAABkACQACAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAAAAAFoACQABAAA + AVuGDDQMAAACjlkROuH+XT4oz0jjbi14tnQ4AAAAAAACdDgAAAAAAAF4ACQABAAAAVuGDDQMAAACj + lkROuH+XT4oz0jjbi14tnQ4AAAAAAACdDgAAAAAAAGAACQADAAAAV+GDDQMAAACjlkROuH+XT4oz0 + jjbi14tog4AAAAAAACiDgAAAAAAAGIACQACAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAA + AAAACiDgAAAAAAAH0ACQABAAAAVuGDDQMAAACjlkROuH+XT4oz0jjbi14tnQ4AAAAAAACdDgAAAAA + AAJIACQABAAAAVuGDDQMAAACjlkROuH+XT4oz0jjbi14tnA4AAAAAAACcDgAAAAAAAJ8ACQACAAAA + V+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAAAAAN0ACQABAAAAVuGDDQMAAACjl + kROuH+XT4oz0jjbi14tnA4AAAAAAACcDgAAAAAAAC4BCQACAAAAV+GDDQMAAACjlkROuH+XT4oz0j + jbi14tog4AAAAAAACiDgAAAAAAAJACCQACAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAA + AAACiDgAAAAAAAA0DCQABAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAAAA + AA4DCQACAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAAAAAAoICQABAAAAV + +GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAAAAAA== +whenChanged: 20160629043639.0Z +uSNChanged: 3746 +nTSecurityDescriptor:: AQAXjBQAAAAwAAAATAAAAMQAAAABBQAAAAAABRUAAACB/fj4FbukVnK + PlwUAAgAAAQUAAAAAAAUVAAAAgf34+BW7pFZyj5cFAAIAAAQAeAACAAAAB1o4ACAAAAADAAAAvjsO + 8/Cf0RG2AwAA+ANnwaV6lr/mDdARooUAqgAwSeIBAQAAAAAAAQAAAAAHWjgAIAAAAAMAAAC/Ow7z8 + J/REbYDAAD4A2fBpXqWv+YN0BGihQCqADBJ4gEBAAAAAAABAAAAAAQA1AcsAAAAAAAkAP8BDwABBQ + AAAAAABRUAAACB/fj4FbukVnKPlwUAAgAAAAAUAP8BDwABAQAAAAAABRIAAAAAABgA/wEPAAECAAA + AAAAFIAAAACQCAAAAABQAlAACAAEBAAAAAAAFCgAAAAUAKAAAAQAAAQAAAFMacqsvHtARmBkAqgBA + UpsBAQAAAAAABQoAAAAFACgAAAEAAAEAAABUGnKrLx7QEZgZAKoAQFKbAQEAAAAAAAUKAAAABQAoA + AABAAABAAAAVhpyqy8e0BGYGQCqAEBSmwEBAAAAAAAFCgAAAAUAKAAwAAAAAQAAAIa4tXdKlNERrr + 0AAPgDZ8EBAQAAAAAABQoAAAAFACgAMAAAAAEAAACylVfkVZTREa69AAD4A2fBAQEAAAAAAAUKAAA + ABQAoADAAAAABAAAAs5VX5FWU0RGuvQAA+ANnwQEBAAAAAAAFCgAAAAUAOAAQAAAAAQAAAPiIcAPh + CtIRtCIAoMlo+TkBBQAAAAAABRUAAACB/fj4FbukVnKPlwUpAgAABQA4ABAAAAABAAAAAEIWTMAg0 + BGnaACqAG4FKQEFAAAAAAAFFQAAAIH9+PgVu6RWco+XBSkCAAAFADgAEAAAAAEAAABAwgq8qXnQEZ + AgAMBPwtTPAQUAAAAAAAUVAAAAgf34+BW7pFZyj5cFKQIAAAAAFAAAAAIAAQEAAAAAAAULAAAABQA + oABAAAAABAAAAQi+6WaJ50BGQIADAT8LTzwEBAAAAAAAFCwAAAAUAKAAQAAAAAQAAAIa4tXdKlNER + rr0AAPgDZ8EBAQAAAAAABQsAAAAFACgAEAAAAAEAAACzlVfkVZTREa69AAD4A2fBAQEAAAAAAAULA + AAABQAoABAAAAABAAAAVAGN5Pi80RGHAgDAT7lgUAEBAAAAAAAFCwAAAAUAKAAAAQAAAQAAAFMacq + svHtARmBkAqgBAUpsBAQAAAAAAAQAAAAAFADgAEAAAAAEAAAAQICBfpXnQEZAgAMBPwtTPAQUAAAA + AAAUVAAAAgf34+BW7pFZyj5cFKQIAAAUAOAAwAAAAAQAAAH96lr/mDdARooUAqgAwSeIBBQAAAAAA + BRUAAACB/fj4FbukVnKPlwUFAgAABQAsABAAAAABAAAAHbGpRq5gWkC36P+KWNRW0gECAAAAAAAFI + AAAADACAAAFACwAMAAAAAEAAAAcmrZtIpTREa69AAD4A2fBAQIAAAAAAAUgAAAAMQIAAAUALAAwAA + AAAQAAAGK8BVjJvShEpeKFag9MGF4BAgAAAAAABSAAAAAxAgAABRo8ABAAAAADAAAAAEIWTMAg0BG + naACqAG4FKRTMKEg3FLxFmwetbwFeXygBAgAAAAAABSAAAAAqAgAABRI8ABAAAAADAAAAAEIWTMAg + 0BGnaACqAG4FKbp6lr/mDdARooUAqgAwSeIBAgAAAAAABSAAAAAqAgAABRo8ABAAAAADAAAAECAgX + 6V50BGQIADAT8LUzxTMKEg3FLxFmwetbwFeXygBAgAAAAAABSAAAAAqAgAABRI8ABAAAAADAAAAEC + AgX6V50BGQIADAT8LUz7p6lr/mDdARooUAqgAwSeIBAgAAAAAABSAAAAAqAgAABRo8ABAAAAADAAA + AQMIKvKl50BGQIADAT8LUzxTMKEg3FLxFmwetbwFeXygBAgAAAAAABSAAAAAqAgAABRI8ABAAAAAD + AAAAQMIKvKl50BGQIADAT8LUz7p6lr/mDdARooUAqgAwSeIBAgAAAAAABSAAAAAqAgAABRo8ABAAA + AADAAAAQi+6WaJ50BGQIADAT8LTzxTMKEg3FLxFmwetbwFeXygBAgAAAAAABSAAAAAqAgAABRI8AB + AAAAADAAAAQi+6WaJ50BGQIADAT8LTz7p6lr/mDdARooUAqgAwSeIBAgAAAAAABSAAAAAqAgAABRo + 8ABAAAAADAAAA+IhwA+EK0hG0IgCgyWj5ORTMKEg3FLxFmwetbwFeXygBAgAAAAAABSAAAAAqAgAA + BRI8ABAAAAADAAAA+IhwA+EK0hG0IgCgyWj5Obp6lr/mDdARooUAqgAwSeIBAgAAAAAABSAAAAAqA + gAABRo4ABAAAAADAAAAbZ7Gt8cs0hGFTgCgyYP2CIZ6lr/mDdARooUAqgAwSeIBAQAAAAAABQkAAA + AFGjgAEAAAAAMAAABtnsa3xyzSEYVOAKDJg/YInHqWv+YN0BGihQCqADBJ4gEBAAAAAAAFCQAAAAU + SOAAQAAAAAwAAAG2exrfHLNIRhU4AoMmD9gi6epa/5g3QEaKFAKoAMEniAQEAAAAAAAUJAAAABRos + AJQAAgACAAAAFMwoSDcUvEWbB61vAV5fKAECAAAAAAAFIAAAACoCAAAFGiwAlAACAAIAAACcepa/5 + g3QEaKFAKoAMEniAQIAAAAAAAUgAAAAKgIAAAUSLACUAAIAAgAAALp6lr/mDdARooUAqgAwSeIBAg + AAAAAABSAAAAAqAgAABRIoADABAAABAAAA3kfmkW/ZcEuVV9Y/9PPM2AEBAAAAAAAFCgAAAAASJAD + /AQ8AAQUAAAAAAAUVAAAAgf34+BW7pFZyj5cFBwIAAAASGAAEAAAAAQIAAAAAAAUgAAAAKgIAAAAS + GAC9AQ8AAQIAAAAAAAUgAAAAIAIAAA== +EOF + + out=$(TZ=UTC $ldbadd -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb $ldif) + if [ "$?" != "0" ]; then + echo "ldbadd returned:\n$out" + return 1 + fi + + return 0 +} + +dbcheck_lost_deleted_user1() +{ + dbcheck "-lost-deleted-user1" "1" "--selftest-check-expired-tombstones" + return $? +} + +remove_lost_deleted_user1() +{ + out=$(TZ=UTC $ldbdel -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "" --show-recycled --relax) + if [ "$?" != "0" ]; then + echo "ldbdel returned:\n$out" + return 1 + fi + + return 0 +} + +add_lost_deleted_user2() +{ + ldif=$PREFIX_ABS/${RELEASE}/add_lost_deleted_user2.ldif + cat >$ldif <$ldif <;OU=removed,DC=rel + ease-4-5-0-pre1,DC=samba,DC=corp +isRecycled: TRUE +cn:: ZnJlZApERUw6MjMwMWE2NGMtMTEyMi01NTY2LTg1MWUtMTJkNGE3MTFjZmI0 +name:: ZnJlZApERUw6MjMwMWE2NGMtMTEyMi01NTY2LTg1MWUtMTJkNGE3MTFjZmI0 +replPropertyMetaData:: AQAAAAAAAAAXAAAAAAAAAAAAAAABAAAAVuGDDQMAAACjlkROuH+XT4o + z0jjbi14tnA4AAAAAAACcDgAAAAAAAAMAAAACAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4A + AAAAAACiDgAAAAAAAAEAAgABAAAAVuGDDQMAAACjlkROuH+XT4oz0jjbi14tnA4AAAAAAACcDgAAA + AAAAAIAAgABAAAAVuGDDQMAAACjlkROuH+XT4oz0jjbi14tnA4AAAAAAACcDgAAAAAAADAAAgABAA + AAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAAAAABkBAgABAAAAVuGDDQMAAAC + jlkROuH+XT4oz0jjbi14tnA4AAAAAAACcDgAAAAAAAAEACQACAAAAV+GDDQMAAACjlkROuH+XT4oz + 0jjbi14tog4AAAAAAACiDgAAAAAAAAgACQADAAAAVuGDDQMAAACjlkROuH+XT4oz0jjbi14tng4AA + AAAAACeDgAAAAAAABAACQACAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAA + AAABkACQACAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAAAAAFoACQABAAA + AVuGDDQMAAACjlkROuH+XT4oz0jjbi14tnQ4AAAAAAACdDgAAAAAAAF4ACQABAAAAVuGDDQMAAACj + lkROuH+XT4oz0jjbi14tnQ4AAAAAAACdDgAAAAAAAGAACQADAAAAV+GDDQMAAACjlkROuH+XT4oz0 + jjbi14tog4AAAAAAACiDgAAAAAAAGIACQACAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAA + AAAACiDgAAAAAAAH0ACQABAAAAVuGDDQMAAACjlkROuH+XT4oz0jjbi14tnQ4AAAAAAACdDgAAAAA + AAJIACQABAAAAVuGDDQMAAACjlkROuH+XT4oz0jjbi14tnA4AAAAAAACcDgAAAAAAAJ8ACQACAAAA + V+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAAAAAN0ACQABAAAAVuGDDQMAAACjl + kROuH+XT4oz0jjbi14tnA4AAAAAAACcDgAAAAAAAC4BCQACAAAAV+GDDQMAAACjlkROuH+XT4oz0j + jbi14tog4AAAAAAACiDgAAAAAAAJACCQACAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAA + AAACiDgAAAAAAAA0DCQABAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAAAA + AA4DCQACAAAAV+GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAAAAAAoICQABAAAAV + +GDDQMAAACjlkROuH+XT4oz0jjbi14tog4AAAAAAACiDgAAAAAAAA== +whenChanged: 20160629043639.0Z +uSNChanged: 3746 +nTSecurityDescriptor:: AQAXjBQAAAAwAAAATAAAAMQAAAABBQAAAAAABRUAAACB/fj4FbukVnK + PlwUAAgAAAQUAAAAAAAUVAAAAgf34+BW7pFZyj5cFAAIAAAQAeAACAAAAB1o4ACAAAAADAAAAvjsO + 8/Cf0RG2AwAA+ANnwaV6lr/mDdARooUAqgAwSeIBAQAAAAAAAQAAAAAHWjgAIAAAAAMAAAC/Ow7z8 + J/REbYDAAD4A2fBpXqWv+YN0BGihQCqADBJ4gEBAAAAAAABAAAAAAQA1AcsAAAAAAAkAP8BDwABBQ + AAAAAABRUAAACB/fj4FbukVnKPlwUAAgAAAAAUAP8BDwABAQAAAAAABRIAAAAAABgA/wEPAAECAAA + AAAAFIAAAACQCAAAAABQAlAACAAEBAAAAAAAFCgAAAAUAKAAAAQAAAQAAAFMacqsvHtARmBkAqgBA + UpsBAQAAAAAABQoAAAAFACgAAAEAAAEAAABUGnKrLx7QEZgZAKoAQFKbAQEAAAAAAAUKAAAABQAoA + AABAAABAAAAVhpyqy8e0BGYGQCqAEBSmwEBAAAAAAAFCgAAAAUAKAAwAAAAAQAAAIa4tXdKlNERrr + 0AAPgDZ8EBAQAAAAAABQoAAAAFACgAMAAAAAEAAACylVfkVZTREa69AAD4A2fBAQEAAAAAAAUKAAA + ABQAoADAAAAABAAAAs5VX5FWU0RGuvQAA+ANnwQEBAAAAAAAFCgAAAAUAOAAQAAAAAQAAAPiIcAPh + CtIRtCIAoMlo+TkBBQAAAAAABRUAAACB/fj4FbukVnKPlwUpAgAABQA4ABAAAAABAAAAAEIWTMAg0 + BGnaACqAG4FKQEFAAAAAAAFFQAAAIH9+PgVu6RWco+XBSkCAAAFADgAEAAAAAEAAABAwgq8qXnQEZ + AgAMBPwtTPAQUAAAAAAAUVAAAAgf34+BW7pFZyj5cFKQIAAAAAFAAAAAIAAQEAAAAAAAULAAAABQA + oABAAAAABAAAAQi+6WaJ50BGQIADAT8LTzwEBAAAAAAAFCwAAAAUAKAAQAAAAAQAAAIa4tXdKlNER + rr0AAPgDZ8EBAQAAAAAABQsAAAAFACgAEAAAAAEAAACzlVfkVZTREa69AAD4A2fBAQEAAAAAAAULA + AAABQAoABAAAAABAAAAVAGN5Pi80RGHAgDAT7lgUAEBAAAAAAAFCwAAAAUAKAAAAQAAAQAAAFMacq + svHtARmBkAqgBAUpsBAQAAAAAAAQAAAAAFADgAEAAAAAEAAAAQICBfpXnQEZAgAMBPwtTPAQUAAAA + AAAUVAAAAgf34+BW7pFZyj5cFKQIAAAUAOAAwAAAAAQAAAH96lr/mDdARooUAqgAwSeIBBQAAAAAA + BRUAAACB/fj4FbukVnKPlwUFAgAABQAsABAAAAABAAAAHbGpRq5gWkC36P+KWNRW0gECAAAAAAAFI + AAAADACAAAFACwAMAAAAAEAAAAcmrZtIpTREa69AAD4A2fBAQIAAAAAAAUgAAAAMQIAAAUALAAwAA + AAAQAAAGK8BVjJvShEpeKFag9MGF4BAgAAAAAABSAAAAAxAgAABRo8ABAAAAADAAAAAEIWTMAg0BG + naACqAG4FKRTMKEg3FLxFmwetbwFeXygBAgAAAAAABSAAAAAqAgAABRI8ABAAAAADAAAAAEIWTMAg + 0BGnaACqAG4FKbp6lr/mDdARooUAqgAwSeIBAgAAAAAABSAAAAAqAgAABRo8ABAAAAADAAAAECAgX + 6V50BGQIADAT8LUzxTMKEg3FLxFmwetbwFeXygBAgAAAAAABSAAAAAqAgAABRI8ABAAAAADAAAAEC + AgX6V50BGQIADAT8LUz7p6lr/mDdARooUAqgAwSeIBAgAAAAAABSAAAAAqAgAABRo8ABAAAAADAAA + AQMIKvKl50BGQIADAT8LUzxTMKEg3FLxFmwetbwFeXygBAgAAAAAABSAAAAAqAgAABRI8ABAAAAAD + AAAAQMIKvKl50BGQIADAT8LUz7p6lr/mDdARooUAqgAwSeIBAgAAAAAABSAAAAAqAgAABRo8ABAAA + AADAAAAQi+6WaJ50BGQIADAT8LTzxTMKEg3FLxFmwetbwFeXygBAgAAAAAABSAAAAAqAgAABRI8AB + AAAAADAAAAQi+6WaJ50BGQIADAT8LTz7p6lr/mDdARooUAqgAwSeIBAgAAAAAABSAAAAAqAgAABRo + 8ABAAAAADAAAA+IhwA+EK0hG0IgCgyWj5ORTMKEg3FLxFmwetbwFeXygBAgAAAAAABSAAAAAqAgAA + BRI8ABAAAAADAAAA+IhwA+EK0hG0IgCgyWj5Obp6lr/mDdARooUAqgAwSeIBAgAAAAAABSAAAAAqA + gAABRo4ABAAAAADAAAAbZ7Gt8cs0hGFTgCgyYP2CIZ6lr/mDdARooUAqgAwSeIBAQAAAAAABQkAAA + AFGjgAEAAAAAMAAABtnsa3xyzSEYVOAKDJg/YInHqWv+YN0BGihQCqADBJ4gEBAAAAAAAFCQAAAAU + SOAAQAAAAAwAAAG2exrfHLNIRhU4AoMmD9gi6epa/5g3QEaKFAKoAMEniAQEAAAAAAAUJAAAABRos + AJQAAgACAAAAFMwoSDcUvEWbB61vAV5fKAECAAAAAAAFIAAAACoCAAAFGiwAlAACAAIAAACcepa/5 + g3QEaKFAKoAMEniAQIAAAAAAAUgAAAAKgIAAAUSLACUAAIAAgAAALp6lr/mDdARooUAqgAwSeIBAg + AAAAAABSAAAAAqAgAABRIoADABAAABAAAA3kfmkW/ZcEuVV9Y/9PPM2AEBAAAAAAAFCgAAAAASJAD + /AQ8AAQUAAAAAAAUVAAAAgf34+BW7pFZyj5cFBwIAAAASGAAEAAAAAQIAAAAAAAUgAAAAKgIAAAAS + GAC9AQ8AAQIAAAAAAAUgAAAAIAIAAA== +EOF + + out=$(TZ=UTC $ldbadd -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb $ldif) + if [ "$?" != "0" ]; then + echo "ldbadd returned:\n$out" + return 1 + fi + + return 0 +} + +dbcheck_lost_deleted_user3() +{ + # here we don't pass --selftest-check-expired-tombstones + # as we want to test the default + dbcheck "-lost-deleted-user3" "0" "" + return $? +} + +remove_lost_deleted_user3() +{ + out=$(TZ=UTC $ldbdel -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "" --show-recycled --relax) + if [ "$?" != "0" ]; then + echo "ldbdel returned:\n$out" + return 1 + fi + + return 0 +} + +forward_link_corruption() +{ + # + # Step1: add a duplicate forward link from + # "CN=Enterprise Admins" to "CN=Administrator" + # + LDIF1=$(TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb -b 'CN=Enterprise Admins,CN=users,DC=release-4-5-0-pre1,DC=samba,DC=corp' --scope=base --reveal --extended-dn member) + DN=$(echo "${LDIF1}" | grep '^dn: ') + MSG=$(echo "${LDIF1}" | grep -v '^dn: ' | grep -v '^#' | grep -v '^$') + ldif=$PREFIX_ABS/${RELEASE}/forward_link_corruption1.ldif + { + echo "${DN}" + echo "changetype: modify" + echo "replace: member" + echo "${MSG}" + echo "${MSG}" | sed -e 's!RMD_LOCAL_USN=[1-9][0-9]*!RMD_LOCAL_USN=0!' + } >$ldif + + out=$(TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb $ldif) + if [ "$?" != "0" ]; then + echo "ldbmodify returned:\n$out" + return 1 + fi + + # + # Step2: add user "dangling" + # + ldif=$PREFIX_ABS/${RELEASE}/forward_link_corruption2.ldif + cat >$ldif <;;CN=Enterprise Admins,CN=Users,DC=release-4-5-0-pre1,DC=samba,DC=corp" + } >$ldif + + out=$(TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb $ldif) + if [ "$?" != "0" ]; then + echo "ldbmodify returned:\n$out" + return 1 + fi +} + +dbcheck_forward_link_corruption() +{ + dbcheck "-forward-link-corruption" "1" "--selftest-check-expired-tombstones" + return $? +} + +check_expected_after_dbcheck_forward_link_corruption() +{ + tmpldif=$PREFIX_ABS/$RELEASE/expected-after-dbcheck-forward-link-corruption.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(|(cn=dangling)(cn=enterprise admins))' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --sorted memberOf member >$tmpldif + diff -u $tmpldif $release_dir/expected-after-dbcheck-forward-link-corruption.ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +oneway_link_corruption() +{ + # + # Step1: add OU "dangling-ou" + # + ldif=$PREFIX_ABS/${RELEASE}/oneway_link_corruption.ldif + cat >$ldif <$ldif <$tmpldif + diff -u $tmpldif $release_dir/expected-after-dbcheck-oneway-link-corruption.ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +dbcheck_dangling_multi_valued() +{ + + $PYTHON $BINDIR/samba-tool dbcheck -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --selftest-check-expired-tombstones --fix --yes + if [ "$?" != "1" ]; then + return 1 + fi +} + +dangling_multi_valued_check_missing() +{ + WORDS=$(TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(samaccountname=dangling-multi2)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted msDS-RevealedDSAs | grep msDS-RevealedDSAs | wc -l) + if [ $WORDS -ne 4 ]; then + echo Got only $WORDS links for dangling-multi2 + return 1 + fi + WORDS=$(TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(samaccountname=dangling-multi3)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted msDS-RevealedDSAs | grep msDS-RevealedDSAs | wc -l) + if [ $WORDS -ne 4 ]; then + echo Got only $WORDS links for dangling-multi3 + return 1 + fi +} + +dangling_multi_valued_check_equal_or_too_many() +{ + WORDS=$(TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(samaccountname=dangling-multi1)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted msDS-RevealedDSAs | grep msDS-RevealedDSAs | wc -l) + if [ $WORDS -ne 4 ]; then + echo Got $WORDS links for dangling-multi1 + return 1 + fi + + WORDS=$(TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(samaccountname=dangling-multi5)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted msDS-RevealedDSAs | grep msDS-RevealedDSAs | wc -l) + + if [ $WORDS -ne 0 ]; then + echo Got $WORDS links for dangling-multi5 + return 1 + fi + + WORDS=$(TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(samaccountname=Administrator)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted msDS-RevealedDSAs | grep msDS-RevealedDSAs | wc -l) + + if [ $WORDS -ne 2 ]; then + echo Got $WORDS links for Administrator + return 1 + fi +} + +dangling_link_does_not_prevent_delete() +{ + + # + # Step1: add user "dangling" + # + ldif=$PREFIX_ABS/${RELEASE}/backlink_can_be_vanished1.ldif + dn='CN=dangling-for-vanish,CN=users,DC=release-4-5-0-pre1,DC=samba,DC=corp' + cat >$ldif <;;CN=Enterprise Admins,CN=Users,DC=release-4-5-0-pre1,DC=samba,DC=corp" + } >$ldif + + out=$(TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb $ldif) + if [ "$?" != "0" ]; then + echo "ldbmodify returned:\n$out" + return 1 + fi + + out=$(TZ=UTC $ldbdel -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "$dn") + if [ "$?" != "0" ]; then + echo "ldbdel returned:\n$out" + return 1 + fi +} + +dangling_link_to_unknown_does_not_prevent_delete() +{ + + # + # Step1: add user "dangling" + # + ldif=$PREFIX_ABS/${RELEASE}/backlink_can_be_vanished1.ldif + dn='CN=dangling-for-vanish,CN=users,DC=release-4-5-0-pre1,DC=samba,DC=corp' + cat >$ldif <;;CN=NOT Enterprise Admins,CN=Users,DC=release-4-5-0-pre1,DC=samba,DC=corp" + } >$ldif + + out=$(TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb $ldif) + if [ "$?" != "0" ]; then + echo "ldbmodify returned:\n$out" + return 1 + fi + + out=$(TZ=UTC $ldbdel -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "$dn") + if [ "$?" != "0" ]; then + echo "ldbdel returned:\n$out" + return 1 + fi +} + +dangling_link_to_known_and_unknown_does_not_prevent_delete() +{ + + # + # Step1: add user "dangling" + # + ldif=$PREFIX_ABS/${RELEASE}/backlink_can_be_vanished1.ldif + dn='CN=dangling-for-vanish,CN=users,DC=release-4-5-0-pre1,DC=samba,DC=corp' + cat >$ldif <;;CN=Enterprise Admins,CN=Users,DC=release-4-5-0-pre1,DC=samba,DC=corp" + echo "memberOf: ;;CN=NOT Enterprise Admins,CN=Users,DC=release-4-5-0-pre1,DC=samba,DC=corp" + echo "memberOf: ;CN=dangling-for-vanish,CN=users,DC=release-4-5-0-pre1,DC=samba,DC=corp" + } >$ldif + + out=$(TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb $ldif) + if [ "$?" != "0" ]; then + echo "ldbmodify returned:\n$out" + return 1 + fi + + out=$(TZ=UTC $ldbdel -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "$dn") + if [ "$?" != "0" ]; then + echo "ldbdel returned:\n$out" + return 1 + fi +} + +remove_directory $PREFIX_ABS/${RELEASE} + +testit $RELEASE undump || failed=$(expr $failed + 1) +testit_expect_failure "dbcheck_acl_reset" dbcheck_acl_reset || failed=$(expr $failed + 1) +testit "dbcheck_acl_clean" dbcheck_acl_clean || failed=$(expr $failed + 1) +testit "add_two_more_users" add_two_more_users || failed=$(expr $failed + 1) +testit "add_four_more_links" add_four_more_links || failed=$(expr $failed + 1) +testit "remove_one_link" remove_one_link || failed=$(expr $failed + 1) +testit "remove_one_user" remove_one_user || failed=$(expr $failed + 1) +testit "move_one_user" move_one_user || failed=$(expr $failed + 1) +testit "add_dangling_link" add_dangling_link || failed=$(expr $failed + 1) +testit "add_dangling_backlink" add_dangling_backlink || failed=$(expr $failed + 1) +testit "add_deleted_dangling_backlink" add_deleted_dangling_backlink || failed=$(expr $failed + 1) +testit "revive_links_on_deleted_group" revive_links_on_deleted_group || failed=$(expr $failed + 1) +testit "revive_backlink_on_deleted_group" revive_backlink_on_deleted_group || failed=$(expr $failed + 1) +testit "add_deleted_target_link" add_deleted_target_link || failed=$(expr $failed + 1) +testit "add_deleted_target_backlink" add_deleted_target_backlink || failed=$(expr $failed + 1) +testit "dbcheck_dangling" dbcheck_dangling || failed=$(expr $failed + 1) +testit "dbcheck_clean" dbcheck_clean || failed=$(expr $failed + 1) +testit "check_expected_after_deleted_links" check_expected_after_deleted_links || failed=$(expr $failed + 1) +testit "check_expected_after_links" check_expected_after_links || failed=$(expr $failed + 1) +testit "check_expected_after_objects" check_expected_after_objects || failed=$(expr $failed + 1) +testit "duplicate_member" duplicate_member || failed=$(expr $failed + 1) +testit "dbcheck_duplicate_member" dbcheck_duplicate_member || failed=$(expr $failed + 1) +testit "check_expected_after_duplicate_links" check_expected_after_duplicate_links || failed=$(expr $failed + 1) +testit "duplicate_clean" dbcheck_clean || failed=$(expr $failed + 1) +testit "forward_link_corruption" forward_link_corruption || failed=$(expr $failed + 1) +testit "dbcheck_forward_link_corruption" dbcheck_forward_link_corruption || failed=$(expr $failed + 1) +testit "check_expected_after_dbcheck_forward_link_corruption" check_expected_after_dbcheck_forward_link_corruption || failed=$(expr $failed + 1) +testit "forward_link_corruption_clean" dbcheck_clean || failed=$(expr $failed + 1) +testit "oneway_link_corruption" oneway_link_corruption || failed=$(expr $failed + 1) +testit "dbcheck_oneway_link_corruption" dbcheck_oneway_link_corruption || failed=$(expr $failed + 1) +testit "check_expected_after_dbcheck_oneway_link_corruption" check_expected_after_dbcheck_oneway_link_corruption || failed=$(expr $failed + 1) +testit "oneway_link_corruption_clean" dbcheck_clean || failed=$(expr $failed + 1) +testit "dangling_one_way_link" dangling_one_way_link || failed=$(expr $failed + 1) +testit "dbcheck_one_way" dbcheck_one_way || failed=$(expr $failed + 1) +testit "dbcheck_clean2" dbcheck_clean || failed=$(expr $failed + 1) +testit "missing_link_sid_corruption" missing_link_sid_corruption || failed=$(expr $failed + 1) +testit "dbcheck_missing_link_sid_corruption" dbcheck_missing_link_sid_corruption || failed=$(expr $failed + 1) +testit "missing_link_sid_clean" dbcheck_clean || failed=$(expr $failed + 1) +testit "add_lost_deleted_user1" add_lost_deleted_user1 || failed=$(expr $failed + 1) +testit "dbcheck_lost_deleted_user1" dbcheck_lost_deleted_user1 || failed=$(expr $failed + 1) +testit "lost_deleted_user1_clean_A" dbcheck_clean || failed=$(expr $failed + 1) +testit "remove_lost_deleted_user1" remove_lost_deleted_user1 || failed=$(expr $failed + 1) +testit "lost_deleted_user1_clean_B" dbcheck_clean || failed=$(expr $failed + 1) +testit "add_lost_deleted_user2" add_lost_deleted_user2 || failed=$(expr $failed + 1) +testit "dbcheck_lost_deleted_user2" dbcheck_lost_deleted_user2 || failed=$(expr $failed + 1) +testit "lost_deleted_user2_clean" dbcheck_clean || failed=$(expr $failed + 1) +testit "add_lost_deleted_user3" add_lost_deleted_user3 || failed=$(expr $failed + 1) +testit "dbcheck_lost_deleted_user3" dbcheck_lost_deleted_user3 || failed=$(expr $failed + 1) +testit "lost_deleted_user3_clean_A" dbcheck_clean || failed=$(expr $failed + 1) +testit "remove_lost_deleted_user3" remove_lost_deleted_user3 || failed=$(expr $failed + 1) +testit "lost_deleted_user3_clean_B" dbcheck_clean || failed=$(expr $failed + 1) +testit "dangling_one_way_dn" dangling_one_way_dn || failed=$(expr $failed + 1) +testit "deleted_one_way_dn" deleted_one_way_dn || failed=$(expr $failed + 1) +testit "dbcheck_clean3" dbcheck_clean || failed=$(expr $failed + 1) +testit "add_dangling_multi_valued" add_dangling_multi_valued || failed=$(expr $failed + 1) +testit "dbcheck_dangling_multi_valued" dbcheck_dangling_multi_valued || failed=$(expr $failed + 1) +testit "dangling_multi_valued_check_missing" dangling_multi_valued_check_missing || failed=$(expr $failed + 1) +testit "dangling_multi_valued_check_equal_or_too_many" dangling_multi_valued_check_equal_or_too_many || failed=$(expr $failed + 1) +# Currently this cannot pass +testit "dbcheck_dangling_multi_valued_clean" dbcheck_clean || failed=$(expr $failed + 1) +testit "dangling_link_does_not_prevent_delete" dangling_link_does_not_prevent_delete || failed=$(expr $failed + 1) +testit "dangling_link_to_unknown_does_not_prevent_delete" dangling_link_to_unknown_does_not_prevent_delete || failed=$(expr $failed + 1) +testit "dangling_link_to_known_and_unknown_does_not_prevent_delete" dangling_link_to_known_and_unknown_does_not_prevent_delete || failed=$(expr $failed + 1) + +remove_directory $PREFIX_ABS/${RELEASE} + +exit $failed diff --git a/testprogs/blackbox/dbcheck-oldrelease.sh b/testprogs/blackbox/dbcheck-oldrelease.sh new file mode 100755 index 0000000..73f7ec4 --- /dev/null +++ b/testprogs/blackbox/dbcheck-oldrelease.sh @@ -0,0 +1,547 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + cat <$tmpldif + diff -u $tmpldif $release_dir/expected-userParameters-after-dbcheck.ldif + if [ "$?" != "0" ]; then + return 1 + fi + fi + return 0 +} + +reindex() +{ + $PYTHON $BINDIR/samba-tool dbcheck --reindex -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "$@" +} + +do_current_version_mod() +{ + if [ x$RELEASE = x"release-4-1-0rc3" ]; then + # Confirm (in combination with the ldbsearch below) that + # changing the attribute with current Samba fixes it, and that + # a fixed attriute isn't unfixed by dbcheck. + tmpldif=$release_dir/sudoers2-mod.ldif + $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $tmpldif + fi + return 0 +} + +check_expected_before_values() +{ + if [ x$RELEASE = x"release-4-1-0rc3" ]; then + tmpldif=$PREFIX_ABS/$RELEASE/expected-replpropertymetadata-before-dbcheck.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=ops_run_anything --scope=one -b OU=SUDOers,DC=release-4-1-0rc3,DC=samba,DC=corp \* replpropertymetadata --sorted --show-binary >$tmpldif + diff -u $tmpldif $release_dir/expected-replpropertymetadata-before-dbcheck.ldif + if [ "$?" != "0" ]; then + return 1 + fi + + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=ops_run_anything2 --scope=one -b OU=SUDOers,DC=release-4-1-0rc3,DC=samba,DC=corp \* replpropertymetadata --sorted --show-binary | grep -v originating_change_time | grep -v whenChanged >$tmpldif + + # Here we remove originating_change_time and whenChanged as + # these are time-dependent, caused by the ldbmodify above. + + diff -u $tmpldif $release_dir/expected-replpropertymetadata-before-dbcheck2.ldif + if [ "$?" != "0" ]; then + return 1 + fi + + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=ops_run_anything3 --scope=one -b OU=SUDOers,DC=release-4-1-0rc3,DC=samba,DC=corp \* replpropertymetadata --sorted --show-binary >$tmpldif + diff -u $tmpldif $release_dir/expected-replpropertymetadata-before-dbcheck3.ldif + if [ "$?" != "0" ]; then + return 1 + fi + elif [ x$RELEASE = x"release-4-5-0-pre1" ]; then + tmpldif=$PREFIX_ABS/$RELEASE/rootdse-version.initial.txt.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --scope=base -b '' | grep highestCommittedUSN >$tmpldif + diff -u $tmpldif $release_dir/rootdse-version.initial.txt + if [ "$?" != "0" ]; then + return 1 + fi + fi + return 0 +} + +# This should 'fail', because it returns the number of modified records +dbcheck_objectclass() +{ + if [ x$RELEASE = x"release-4-1-6-partial-object" ]; then + $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --attrs=objectclass "$@" + else + return 1 + fi +} + +# This should 'fail', because it returns the number of wrong records, which it must if we did not skip the deleted objects +dbcheck_deleted_objects() +{ + if [ x$RELEASE = x"alpha13" ]; then + basedn=$($ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --scope base -b "" defaultNamingContext | grep -i defaultNamingContext | cut -d\ -f 2) + + $PYTHON $BINDIR/samba-tool dbcheck -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "cn=deleted objects,$basedn" --scope base "$@" + else + return 1 + fi +} + +# This should 'fail', because it returns the number of modified records +dbcheck() +{ + $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "$@" +} + +check_expected_after_values() +{ + if [ x$RELEASE = x"release-4-1-0rc3" ]; then + tmpldif=$PREFIX_ABS/$RELEASE/expected-replpropertymetadata-after-dbcheck.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=ops_run_anything --scope=one -b OU=SUDOers,DC=release-4-1-0rc3,DC=samba,DC=corp \* replpropertymetadata --sorted --show-binary >$tmpldif + diff -u $tmpldif $release_dir/expected-replpropertymetadata-after-dbcheck.ldif + if [ "$?" != "0" ]; then + return 1 + fi + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=ops_run_anything2 --scope=one -b OU=SUDOers,DC=release-4-1-0rc3,DC=samba,DC=corp \* replpropertymetadata --sorted --show-binary | grep -v originating_change_time | grep -v whenChanged >$tmpldif + diff -u $tmpldif $release_dir/expected-replpropertymetadata-after-dbcheck2.ldif + if [ "$?" != "0" ]; then + return 1 + fi + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=ops_run_anything3 --scope=one -b OU=SUDOers,DC=release-4-1-0rc3,DC=samba,DC=corp \* replpropertymetadata --sorted --show-binary >$tmpldif + diff -u $tmpldif $release_dir/expected-replpropertymetadata-after-dbcheck3.ldif + if [ "$?" != "0" ]; then + return 1 + fi + # Check DomainDNS partition for replica locations + tmpldif=$PREFIX_ABS/$RELEASE/expected-replica-locations-after-dbcheck.ldif.tmp + $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=49a69498-9a85-48af-9be4-aa0b3e0054f9 --scope=one -b CN=Partitions,CN=Configuration,DC=release-4-1-0rc3,DC=samba,DC=corp msDS-NC-Replica-Locations >$tmpldif + diff -u $tmpldif $release_dir/expected-replica-locations-after-dbcheck.ldif + if [ "$?" != "0" ]; then + return 1 + fi + # Check ForestDNS partition for replica locations + $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=7d2a15af-c0d4-487c-847e-e036292bcc65 --scope=one -b CN=Partitions,CN=Configuration,DC=release-4-1-0rc3,DC=samba,DC=corp msDS-NC-Replica-Locations >$tmpldif + diff -u $tmpldif $release_dir/expected-replica-locations-after-dbcheck2.ldif + if [ "$?" != "0" ]; then + return 1 + fi + elif [ x$RELEASE = x"release-4-5-0-pre1" ]; then + echo $RELEASE checking after values + tmpldif=$PREFIX_ABS/$RELEASE/expected-links-after-dbcheck.ldif.tmp + $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --show-recycled --show-deleted --show-deactivated-link --reveal member memberOf lastKnownParent objectCategory lastKnownParent wellKnownObjects legacyExchangeDN sAMAccountType uSNChanged --sorted >$tmpldif + diff -u $tmpldif $release_dir/expected-links-after-dbcheck.ldif + if [ "$?" != "0" ]; then + return 1 + fi + + # If in the future dbcheck has to make a change recorded in replPropertyMetadata, + # this test will fail and can be removed. + tmpversion=$PREFIX_ABS/$RELEASE/rootdse-version.final.txt.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --scope=base -b '' | grep highestCommittedUSN >$tmpversion + diff -u $tmpversion $release_dir/rootdse-version.final.txt + if [ "$?" != "0" ]; then + return 1 + fi + fi + return 0 +} + +check_forced_duplicate_values() +{ + if [ x$RELEASE = x"release-4-1-0rc3" ]; then + ldif=$release_dir/forced-duplicate-value-for-dbcheck.ldif + TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-1-0RC3,DC%3DSAMBA,DC%3DCORP.ldb $ldif + if [ "$?" != "0" ]; then + return 1 + fi + else + return 0 + fi +} + +# This should 'fail', because it returns the number of modified records +dbcheck_after_dup() +{ + if [ x$RELEASE = x"release-4-1-0rc3" ]; then + $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=administrator,cn=users,DC=release-4-1-0rc3,DC=samba,DC=corp "$@" + else + return 1 + fi +} + +check_expected_after_dup_values() +{ + if [ x$RELEASE = x"release-4-1-0rc3" ]; then + tmpldif=$PREFIX_ABS/$RELEASE/expected-otherphone-after-dbcheck.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=administrator --scope=base -b cn=administrator,cn=users,DC=release-4-1-0rc3,DC=samba,DC=corp otherHomePhone --sorted --show-binary | grep -v \# | sort >$tmpldif + diff -u $tmpldif $release_dir/expected-otherphone-after-dbcheck.ldif + if [ "$?" != "0" ]; then + return 1 + fi + fi + return 0 +} + +# But having fixed it all up, this should pass +dbcheck_clean() +{ + $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "$@" +} + +# This should 'fail', because it returns the number of modified records. +# We need to run this against all versions without adprep 2016 (before Samba 4.19) +dbcheck_acl_reset() +{ + $PYTHON $BINDIR/samba-tool dbcheck --reset-well-known-acls --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "$@" +} +# But having fixed it all up, this should pass. +# We don't need to run this against 4.1.0rc3 +dbcheck_acl_reset_clean() +{ + if [ x$RELEASE != x"release-4-1-0rc3" ]; then + $PYTHON $BINDIR/samba-tool dbcheck --reset-well-known-acls --cross-ncs -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "$@" + fi +} + +# This should 'fail', because it returns the number of modified records +dbcheck2() +{ + if [ x$RELEASE = x"release-4-1-0rc3" ]; then + $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "$@" + else + exit 1 + fi +} +# But having fixed it all up, this should pass +dbcheck_clean2() +{ + if [ x$RELEASE = x"release-4-1-0rc3" ]; then + $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --cross-ncs -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "$@" + fi +} + +rm_deleted_objects() +{ + if [ x$RELEASE = x"release-4-1-0rc3" ]; then + TZ=UTC $ldbdel -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-1-0RC3,DC%3DSAMBA,DC%3DCORP.ldb 'CN=Deleted Objects,DC=RELEASE-4-1-0RC3,DC=SAMBA,DC=CORP' + if [ "$?" != "0" ]; then + return 1 + fi + else + return 0 + fi +} +# This should 'fail', because it returns the number of modified records +dbcheck3() +{ + if [ x$RELEASE = x"release-4-1-0rc3" ]; then + $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "$@" + else + exit 1 + fi +} +# But having fixed it all up, this should pass +dbcheck_clean3() +{ + if [ x$RELEASE = x"release-4-1-0rc3" ]; then + $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --cross-ncs -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "$@" + fi +} + +check_expected_after_deleted_objects() +{ + if [ x$RELEASE = x"release-4-1-0rc3" ]; then + tmpldif=$PREFIX_ABS/$RELEASE/expected-deleted_objects-after-dbcheck.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=deleted\ objects --scope=base -b cn=deleted\ objects,DC=release-4-1-0rc3,DC=samba,DC=corp objectClass description isDeleted isCriticalSystemObject objectGUID showInAdvancedViewOnly systemFlags --sorted --show-binary --show-deleted | grep -v \# | sort >$tmpldif + diff -u $tmpldif $release_dir/expected-deleted_objects-after-dbcheck.ldif + if [ "$?" != "0" ]; then + return 1 + fi + fi + return 0 +} + +referenceprovision() +{ + if [ x$RELEASE = x"release-4-0-0" ]; then + $PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=SAMBA --host-name=ares --realm=${RELEASE}.samba.corp --targetdir=$PREFIX_ABS/${RELEASE}_reference --use-ntvfs --host-ip=127.0.0.1 --host-ip6=::1 --function-level=2003 --base-schema=2008_R2_old + + # on top of this, also apply 2008R2 changes we accidentally missed in the past + $PYTHON $BINDIR/samba-tool domain schemaupgrade -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --ldf-file=samba-4.7-missing-for-schema45.ldif,fix-forest-rev.ldf + fi +} + +ldapcmp() +{ + if [ x$RELEASE = x"release-4-0-0" ]; then + $PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/${RELEASE}_reference/private/sam.ldb tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --two --skip-missing-dn --filter=dnsRecord,displayName,msDS-SupportedEncryptionTypes,servicePrincipalName + fi +} + +ldapcmp_sd() +{ + if [ x$RELEASE = x"release-4-0-0" ]; then + $PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/${RELEASE}_reference/private/sam.ldb tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --two --sd --skip-missing-dn --filter=servicePrincipalName + fi +} + +remove_directory $PREFIX_ABS/${RELEASE}_reference + +testit $RELEASE undump || failed=$(expr $failed + 1) +testit "reindex" reindex || failed=$(expr $failed + 1) +testit "current_version_mod" do_current_version_mod || failed=$(expr $failed + 1) +testit "check_expected_before_values" check_expected_before_values || failed=$(expr $failed + 1) +testit_expect_failure "dbcheck_deleted_objects" dbcheck_deleted_objects || failed=$(expr $failed + 1) +testit_expect_failure "dbcheck_objectclass" dbcheck_objectclass || failed=$(expr $failed + 1) +testit_expect_failure "dbcheck" dbcheck || failed=$(expr $failed + 1) +testit "check_expected_after_values" check_expected_after_values || failed=$(expr $failed + 1) +testit "check_forced_duplicate_values" check_forced_duplicate_values || failed=$(expr $failed + 1) +testit_expect_failure "dbcheck_after_dup" dbcheck_after_dup || failed=$(expr $failed + 1) +testit "check_expected_after_dup_values" check_expected_after_dup_values || failed=$(expr $failed + 1) +testit "dbcheck_clean" dbcheck_clean || failed=$(expr $failed + 1) +testit_expect_failure "dbcheck_acl_reset" dbcheck_acl_reset || failed=$(expr $failed + 1) +testit "dbcheck_acl_reset_clean" dbcheck_acl_reset_clean || failed=$(expr $failed + 1) +testit "add_userparameters0" add_userparameters1 || failed=$(expr $failed + 1) +testit "add_userparameters1" add_userparameters1 || failed=$(expr $failed + 1) +testit "add_userparameters2" add_userparameters2 || failed=$(expr $failed + 1) +testit "add_userparameters3" add_userparameters3 || failed=$(expr $failed + 1) +testit_expect_failure "dbcheck2" dbcheck2 || failed=$(expr $failed + 1) +testit "dbcheck_clean2" dbcheck_clean2 || failed=$(expr $failed + 1) +testit "check_expected_userparameters" check_expected_userparameters || failed=$(expr $failed + 1) +testit "rm_deleted_objects" rm_deleted_objects || failed=$(expr $failed + 1) +# We must re-index again because rm_deleted_objects went behind +# the back of the main sam.ldb. +testit "reindex2" reindex || failed=$(expr $failed + 1) +testit_expect_failure "dbcheck3" dbcheck3 || failed=$(expr $failed + 1) +testit "dbcheck_clean3" dbcheck_clean3 || failed=$(expr $failed + 1) +testit "check_expected_after_deleted_objects" check_expected_after_deleted_objects || failed=$(expr $failed + 1) +testit "referenceprovision" referenceprovision || failed=$(expr $failed + 1) +testit "ldapcmp" ldapcmp || failed=$(expr $failed + 1) +testit "ldapcmp_sd" ldapcmp_sd || failed=$(expr $failed + 1) + +if [ -d $PREFIX_ABS/${RELEASE} ]; then + rm -fr $PREFIX_ABS/${RELEASE} +fi + +remove_directory $PREFIX_ABS/${RELEASE}_reference + +exit $failed diff --git a/testprogs/blackbox/dbcheck.sh b/testprogs/blackbox/dbcheck.sh new file mode 100755 index 0000000..0869a2b --- /dev/null +++ b/testprogs/blackbox/dbcheck.sh @@ -0,0 +1,72 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + cat < +# Copyright (C) 2006-2008 Andrew Bartlett + +if [ $# -lt 2 ]; then + cat < +# Copyright (C) 2006-2008 Andrew Bartlett + +if [ $# -lt 2 ]; then + cat < +# Copyright (C) 2008 Jelmer Vernooij +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +timestamp() +{ + # mark the start time. With Gnu date, you get nanoseconds from %N + # (here truncated to microseconds with %6N), but not on BSDs, + # Solaris, etc, which will apparently leave either %N or N at the end. + date -u +'time: %Y-%m-%d %H:%M:%S.%6NZ' | sed 's/\..*NZ$/.000000Z/' +} + +subunit_start_test() +{ + # emit the current protocol start-marker for test $1 + timestamp + printf 'test: %s\n' "$1" +} + +subunit_pass_test() +{ + # emit the current protocol test passed marker for test $1 + timestamp + printf 'success: %s\n' "$1" +} + +# This is just a hack as we have some broken scripts +# which use "exit $failed", without initializing failed. +failed=0 + +subunit_fail_test() +{ + # emit the current protocol fail-marker for test $1, and emit stdin as + # the error text. + # we use stdin because the failure message can be arbitrarily long, and this + # makes it convenient to write in scripts (using <&1) + status=$? + if [ ${status} -eq 0 ]; then + subunit_pass_test "$name" + else + echo "$output" | subunit_fail_test "$name" + fi + return $status +} + +# This returns 0 if the command gave success and the grep value was found +# all other cases return != 0 +testit_grep() +{ + name="$1" + shift + grep="$1" + shift + cmdline="$*" + subunit_start_test "$name" + output=$($cmdline 2>&1) + status=$? + if [ ${status} -ne 0 ]; then + printf '%s' "$output" | subunit_fail_test "$name" + return $status + fi + printf '%s' "$output" | grep -q "$grep" + gstatus=$? + if [ ${gstatus} -eq 0 ]; then + subunit_pass_test "$name" + else + printf 'GREP: "%s" not found in output:\n%s' "$grep" "$output" | subunit_fail_test "$name" + fi + return $gstatus +} + +# This returns 0 if the command gave success and the grep value was found +# num times all other cases return != 0 +testit_grep_count() +{ + name="$1" + shift + grep="$1" + shift + num="$1" + shift + cmdline="$*" + subunit_start_test "$name" + output=$($cmdline 2>&1) + status=$? + if [ ${status} -ne 0 ]; then + printf '%s' "$output" | subunit_fail_test "$name" + return $status + fi + found=$(printf '%s' "$output" | grep -c "$grep") + if [ "${found}" -eq "$num" ]; then + subunit_pass_test "$name" + else + printf 'GREP: "%s" found "%d" times, expected "%d" in output:\n%s'\ + "$grep" "$found" "$num" "$output" | + subunit_fail_test "$name" + return 1 + fi + return 0 +} + +testit_expect_failure() +{ + name="$1" + shift + cmdline="$*" + subunit_start_test "$name" + output=$($cmdline 2>&1) + status=$? + if [ ${status} = 0 ]; then + echo "$output" | subunit_fail_test "$name" + return 1 + else + subunit_pass_test "$name" + return 0 + fi +} + +# This returns 0 if the command gave a failure and the grep value was found +# all other cases return != 0 +testit_expect_failure_grep() +{ + name="$1" + shift + grep="$1" + shift + cmdline="$*" + subunit_start_test "$name" + output=$($cmdline 2>&1) + status=$? + if [ ${status} -eq 0 ]; then + printf '%s' "$output" | subunit_fail_test "$name" + return 1 + fi + printf '%s' "$output" | grep -q "$grep" + gstatus=$? + if [ ${gstatus} -eq 0 ]; then + subunit_pass_test "$name" + else + printf 'GREP: "%s" not found in output:\n%s' "$grep" "$output" | subunit_fail_test "$name" + return 1 + fi + return 0 +} + +testok() +{ + name=$(basename $1) + failed=$2 + + exit $failed +} + +# work out the top level source directory +if [ -d source4 ]; then + SRCDIR="." +else + SRCDIR=".." +fi +export SRCDIR diff --git a/testprogs/blackbox/test_alias_membership.sh b/testprogs/blackbox/test_alias_membership.sh new file mode 100755 index 0000000..510940a --- /dev/null +++ b/testprogs/blackbox/test_alias_membership.sh @@ -0,0 +1,194 @@ +#!/bin/bash + +if [ $# -lt 1 ]; then + cat < +# Copyright (C) 2006-2008 Andrew Bartlett + +if [ $# -lt 4 ]; then + cat </dev/null 2>&1 || ! which sha1sum >/dev/null 2>&1; then + subunit_start_test "client encryption types" + subunit_skip_test "client encryption types" </dev/null | sha1sum | cut -b 1-10) + +RUNDIR=$(pwd) +cd $BASEDIR +WORKDIR=$(mktemp -d -p .) +WORKDIR=$(basename $WORKDIR) +cp -a client/* $WORKDIR/ +sed -ri "s@(dir|directory) = (.*)/client/@\1 = \2/$WORKDIR/@" $WORKDIR/client.conf +sed -ri "s/netbios name = .*/netbios name = $HOSTNAME/" $WORKDIR/client.conf +rm -f $WORKDIR/private/secrets.tdb +cd $RUNDIR + +failed=0 + +net_tool="$BINDIR/net --configfile=$BASEDIR/$WORKDIR/client.conf --option=security=ads --option=kerberosencryptiontypes=$ETYPE_CONF" +pcap_file=$BASEDIR/$WORKDIR/test.pcap + +export SOCKET_WRAPPER_PCAP_FILE=$pcap_file +testit "join" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC_PASSWORD --use-kerberos=required || failed=$(expr $failed + 1) + +testit "testjoin" $VALGRIND $net_tool ads testjoin -P --use-kerberos=required || failed=$(expr $failed + 1) + +#The leave command does not use the locally-generated +#krb5.conf +export SOCKET_WRAPPER_PCAP_FILE= +testit "leave" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +# +# Older versions of tshark do not support -Y option, +# They use -R which cannot be used with recent versions... +# +if ! tshark -r $pcap_file -nVY "kerberos" >/dev/null 2>&1; then + subunit_start_test "client encryption types" + subunit_skip_test "client encryption types" < + +if [ $# -lt 6 ]; then + cat </dev/null 2>&1 + ret=$? + if [ $ret -eq 0 ]; then + echo "Kinit failed for smbclient" + echo "$out" + return 1 + fi + + return 0 +} + +KRB5CCNAME_PATH="$PREFIX/ccache_client_kerberos" +KRB5CCNAME="FILE:$KRB5CCNAME_PATH" +export KRB5CCNAME + +### RPCCLIENT (legacy) +cmd='$samba_rpcclient ncacn_np:${SERVER} -U${USERNAME}%${PASSWORD} --configfile=${CONFIGURATION} -c getusername 2>&1' +testit "test rpcclient legacy ntlm" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +cmd='echo ${PASSWORD} | USER=${USERNAME} $samba_rpcclient ncacn_np:${SERVER} --configfile=${CONFIGURATION} -c getusername 2>&1' +testit "test rpcclient legacy ntlm interactive" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +cmd='echo ${PASSWORD} | $samba_rpcclient ncacn_np:${SERVER} -U${USERNAME} --configfile=${CONFIGURATION} -c getusername 2>&1' +testit "test rpcclient legacy ntlm interactive with -U" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +cmd='$samba_rpcclient ncacn_np:${SERVER} -U${USERNAME}%${PASSWORD} -k --configfile=${CONFIGURATION} -c getusername 2>&1' +testit "test rpcclient legacy kerberos" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +cmd='echo ${PASSWORD} | $samba_rpcclient ncacn_np:${SERVER} -U${USERNAME} -k --configfile=${CONFIGURATION} -c getusername 2>&1' +testit_expect_failure "test rpcclient legacy kerberos interactive (negative test)" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +kerberos_kinit $samba_kinit ${USERNAME}@${REALM} ${PASSWORD} +cmd='$samba_rpcclient ncacn_np:${SERVER} -k --configfile=${CONFIGURATION} -c getusername 2>&1' +testit "test rpcclient legacy kerberos ccache" \ + test_rpc_getusername || + failed=$(expr $failed + 1) +$samba_kdestroy + +### RPCCLIENT +cmd='$samba_rpcclient ncacn_np:${SERVER} -U${USERNAME}%${PASSWORD} --use-kerberos=disabled --configfile=${CONFIGURATION} -c getusername 2>&1' +testit "test rpcclient ntlm" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +cmd='echo ${PASSWORD} | USER=${USERNAME} $samba_rpcclient ncacn_np:${SERVER} --use-kerberos=disabled --configfile=${CONFIGURATION} -c getusername 2>&1' +testit "test rpcclient ntlm interactive" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +cmd='echo ${PASSWORD} | $samba_rpcclient ncacn_np:${SERVER} -U${USERNAME} --use-kerberos=disabled --configfile=${CONFIGURATION} -c getusername 2>&1' +testit "test rpcclient ntlm interactive with -U" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +cmd='$samba_rpcclient ncacn_np:${SERVER} -U${USERNAME}%${PASSWORD} --use-kerberos=required --configfile=${CONFIGURATION} -c getusername 2>&1' +testit "test rpcclient kerberos" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +cmd='echo ${PASSWORD} | $samba_rpcclient ncacn_np:${SERVER} -U${USERNAME} --use-krb5-ccache=$KRB5CCNAME --configfile=${CONFIGURATION} -c getusername 2>&1' +testit_expect_failure "test rpcclient kerberos interactive (negative test)" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +kerberos_kinit $samba_kinit ${USERNAME}@${REALM} ${PASSWORD} +cmd='$samba_rpcclient ncacn_np:${SERVER} --use-krb5-ccache=$KRB5CCNAME --configfile=${CONFIGURATION} -c getusername 2>&1' +testit "test rpcclient kerberos ccache" \ + test_rpc_getusername || + failed=$(expr $failed + 1) +$samba_kdestroy + +### SMBTORTURE (legacy) + +cmd='$samba_smbtorture -U${USERNAME}%${PASSWORD} --configfile=${CONFIGURATION} --maximum-runtime=30 --basedir=$PREFIX --option=torture:progress=no --target=samba4 ncacn_np:${SERVER} rpc.lsa-getuser 2>&1' +testit "test smbtorture legacy default" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +cmd='$samba_smbtorture -U${USERNAME}%${PASSWORD} -k no --configfile=${CONFIGURATION} --maximum-runtime=30 --basedir=$PREFIX --option=torture:progress=no --target=samba4 ncacn_np:${SERVER} rpc.lsa-getuser 2>&1' +testit "test smbtorture legacy ntlm (kerberos=no)" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +cmd='$samba_smbtorture -U${USERNAME}%${PASSWORD} -k yes --configfile=${CONFIGURATION} --maximum-runtime=30 --basedir=$PREFIX --option=torture:progress=no --target=samba4 ncacn_np:${SERVER} rpc.lsa-getuser 2>&1' +testit "test smbtorture legacy kerberos=yes" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +kerberos_kinit $samba_kinit ${USERNAME}@${REALM} ${PASSWORD} +cmd='$samba_smbtorture -k yes --configfile=${CONFIGURATION} --maximum-runtime=30 --basedir=$PREFIX --option=torture:progress=no --target=samba4 ncacn_np:${SERVER} rpc.lsa-getuser 2>&1' +testit "test smbtorture legacy kerberos=yes ccache" \ + test_rpc_getusername || + failed=$(expr $failed + 1) +$samba_kdestroy + +kerberos_kinit $samba_kinit ${USERNAME}@${REALM} ${PASSWORD} +cmd='$samba_smbtorture -k no --configfile=${CONFIGURATION} --maximum-runtime=30 --basedir=$PREFIX --option=torture:progress=no --target=samba4 ncacn_np:${SERVER} rpc.lsa-getuser 2>&1' +testit_expect_failure "test smbtorture legacy kerberos=no ccache (negative test)" \ + test_rpc_getusername || + failed=$(expr $failed + 1) +$samba_kdestroy + +### SMBTORTURE + +cmd='$samba_smbtorture -U${USERNAME}%${PASSWORD} --configfile=${CONFIGURATION} --maximum-runtime=30 --basedir=$PREFIX --option=torture:progress=no --target=samba4 ncacn_np:${SERVER} rpc.lsa-getuser 2>&1' +testit "test smbtorture default" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +cmd='$samba_smbtorture -U${USERNAME}%${PASSWORD} --use-kerberos=disabled --configfile=${CONFIGURATION} --maximum-runtime=30 --basedir=$PREFIX --option=torture:progress=no --target=samba4 ncacn_np:${SERVER} rpc.lsa-getuser 2>&1' +testit "test smbtorture ntlm (kerberos=no)" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +cmd='$samba_smbtorture -U${USERNAME}%${PASSWORD} --use-kerberos=required --configfile=${CONFIGURATION} --maximum-runtime=30 --basedir=$PREFIX --option=torture:progress=no --target=samba4 ncacn_np:${SERVER} rpc.lsa-getuser 2>&1' +testit "test smbtorture kerberos=yes" \ + test_rpc_getusername || + failed=$(expr $failed + 1) + +kerberos_kinit $samba_kinit ${USERNAME}@${REALM} ${PASSWORD} +cmd='$samba_smbtorture --use-krb5-ccache=$KRB5CCNAME --configfile=${CONFIGURATION} --maximum-runtime=30 --basedir=$PREFIX --option=torture:progress=no --target=samba4 ncacn_np:${SERVER} rpc.lsa-getuser 2>&1' +testit "test smbtorture kerberos=yes ccache" \ + test_rpc_getusername || + failed=$(expr $failed + 1) +$samba_kdestroy + +kerberos_kinit $samba_kinit ${USERNAME}@${REALM} ${PASSWORD} +cmd='$samba_smbtorture --use-kerbers=required --configfile=${CONFIGURATION} --maximum-runtime=30 --basedir=$PREFIX --option=torture:progress=no --target=samba4 ncacn_np:${SERVER} rpc.lsa-getuser 2>&1' +testit_expect_failure "test smbtorture kerberos=no ccache (negative test)" \ + test_rpc_getusername || + failed=$(expr $failed + 1) +$samba_kdestroy + +### SMBCLIENT (legacy) +cmd='$samba_smbclient //${SERVER}/tmp -W ${DOMAIN} -U${USERNAME}%${PASSWORD} --configfile=${CONFIGURATION} -c "ls; quit"' +testit "test smbclient legacy ntlm" \ + test_smbclient || + failed=$(expr $failed + 1) + +cmd='echo ${PASSWORD} | USER=$USERNAME $samba_smbclient //${SERVER}/tmp -W ${DOMAIN} --configfile=${CONFIGURATION} -c "ls; quit"' +testit "test smbclient legacy ntlm interactive" \ + test_smbclient || + failed=$(expr $failed + 1) + +cmd='echo ${PASSWORD} | $samba_smbclient //${SERVER}/tmp -W ${DOMAIN} -U${USERNAME} --configfile=${CONFIGURATION} -c "ls; quit"' +testit "test smbclient legacy ntlm interactive with -U" \ + test_smbclient || + failed=$(expr $failed + 1) + +cmd='$samba_smbclient //${SERVER}/tmp -W ${DOMAIN} -U${USERNAME}%${PASSWORD} -k --configfile=${CONFIGURATION} -c "ls; quit"' +testit "test smbclient legacy kerberos" \ + test_smbclient || + failed=$(expr $failed + 1) + +kerberos_kinit $samba_kinit ${USERNAME}@${REALM} ${PASSWORD} +cmd='$samba_smbclient //${SERVER}/tmp -W ${DOMAIN} -k --configfile=${CONFIGURATION} -c "ls; quit"' +testit "test smbclient legacy kerberos ccache" \ + test_smbclient || + failed=$(expr $failed + 1) +$samba_kdestroy + +### SMBCLIENT tests for --use-kerberos=desired|required|disabled +cmd='$samba_smbclient //${SERVER}/tmp -W ${DOMAIN} -U${USERNAME}%${PASSWORD} --use-kerberos=disabled --configfile=${CONFIGURATION} -c "ls; quit"' +testit "test smbclient ntlm" \ + test_smbclient || + failed=$(expr $failed + 1) + +cmd='echo ${PASSWORD} | USER=$USERNAME $samba_smbclient //${SERVER}/tmp -W ${DOMAIN} --use-kerberos=disabled --configfile=${CONFIGURATION} -c "ls; quit"' +testit "test smbclient ntlm interactive" \ + test_smbclient || + failed=$(expr $failed + 1) + +cmd='echo ${PASSWORD} | $samba_smbclient //${SERVER}/tmp -W ${DOMAIN} -U${USERNAME} --use-kerberos=disabled --configfile=${CONFIGURATION} -c "ls; quit"' +testit "test smbclient ntlm interactive with -U" \ + test_smbclient || + failed=$(expr $failed + 1) + +cmd='$samba_smbclient //${SERVER}/tmp -W ${DOMAIN} -U${USERNAME}%${PASSWORD} --use-kerberos=desired --configfile=${CONFIGURATION} -c "ls; quit"' +testit "test smbclient kerberos=desired" \ + test_smbclient_kerberos || + failed=$(expr $failed + 1) + +cmd='$samba_smbclient //${SERVER}/tmp -W ${DOMAIN} -U${USERNAME}%${PASSWORD} --use-kerberos=required --configfile=${CONFIGURATION} -c "ls; quit"' +testit "test smbclient kerberos=required" \ + test_smbclient_kerberos || + failed=$(expr $failed + 1) + +kerberos_kinit $samba_kinit ${USERNAME}@${REALM} ${PASSWORD} +cmd='$samba_smbclient //${SERVER}/tmp --use-krb5-ccache=$KRB5CCNAME --configfile=${CONFIGURATION} -c "ls; quit"' +testit "test smbclient kerberos=required ccache" \ + test_smbclient || + failed=$(expr $failed + 1) +$samba_kdestroy + +rm -rf $KRB5CCNAME_PATH + +exit $failed diff --git a/testprogs/blackbox/test_kinit.sh b/testprogs/blackbox/test_kinit.sh new file mode 100755 index 0000000..d9fb6c4 --- /dev/null +++ b/testprogs/blackbox/test_kinit.sh @@ -0,0 +1,555 @@ +#!/bin/sh +# Blackbox tests for kinit and kerberos integration with smbclient etc +# Copyright (c) Andreas Schneider +# Copyright (C) 2006-2007 Jelmer Vernooij +# Copyright (C) 2006-2008 Andrew Bartlett + +if [ $# -lt 8 ]; then + cat <"${PREFIX}/tmpldbmodify" <"${PREFIX}/tmpldbmodify" <"${PREFIX}/tmpkpasswdscript" <"${PREFIX}/tmpkpasswdscript" <"${PREFIX}/tmpldbmodify" <"${PREFIX}/tmpkinituserpassscript" <"${PREFIX}/tmpkinituserpassscript" < +# Copyright (C) 2006-2008 Andrew Bartlett +# Copyright (C) Andreas Schneider + +if [ $# -lt 7 ]; then + cat <&1) + status=$? + if [ ${status} -ne 0 ]; then + echo "${output}" | subunit_fail_test "${testname}" + return $status + fi + + NKEYS=$(echo "${output}" | grep -i "${principal}" | \ + grep -c -e "${KEYTAB_GREP}") + if [ "${NKEYS}" -ne "${expected_nkeys}" ]; then + echo "Unexpected number of keys passed ${NKEYS} != ${expected_nkeys}" | \ + subunit_fail_test "${testname}" + return 1 + fi + + subunit_pass_test "${testname}" + return 0 +} + +testit "create local user ${TEST_USER}" \ + "${VALGRIND}" "${PYTHON}" "${samba_newuser}" "${TEST_USER}" "${TEST_PASSWORD}" \ + "${CONFIGURATION}" "$@" || \ + failed=$((failed + 1)) + +testit "dump keytab from domain" \ + "${VALGRIND}" "${PYTHON}" "${samba_tool}" domain exportkeytab \ + "${PREFIX}/tmpkeytab-all" \ + "${CONFIGURATION}" "$@" || \ + failed=$((failed + 1)) + +test_keytab "read keytab from domain" \ + "${PREFIX}/tmpkeytab-all" "${SERVER}\\\$" "${EXPECTED_NKEYS}" || \ + failed=$((failed + 1)) + +testit "dump keytab from domain (2nd time)" \ + "${VALGRIND}" "${PYTHON}" "${samba_tool}" domain exportkeytab \ + "${PREFIX}/tmpkeytab-all" "${CONFIGURATION}" "$@" || \ + failed=$((failed + 1)) + +test_keytab "read keytab from domain (2nd time)" \ + "${PREFIX}/tmpkeytab-all" "${SERVER}\\\$" "${EXPECTED_NKEYS}" || \ + failed=$((failed + 1)) + +testit "dump keytab from domain for cifs service principal" \ + "${VALGRIND}" "${PYTHON}" "${samba_tool}" domain exportkeytab \ + "${PREFIX}/tmpkeytab-server" --principal="cifs/$SERVER_FQDN" \ + "${CONFIGURATION}" "$@" || \ + failed=$((failed + 1)) + +test_keytab "read keytab from domain for cifs service principal" \ + "${PREFIX}/tmpkeytab-server" "cifs/${SERVER_FQDN}" \ + "${EXPECTED_NKEYS}" || \ + failed=$((failed + 1)) + +testit "dump keytab from domain for cifs service principal (2nd time)" \ + "${VALGRIND}" "${PYTHON}" "${samba_tool}" domain exportkeytab \ + "$PREFIX/tmpkeytab-server" --principal="cifs/$SERVER_FQDN" \ + "${CONFIGURATION}" "$@" || \ + failed=$((failed + 1)) + +test_keytab "read keytab from domain for cifs service principal (2nd time)" \ + "${PREFIX}/tmpkeytab-server" "cifs/${SERVER_FQDN}" \ + "${EXPECTED_NKEYS}" || \ + failed=$((failed + 1)) + +testit "dump keytab from domain for user principal" \ + "${VALGRIND}" "${PYTHON}" "${samba_tool}" domain exportkeytab \ + "${PREFIX}/tmpkeytab-user-princ" --principal="${TEST_USER}" \ + "${CONFIGURATION}" "$@" || \ + failed=$((failed + 1)) + +test_keytab "read keytab from domain for user principal" \ + "${PREFIX}/tmpkeytab-user-princ" "${TEST_USER}@${REALM}" \ + "${EXPECTED_NKEYS}" || \ + failed=$((failed + 1)) + +testit "dump keytab from domain for user principal (2nd time)" \ + "${VALGRIND}" "${PYTHON}" "${samba_tool}" domain exportkeytab \ + "${PREFIX}/tmpkeytab-user-princ-2" --principal="${TEST_USER}@${REALM}" \ + "${CONFIGURATION}" "$@" || \ + failed=$((failed + 1)) + +test_keytab "read keytab from domain for user principal (2nd time)" \ + "${PREFIX}/tmpkeytab-user-princ-2" "${TEST_USER}@${REALM}" \ + "${EXPECTED_NKEYS}" || \ + failed=$((failed + 1)) + +testit "dump keytab from domain for user principal with SPN as UPN" \ + "${VALGRIND}" "${PYTHON}" "${samba_tool}" domain exportkeytab \ + "${PREFIX}/tmpkeytab-spn-upn" \ + --principal="http/testupnspn.${DNSDOMAIN}" "${CONFIGURATION}" "$@" || \ + failed=$((failed + 1)) + +test_keytab "read keytab from domain for user principal with SPN as UPN" \ + "${PREFIX}/tmpkeytab-spn-upn" "http/testupnspn.${DNSDOMAIN}@${REALM}" \ + "${EXPECTED_NKEYS}" + +KRB5CCNAME_PATH="${PREFIX}/tmpuserccache" +KRB5CCNAME="FILE:${PREFIX}/tmpuserccache" +export KRB5CCNAME + +testit "kinit with keytab as user" \ + "${VALGRIND}" "${samba_kinit}" \ + "${OPTION_USE_KEYTAB}" \ + "${OPTION_KEYTAB_FILENAME}" "${PREFIX}/tmpkeytab-all" \ + "${TEST_USER}@${REALM}" || \ + failed=$((failed + 1)) + +test_smbclient "Test login with user kerberos ccache" \ + "ls" "${SMBCLIENT_UNC}" --use-krb5-ccache="${KRB5CCNAME}" || \ + failed=$((failed + 1)) + +testit "kinit with keytab as user (one princ)" \ + "${VALGRIND}" "$samba_kinit" \ + "${OPTION_USE_KEYTAB}" \ + "${OPTION_KEYTAB_FILENAME}" "${PREFIX}/tmpkeytab-user-princ" \ + "${TEST_USER}@$REALM" || \ + failed=$((failed + 1)) + +test_smbclient "Test login with user kerberos ccache (one princ)" \ + "ls" "${SMBCLIENT_UNC}" --use-krb5-ccache="${KRB5CCNAME}" || \ + failed=$((failed + 1)) + +rm -f "${KRB5CCNAME_PATH}" + +KRB5CCNAME_PATH="${PREFIX}/tmpadminccache" +KRB5CCNAME="FILE:${PREFIX}/tmpadminccache" +export KRB5CCNAME + +testit "kinit with keytab as ${USERNAME}" \ + "${VALGRIND}" "${samba_kinit}" \ + "${OPTION_USE_KEYTAB}" \ + "${OPTION_KEYTAB_FILENAME}" "${PREFIX}/tmpkeytab-all" \ + "${USERNAME}@${REALM}" || \ + failed=$((failed + 1)) + +rm -f "${KRB5CCNAME_PATH}" + +KRB5CCNAME_PATH="${PREFIX}/tmpserverccache" +KRB5CCNAME="FILE:${PREFIX}/tmpserverccache" +export KRB5CCNAME + +testit "kinit with SPN from keytab" \ + "${VALGRIND}" "${samba_kinit}" \ + "${OPTION_USE_KEYTAB}" \ + "${OPTION_KEYTAB_FILENAME}" "${PREFIX}/tmpkeytab-spn-upn" \ + "http/testupnspn.${DNSDOMAIN}" || \ + failed=$((failed + 1)) + +# cleanup +testit "delete user ${TEST_USER}" \ + "${VALGRIND}" "${PYTHON}" "${samba_tool}" user delete "${TEST_USER}" \ + --use-krb5-ccache="${KRB5CCNAME}" "${CONFIGURATION}" "$@" || \ + failed=$((failed + 1)) + +rm -f "${KRB5CCNAME_PATH}" +rm -f "${PREFIX}/tmpadminccache" \ + "${PREFIX}/tmpuserccache" \ + "${PREFIX}/tmpkeytab" \ + "${PREFIX}/tmpkeytab-user-princ" \ + "${PREFIX}/tmpkeytab-user-princ-2" \ + "${PREFIX}/tmpkeytab-server" \ + "${PREFIX}/tmpkeytab-spn-upn" \ + "${PREFIX}/tmpkeytab-all" + +exit $failed diff --git a/testprogs/blackbox/test_kinit_trusts.sh b/testprogs/blackbox/test_kinit_trusts.sh new file mode 100755 index 0000000..e76d81b --- /dev/null +++ b/testprogs/blackbox/test_kinit_trusts.sh @@ -0,0 +1,247 @@ +#!/bin/sh +# Blackbox tests for kinit and trust validation +# Copyright (c) 2015 Stefan Metzmacher +# Copyright (c) Andreas Schneider + +if [ $# -lt 13 ]; then + cat < +# Copyright (C) 2006-2008 Andrew Bartlett +# Copyright (C) 2016 Andreas Schneider + +if [ $# -lt 7 ]; then + cat <$PREFIX/tmpkpasswdscript <$PREFIX/tmpkpasswdscript <$PREFIX/tmpkpasswdscript < "${PREFIX}/tmpkpasswdscript" < "${KRB5_CONFIG}" + testit "MIT kpasswd change user password" \ + "${texpect}" "${PREFIX}/tmpkpasswdscript" "${mit_kpasswd}" \ + "${TEST_PRINCIPAL}" || + failed=$((failed + 1)) + KRB5_CONFIG="${SAVE_KRB5_CONFIG}" + export KRB5_CONFIG +fi + +TEST_PASSWORD="${TEST_PASSWORD_NEW}" +TEST_PASSWORD_NEW="testPaSS@03force%" + +########################################################### +### Force password change at login +########################################################### + +testit "set password on user locally" \ + $VALGRIND $PYTHON $samba_tool user setpassword $TEST_USERNAME "${CONFIGURATION}" --newpassword=$TEST_PASSWORD_NEW --must-change-at-next-login || failed=$(expr $failed + 1) + +TEST_PASSWORD=$TEST_PASSWORD_NEW +TEST_PASSWORD_NEW="testPaSS@04%" + +rm -f $PREFIX/tmpuserccache + +cat >$PREFIX/tmpkinitscript < +# Copyright (c) 2006-2008 Andrew Bartlett +# Copyright (c) 2016 Andreas Schneider + +if [ $# -lt 7 ]; then + cat <$PREFIX/tmpkpasswdscript <$PREFIX/tmpkpasswdscript <$PREFIX/tmpkpasswdscript <$PREFIX/tmpkpasswdscript <$PREFIX/tmpkinitscript <$PREFIX/tmppassfile +testit "kinit with passwd" $samba4kinit -e arcfour-hmac-md5 --password-file=$PREFIX/tmppassfile $TESTUSER@SAMBA.EXAMPLE.COM || failed=$(expr $failed + 1) +testit "ktpass" $samba4srcdir/scripting/bin/ktpass.sh --host LOCALDC --out $PREFIX/testuser.kt --princ $TESTUSER --pass "testp@ssw0Rd" --path-to-ldbsearch=$BINDIR/bin || failed=$(expr $failed + 1) + +rm -f $KRB5CCNAME + +testit "kinit with keytab" $samba4kinit -e arcfour-hmac-md5 --use-keytab -t $PREFIX/testuser.kt $TESTUSER@SAMBA.EXAMPLE.COM || failed=$(expr $failed + 1) + +rm -f $PREFIX/tmpccache $PREFIX/testuser.kt +exit $failed diff --git a/testprogs/blackbox/test_ldap_tls_reload.sh b/testprogs/blackbox/test_ldap_tls_reload.sh new file mode 100755 index 0000000..d0c9af1 --- /dev/null +++ b/testprogs/blackbox/test_ldap_tls_reload.sh @@ -0,0 +1,64 @@ +#!/bin/bash +# + +if [ $# -ne 3 ]; then + cat < ${object}" + r=$($ldbsearch $options $CONFIGURATION -H $p://$SERVER '(objectClass=*)' -b "${dn}" | grep 'dn: ') + n=$(echo "${r}" | grep 'dn: ' | wc -l) + c=$(echo "${r}" | grep "${object}" | wc -l) + + if [ $n -lt 1 ]; then + echo "Object not found by WKGUID" + failed=$(expr $failed + 1) + continue + fi + if [ $c -lt 1 ]; then + echo "Wrong object found by WKGUID: [${r}]" + failed=$(expr $failed + 1) + continue + fi + done + + return $failed +) + +wellknown_object_test 22B70C67D56E4EFB91E9300FCA3DC1AA ForeignSecurityPrincipals +st=$? +if [ x"$st" != x"0" ]; then + failed=$(expr $failed + $st) +fi +wellknown_object_test 2FBAC1870ADE11D297C400C04FD8D5CD Infrastructure +st=$? +if [ x"$st" != x"0" ]; then + failed=$(expr $failed + $st) +fi +wellknown_object_test AB1D30F3768811D1ADED00C04FD8D5CD System +st=$? +if [ x"$st" != x"0" ]; then + failed=$(expr $failed + $st) +fi +wellknown_object_test A361B2FFFFD211D1AA4B00C04FD7D83A Domain Controllers +st=$? +if [ x"$st" != x"0" ]; then + failed=$(expr $failed + $st) +fi +wellknown_object_test AA312825768811D1ADED00C04FD8D5CD Computers +st=$? +if [ x"$st" != x"0" ]; then + failed=$(expr $failed + $st) +fi +wellknown_object_test A9D1CA15768811D1ADED00C04FD8D5CD Users +st=$? +if [ x"$st" != x"0" ]; then + failed=$(expr $failed + $st) +fi + +echo "Getting HEX GUID/SID of $BASEDN" +HEXDN=$($ldbsearch $CONFIGURATION $options -b "$BASEDN" -H $p://$SERVER --scope=base "(objectClass=*)" --controls=extended_dn:1:0 distinguishedName | grep 'distinguishedName: ' | cut -d ' ' -f2-) +HEXGUID=$(echo "$HEXDN" | cut -d ';' -f1) +echo "HEXGUID[$HEXGUID]" + +echo "Getting STR GUID/SID of $BASEDN" +STRDN=$($ldbsearch $CONFIGURATION $options -b "$BASEDN" -H $p://$SERVER --scope=base "(objectClass=*)" --controls=extended_dn:1:1 distinguishedName | grep 'distinguishedName: ' | cut -d ' ' -f2-) +echo "STRDN: $STRDN" +STRGUID=$(echo "$STRDN" | cut -d ';' -f1) +echo "STRGUID[$STRGUID]" + +echo "Getting STR GUID/SID of $BASEDN" +STRDN=$($ldbsearch $CONFIGURATION $options -b "$BASEDN" -H $p://$SERVER --scope=base "(objectClass=*)" --controls=extended_dn:1:1 | grep 'dn: ' | cut -d ' ' -f2-) +echo "STRDN: $STRDN" +STRSID=$(echo "$STRDN" | cut -d ';' -f2) +echo "STRSID[$STRSID]" + +SPECIALDNS="$HEXGUID $STRGUID $STRSID" +for SPDN in $SPECIALDNS; do + echo "Search for $SPDN" + nentries=$($ldbsearch $options $CONFIGURATION -H $p://$SERVER --scope=base -b "$SPDN" '(objectClass=*)' | grep "dn: $BASEDN" | wc -l) + if [ $nentries -lt 1 ]; then + echo "Special search returned 0 items" + failed=$(expr $failed + 1) + fi +done + +echo "Search using OIDs instead of names" +nentries1=$($ldbsearch $options $CONFIGURATION -H $p://$SERVER '(objectClass=user)' name | grep "^name: " | wc -l) +nentries2=$($ldbsearch $options $CONFIGURATION -H $p://$SERVER '(2.5.4.0=1.2.840.113556.1.5.9)' name | grep "^name: " | wc -l) +if [ $nentries1 -lt 1 ]; then + echo "Error: Searching user via (objectClass=user): '$nentries1' < 1" + failed=$(expr $failed + 1) +fi +if [ $nentries2 -lt 1 ]; then + echo "Error: Searching user via (2.5.4.0=1.2.840.113556.1.5.9) '$nentries2' < 1" + failed=$(expr $failed + 1) +fi +if [ x"$nentries1" != x"$nentries2" ]; then + echo "Error: Searching user with OIDS[$nentries1] doesn't return the same as STRINGS[$nentries2]" + failed=$(expr $failed + 1) +fi + +exit $failed diff --git a/testprogs/blackbox/test_ldb_simple.sh b/testprogs/blackbox/test_ldb_simple.sh new file mode 100755 index 0000000..5f5f9b8 --- /dev/null +++ b/testprogs/blackbox/test_ldb_simple.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +if [ $# -lt 2 ]; then + cat </dev/null | sha1sum | cut -b 1-10) + +RUNDIR=$(pwd) +cd $BASEDIR +WORKDIR=$(mktemp -d -p .) +WORKDIR=$(basename $WORKDIR) +cp -a client/* $WORKDIR/ +sed -ri "s@(dir|directory) = (.*)/client/@\1 = \2/$WORKDIR/@" $WORKDIR/client.conf +sed -ri "s/netbios name = .*/netbios name = $HOSTNAME/" $WORKDIR/client.conf +rm -f $WORKDIR/private/secrets.tdb +cd $RUNDIR + +failed=0 + +net_tool="$BINDIR/net --configfile=$BASEDIR/$WORKDIR/client.conf --option=security=ads" + +# Load test functions +. $(dirname $0)/subunit.sh +. "$(dirname "${0}")/common_test_fns.inc" + +ldbadd=$(system_or_builddir_binary ldbadd "${BINDIR}") +ldbmodify=$(system_or_builddir_binary ldbmodify "${BINDIR}") +ldbdel=$(system_or_builddir_binary ldbdel "${BINDIR}") +ldbsearch=$(system_or_builddir_binary ldbsearch "${BINDIR}") + +testit "join" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +workgroup=$(awk '/workgroup =/ { print $NR }' "${BASEDIR}/${WORKDIR}/client.conf") +testit "local krb5.conf created" \ + test -r \ + "${BASEDIR}/${WORKDIR}/lockdir/smb_krb5/krb5.conf.${workgroup}" || + failed=$((failed + 1)) + +testit "testjoin" $VALGRIND $net_tool ads testjoin -P --use-kerberos=required || failed=$(expr $failed + 1) + +netbios=$(grep "netbios name" $BASEDIR/$WORKDIR/client.conf | cut -f2 -d= | awk '{$1=$1};1') + +testit "test setspn list $netbios" $VALGRIND $net_tool ads setspn list $netbios -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) +spn="foo" +testit_expect_failure "test setspn add illegal windows spn ($spn)" $VALGRIND $net_tool ads setspn add $spn -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +spn="foo/somehost.domain.com" +testit "test setspn add ($spn)" $VALGRIND $net_tool ads setspn add $spn -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +found=$($net_tool ads setspn list -U$DC_USERNAME%$DC_PASSWORD | grep $spn | wc -l) +testit "test setspn list shows the newly added spn ($spn)" test $found -eq 1 || failed=$(expr $failed + 1) + +up_spn=$(echo $spn | tr '[:lower:]' '[:upper:]') +testit_expect_failure "test setspn add existing (case-insensitive) spn ($spn)" $VALGRIND $net_tool ads setspn add $up_spn -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +testit "test setspn delete existing (case-insensitive) ($spn)" $VALGRIND $net_tool ads setspn delete $spn -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +found=$($net_tool ads setspn list -U$DC_USERNAME%$DC_PASSWORD | grep $spn | wc -l) +testit "test setspn list shows the newly deleted spn ($spn) is gone" test $found -eq 0 || failed=$(expr $failed + 1) + +testit "changetrustpw" $VALGRIND $net_tool ads changetrustpw || failed=$(expr $failed + 1) + +testit "leave" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +# Test with kerberos method = secrets and keytab +dedicated_keytab_file="$BASEDIR/$WORKDIR/test_net_ads_dedicated_krb5.keytab" +testit "join (dedicated keytab)" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + +testit "testjoin (dedicated keytab)" $VALGRIND $net_tool ads testjoin -P --use-kerberos=required || failed=$(expr $failed + 1) + +netbios=$(grep "netbios name" $BASEDIR/$WORKDIR/client.conf | cut -f2 -d= | awk '{$1=$1};1') +uc_netbios=$(echo $netbios | tr '[:lower:]' '[:upper:]') +lc_realm=$(echo $REALM | tr '[:upper:]' '[:lower:]') +fqdn="$netbios.$lc_realm" + +krb_princ="primary/instance@$REALM" +testit "test (dedicated keytab) add a fully qualified krb5 principal" $VALGRIND $net_tool ads keytab add $krb_princ -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + +found=$($net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $krb_princ | wc -l) + +testit "test (dedicated keytab) at least one fully qualified krb5 principal that was added is present in keytab" test $found -gt 1 || failed=$(expr $failed + 1) + +machinename="machine123" +testit "test (dedicated keytab) add a kerberos principal created from machinename to keytab" $VALGRIND $net_tool ads keytab add $machinename'$' -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) +search_str="$machinename\$@$REALM" +found=$($net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $search_str | wc -l) +testit "test (dedicated keytab) at least one krb5 principal created from $machinename added is present in keytab" test $found -gt 1 || failed=$(expr $failed + 1) + +service="nfs" +testit "test (dedicated keytab) add a $service service to keytab" $VALGRIND $net_tool ads keytab add $service -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + +search_str="$service/$fqdn@$REALM" +found=$($net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $search_str | wc -l) +testit "test (dedicated keytab) at least one (long form) krb5 principal created from service added is present in keytab" test $found -gt 1 || failed=$(expr $failed + 1) + +search_str="$service/$uc_netbios@$REALM" +found=$($net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $search_str | wc -l) +testit "test (dedicated keytab) at least one (shorter form) krb5 principal created from service added is present in keytab" test $found -gt 1 || failed=$(expr $failed + 1) + +spn_service="random_srv" +spn_host="somehost.subdomain.domain" +spn_port="12345" + +windows_spn="$spn_service/$spn_host" +testit "test (dedicated keytab) add a $windows_spn windows style SPN to keytab" $VALGRIND $net_tool ads keytab add $windows_spn -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + +search_str="$spn_service/$spn_host@$REALM" +found=$($net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $search_str | wc -l) +testit "test (dedicated keytab) at least one krb5 principal created from windown SPN added is present in keytab" test $found -gt 1 || failed=$(expr $failed + 1) + +windows_spn="$spn_service/$spn_host:$spn_port" +testit "test (dedicated keytab) add a $windows_spn windows style SPN to keytab" $VALGRIND $net_tool ads keytab add $windows_spn -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + +search_str="$spn_service/$spn_host@$REALM" +found=$($net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $search_str | wc -l) +testit "test (dedicated keytab) at least one krb5 principal created from windown SPN (with port) added is present in keytab" test $found -gt 1 || failed=$(expr $failed + 1) + +# keytab add shouldn't have written spn to AD +found=$($net_tool ads setspn list -U$DC_USERNAME%$DC_PASSWORD | grep $service | wc -l) +testit "test (dedicated keytab) spn is not written to AD (using keytab add)" test $found -eq 0 || failed=$(expr $failed + 1) + +ad_service="writetoad" +testit "test (dedicated keytab) add a $ad_service service to keytab (using add_update_ads" $VALGRIND $net_tool ads keytab add_update_ads $ad_service -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + +found=$($net_tool ads setspn list -U$DC_USERNAME%$DC_PASSWORD | grep $ad_service | wc -l) +testit "test (dedicated keytab) spn is written to AD (using keytab add_update_ads)" test $found -eq 2 || failed=$(expr $failed + 1) + +# test existence in keytab of service (previously added) pulled from SPN post +# 'keytab create' is now present in keytab file +testit "test (dedicated keytab) keytab created succeeds" $VALGRIND $net_tool ads keytab create -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) +found=$($net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $ad_service | wc -l) +testit "test (dedicated keytab) spn service that exists in AD (created via add_update_ads) is added to keytab file" test $found -gt 1 || failed=$(expr $failed + 1) + +found_ad=$($net_tool ads setspn list -U$DC_USERNAME%$DC_PASSWORD | grep $service | wc -l) +found_keytab=$($net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $service | wc -l) +# test after create that a spn that exists in the keytab but shouldn't +# be written to the AD. +testit "test spn service doesn't exist in AD but is present in keytab file after keytab create" test $found_ad -eq 0 -a $found_keytab -gt 1 || failed=$(expr $failed + 1) + +# SPN parser is very basic but does detect some illegal combination + +windows_spn="$spn_service/$spn_host:" +testit_expect_failure "test (dedicated keytab) fail to parse windows spn with missing port" $VALGRIND $net_tool ads keytab add $windows_spn -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + +windows_spn="$spn_service/$spn_host/" +testit_expect_failure "test (dedicated keytab) fail to parse windows spn with missing servicename" $VALGRIND $net_tool ads keytab add $windows_spn -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + +# now delete the keytab entries again... + +krb_princ="primary/instance@$REALM" +testit "test (dedicated keytab) delete a fully qualified krb5 principal" $VALGRIND $net_tool ads keytab delete $krb_princ -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + +found=`$net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $krb_princ | wc -l` + +testit "test (dedicated keytab) fully qualified krb5 principal was deleted and is no longer present in keytab" test $found -eq 0 || failed=$(expr $failed + 1) + +machinename="machine123" +testit "test (dedicated keytab) delete a kerberos principle created from machinename from keytab" $VALGRIND $net_tool ads keytab delete $machinename'$' -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) +search_str="$machinename\$@$REALM" +found=`$net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $search_str | wc -l` +testit "test (dedicated keytab) krb5 principal created from $machinename was deleted and is no longer present in keytab" test $found -eq 0 || failed=$(expr $failed + 1) + +service="nfs" +testit "test (dedicated keytab) delete a $service service to keytab" $VALGRIND $net_tool ads keytab delete $service -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + +search_str="$service" +found=`$net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $search_str | wc -l` +testit "test (dedicated keytab) krb5 principal created from service was deleted and is no longer present in keytab" test $found -eq 0 || failed=$(expr $failed + 1) + +spn_service="random_srv" +spn_host="somehost.subdomain.domain" +spn_port="12345" + +windows_spn="$spn_service/$spn_host" +testit "test (dedicated keytab) delete a $windows_spn windows style SPN from keytab" $VALGRIND $net_tool ads keytab delete $windows_spn -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + +search_str="$spn_service/$spn_host@$REALM" +found=`$net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $search_str | wc -l` +testit "test (dedicated keytab) krb5 principal created from windown SPN was deleted and is no longer present in keytab" test $found -eq 0 || failed=$(expr $failed + 1) + +windows_spn="$spn_service/$spn_host:$spn_port" +testit "test (dedicated keytab) delete a $windows_spn windows style SPN to keytab" $VALGRIND $net_tool ads keytab delete $windows_spn -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + +search_str="$spn_service/$spn_host@$REALM" +found=`$net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $search_str | wc -l` +testit "test (dedicated keytab) krb5 principal created from windown SPN (with port) was deleted and is no longer present in keytab" test $found -eq 0 || failed=$(expr $failed + 1) + +# keytab add shouldn't have written spn to AD +found=$($net_tool ads setspn list -U$DC_USERNAME%$DC_PASSWORD | grep $service | wc -l) +testit "test (dedicated keytab) spn is not written to AD (using keytab add)" test $found -eq 0 || failed=$(expr $failed + 1) + +ad_service="writetoad" +testit "test (dedicated keytab) delete a $ad_service service from keytab (used add_update_ads)" $VALGRIND $net_tool ads keytab delete $ad_service -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + +search_str="$ad_service" +found=`$net_tool ads keytab list -U$DC_USERNAME%$DC_PASSWORD --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" | grep $search_str | wc -l` +testit "test (dedicated keytab) spn is written to AD (using keytab add_update_ads) was deleted and is no longer present in keytab" test $found -eq 0 || failed=$(expr $failed + 1) +# still in ad +found=$($net_tool ads setspn list -U$DC_USERNAME%$DC_PASSWORD | grep $ad_service | wc -l) +testit "test (dedicated keytab) spn is written to AD (using keytab add_update_ads) is still in ad after deletion from keytab" test $found -eq 2 || failed=$(expr $failed + 1) + +testit "changetrustpw (dedicated keytab)" $VALGRIND $net_tool ads changetrustpw || failed=$(expr $failed + 1) + +testit "leave (dedicated keytab)" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +# if there is no keytab, try and create it +if [ ! -f $dedicated_keytab_file ]; then + if [ $(command -v ktutil) ] >/dev/null; then + printf "addent -password -p $DC_USERNAME@$REALM -k 1 -e rc4-hmac\n$DC_PASSWORD\nwkt $dedicated_keytab_file\n" | ktutil + fi +fi + +if [ -f $dedicated_keytab_file ]; then + testit "keytab list (dedicated keytab)" $VALGRIND $net_tool ads keytab list --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=$(expr $failed + 1) + testit "keytab list keytab specified on cmdline" $VALGRIND $net_tool ads keytab list $dedicated_keytab_file || failed=$(expr $failed + 1) +fi + +rm -f $dedicated_keytab_file + +testit_expect_failure "testjoin(not joined)" $VALGRIND $net_tool ads testjoin -P --use-kerberos=required || failed=$(expr $failed + 1) + +testit "join+kerberos" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC_PASSWORD --use-kerberos=required || failed=$(expr $failed + 1) + +testit "testjoin" $VALGRIND $net_tool ads testjoin -P --use-kerberos=required || failed=$(expr $failed + 1) + +testit "leave+kerberos" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD --use-kerberos=required || failed=$(expr $failed + 1) + +testit_expect_failure "testjoin(not joined)" $VALGRIND $net_tool ads testjoin -P --use-kerberos=required || failed=$(expr $failed + 1) + +testit "join+server" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC_PASSWORD -S$DC_SERVER || failed=$(expr $failed + 1) + +testit "leave+server" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD -S$DC_SERVER || failed=$(expr $failed + 1) + +testit_expect_failure "join+invalid_server" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC_PASSWORD -SINVALID || failed=$(expr $failed + 1) + +testit "join+server" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +testit_expect_failure "leave+invalid_server" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD -SINVALID || failed=$(expr $failed + 1) + +testit "testjoin user+password" $VALGRIND $net_tool ads testjoin -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +testit "leave+keep_account" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD --keep-account || failed=$(expr $failed + 1) + +base_dn="DC=addom,DC=samba,DC=example,DC=com" +computers_dn="CN=Computers,$base_dn" +testit "ldb check for existence of machine account" $ldbsearch -U$DC_USERNAME%$DC_PASSWORD -H ldap://$SERVER.$REALM --scope=base -b "cn=$HOSTNAME,$computers_dn" || failed=$(expr $failed + 1) + +dns_alias1="${netbios}_alias1.other.${lc_realm}" +dns_alias2="${netbios}_alias2.other2.${lc_realm}" +testit "join" $VALGRIND $net_tool --option=additionaldnshostnames=$dns_alias1,$dns_alias2 ads join -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +testit "testjoin" $VALGRIND $net_tool ads testjoin || failed=$(expr $failed + 1) + +testit_grep "check dNSHostName" $fqdn $VALGRIND $net_tool ads search -P samaccountname=$netbios\$ dNSHostName || failed=$(expr $failed + 1) +testit_grep "check SPN" ${uc_netbios}.${lc_realm} $VALGRIND $net_tool ads search -P samaccountname=$netbios\$ servicePrincipalName || failed=$(expr $failed + 1) + +testit_grep "dns alias SPN" $dns_alias1 $VALGRIND $net_tool ads search -P samaccountname=$netbios\$ servicePrincipalName || failed=$(expr $failed + 1) +testit_grep "dns alias SPN" $dns_alias2 $VALGRIND $net_tool ads search -P samaccountname=$netbios\$ servicePrincipalName || failed=$(expr $failed + 1) + +testit_grep "dns alias addl" $dns_alias1 $VALGRIND $net_tool ads search -P samaccountname=$netbios\$ msDS-AdditionalDnsHostName || failed=$(expr $failed + 1) +testit_grep "dns alias addl" $dns_alias2 $VALGRIND $net_tool ads search -P samaccountname=$netbios\$ msDS-AdditionalDnsHostName || failed=$(expr $failed + 1) + +# Test binary msDS-AdditionalDnsHostName like ones added by Windows DC +short_alias_file="$BASEDIR/$WORKDIR/short_alias_file" +printf 'short_alias\0$' >$short_alias_file +cat >$BASEDIR/$WORKDIR/tmpldbmodify < +# Copyright (C) 2006-2008 Andrew Bartlett + +if [ $# -lt 6 ]; then + cat </dev/null | sha1sum | cut -b 1-10) + +RUNDIR=$(pwd) +cd $BASEDIR +WORKDIR=$(mktemp -d -p .) +WORKDIR=$(basename $WORKDIR) +cp -a client/* $WORKDIR/ +sed -ri "s@(dir|directory) = (.*)/client/@\1 = \2/$WORKDIR/@" $WORKDIR/client.conf +sed -ri "s/netbios name = .*/netbios name = $HOSTNAME/" $WORKDIR/client.conf +rm -f $WORKDIR/private/secrets.tdb +cd $RUNDIR + +failed=0 + +net_tool="$BINDIR/net --configfile=$BASEDIR/$WORKDIR/client.conf --option=security=ads" + +# Load test functions +. $(dirname $0)/subunit.sh + +# This make sure we are able to join AD in FIPS mode with Kerberos (NTLM doesn't work in FIPS mode). +testit "join" $VALGRIND $net_tool ads join --use-kerberos=required -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +testit "testjoin" $VALGRIND $net_tool ads testjoin -P --use-kerberos=required || failed=$(expr $failed + 1) + +testit "changetrustpw" $VALGRIND $net_tool ads changetrustpw || failed=$(expr $failed + 1) + +testit "leave" $VALGRIND $net_tool ads leave --use-kerberos=required -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +rm -rf $BASEDIR/$WORKDIR + +exit $failed diff --git a/testprogs/blackbox/test_net_ads_search_server.sh b/testprogs/blackbox/test_net_ads_search_server.sh new file mode 100755 index 0000000..f8350c9 --- /dev/null +++ b/testprogs/blackbox/test_net_ads_search_server.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +if [ $# -lt 2 ]; then +cat </dev/null | sha1sum | cut -b 1-10) + +RUNDIR=$(pwd) +cd $BASEDIR +WORKDIR=$(mktemp -d -p .) +WORKDIR=$(basename $WORKDIR) +ODJFILE="$BASEDIR/$WORKDIR/odj_provision.txt" + +cp -a client/* $WORKDIR/ +sed -ri "s@(dir|directory) = (.*)/client/@\1 = \2/$WORKDIR/@" $WORKDIR/client.conf +sed -ri "s/netbios name = .*/netbios name = $HOSTNAME/" $WORKDIR/client.conf +rm -f $WORKDIR/private/secrets.tdb +cd $RUNDIR + +failed=0 + +net_tool="$BINDIR/net --configfile=$BASEDIR/$WORKDIR/client.conf --option=security=ads" +samba_texpect="$BINDIR/texpect" + +# Load test functions +. $(dirname $0)/subunit.sh + +netbios=$(grep "netbios name" $BASEDIR/$WORKDIR/client.conf | cut -f2 -d= | awk '{$1=$1};1') + +# 1. Test w/o dcname + +testit "provision without dcname" $VALGRIND $net_tool offlinejoin provision domain=$REALM machine_name=$netbios savefile=$ODJFILE -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +testit "requestodj" $VALGRIND $net_tool offlinejoin requestodj loadfile=$ODJFILE || failed=$(expr $failed + 1) + +testit "testjoin" $VALGRIND $net_tool ads testjoin -P --use-kerberos=required || failed=$(expr $failed + 1) + +rm -f $ODJFILE + +testit "leave" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +# 2. Test with dcname + +testit "provision with dcname" $VALGRIND $net_tool offlinejoin provision domain=$REALM machine_name=$netbios savefile=$ODJFILE dcname=$DC_SERVER -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +testit "requestodj" $VALGRIND $net_tool offlinejoin requestodj loadfile=$ODJFILE || failed=$(expr $failed + 1) + +testit "testjoin" $VALGRIND $net_tool ads testjoin -P --use-kerberos=required || failed=$(expr $failed + 1) + +rm -f $ODJFILE + +testit "leave" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +# 3. Test with defpwd + +testit "provision with dcname and default password" $VALGRIND $net_tool offlinejoin provision domain=$REALM machine_name=$netbios savefile=$ODJFILE dcname=$DC_SERVER defpwd -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +testit "requestodj" $VALGRIND $net_tool offlinejoin requestodj loadfile=$ODJFILE || failed=$(expr $failed + 1) + +testit "testjoin" $VALGRIND $net_tool ads testjoin -P --use-kerberos=required || failed=$(expr $failed + 1) + +rm -f $ODJFILE + +testit "leave" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + +test_compose_odj() { + local mode=$1 + local composeargv=() + + # Retrieve the necessary information to compose the ODJ blob + # The machine needs to be correctly joined at this point + local netbios_domain_name=$($net_tool ads lookup | awk -F': ' '/^Pre-Win2k Domain/ {print $2}') + local domain_sid=$($net_tool getdomainsid | awk -F': ' "/^SID for domain $netbios_domain_name/ {print \$2}") + local domain_guid=$($net_tool ads lookup | awk -F': ' '/^GUID/ {print $2}') + local forest_name=$($net_tool ads lookup | awk -F': ' '/^Forest/ {print $2}') + local dc_name=$($net_tool ads info | awk -F': ' '/^LDAP server name/ {print $2}') + local dc_address=$($net_tool ads info | awk -F': ' '/^LDAP server:/ {print $2}') + local ret=1 + local out="" + + composeargv=( \ + "domain_sid=${domain_sid}" \ + "domain_guid=${domain_guid}" \ + "forest_name=${forest_name}" \ + "-S ${dc_name}" \ + "-I ${dc_address}" \ + "savefile=${ODJFILE}" + ) + case $mode in + machacct) + cmd='$net_tool offlinejoin composeodj ${composeargv[@]} -P 2>&1' + out=$(eval $cmd) + ret=$? + ;; + stdinfd) + cmd='echo ${netbios} | $net_tool offlinejoin composeodj ${composeargv[@]} -U${netbios^^}\$ 2>&1' + out=$(PASSWD_FD=0 eval $cmd) + ret=$? + ;; + callback) + tmpfile=$BASEDIR/$WORKDIR/composeodj_password_script + cat >$tmpfile < + +if [ $# -lt 4 ]; then + cat < + +if [ $# -lt 9 ]; then + cat <$out +testit_grep "find my dn" msDS-SupportedEncryptionTypes cat $out || failed=$(expr $failed + 1) + +my_dn=$(cat $out | sed -n 's/^dn: //p') +my_encs=$(cat $out | sed -n 's/^msDS-SupportedEncryptionTypes: //p') +my_test_encs=$(expr $my_encs + 3) + +ldif="${PREFIX_ABS}/tmpldbmodify.ldif" + +cat >$ldif <$ldif < +# Copyright (c) 2006-2008 Andrew Bartlett +# Copyright (c) 2016 Andreas Schneider + +if [ $# -lt 7 ]; then + cat <$PREFIX/tmpsmbpasswdscript <$PREFIX/tmpsmbpasswdscript < +# Copyright (C) 2006-2008 Andrew Bartlett +# Copyright (C) 2022 Andreas Schneider + +if [ $# -lt 7 ]; then + cat <$ldif +rid=$(cat $ldif | sed -n 's/^objectSid: S-1-5-21-.*-.*-.*-//p') + +testit "search2" ${ldbsearch} -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 sAMAccountName="$testuser" dn || failed=$(expr $failed + 1) +ldif="${TMPDIR}/search2.ldif" +${ldbsearch} -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 sAMAccountName=$testuser dn >$ldif +user_dn=$(cat $ldif | sed -n 's/^dn: //p') + +ldif="${TMPDIR}/modify1.ldif" +cat >$ldif <$ldif < + +if [ $# -lt 8 ]; then + cat <$PREFIX/tmppassfile +testit "kinit impersonator" $samba4kinit -f --password-file=$PREFIX/tmppassfile $impersonator || failed=$(expr $failed + 1) + +testit "test S4U2Self with normal user" $samba4kgetcred --out-cache=$ocache --forwardable --impersonate=${USERNAME} $impersonator || failed=$(expr $failed + 1) +testit "test S4U2Proxy with normal user" $samba4kgetcred --out-cache=$ocache --delegation-credential-cache=${ocache} $target || failed=$(expr $failed + 1) + +testit "test S4U2Self with sensitive user" $samba4kgetcred --out-cache=$ocache --forwardable --impersonate=$princ $impersonator || failed=$(expr $failed + 1) +testit_expect_failure "test S4U2Proxy with sensitive user" $samba4kgetcred --out-cache=$ocache --delegation-credential-cache=${ocache} $target || failed=$(expr $failed + 1) + +rm -f $ocache +testit "unset not-delegated flag" $samba_tool user sensitive $princ off || failed=$(expr $failed + 1) + +testit "test S4U2Self after unsetting ND flag" $samba4kgetcred --out-cache=$ocache --forwardable --impersonate=$princ $impersonator || failed=$(expr $failed + 1) +testit "test S4U2Proxy after unsetting ND flag" $samba4kgetcred --out-cache=$ocache --delegation-credential-cache=${ocache} $target || failed=$(expr $failed + 1) + +testit "kinit user cache" $samba4kinit -c $ocache -f --password-file=$PREFIX/tmppassfile $USERNAME || failed=$(expr $failed + 1) +testit "get a ticket to impersonator" $samba4kgetcred -c $ocache --forwardable $impersonator || failed=$(expr $failed + 1) +testit "test S4U2Proxy evidence ticket obtained by TGS" $samba4kgetcred --out-cache=$ocache --delegation-credential-cache=${ocache} $target || failed=$(expr $failed + 1) + +echo $TRUST_PASSWORD >$PREFIX/tmppassfile +testit "kinit trust user cache" $samba4kinit -c $ocache -f --password-file=$PREFIX/tmppassfile $TRUST_USERNAME@$TRUST_REALM || failed=$(expr $failed + 1) +testit "get a ticket to impersonator for trust user" $samba4kgetcred -c $ocache --forwardable $impersonator || failed=$(expr $failed + 1) +testit "test S4U2Proxy evidence ticket obtained by TGS of trust user" $samba4kgetcred --out-cache=$ocache --delegation-credential-cache=${ocache} $target || failed=$(expr $failed + 1) + +echo $PASSWORD >$PREFIX/tmppassfile +testit "set not-delegated on impersonator" $samba_tool user sensitive $impersonator on || failed=$(expr $failed + 1) +testit "kinit user cache again" $samba4kinit -c $ocache -f --password-file=$PREFIX/tmppassfile $USERNAME || failed=$(expr $failed + 1) +testit "get a ticket to sensitive impersonator" $samba4kgetcred -c $ocache --forwardable $impersonator || failed=$(expr $failed + 1) +testit_expect_failure "test S4U2Proxy using received ticket" $samba4kgetcred --out-cache=$ocache --delegation-credential-cache=${ocache} $target || failed=$(expr $failed + 1) + +rm -f $ocache $PREFIX/tmpccache $PREFIX/tmppassfile +exit $failed diff --git a/testprogs/blackbox/test_samba-tool_ntacl.sh b/testprogs/blackbox/test_samba-tool_ntacl.sh new file mode 100755 index 0000000..1571b1a --- /dev/null +++ b/testprogs/blackbox/test_samba-tool_ntacl.sh @@ -0,0 +1,264 @@ +#!/bin/sh +# Blackbox tests for samba-tool ntacl get/set on member server +# Copyright (C) 2018 Björn Baumbach + +if [ $# -ne 3 ]; then + echo "Usage: test_samba-tool_ntacl.sh PREFIX DOMSID CONFIGURATION" + exit 1 +fi + +set -u +set -e + +PREFIX=$1 +domain_sid=$2 +CONFIGURATION=$3 + +failed=0 + +samba4bindir="$BINDIR" +samba_tool="$samba4bindir/samba-tool" + +testdirtop="$PREFIX/ntacl_testdirtop" +testfile="$testdirtop/testfile" +testdir1="$testdirtop/dir1" +testdir1f="$testdirtop/dir1/file" +testdir1l="$testdirtop/dir1/symlink" + +# acl from samba_tool/ntacl.py tests +acl="O:DAG:DUD:P(A;OICI;FA;;;DA)(A;OICI;FA;;;EA)(A;OICIIO;FA;;;CO)(A;OICI;FA;;;DA)(A;OICI;FA;;;SY)(A;OICI;0x001200a9;;;AU)(A;OICI;0x001200a9;;;ED)S:AI(OU;CIIDSA;WP;f30e3bbe-9ff0-11d1-b603-0000f80367c1;bf967aa5-0de6-11d0-a285-00aa003049e2;WD)(OU;CIIDSA;WP;f30e3bbf-9ff0-11d1-b603-0000f80367c1;bf967aa5-0de6-11d0-a285-00aa003049e2;WD)" +new_acl="O:S-1-5-21-2212615479-2695158682-2101375468-512G:S-1-5-21-2212615479-2695158682-2101375468-513D:P(A;OICI;FA;;;S-1-5-21-2212615479-2695158682-2101375468-512)(A;OICI;FA;;;S-1-5-21-2212615479-2695158682-2101375468-519)(A;OICIIO;FA;;;CO)(A;OICI;FA;;;S-1-5-21-2212615479-2695158682-2101375468-512)(A;OICI;FA;;;SY)(A;OICI;0x001200a9;;;AU)(A;OICI;0x001200a9;;;ED)S:AI(OU;CIIDSA;WP;f30e3bbe-9ff0-11d1-b603-0000f80367c1;bf967aa5-0de6-11d0-a285-00aa003049e2;WD)(OU;CIIDSA;WP;f30e3bbf-9ff0-11d1-b603-0000f80367c1;bf967aa5-0de6-11d0-a285-00aa003049e2;WD)" +new_domain_sid="S-1-5-21-2212615479-2695158682-2101375468" + +acl_without_padding=$(echo -n "$acl" | perl -p -e 's/0x00/0x/g') +new_acl_without_padding=$(echo -n "$new_acl" | perl -p -e 's/0x00/0x/g') + +. $(dirname $0)/subunit.sh + +test_get_acl() +{ + testfile="$1" + exptextedacl="$2" + shift 2 + + retacl=$($PYTHON $samba_tool ntacl get "$testfile" --as-sddl "$@") || return $? + + test "$retacl" = "$exptextedacl" +} + +test_set_acl() +{ + testfile="$1" + acl="$2" + shift 2 + + $PYTHON $samba_tool ntacl set "$acl" "$testfile" "$@" +} + +test_get_acl_ntvfs() +{ + testfile="$1" + exptextedacl="$2" + + retacl=$($PYTHON $samba_tool ntacl get "$testfile" --as-sddl --use-ntvfs --xattr-backend=tdb $CONFIGURATION) || return $? + + test "$retacl" = "$exptextedacl" +} + +test_set_acl_ntvfs() +{ + testfile="$1" + acl="$2" + + $PYTHON $samba_tool ntacl set "$acl" "$testfile" --use-ntvfs --xattr-backend=tdb $CONFIGURATION +} + +test_changedomsid() +{ + testfile="$1" + shift 1 + + $PYTHON $samba_tool ntacl changedomsid \ + "$domain_sid" "$new_domain_sid" "$testfile" \ + --service=tmp \ + $CONFIGURATION "$@" +} + +test_changedomsid_ntvfs() +{ + testfile="$1" + + $PYTHON $samba_tool ntacl changedomsid \ + "$domain_sid" "$new_domain_sid" "$testfile" \ + --use-ntvfs \ + --xattr-backend=tdb \ + $CONFIGURATION + + retacl=$($PYTHON $samba_tool ntacl get \ + "$testfile" \ + --as-sddl \ + --xattr-backend=tdb \ + --use-ntvfs \ + $CONFIGURATION) || return $? + test "$retacl" = "$new_acl_without_padding" +} + +# work around include error - s4-loadparm does not allow missing include files +# +# Unable to load file /home/bbaumba/src/git/samba/st/ad_member/lib/server.conf +# File "bin/python/samba/netcmd/__init__.py", line 183, in _run +# return self.run(*args, **kwargs) +# File "bin/python/samba/netcmd/ntacl.py", line 175, in run +# lp = sambaopts.get_loadparm() +# File "bin/python/samba/getopt.py", line 92, in get_loadparm +# self._lp.load(os.getenv("SMB_CONF_PATH")) +# Processing section "[global]" +touch "$(dirname $SMB_CONF_PATH)/error_inject.conf" +touch "$(dirname $SMB_CONF_PATH)/delay_inject.conf" + +mkdir "$testdirtop" +touch "$testfile" +mkdir "$testdir1" +touch "$testdir1f" +ln -s "$testfile" "$testdir1l" + +testit "set_ntacl" test_set_acl "$testfile" "$acl" || failed=$(expr $failed + 1) + +testit "get_ntacl" test_get_acl "$testfile" "$acl_without_padding" || failed=$(expr $failed + 1) + +testit "changedomsid" test_changedomsid "$testfile" || failed=$(expr $failed + 1) +testit "get_ntacl_after_changedomsid" \ + test_get_acl "$testfile" "$new_acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) + +testit "set_ntacl_ntvfs" test_set_acl_ntvfs "$testfile" "$acl" || failed=$(expr $failed + 1) +testit "get_ntacl_ntvfs" test_get_acl_ntvfs "$testfile" "$acl_without_padding" || \ + failed=$(expr $failed + 1) + +testit "changedomsid_ntvfs" test_changedomsid_ntvfs "$testfile" || failed=$(expr $failed + 1) + +testit_grep "set_ntacl_recursive1 testdirtop" \ + "ignored symlink: $testdirtop" \ + test_set_acl "$testdirtop" "$acl" --recursive || failed=$(expr $failed + 1) +testit "get_ntacl_after_set_recursive1 testdirtop" \ + test_get_acl "$testdirtop" "$acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_set_recursive1 testfile" \ + test_get_acl "$testfile" "$acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_set_recursive1 testdir1" \ + test_get_acl "$testdir1" "$acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_set_recursive1 testdir1f" \ + test_get_acl "$testdir1f" "$acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) + +testit_grep "changedomsid_recursive1 testdir1" \ + "ignored symlink: $testdir1l" \ + test_changedomsid "$testdir1" --recursive || failed=$(expr $failed + 1) +testit "get_ntacl_after_changedomsid_recursive1 testdirtop" \ + test_get_acl "$testdirtop" "$acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_changedomsid_recursive1 testfile" \ + test_get_acl "$testfile" "$acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_changedomsid_recursive1 testdir1" \ + test_get_acl "$testdir1" "$new_acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_changedomsid_recursive1 testdir1f" \ + test_get_acl "$testdir1f" "$new_acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) + +testit_grep "changedomsid_recursive2 testdirtop" \ + "ignored symlink: $testdir1l" \ + test_changedomsid "$testdirtop" --recursive || failed=$(expr $failed + 1) +testit "get_ntacl_after_changedomsid_recursive2 testdirtop" \ + test_get_acl "$testdirtop" "$new_acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_changedomsid_recursive2 testfile" \ + test_get_acl "$testfile" "$new_acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_changedomsid_recursive2 testdir1" \ + test_get_acl "$testdir1" "$new_acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_changedomsid_recursive2 testdir1f" \ + test_get_acl "$testdir1f" "$new_acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) + +testit_grep "set_ntacl_recursive2 testdir1" \ + "ignored symlink: $testdir1l" \ + test_set_acl "$testdir1" "$acl" --recursive || failed=$(expr $failed + 1) +testit "get_ntacl_after_set_recursive2 testdirtop" \ + test_get_acl "$testdirtop" "$new_acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_set_recursive2 testfile" \ + test_get_acl "$testfile" "$new_acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_set_recursive2 testdir1" \ + test_get_acl "$testdir1" "$acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_set_recursive2 testdir1f" \ + test_get_acl "$testdir1f" "$acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) + +testit_grep "set_ntacl_recursive3 testdir1" \ + "symlink: $testdir1l" \ + test_set_acl "$testdir1" "$acl" --recursive --follow-symlinks --verbose || failed=$(expr $failed + 1) +testit "get_ntacl_after_set_recursive3 testdirtop" \ + test_get_acl "$testdirtop" "$new_acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_set_recursive3 testfile" \ + test_get_acl "$testfile" "$acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_set_recursive3 testdir1" \ + test_get_acl "$testdir1" "$acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) +testit "get_ntacl_after_set_recursive3 testdir1f" \ + test_get_acl "$testdir1f" "$acl_without_padding" \ + --service=tmp \ + $CONFIGURATION \ + || failed=$(expr $failed + 1) + +rm -rf "$testdirtop" + +exit $failed diff --git a/testprogs/blackbox/test_samba_upgradedns.sh b/testprogs/blackbox/test_samba_upgradedns.sh new file mode 100755 index 0000000..388249d --- /dev/null +++ b/testprogs/blackbox/test_samba_upgradedns.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# Blackbox tests for the samba_upgradedns +# Copyright (C) 2006-2007 Jelmer Vernooij +# Copyright (C) 2006-2012 Andrew Bartlett + +if [ $# -lt 4 ]; then + cat < + +if [ $# -lt 12 ]; then + cat < + +if [ $# -lt 12 ]; then + cat <&1) + ret=$? + test x"$ret" = x"0" || { + echo "$out" + return 1 + } + + trust_sids=$(echo "$out" | grep '^tokenGroups' | grep "${TRUST_DOMSID}-" | wc -l) + test "$trust_sids" -ge "2" || { + echo "$out" + echo "Less than 2 sids from $TRUST_DOMAIN $TRUST_DOMSID" + return 1 + } + + domain_sids=$(echo "$out" | grep '^tokenGroups' | grep "${DOMSID}-" | wc -l) + test "$domain_sids" -ge "1" || { + echo "$out" + echo "Less than 1 sid from $DOMAIN $DOMSID" + return 1 + } + + builtin_sids=$(echo "$out" | grep '^tokenGroups' | grep "S-1-5-32-" | wc -l) + test "$builtin_sids" -ge "1" || { + echo "$out" + echo "Less than 1 sid from BUILTIN S-1-5-32" + return 1 + } + + # + # The following should always be present + # + # SID_WORLD(S-1-1-0) + # SID_NT_NETWORK(S-1-5-2) + # SID_NT_AUTHENTICATED_USERS(S-1-5-11) + # + required_sids="S-1-1-0 S-1-5-2 S-1-5-11 ${auth_sid}" + for sid in $required_sids; do + found=$(echo "$out" | grep "^tokenGroups: ${sid}$" | wc -l) + test x"$found" = x"1" || { + echo "$out" + echo "SID: ${sid} not found" + return 1 + } + done + + return 0 +} + +testit "Test token with kerberos" test_token "yes" "" || failed=$(expr $failed + 1) +# Check that SID_NT_NTLM_AUTHENTICATION(S-1-5-64-10) is added for NTLMSSP +testit "Test token with NTLMSSP" test_token "no" "S-1-5-64-10" || failed=$(expr $failed + 1) + +exit $failed diff --git a/testprogs/blackbox/test_trust_user_account.sh b/testprogs/blackbox/test_trust_user_account.sh new file mode 100755 index 0000000..94a3aa3 --- /dev/null +++ b/testprogs/blackbox/test_trust_user_account.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + cat < + +if [ $# -lt 12 ]; then + cat < +# + +if [ $# -lt 6 ]; then + cat <&1 || failed=$(expr $failed + 1) + +# We should be allowed to use NTLM for connecting +testit "rpclient.ntlm" $samba_rpcclient ncacn_np:$SERVER $opt -c "getusername" || failed=$(expr $failed + 1) + +GNUTLS_FORCE_FIPS_MODE=1 +export GNUTLS_FORCE_FIPS_MODE + +# Checks that testparm reports: Weak crypto is disallowed +testit_grep "testparm" "Weak crypto is disallowed" $samba_testparm --suppress-prompt $SMB_CONF_PATH 2>&1 || failed=$(expr $failed + 1) + +# We should not be allowed to use NTLM for connecting +testit_expect_failure "rpclient.ntlm" $samba_rpcclient ncacn_np:$SERVER $opt -c "getusername" || failed=$(expr $failed + 1) + +unset GNUTLS_FORCE_FIPS_MODE + +exit $failed diff --git a/testprogs/blackbox/test_weak_crypto_server.sh b/testprogs/blackbox/test_weak_crypto_server.sh new file mode 100755 index 0000000..963861b --- /dev/null +++ b/testprogs/blackbox/test_weak_crypto_server.sh @@ -0,0 +1,64 @@ +#!/bin/sh + +# +# Blackbox tests for weak crypto +# Copyright (c) 2020 Andreas Schneider +# + +if [ $# -lt 7 ]; then + cat <$testparm_stderr_output_path >/dev/null + + grep "Weak crypto is allowed" $testparm_stderr_output_path >/dev/null 2>&1 + if [ $ret -ne 0 ]; then + echo "Invalid crypto state:" + cat $testparm_stderr_output_path + rm -f $testparm_stderr_output_path + return 1 + fi + + rm -f $testparm_stderr_output_path + + return 0 +} + +unset GNUTLS_FORCE_FIPS_MODE + +# Checks that testparm reports: Weak crypto is disallowed +testit "testparm-weak-crypto" test_weak_crypto_allowed || failed=$(expr $failed + 1) + +# We should not be allowed to use NTLM for connecting +testit_expect_failure "rpclient.ntlm" $samba_rpcclient ncacn_np:${SERVER_IP}[ntlm] -U$USERNAME%$PASSWORD -c "getusername" || failed=$(expr $failed + 1) + +GNUTLS_FORCE_FIPS_MODE=1 +export GNUTLS_FORCE_FIPS_MODE + +exit $failed diff --git a/testprogs/blackbox/test_weak_disable_ntlmssp_ldap.sh b/testprogs/blackbox/test_weak_disable_ntlmssp_ldap.sh new file mode 100755 index 0000000..d2f1c8f --- /dev/null +++ b/testprogs/blackbox/test_weak_disable_ntlmssp_ldap.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# Blackbox tests for diabing NTLMSSP for ldap client connections +# Copyright (c) 2022 Pavel Filipenský + +if [ $# -lt 2 ]; then + cat <&1 || failed=$(expr $failed + 1) + +# We should be allowed to use NTLM for connecting +testit "net_ads_search.ntlm" $samba_net ads search --use-kerberos=off '(objectCategory=group)' sAMAccountName -U${USERNAME}%${PASSWORD} || failed=$(expr $failed + 1) + +GNUTLS_FORCE_FIPS_MODE=1 +export GNUTLS_FORCE_FIPS_MODE + +# Checks that testparm reports: Weak crypto is disallowed +testit_grep "testparm" "Weak crypto is disallowed" $samba_testparm --suppress-prompt $SMB_CONF_PATH 2>&1 || failed=$(expr $failed + 1) + +# We should not be allowed to use NTLM for connecting +testit_expect_failure_grep "net_ads_search.ntlm" "We can't fallback to NTLMSSP, weak crypto is disallowed." $samba_net ads search --use-kerberos=off -d10 '(objectCategory=group)' sAMAccountName -U${USERNAME}%${PASSWORD} || failed=$(expr $failed + 1) + +unset GNUTLS_FORCE_FIPS_MODE + +testok $0 $failed diff --git a/testprogs/blackbox/test_wintest.sh b/testprogs/blackbox/test_wintest.sh new file mode 100755 index 0000000..1015a1e --- /dev/null +++ b/testprogs/blackbox/test_wintest.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# Blackbox tests for testing against windows machines +# Copyright (C) 2008 Jim McDonough + +testwithconf() +{ + # define test variables, startup/shutdown scripts + . $1 + shift 1 + + if [ -n "$WINTEST_STARTUP" ]; then + . $WINTEST_STARTUP + fi + + testit "smbtorture" $smbtorture //$SERVER/$SHARE RAW-OPEN -W "$DOMAIN" -U"$USERNAME%$PASSWORD" "$@" || failed=$(expr $failed + 1) + + if [ -n "$WINTEST_SHUTDOWN" ]; then + . $WINTEST_SHUTDOWN + fi +} + +# main +# skip without WINTEST_CONF_DIR +if [ -z "$WINTEST_CONF_DIR" ]; then + exit 0 +fi + +unset SOCKET_WRAPPER_DIR + +failed=0 + +basedir=$(pwd) + +samba4bindir=$(dirname $0)/../../source4/bin +smbtorture=$samba4bindir/smbtorture + +. $(dirname $0)/subunit.sh + +for wintest_conf in $WINTEST_CONF_DIR/*.conf; do + testwithconf "$wintest_conf" "$@" +done + +exit $failed diff --git a/testprogs/blackbox/tfork.sh b/testprogs/blackbox/tfork.sh new file mode 100755 index 0000000..0f75a8c --- /dev/null +++ b/testprogs/blackbox/tfork.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +sleep 1 + +echo stdout >&1 +echo $1 >&1 +echo stderror >&2 + +# close stdout and stderror, but don't exit yet +exec 1>&- +exec 2>&- + +sleep 1 + +exit 0 diff --git a/testprogs/blackbox/tombstones-expunge.sh b/testprogs/blackbox/tombstones-expunge.sh new file mode 100755 index 0000000..a1a6d02 --- /dev/null +++ b/testprogs/blackbox/tombstones-expunge.sh @@ -0,0 +1,246 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + cat <$tmpldif1 + + $PYTHON $BINDIR/samba-tool domain tombstones expunge -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --current-time=2016-07-30 --tombstone-lifetime=4 >$tmpfile + if [ "$?" != "0" ]; then + return 1 + fi + diff -u $tmpfile $release_dir/expected-expunge-output.txt + if [ "$?" != "0" ]; then + return 1 + fi + + tmpldif2=$PREFIX_ABS/$RELEASE/expected-expunge-output2.txt.tmp2 + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --scope=base -b '' | grep highestCommittedUSN >$tmpldif2 + + diff -u $tmpldif1 $tmpldif2 + if [ "$?" != "0" ]; then + return 1 + fi +} + +add_dangling_link() +{ + ldif=$release_dir/add-dangling-link.ldif + TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb $ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +add_two_more_users() +{ + ldif=$release_dir/add-two-more-users.ldif + TZ=UTC $ldbadd -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +add_four_more_links() +{ + ldif=$release_dir/add-four-more-links.ldif + TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +add_unsorted_links() +{ + ldif=$release_dir/add-unsorted-links-step1.ldif + TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $ldif --relax + if [ "$?" != "0" ]; then + return 1 + fi + ldif=$release_dir/add-unsorted-links-step2.ldif + TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb $ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +remove_one_link() +{ + ldif=$release_dir/remove-one-more-link.ldif + TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +remove_one_user() +{ + ldif=$release_dir/remove-one-more-user.ldif + TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +check_match_rule_links() +{ + tmpldif=$PREFIX_ABS/$RELEASE/expected-match-rule-links.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(member:1.3.6.1.4.1.7165.4.5.2:=131139216000000000)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted no_attrs >$tmpldif + diff -u $tmpldif $release_dir/expected-match-rule-links.ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +check_match_rule_links_negative() +{ + $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(member:1.3.6.1.4.1.7165.4.5.2:=-131139216000000000)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted member +} + +check_match_rule_links_overflow() +{ + $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(member:1.3.6.1.4.1.7165.4.5.2:=18446744073709551617)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted member +} + +check_match_rule_links_null() +{ + $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(member:1.3.6.1.4.1.7165.4.5.2:=18446744\073709551617)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted member +} + +check_match_rule_links_hex() +{ + $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(member:1.3.6.1.4.1.7165.4.5.2:=abcd)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted member +} + +check_match_rule_links_hex2() +{ + $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(member:1.3.6.1.4.1.7165.4.5.2:=0xabcd)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted member +} + +check_match_rule_links_decimal() +{ + $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(member:1.3.6.1.4.1.7165.4.5.2:=131139216000000000.00)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted member +} + +check_match_rule_links_backlink() +{ + $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(memberOf:1.3.6.1.4.1.7165.4.5.2:=131139216000000000)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted memberOf +} + +check_match_rule_links_notlink() +{ + $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(samAccountName:1.3.6.1.4.1.7165.4.5.2:=131139216000000000)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted samAccountName +} + +check_expected_after_links() +{ + tmpldif=$PREFIX_ABS/$RELEASE/expected-links-after-expunge.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(|(cn=swimmers)(cn=leaders)(cn=helpers))' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --sorted member >$tmpldif + diff -u $tmpldif $release_dir/expected-links-after-expunge.ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +check_expected_after_deleted_links() +{ + tmpldif=$PREFIX_ABS/$RELEASE/expected-deleted-links-after-expunge.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(|(cn=swimmers)(cn=leaders)(cn=helpers))' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted member >$tmpldif + diff -u $tmpldif $release_dir/expected-deleted-links-after-expunge.ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +check_expected_after_objects() +{ + tmpldif=$PREFIX_ABS/$RELEASE/expected-objects-after-expunge.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(|(samaccountname=fred)(samaccountname=ddg)(samaccountname=usg)(samaccountname=user1)(samaccountname=user2))' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted samAccountName | grep sAMAccountName >$tmpldif + diff -u $tmpldif $release_dir/expected-objects-after-expunge.ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +check_expected_unsorted_links() +{ + tmpldif=$PREFIX_ABS/$RELEASE/expected-unsorted-links-after-expunge.ldif.tmp + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb '(name=unsorted-g)' --scope=sub -b DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted member >$tmpldif + diff -u $tmpldif $release_dir/expected-unsorted-links-after-expunge.ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + +remove_directory $PREFIX_ABS/${RELEASE} + +testit $RELEASE undump || failed=$(expr $failed + 1) +testit "add_two_more_users" add_two_more_users || failed=$(expr $failed + 1) +testit "add_four_more_links" add_four_more_links || failed=$(expr $failed + 1) +testit "add_dangling_link" add_dangling_link || failed=$(expr $failed + 1) +testit "remove_one_link" remove_one_link || failed=$(expr $failed + 1) +testit "remove_one_user" remove_one_user || failed=$(expr $failed + 1) +testit "check_match_rule_links" check_match_rule_links || failed=$(expr $failed + 1) +testit_expect_failure "check_match_rule_links_negative" check_match_rule_links_negative || failed=$(expr $failed + 1) +testit_expect_failure "check_match_rule_links_overflow" check_match_rule_links_overflow || failed=$(expr $failed + 1) +testit_expect_failure "check_match_rule_links_null" check_match_rule_links_null || failed=$(expr $failed + 1) +testit_expect_failure "check_match_rule_links_hex" check_match_rule_links_hex || failed=$(expr $failed + 1) +testit_expect_failure "check_match_rule_links_hex2" check_match_rule_links_hex2 || failed=$(expr $failed + 1) +testit_expect_failure "check_match_rule_links_decimal" check_match_rule_links_decimal || failed=$(expr $failed + 1) +testit_expect_failure "check_match_rule_links_backlink" check_match_rule_links_backlink || failed=$(expr $failed + 1) +testit_expect_failure "check_match_rule_links_notlink" check_match_rule_links_notlink || failed=$(expr $failed + 1) +testit "add_unsorted_links" add_unsorted_links || failed=$(expr $failed + 1) +testit "tombstones_expunge" tombstones_expunge || failed=$(expr $failed + 1) +testit "check_expected_after_deleted_links" check_expected_after_deleted_links || failed=$(expr $failed + 1) +testit "check_expected_after_links" check_expected_after_links || failed=$(expr $failed + 1) +testit "check_expected_after_objects" check_expected_after_objects || failed=$(expr $failed + 1) +testit "check_expected_unsorted_links" check_expected_unsorted_links || failed=$(expr $failed + 1) + +remove_directory $PREFIX_ABS/${RELEASE} + +exit $failed diff --git a/testprogs/blackbox/upgradeprovision-oldrelease.sh b/testprogs/blackbox/upgradeprovision-oldrelease.sh new file mode 100755 index 0000000..e8267ea --- /dev/null +++ b/testprogs/blackbox/upgradeprovision-oldrelease.sh @@ -0,0 +1,234 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + cat <$PREFIX_ABS/${RELEASE}_upgrade/etc/smb.conf + + cp -a $release_dir/private/*.keytab $PREFIX_ABS/${RELEASE}_upgrade_full/private/ + cp -a $release_dir/sysvol $PREFIX_ABS/${RELEASE}_upgrade_full/ + mkdir $PREFIX_ABS/${RELEASE}_upgrade_full/etc/ + sed -e "s|@@PREFIX@@|$PREFIX_ABS/${RELEASE}_upgrade_full|g" $release_dir/etc/smb.conf.template \ + >$PREFIX_ABS/${RELEASE}_upgrade_full/etc/smb.conf +} + +remove_dns_user() +{ + if [ x$RELEASE != x"release-4-0-0" ]; then + # This is done, because otherwise the upgrdeprovision will not run without --full + ${ldbdel} -H tdb://$PREFIX_ABS/${RELEASE}_upgrade/private/sam.ldb cn=dns,cn=users,dc=${RELEASE},dc=samba,dc=corp + fi +} + +reindex() +{ + $PYTHON $BINDIR/samba-tool dbcheck --reindex -H tdb://$PREFIX_ABS/${RELEASE}_upgrade/private/sam.ldb "$@" +} + +# This should 'fail', because it returns the number of modified records +dbcheck() +{ + $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}_upgrade/private/sam.ldb "$@" +} + +dbcheck_clean() +{ + $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs -H tdb://$PREFIX_ABS/${RELEASE}_upgrade/private/sam.ldb "$@" +} + +# This should 'fail', because it returns the number of modified records +dbcheck_full() +{ + $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}_upgrade_full/private/sam.ldb "$@" +} + +dbcheck_full_clean() +{ + $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs -H tdb://$PREFIX_ABS/${RELEASE}_upgrade_full/private/sam.ldb "$@" +} + +# This checks that after the upgrade, the well known ACLs are correct, so this reset should not want to do anything +dbcheck_full_clean_well_known_acls() +{ + $PYTHON $BINDIR/samba-tool dbcheck --reset-well-known-acls --cross-ncs -H tdb://$PREFIX_ABS/${RELEASE}_upgrade_full/private/sam.ldb "$@" +} + +upgradeprovision() +{ + # bring the really old Samba schema in line with a more recent 2008R2 schema + $PYTHON $BINDIR/samba_upgradeprovision --configfile="$PREFIX_ABS/${RELEASE}_upgrade/etc/smb.conf" --debugchange + + # on top of this, also apply 2008R2 changes we accidentally missed in the past + $PYTHON $BINDIR/samba-tool domain schemaupgrade -H tdb://$PREFIX_ABS/${RELEASE}_upgrade/private/sam.ldb --ldf-file=samba-4.7-missing-for-schema45.ldif,fix-forest-rev.ldf + + # add missing domain prep for 2008R2 + $PYTHON $BINDIR/samba-tool domain functionalprep -H tdb://$PREFIX_ABS/${RELEASE}_upgrade/private/sam.ldb --domain --function-level 2008_R2 +} + +upgradeprovision_full() +{ + # add missing domain prep for 2008R2 + $PYTHON $BINDIR/samba-tool domain functionalprep -H tdb://$PREFIX_ABS/${RELEASE}_upgrade_full/private/sam.ldb --domain --function-level 2008_R2 + + $PYTHON $BINDIR/samba_upgradeprovision --configfile="$PREFIX_ABS/${RELEASE}_upgrade_full/etc/smb.conf" --full --debugchange +} + +samba_upgradedns() +{ + $PYTHON $BINDIR/samba_upgradedns --dns-backend=SAMBA_INTERNAL --configfile="$PREFIX_ABS/${RELEASE}_upgrade_full/etc/smb.conf" +} + +referenceprovision() +{ + $PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=SAMBA --host-name=ares --realm=${RELEASE}.samba.corp --targetdir=$PREFIX_ABS/${RELEASE}_upgrade_reference --use-ntvfs --host-ip=127.0.0.1 --host-ip6=::1 --function-level=2003 --base-schema=2008_R2_old +} + +ldapcmp() +{ + if [ x$RELEASE != x"alpha13" ]; then + $PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/${RELEASE}_upgrade_reference/private/sam.ldb tdb://$PREFIX_ABS/${RELEASE}_upgrade/private/sam.ldb --two --skip-missing-dn --filter=dnsRecord,displayName,msDS-SupportedEncryptionTypes,servicePrincipalName + fi +} + +ldapcmp_full() +{ + $PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/${RELEASE}_upgrade_reference/private/sam.ldb tdb://$PREFIX_ABS/${RELEASE}_upgrade_full/private/sam.ldb --two --filter=dNSProperty,dnsRecord,cn,displayName,versionNumber,systemFlags,msDS-HasInstantiatedNCs,servicePrincipalName --skip-missing-dn +} + +ldapcmp_sd() +{ + $PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/${RELEASE}_upgrade_reference/private/sam.ldb tdb://$PREFIX_ABS/${RELEASE}_upgrade/private/sam.ldb --two --sd --skip-missing-dn +} + +ldapcmp_full_sd() +{ + $PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/${RELEASE}_upgrade_reference/private/sam.ldb tdb://$PREFIX_ABS/${RELEASE}_upgrade_full/private/sam.ldb --two --sd --skip-missing-dn +} + +remove_directory $PREFIX_ABS/${RELEASE}_upgrade +remove_directory $PREFIX_ABS/${RELEASE}_upgrade_full +remove_directory $PREFIX_ABS/${RELEASE}_upgrade_reference + +testit $RELEASE undump || failed=$(expr $failed + 1) +testit "remove_dns_user" remove_dns_user || failed=$(expr $failed + 1) +testit "upgradeprovision" upgradeprovision || failed=$(expr $failed + 1) +testit "upgradeprovision_full" upgradeprovision_full || failed=$(expr $failed + 1) +testit "reindex" reindex || failed=$(expr $failed + 1) +testit_expect_failure "dbcheck" dbcheck || failed=$(expr $failed + 1) +testit_expect_failure "dbcheck_full" dbcheck_full || failed=$(expr $failed + 1) +testit "dbcheck_clean" dbcheck_clean || failed=$(expr $failed + 1) +testit "dbcheck_full_clean" dbcheck_full_clean || failed=$(expr $failed + 1) +testit "dbcheck_full_clean_well_known_acls" dbcheck_full_clean_well_known_acls || failed=$(expr $failed + 1) +testit "referenceprovision" referenceprovision || failed=$(expr $failed + 1) +testit "samba_upgradedns" samba_upgradedns || failed=$(expr $failed + 1) +testit "ldapcmp" ldapcmp || failed=$(expr $failed + 1) +testit "ldapcmp_sd" ldapcmp_sd || failed=$(expr $failed + 1) +testit "ldapcmp_full_sd" ldapcmp_full_sd || failed=$(expr $failed + 1) + +remove_directory $PREFIX_ABS/${RELEASE}_upgrade +remove_directory $PREFIX_ABS/${RELEASE}_upgrade_full +remove_directory $PREFIX_ABS/${RELEASE}_upgrade_reference + +exit $failed diff --git a/testprogs/blackbox/wintest/wintest.conf b/testprogs/blackbox/wintest/wintest.conf new file mode 100644 index 0000000..d140366 --- /dev/null +++ b/testprogs/blackbox/wintest/wintest.conf @@ -0,0 +1,7 @@ +#export WINTEST_STARTUP="/tmp/startup client" +#export WINTEST_SHUTDOWN=/tmp/shutdown client" +export DOMAIN="client" +export USERNAME="administrator" +export PASSWORD="samba" +export SERVER="192.168.213.161" +export SHARE="c\$" \ No newline at end of file diff --git a/testprogs/win32/midltests/Makefile b/testprogs/win32/midltests/Makefile new file mode 100644 index 0000000..ded98e9 --- /dev/null +++ b/testprogs/win32/midltests/Makefile @@ -0,0 +1,16 @@ + +all: + @echo "nmake targets:" + @echo " clean" + @echo " simple" + @echo " tcp" + +clean: + @call nmake /f Makefile.simple /A /NOLOGO clean + @call nmake /f Makefile.tcp /A /NOLOGO clean + +simple: + @call nmake /f Makefile.simple /A /NOLOGO all + +tcp: + @call nmake /f Makefile.tcp /A /NOLOGO all diff --git a/testprogs/win32/midltests/Makefile.simple b/testprogs/win32/midltests/Makefile.simple new file mode 100644 index 0000000..ec4a542 --- /dev/null +++ b/testprogs/win32/midltests/Makefile.simple @@ -0,0 +1,27 @@ +INCLUDES=-I +CFLAGS=$(INCLUDES) -Zi -D_WIN32_WINNT=0x502 +LIBS=rpcrt4.lib + +all: midltests_simple.exe + +clean: + del *~ *.obj *.exe midltests.h midltests_s.c midltests_c.c + +#MIDL_ARGS=/target NT50 +MIDL_ARGS=/Os /prefix client cli_ /prefix server srv_ /prefix switch swi_ +midltests.h midltests_s.c midltests_c.c: midltests.idl midltests.acf + midl $(MIDL_ARGS) /acf midltests.acf midltests.idl + +MIDLTESTS_OBJ = midltests_simple.obj midltests_s_m.obj midltests_c_m.obj midltests_marshall.obj utils.obj +midltests_simple.exe: $(MIDLTESTS_OBJ) + $(CC) -o midltests_simple.exe $(MIDLTESTS_OBJ) $(LIBS) + +midltests_simple.obj: midltests.h midltests.idl +midltests_c_m.c: midltests_c.c +midltests_s_m.c: midltests_s.c + +midltests_simple.obj: midltests.h midltests.idl midltests_simple.c +midltests_s_m.obj: midltests_marshall.h midltests_s.c midltests_s_m.c +midltests_c_m.obj: midltests_marshall.h midltests_c.c midltests_c_m.c +midltests_marshall.obj: midltests.h midltests_marshall.c +utils.obj: midltests.h utils.c diff --git a/testprogs/win32/midltests/Makefile.tcp b/testprogs/win32/midltests/Makefile.tcp new file mode 100644 index 0000000..19c1f11 --- /dev/null +++ b/testprogs/win32/midltests/Makefile.tcp @@ -0,0 +1,22 @@ +INCLUDES=-I +CFLAGS=$(INCLUDES) -Zi -D_WIN32_WINNT=0x610 +LIBS=rpcrt4.lib ws2_32.lib + +all: midltests_tcp.exe + +clean: + del *~ *.obj *.exe midltests.h midltests_s.c midltests_c.c + +MIDL_ARGS=/target NT60 /prefix client cli_ /prefix server srv_ /prefix switch swi_ +midltests.h midltests_s.c midltests_c.c: midltests.idl midltests.acf + midl $(MIDL_ARGS) /acf midltests.acf midltests.idl + +MIDLTESTS_OBJ = midltests_tcp.obj midltests_s.obj midltests_c.obj midltests_marshall.obj utils.obj +midltests_tcp.exe: $(MIDLTESTS_OBJ) + $(CC) -o midltests_tcp.exe $(MIDLTESTS_OBJ) $(LIBS) + +midltests_tcp.obj: midltests.h midltests.idl + +midltests_tcp.obj: midltests.h midltests.idl midltests_tcp.c +midltests_marshall.obj: midltests.h midltests_marshall.c +utils.obj: midltests.h utils.c diff --git a/testprogs/win32/midltests/invalid/README.txt b/testprogs/win32/midltests/invalid/README.txt new file mode 100644 index 0000000..f10cc15 --- /dev/null +++ b/testprogs/win32/midltests/invalid/README.txt @@ -0,0 +1,3 @@ +This directory contains IDL files which give errors, +when they're compiled as midltests.idl. + diff --git a/testprogs/win32/midltests/invalid/midltests_pipe_struct_union_01.idl b/testprogs/win32/midltests/invalid/midltests_pipe_struct_union_01.idl new file mode 100644 index 0000000..517806b --- /dev/null +++ b/testprogs/win32/midltests/invalid/midltests_pipe_struct_union_01.idl @@ -0,0 +1,279 @@ +#ifndef MIDLTESTS_C_CODE + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef pipe char pipe_char; + typedef pipe hyper pipe_hyper; + typedef struct { + long l; + short s; + [switch_is(l)] union { + [case(0)]; + [case(1)] char c; + [case(2)] short s; + [case(4)] long l; + [case(8)] hyper h; + } u; + } structtype; + typedef pipe structtype pipe_structtype; + + struct msg { + long l; + [size_is(l)] char *m; + }; + + long midltests_fn( + [out,ref] struct msg *out1, + [out,ref] pipe_structtype *outp, + [in,ref] pipe_structtype *inp, + [in] struct msg in1 + ); + + long midltests_ping( [in] struct msg in1); + +} + +#elif MIDLTESTS_C_CODE + +struct pipe_char_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_char_pull( + char * _state, + unsigned char * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_char_push( + char * _state, + unsigned char * buf, + unsigned long ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_char_alloc( + char * _state, + unsigned long bsize, + unsigned char * * buf, + unsigned long * bcount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} + +struct pipe_hyper_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_hyper_pull( + char * _state, + hyper * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_hyper_push( + char * _state, + hyper * buf, + unsigned long ecount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_hyper_alloc( + char * _state, + unsigned long bsize, + hyper * * buf, + unsigned long * bcount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} +struct pipe_structtype_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_structtype_pull( + char * _state, + structtype * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_structtype_push( + char * _state, + structtype * buf, + unsigned long ecount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_structtype_alloc( + char * _state, + unsigned long bsize, + structtype * * buf, + unsigned long * bcount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} +static void midltests(void) +{ + struct msg out1; + unsigned char out1b[3]; + struct pipe_structtype_state outs; + pipe_structtype outp; + struct pipe_structtype_state ins; + pipe_structtype inp; + struct msg in1; + unsigned char in1b[3]; + + in1.l = sizeof(in1b); + memset(&in1b, 0xAA, sizeof(in1b)); + in1.m = in1b; + + memset(&outs, 0, sizeof(outs)); + outs.name = "outp"; + memset(&outp, 0, sizeof(outp)); + outp.pull = pipe_structtype_pull; + outp.push = pipe_structtype_push; + outp.alloc = pipe_structtype_alloc; + outp.state = (char *)&outs; + + memset(&ins, 0, sizeof(ins)); + ins.name = "inp"; + ins.count = 1; + memset(&inp, 0, sizeof(inp)); + inp.pull = pipe_structtype_pull; + inp.push = pipe_structtype_push; + inp.alloc = pipe_structtype_alloc; + inp.state = (char *)&ins; + + out1.l = sizeof(out1b); + memset(&out1b, 0xFF, sizeof(out1b)); + out1.m = out1b; + + cli_midltests_ping(in1); + cli_midltests_fn(&out1, outp, inp, in1); +} + +long srv_midltests_fn( + /* [ref][out] */ struct msg *out1, + /* [out] */ pipe_structtype outp, + /* [in] */ pipe_structtype inp, + /* [in] */ struct msg in1) +{ + structtype inb[500]; + unsigned long inb_len = 0; + structtype *outb = NULL; + unsigned long outb_size = 0; + unsigned long outb_len = 0; + + printf("srv_midltests_fn: Start\n"); + + do { + inp.pull(inp.state, inb, sizeof(inb), &inb_len); + printf("pull inp_len[%u]\n", inb_len); + } while (inb_len > 0); + + outb_size = 5; + do { + outp.alloc(outp.state, outb_size, &outb, &outb_len); + memset(outb, 0xCC, outb_len * sizeof(*outb)); + outp.push(outp.state, outb, outb_len); + printf("push outb_len[%u]\n", outb_len); + //Sleep(1000); + outb_size--; + } while (outb_len > 0); + + out1->l = 3; + out1->m = (unsigned char *)malloc(out1->l); + memset(out1->m, 0xBB, out1->l); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +long srv_midltests_ping( + /* [in] */ struct msg in1) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} +#endif diff --git a/testprogs/win32/midltests/invalid/midltests_pipe_struct_union_01.txt b/testprogs/win32/midltests/invalid/midltests_pipe_struct_union_01.txt new file mode 100644 index 0000000..46f8de5 --- /dev/null +++ b/testprogs/win32/midltests/invalid/midltests_pipe_struct_union_01.txt @@ -0,0 +1,17 @@ + +Microsoft (R) Program Maintenance Utility Version 10.00.30319.01 +Copyright (C) Microsoft Corporation. All rights reserved. + + midl /target NT60 /prefix client cli_ /prefix server srv_ /prefix switch swi_ /acf midltests.acf midltests.idl +Microsoft (R) 32b/64b MIDL Compiler Version 7.00.0555 +Copyright (c) Microsoft Corporation. All rights reserved. +64 bit Processing .\midltests.idl +midltests.idl +64 bit Processing .\midltests.acf +midltests.acf +.\midltests.idl(34) : error MIDL2028 : feature not implemented : pipes can't contain unions [ Type 'pipe_structtype' ( Parameter 'outp' ) ] +.\midltests.idl(34) : error MIDL2028 : feature not implemented : pipes can't contain unions [ Type 'pipe_structtype' ( Parameter 'inp' ) ] +NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\x64\midl.EXE"' : return code '0x8a6' +Stop. +NMAKE : fatal error U1077: 'call' : return code '0x2' +Stop. diff --git a/testprogs/win32/midltests/midltests.acf b/testprogs/win32/midltests/midltests.acf new file mode 100644 index 0000000..a04bb5d --- /dev/null +++ b/testprogs/win32/midltests/midltests.acf @@ -0,0 +1,6 @@ +[ + implicit_handle (handle_t midltests_IfHandle) +] +interface midltests +{ +} diff --git a/testprogs/win32/midltests/midltests.idl b/testprogs/win32/midltests/midltests.idl new file mode 100644 index 0000000..0c0bbf8 --- /dev/null +++ b/testprogs/win32/midltests/midltests.idl @@ -0,0 +1,51 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + long midltests_fn( + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + cli_midltests_fn(); +} + +long srv_midltests_fn(void) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/midltests_c_m.c b/testprogs/win32/midltests/midltests_c_m.c new file mode 100644 index 0000000..facf735 --- /dev/null +++ b/testprogs/win32/midltests/midltests_c_m.c @@ -0,0 +1,2 @@ +#include "midltests_marshall.h" +#include "midltests_c.c" diff --git a/testprogs/win32/midltests/midltests_marshall.c b/testprogs/win32/midltests/midltests_marshall.c new file mode 100644 index 0000000..f0fc78a --- /dev/null +++ b/testprogs/win32/midltests/midltests_marshall.c @@ -0,0 +1,125 @@ +/* + MIDLTESTS client. + + Copyright (C) Stefan Metzmacher 2008 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include +#include +#include +#include "midltests.h" + +#define MIN(a,b) ((a)<(b)?(a):(b)) +static void print_asc(const unsigned char *buf,int len) +{ + int i; + for (i=0;i8) printf(" "); + while (n--) printf(" "); + n = MIN(8,i%16); + print_asc(&buf[i-(i%16)],n); printf( " " ); + n = (i%16) - n; + if (n>0) print_asc(&buf[i-n],n); + printf("\n"); + } +} + +#if _WIN32_WINNT < 0x600 + +void NdrGetBufferMarshall(PMIDL_STUB_MESSAGE stubmsg, unsigned long len, RPC_BINDING_HANDLE hnd) +{ + stubmsg->RpcMsg->Buffer = HeapAlloc(GetProcessHeap(), 0, len); + memset(stubmsg->RpcMsg->Buffer, 0xef, len); + stubmsg->RpcMsg->BufferLength = len; + stubmsg->Buffer = stubmsg->RpcMsg->Buffer; + stubmsg->BufferLength = stubmsg->RpcMsg->BufferLength; + stubmsg->fBufferValid = TRUE; +} + +void __RPC_STUB midltests_midltests_fn(PRPC_MESSAGE _pRpcMessage); + +void NdrSendReceiveMarshall(PMIDL_STUB_MESSAGE StubMsg, unsigned char *buffer) +{ + unsigned long DataRepresentation; + + StubMsg->RpcMsg->BufferLength = buffer - (unsigned char *)StubMsg->RpcMsg->Buffer; + + printf("[in] Buffer[%d/%d]\n", + StubMsg->RpcMsg->BufferLength, StubMsg->BufferLength); + dump_data(StubMsg->RpcMsg->Buffer, StubMsg->RpcMsg->BufferLength); + + DataRepresentation = StubMsg->RpcMsg->DataRepresentation; + StubMsg->RpcMsg->DataRepresentation = NDR_LOCAL_DATA_REPRESENTATION; + midltests_midltests_fn(StubMsg->RpcMsg); + StubMsg->RpcMsg->DataRepresentation = DataRepresentation; + + StubMsg->BufferLength = StubMsg->RpcMsg->BufferLength; + StubMsg->BufferStart = StubMsg->RpcMsg->Buffer; + StubMsg->BufferEnd = StubMsg->BufferStart + StubMsg->BufferLength; + StubMsg->Buffer = StubMsg->BufferStart; + + printf("[out] Buffer[%d]\n", + StubMsg->RpcMsg->BufferLength); + dump_data(StubMsg->RpcMsg->Buffer, StubMsg->RpcMsg->BufferLength); +} + +void NdrServerInitializeNewMarshall(PRPC_MESSAGE pRpcMsg, + PMIDL_STUB_MESSAGE pStubMsg, + PMIDL_STUB_DESC pStubDesc) +{ + memset(pStubMsg, 0, sizeof(*pStubMsg)); + pStubMsg->RpcMsg = pRpcMsg; + pStubMsg->Buffer = pStubMsg->BufferStart = pRpcMsg->Buffer; + pStubMsg->BufferEnd = pStubMsg->Buffer + pRpcMsg->BufferLength; + pStubMsg->BufferLength = pRpcMsg->BufferLength; + pStubMsg->pfnAllocate = pStubDesc->pfnAllocate; + pStubMsg->pfnFree = pStubDesc->pfnFree; + pStubMsg->StubDesc = pStubDesc; + pStubMsg->dwDestContext = MSHCTX_DIFFERENTMACHINE; +} + +RPC_STATUS WINAPI I_RpcGetBufferMarshall(PRPC_MESSAGE RpcMsg) +{ + RpcMsg->Buffer = HeapAlloc(GetProcessHeap(), 0, RpcMsg->BufferLength); + memset(RpcMsg->Buffer, 0xcd, RpcMsg->BufferLength); + return 0; +} + +#endif /* _WIN32_WINNT < 0x600 */ diff --git a/testprogs/win32/midltests/midltests_marshall.h b/testprogs/win32/midltests/midltests_marshall.h new file mode 100644 index 0000000..8bb59b9 --- /dev/null +++ b/testprogs/win32/midltests/midltests_marshall.h @@ -0,0 +1,19 @@ +#include "rpc.h" +#include "rpcndr.h" + +void dump_data(const unsigned char *buf1,int len); + +#if _WIN32_WINNT < 0x600 +#define NdrSendReceive NdrSendReceiveMarshall +void NdrSendReceiveMarshall(PMIDL_STUB_MESSAGE stubmsg, unsigned char *buffer); +#define NdrGetBuffer NdrGetBufferMarshall +void NdrGetBufferMarshall(PMIDL_STUB_MESSAGE stubmsg, unsigned long len, RPC_BINDING_HANDLE hnd); +#define NdrServerInitializeNew NdrServerInitializeNewMarshall +void NdrServerInitializeNewMarshall(PRPC_MESSAGE pRpcMsg, + PMIDL_STUB_MESSAGE pStubMsg, + PMIDL_STUB_DESC pStubDesc); +#define I_RpcGetBuffer I_RpcGetBufferMarshall +RPC_STATUS WINAPI I_RpcGetBufferMarshall(PRPC_MESSAGE pMsg); + +#endif /* _WIN32_WINNT < 0x600 */ + diff --git a/testprogs/win32/midltests/midltests_s_m.c b/testprogs/win32/midltests/midltests_s_m.c new file mode 100644 index 0000000..7e0862d --- /dev/null +++ b/testprogs/win32/midltests/midltests_s_m.c @@ -0,0 +1,2 @@ +#include "midltests_marshall.h" +#include "midltests_s.c" diff --git a/testprogs/win32/midltests/midltests_simple.c b/testprogs/win32/midltests/midltests_simple.c new file mode 100644 index 0000000..61d4ce0 --- /dev/null +++ b/testprogs/win32/midltests/midltests_simple.c @@ -0,0 +1,42 @@ +/* + MIDLTESTS client. + + Copyright (C) Stefan Metzmacher 2008 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include +#include +#include +#include "midltests.h" + +#define MIDLTESTS_C_CODE 1 +#include "midltests.idl" + +int main(int argc, char **argv) +{ + int ret; + + midltests_IfHandle = NULL; + + RpcTryExcept { + midltests(); + } RpcExcept(1) { + ret = RpcExceptionCode(); + printf("Runtime error 0x%x\n", ret); + } RpcEndExcept + + return ret; +} diff --git a/testprogs/win32/midltests/midltests_tcp.c b/testprogs/win32/midltests/midltests_tcp.c new file mode 100644 index 0000000..3046f6d --- /dev/null +++ b/testprogs/win32/midltests/midltests_tcp.c @@ -0,0 +1,646 @@ +/* + MIDLTESTS client. + + Copyright (C) Stefan Metzmacher 2008 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include +#include +#include +#include +#include "midltests.h" + +#ifndef _M_AMD64 +#error "please run 'vcvarsall.bat amd64' -midltests_tcp needs 64-bit support!" +#endif + +#define MIDLTESTS_C_CODE 1 +#include "midltests.idl" + +#ifndef LISTEN_IP +#define LISTEN_IP "127.0.0.1" +#endif + +#ifndef FORWARD_IP +#define FORWARD_IP "127.0.0.1" +#endif + +#ifndef CONNECT_IP +#define CONNECT_IP "127.0.0.1" +#endif + +struct NDRTcpThreadCtx; + +struct NDRProxyThreadCtx { + const struct NDRTcpThreadCtx *ctx; + SOCKET InSocket; + SOCKET OutSocket; + DWORD dwThreadId; + HANDLE hThread; +}; + +struct NDRTcpThreadCtx { + const char *name; + short listen_port; + short client_port; + BOOL ndr64; + BOOL stop; +}; + +struct dcerpc_header { + BYTE rpc_vers; /* RPC version */ + BYTE rpc_vers_minor; /* Minor version */ + BYTE ptype; /* Packet type */ + BYTE pfc_flags; /* Fragmentation flags */ + BYTE drep[4]; /* NDR data representation */ + short frag_length; /* Total length of fragment */ + short auth_length; /* authenticator length */ + DWORD call_id; /* Call identifier */ +}; + +static void dump_packet(const char *ctx, const char *direction, + const unsigned char *buf, int len) +{ + struct dcerpc_header *hdr = (struct dcerpc_header *)buf; + + if (len < sizeof(struct dcerpc_header)) { + printf("%s:%s: invalid dcerpc pdu len(%d)\n", + ctx, direction, len); + fflush(stdout); + return; + } + + if (hdr->rpc_vers != 5 || hdr->rpc_vers_minor != 0) { + printf("%s:%s: invalid dcerpc pdu len(%d) ver:%d min:%d\n", + ctx, direction, len, + hdr->rpc_vers, hdr->rpc_vers_minor); + fflush(stdout); + return; + } + + if (hdr->frag_length != len) { + printf("%s:%s: invalid dcerpc pdu len(%d) should be (%d)\n", + ctx, direction, len, hdr->frag_length); + fflush(stdout); + return; + } + + + switch (hdr->ptype) { + case 0: /* request */ + printf("%s:%s: ptype[request] flen[%d] plen[%d] ahint[%d]\n\n", + ctx, direction, hdr->frag_length, + len - 24, *(DWORD *)(&buf[0x10])); + dump_data(buf + 24, len - 24); + printf("\n"); + fflush(stdout); + break; + + case 2: /* response */ + printf("\n%s:%s: ptype[response] flen[%d] plen[%d] ahint[%d]\n\n", + ctx, direction, hdr->frag_length, + len - 24, *(DWORD *)(&buf[0x10])); + dump_data(buf + 24, len - 24); + printf("\n"); + fflush(stdout); + break; + + case 11: /* bind */ +#if 0 + printf("%s:%s: ptype[bind] flen[%d] call[%d] contexts[%d]\n\n" + ctx, direction, hdr->frag_length, hdr->call_id, + buf[24]); + dump_data(buf + 24, len - 24); + printf("\n"); + fflush(stdout); +#endif + break; + + case 12: /* bind ack */ +#if 0 + printf("%s:%s: ptype[bind_ack] flen[%d] call[%d]\n\n", + ctx, direction, hdr->frag_length, hdr->call_id); + fflush(stdout); +#endif + break; + + case 14: /* alter_req */ +#if 1 + printf("%s:%s: ptype[alter_req] flen[%d] call[%d] contexts[%d]\n\n", + ctx, direction, hdr->frag_length, hdr->call_id, + buf[24]); + //dump_data(buf + 24, len - 24); + printf("\n"); + fflush(stdout); +#endif + break; + + case 15: /* alter_ack */ +#if 1 + printf("%s:%s: ptype[alter_ack] flen[%d] call[%d]\n\n", + ctx, direction, hdr->frag_length, hdr->call_id); + fflush(stdout); +#endif + break; + + default: + printf("%s:%s: ptype[%d] flen[%d] call[%d]\n\n", + ctx, direction, hdr->ptype, hdr->frag_length, hdr->call_id); + fflush(stdout); + break; + } +} + +static void change_packet(const char *ctx, BOOL ndr64, + unsigned char *buf, int len) +{ + struct dcerpc_header *hdr = (struct dcerpc_header *)buf; + BOOL is_ndr64 = FALSE; + const unsigned char ndr64_buf[] = { + 0x33, 0x05, 0x71, 0x71, 0xBA, 0xBE, 0x37, 0x49, + 0x83, 0x19, 0xB5, 0xDB, 0xEF, 0x9C, 0xCC, 0x36 + }; + + if (len < sizeof(struct dcerpc_header)) { + printf("%s: invalid dcerpc pdu len(%d)\n", + ctx, len); + fflush(stdout); + return; + } + + if (hdr->rpc_vers != 5 || hdr->rpc_vers_minor != 0) { + printf("%s: invalid dcerpc pdu len(%d) ver:%d min:%d\n", + ctx, len, + hdr->rpc_vers, hdr->rpc_vers_minor); + fflush(stdout); + return; + } + + if (hdr->frag_length != len) { + printf("%s: invalid dcerpc pdu len(%d) should be (%d)\n", + ctx, len, hdr->frag_length); + fflush(stdout); + return; + } + + switch (hdr->ptype) { + case 11: /* bind */ + case 14: /* alter_req */ + + if (buf[24] >= 2) { + int ret; + + ret = memcmp(&buf[0x60], ndr64_buf, 16); + if (ret == 0) { + is_ndr64 = TRUE; + } + } + + if (is_ndr64 && !ndr64) { + buf[24+0x48] = 0xFF; + memset(&buf[0x60], 0xFF, 16); + printf("%s: disable NDR64\n\n", ctx); + } else if (!is_ndr64 && ndr64) { + printf("\n%s: got NDR32 downgrade\n\n", ctx); +#ifndef DONOT_FORCE_NDR64 + printf("\n\tERROR!!!\n\n"); + memset(&buf[0x34], 0xFF, 16); + printf("You may need to run 'vcvarsall.bat amd64' before 'nmake tcp'\n"); +#endif + printf("\n"); + } else if (is_ndr64) { + printf("%s: got NDR64\n\n", ctx); + } else { + printf("%s: got NDR32\n\n", ctx); + } + //printf("%s: bind with %u pres\n", ctx, buf[24]); + fflush(stdout); + break; + } +} + +static int sock_pending(SOCKET s) +{ + int ret, error; + int value = 0; + int len; + + ret = ioctlsocket(s, FIONREAD, &value); + if (ret == -1) { + return ret; + } + + if (ret != 0) { + /* this should not be reached */ + return -1; + } + + if (value != 0) { + return value; + } + + error = 0; + len = sizeof(error); + + /* + * if no data is available check if the socket is in error state. For + * dgram sockets it's the way to return ICMP error messages of + * connected sockets to the caller. + */ + ret = getsockopt(s, SOL_SOCKET, SO_ERROR, (char *)&error, &len); + if (ret == -1) { + return ret; + } + if (error != 0) { + return -1; + } + return 0; +} + +DWORD WINAPI NDRProxyThread(LPVOID lpParameter) +{ + struct NDRProxyThreadCtx *p = (struct NDRProxyThreadCtx *)lpParameter; + + while (!p->ctx->stop) { + int r, s; + int ret = -1; + BYTE buf[5840]; + + Sleep(250); + + ret = sock_pending(p->InSocket); + if (ret == 0) { + goto out; + } + + r = recv(p->InSocket, buf, sizeof(buf), 0); + if (r <= 0) { + ret = WSAGetLastError(); + printf("%s: recv(in) failed[%d][%d]\n", p->ctx->name, r, ret); + fflush(stdout); + goto stop; + } + + change_packet(p->ctx->name, p->ctx->ndr64, buf, r); + fflush(stdout); + + dump_packet(p->ctx->name, "in => out", buf, r); + fflush(stdout); + +out: + s = send(p->OutSocket, buf, r, 0); + if (s <= 0) { + ret = WSAGetLastError(); + printf("%s: send(out) failed[%d][%d]\n", p->ctx->name, s, ret); + fflush(stdout); + goto stop; + } + + ret = sock_pending(p->OutSocket); + if (ret == 0) { + goto next; + } + + r = recv(p->OutSocket, buf, sizeof(buf), 0); + if (r <= 0) { + ret = WSAGetLastError(); + printf("%s: recv(out) failed[%d][%d]\n", p->ctx->name, r, ret); + fflush(stdout); + goto stop; + } + + dump_packet(p->ctx->name, "out => in", buf, r); + fflush(stdout); + + s = send(p->InSocket, buf, r, 0); + if (s <= 0) { + ret = WSAGetLastError(); + printf("%s: send(in) failed[%d][%d]\n", p->ctx->name, s, ret); + fflush(stdout); + goto stop; + } +next: + continue; + } +stop: + closesocket(p->InSocket); + closesocket(p->OutSocket); + + printf("NDRTcpThread[%s] stop\n", p->ctx->name); + fflush(stdout); + return 0; +} + +DWORD WINAPI NDRTcpThread(LPVOID lpParameter) +{ + struct NDRTcpThreadCtx *ctx = (struct NDRTcpThreadCtx *)lpParameter; + int ret = -1; + SOCKET ListenSocket; + struct sockaddr_in saServer; + struct sockaddr_in saClient; + + //printf("NDRTcpThread[%s] start\n", ctx->name); + fflush(stdout); + + ListenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (ListenSocket == INVALID_SOCKET) { + ret = WSAGetLastError(); + printf("socket() failed[%d][%d]\n", ListenSocket, ret); + fflush(stdout); + goto failed; + } + + saServer.sin_family = AF_INET; + saServer.sin_addr.s_addr = inet_addr(LISTEN_IP); + saServer.sin_port = htons(ctx->listen_port); + + saClient.sin_family = AF_INET; + saClient.sin_addr.s_addr = inet_addr(FORWARD_IP); + saClient.sin_port = htons(ctx->client_port); + + ret = bind(ListenSocket, (SOCKADDR*)&saServer, sizeof(saServer)); + if (ret == SOCKET_ERROR) { + ret = WSAGetLastError(); + printf("bind() failed[%d]\n", ret); + fflush(stdout); + goto failed; + } + + ret = listen(ListenSocket, 10); + if (ret == SOCKET_ERROR) { + ret = WSAGetLastError(); + printf("listen() failed[%d]\n", ret); + fflush(stdout); + goto failed; + } + + while (!ctx->stop) { + struct sockaddr_in sa; + int sa_len = sizeof(sa); + struct NDRProxyThreadCtx *p = malloc(sizeof(*p)); + p->ctx = ctx; + + p->InSocket = accept(ListenSocket, (SOCKADDR *)&sa, &sa_len); + if (p->InSocket == INVALID_SOCKET) { + ret = WSAGetLastError(); + printf("%s: accept() failed[%d][%d]\n", p->ctx->name, p->InSocket, ret); + fflush(stdout); + continue; + } + + p->OutSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (p->OutSocket == INVALID_SOCKET) { + ret = WSAGetLastError(); + printf("%s: socket(out) failed[%d][%d]\n", p->ctx->name, p->OutSocket, ret); + fflush(stdout); + closesocket(p->InSocket); + continue; + } + + ret = connect(p->OutSocket, (SOCKADDR*)&saClient, sizeof(saClient)); + if (ret == SOCKET_ERROR) { + ret = WSAGetLastError(); + printf("%s: connect() failed[%d]\n", p->ctx->name, ret); + fflush(stdout); + closesocket(p->InSocket); + closesocket(p->OutSocket); + continue; + } + + p->hThread = CreateThread( + NULL, // default security attributes + 0, // use default stack size + NDRProxyThread, // thread function name + p, // argument to thread function + 0, // use default creation flags + &p->dwThreadId);// returns the thread identifier + if (p->hThread == NULL) { + printf("failed to create thread ndr32\n"); + fflush(stdout); + return -1; + } + } + + //printf("NDRTcpThread[%s] stop\n", ctx->name); + fflush(stdout); + return 0; +failed: + printf("NDRTcpThread[%s] failed[%d]\n", ctx->name, ret); + fflush(stdout); + return ret; +} + +struct NDRRpcThreadCtx { + const char *name; + short listen_port; +}; + +DWORD WINAPI NDRRpcThread(LPVOID lpParameter) +{ + struct NDRRpcThreadCtx *ctx = (struct NDRRpcThreadCtx *)lpParameter; + int ret = -1; + RPC_STATUS status; + RPC_BINDING_VECTOR *pBindingVector; + +#define RPC_MIN_CALLS 1 +#define RPC_MAX_CALLS 20 + + //printf("NDRRpcThread[%s] start\n", ctx->name); + fflush(stdout); + status = RpcServerUseProtseqEp("ncacn_ip_tcp", RPC_MAX_CALLS, "5055", NULL); + if (status) { + printf("Failed to register ncacn_ip_tcp endpoint\n"); + fflush(stdout); + return status; + } + + status = RpcServerInqBindings(&pBindingVector); + if (status) { + printf("Failed RpcServerInqBindings\n"); + fflush(stdout); + return status; + } + +#if 0 + status = RpcEpRegister(srv_midltests_v0_0_s_ifspec, pBindingVector, NULL, "midltests server"); + if (status) { + printf("Failed RpcEpRegister\n"); + fflush(stdout); + return status; + } +#endif + status = RpcServerRegisterIf(srv_midltests_v0_0_s_ifspec, NULL, NULL); + if (status) { + printf("Failed to register interface\n"); + fflush(stdout); + return status; + } + + status = RpcServerListen(RPC_MIN_CALLS, RPC_MAX_CALLS, FALSE); + if (status) { + printf("RpcServerListen returned error %d\n", status); + fflush(stdout); + return status; + } + + printf("NDRRpcThread[%s] stop\n", ctx->name); + fflush(stdout); + return 0; +failed: + printf("NDRRpcThread[%s] failed[%d]\n", ctx->name, ret); + fflush(stdout); + return ret; +} + +int main(int argc, char **argv) +{ + int ret; + struct NDRTcpThreadCtx ctx_ndr32; + struct NDRTcpThreadCtx ctx_ndr64; + struct NDRRpcThreadCtx ctx_rpc; + DWORD dwThreadIdArray[3]; + HANDLE hThreadArray[3]; + WORD wVersionRequested = MAKEWORD(2, 2); + WSADATA wsaData; + char *binding; + RPC_STATUS status; + + ret = WSAStartup(wVersionRequested, &wsaData); + if (ret != 0) { + printf("WSAStartup failed with error: %d\n", ret); + fflush(stdout); + return -1; + } + + ctx_ndr32.name = "ndr32"; + ctx_ndr32.listen_port = 5032; + ctx_ndr32.client_port = 5055; + ctx_ndr32.ndr64 = FALSE; + ctx_ndr32.stop = FALSE; + hThreadArray[0] = CreateThread( + NULL, // default security attributes + 0, // use default stack size + NDRTcpThread, // thread function name + &ctx_ndr32, // argument to thread function + 0, // use default creation flags + &dwThreadIdArray[0]); // returns the thread identifier + if (hThreadArray[0] == NULL) { + printf("failed to create thread ndr32\n"); + fflush(stdout); + return -1; + } + + ctx_ndr64.name = "ndr64"; + ctx_ndr64.listen_port = 5064; + ctx_ndr64.client_port = 5055; + ctx_ndr64.ndr64 = TRUE; + ctx_ndr64.stop = FALSE; + hThreadArray[1] = CreateThread( + NULL, // default security attributes + 0, // use default stack size + NDRTcpThread, // thread function name + &ctx_ndr64, // argument to thread function + 0, // use default creation flags + &dwThreadIdArray[1]); // returns the thread identifier + if (hThreadArray[1] == NULL) { + printf("failed to create thread ndr64\n"); + fflush(stdout); + return -1; + } + + ctx_rpc.name = "rpc"; + ctx_rpc.listen_port = 5050; + hThreadArray[2] = CreateThread( + NULL, // default security attributes + 0, // use default stack size + NDRRpcThread, // thread function name + &ctx_rpc, // argument to thread function + 0, // use default creation flags + &dwThreadIdArray[2]); // returns the thread identifier + if (hThreadArray[2] == NULL) { + printf("failed to create thread rpc\n"); + fflush(stdout); + return -1; + } + + printf("Wait for setup of server threads\n"); + fflush(stdout); + ret = WaitForMultipleObjects(3, hThreadArray, TRUE, 3000); + if (ret == WAIT_TIMEOUT) { + /* OK */ + } else { + printf("Failed to setup of server threads %d:%d\n", + ret, GetLastError()); + fflush(stdout); + return -1; + } + ret = 0; + + printf("\nTest NDR32\n\n"); + fflush(stdout); + binding = "ncacn_ip_tcp:" CONNECT_IP "[5032]"; + status = RpcBindingFromStringBinding( + binding, + &midltests_IfHandle); + if (status) { + printf("RpcBindingFromStringBinding returned %d\n", status); + fflush(stdout); + return status; + } + + RpcTryExcept { + midltests(); + } RpcExcept(1) { + ret = RpcExceptionCode(); + printf("NDR32 Runtime error 0x%x\n", ret); + fflush(stdout); + } RpcEndExcept + ctx_ndr32.stop = TRUE; + + Sleep(250); + + printf("\nTest NDR64\n\n"); + binding = "ncacn_ip_tcp:" CONNECT_IP "[5064]"; + status = RpcBindingFromStringBinding( + binding, + &midltests_IfHandle); + if (status) { + printf("RpcBindingFromStringBinding returned %d\n", status); + fflush(stdout); + return status; + } + + RpcTryExcept { + midltests(); + } RpcExcept(1) { + ret = RpcExceptionCode(); + printf("Runtime error 0x%x\n", ret); + fflush(stdout); + } RpcEndExcept + ctx_ndr64.stop = TRUE; + + WaitForMultipleObjects(3, hThreadArray, TRUE, 2000); + + if (ret == 0) { + printf("\nTest OK\n"); + fflush(stdout); + } else { + printf("\nTest FAILED[%d]\n", ret); + fflush(stdout); + } + + return ret; +} diff --git a/testprogs/win32/midltests/todo/midltests-array-range.idl b/testprogs/win32/midltests/todo/midltests-array-range.idl new file mode 100644 index 0000000..1d60fd6 --- /dev/null +++ b/testprogs/win32/midltests/todo/midltests-array-range.idl @@ -0,0 +1,39 @@ +#ifndef MIDLTESTS_C_CODE + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + long midltests_fn( + [out,ref] long *count, + [out,ref,size_is(,*count),range(0,1)] long **array, + [out,ref] long *error + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + long count; + long *array; + long error; + + cli_midltests_fn(&count, &array, &error); +} + +long srv_midltests_fn(long *count, long **array, long *error) +{ + printf("srv_midltests_fn: Start\n"); + *count=2; + *array=(long *)malloc((*count) * sizeof(long)); + (*array)[0] = 7; + (*array)[1] = 7; + *error=0; + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/todo/midltests-pipe-02.idl b/testprogs/win32/midltests/todo/midltests-pipe-02.idl new file mode 100644 index 0000000..e6be283 --- /dev/null +++ b/testprogs/win32/midltests/todo/midltests-pipe-02.idl @@ -0,0 +1,153 @@ +#ifndef MIDLTESTS_C_CODE + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef pipe char pipe_char; + + struct msg { + long l; + [size_is(l)] char *m; + }; + + long midltests_fn( + [out,ref] struct msg *out1, + [out] pipe_char outp, + [in] pipe_char inp, + [in] struct msg in1 + ); +} + +#elif MIDLTESTS_C_CODE + +struct pipe_char_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_char_pull( + char * _state, + unsigned char * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_char_push( + char * _state, + unsigned char * buf, + unsigned long ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_char_alloc( + char * _state, + unsigned long bsize, + unsigned char * * buf, + unsigned long * bcount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} + +static void midltests(void) +{ + struct msg out1; + unsigned char out1b[3]; + struct pipe_char_state outs; + pipe_char outp; + struct pipe_char_state ins; + pipe_char inp; + struct msg in1; + unsigned char in1b[3]; + + in1.l = sizeof(in1b); + memset(&in1b, 0xAA, sizeof(in1b)); + in1.m = in1b; + + memset(&outs, 0, sizeof(outs)); + outs.name = "outp"; + memset(&outp, 0, sizeof(outp)); + outp.pull = pipe_char_pull; + outp.push = pipe_char_push; + outp.alloc = pipe_char_alloc; + outp.state = (char *)&outs; + + memset(&ins, 0, sizeof(ins)); + ins.name = "inp"; + ins.count = 1; + memset(&inp, 0, sizeof(inp)); + inp.pull = pipe_char_pull; + inp.push = pipe_char_push; + inp.alloc = pipe_char_alloc; + inp.state = (char *)&ins; + + out1.l = sizeof(out1b); + memset(&out1b, 0xFF, sizeof(out1b)); + out1.m = out1b; + + cli_midltests_fn(&out1, outp, inp, in1); +} + +long srv_midltests_fn( + /* [ref][out] */ struct msg *out1, + /* [out] */ pipe_char outp, + /* [in] */ pipe_char inp, + /* [in] */ struct msg in1) +{ + char inb[500]; + unsigned long inb_len = 0; + char *outb = NULL; + unsigned long outb_size = 0; + unsigned long outb_len = 0; + + printf("srv_midltests_fn: Start\n"); + + do { + inp.pull(inp.state, inb, sizeof(inb), &inb_len); + printf("pull inp_len[%u]\n", inb_len); + } while (inb_len > 0); + + outb_size = 5; + do { + outp.alloc(outp.state, outb_size, &outb, &outb_len); + memset(outb, 0xCC, outb_len); + outp.push(outp.state, outb, outb_len); + printf("push outb_len[%u]\n", outb_len); + //Sleep(1000); + outb_size--; + } while (outb_len > 0); + + out1->l = 3; + out1->m = (unsigned char *)malloc(out1->l); + memset(out1->m, 0xBB, out1->l); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/todo/midltests-pipe-03-hyper.idl b/testprogs/win32/midltests/todo/midltests-pipe-03-hyper.idl new file mode 100644 index 0000000..475aedd --- /dev/null +++ b/testprogs/win32/midltests/todo/midltests-pipe-03-hyper.idl @@ -0,0 +1,205 @@ +#ifndef MIDLTESTS_C_CODE + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef pipe char pipe_char; + typedef pipe hyper pipe_hyper; + + struct msg { + long l; + [size_is(l)] char *m; + }; + + long midltests_fn( + [out,ref] struct msg *out1, + [out] pipe_hyper outp, + [in] pipe_hyper inp, + [in] struct msg in1 + ); +} + +#elif MIDLTESTS_C_CODE + +struct pipe_char_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_char_pull( + char * _state, + unsigned char * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_char_push( + char * _state, + unsigned char * buf, + unsigned long ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_char_alloc( + char * _state, + unsigned long bsize, + unsigned char * * buf, + unsigned long * bcount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} + +struct pipe_hyper_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_hyper_pull( + char * _state, + hyper * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_hyper_push( + char * _state, + hyper * buf, + unsigned long ecount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_hyper_alloc( + char * _state, + unsigned long bsize, + hyper * * buf, + unsigned long * bcount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} +static void midltests(void) +{ + struct msg out1; + unsigned char out1b[3]; + struct pipe_hyper_state outs; + pipe_hyper outp; + struct pipe_hyper_state ins; + pipe_hyper inp; + struct msg in1; + unsigned char in1b[3]; + + in1.l = sizeof(in1b); + memset(&in1b, 0xAA, sizeof(in1b)); + in1.m = in1b; + + memset(&outs, 0, sizeof(outs)); + outs.name = "outp"; + memset(&outp, 0, sizeof(outp)); + outp.pull = pipe_hyper_pull; + outp.push = pipe_hyper_push; + outp.alloc = pipe_hyper_alloc; + outp.state = (char *)&outs; + + memset(&ins, 0, sizeof(ins)); + ins.name = "inp"; + ins.count = 1; + memset(&inp, 0, sizeof(inp)); + inp.pull = pipe_hyper_pull; + inp.push = pipe_hyper_push; + inp.alloc = pipe_hyper_alloc; + inp.state = (char *)&ins; + + out1.l = sizeof(out1b); + memset(&out1b, 0xFF, sizeof(out1b)); + out1.m = out1b; + + cli_midltests_fn(&out1, outp, inp, in1); +} + +long srv_midltests_fn( + /* [ref][out] */ struct msg *out1, + /* [out] */ pipe_hyper outp, + /* [in] */ pipe_hyper inp, + /* [in] */ struct msg in1) +{ + hyper inb[500]; + unsigned long inb_len = 0; + hyper *outb = NULL; + unsigned long outb_size = 0; + unsigned long outb_len = 0; + + printf("srv_midltests_fn: Start\n"); + + do { + inp.pull(inp.state, inb, sizeof(inb), &inb_len); + printf("pull inp_len[%u]\n", inb_len); + } while (inb_len > 0); + + outb_size = 5; + do { + outp.alloc(outp.state, outb_size, &outb, &outb_len); + memset(outb, 0xCC, outb_len * sizeof(*outb)); + outp.push(outp.state, outb, outb_len); + printf("push outb_len[%u]\n", outb_len); + //Sleep(1000); + outb_size--; + } while (outb_len > 0); + + out1->l = 3; + out1->m = (unsigned char *)malloc(out1->l); + memset(out1->m, 0xBB, out1->l); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/todo/midltests-pipe-04-struct.idl b/testprogs/win32/midltests/todo/midltests-pipe-04-struct.idl new file mode 100644 index 0000000..07921b8 --- /dev/null +++ b/testprogs/win32/midltests/todo/midltests-pipe-04-struct.idl @@ -0,0 +1,272 @@ +#ifndef MIDLTESTS_C_CODE + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef pipe char pipe_char; + typedef pipe hyper pipe_hyper; + typedef struct { + long l; + short s; + } structtype; + typedef pipe structtype pipe_structtype; + + struct msg { + long l; + [size_is(l)] char *m; + }; + + long midltests_fn( + [out,ref] struct msg *out1, + [out] pipe_structtype outp, + [in] pipe_structtype inp, + [in] struct msg in1 + ); + + long midltests_ping( [in] struct msg in1); + +} + +#elif MIDLTESTS_C_CODE + +struct pipe_char_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_char_pull( + char * _state, + unsigned char * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_char_push( + char * _state, + unsigned char * buf, + unsigned long ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_char_alloc( + char * _state, + unsigned long bsize, + unsigned char * * buf, + unsigned long * bcount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} + +struct pipe_hyper_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_hyper_pull( + char * _state, + hyper * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_hyper_push( + char * _state, + hyper * buf, + unsigned long ecount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_hyper_alloc( + char * _state, + unsigned long bsize, + hyper * * buf, + unsigned long * bcount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} +struct pipe_structtype_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_structtype_pull( + char * _state, + structtype * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_structtype_push( + char * _state, + structtype * buf, + unsigned long ecount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_structtype_alloc( + char * _state, + unsigned long bsize, + structtype * * buf, + unsigned long * bcount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} +static void midltests(void) +{ + struct msg out1; + unsigned char out1b[3]; + struct pipe_structtype_state outs; + pipe_structtype outp; + struct pipe_structtype_state ins; + pipe_structtype inp; + struct msg in1; + unsigned char in1b[3]; + + in1.l = sizeof(in1b); + memset(&in1b, 0xAA, sizeof(in1b)); + in1.m = in1b; + + memset(&outs, 0, sizeof(outs)); + outs.name = "outp"; + memset(&outp, 0, sizeof(outp)); + outp.pull = pipe_structtype_pull; + outp.push = pipe_structtype_push; + outp.alloc = pipe_structtype_alloc; + outp.state = (char *)&outs; + + memset(&ins, 0, sizeof(ins)); + ins.name = "inp"; + ins.count = 1; + memset(&inp, 0, sizeof(inp)); + inp.pull = pipe_structtype_pull; + inp.push = pipe_structtype_push; + inp.alloc = pipe_structtype_alloc; + inp.state = (char *)&ins; + + out1.l = sizeof(out1b); + memset(&out1b, 0xFF, sizeof(out1b)); + out1.m = out1b; + + cli_midltests_ping(in1); + cli_midltests_fn(&out1, outp, inp, in1); +} + +long srv_midltests_fn( + /* [ref][out] */ struct msg *out1, + /* [out] */ pipe_structtype outp, + /* [in] */ pipe_structtype inp, + /* [in] */ struct msg in1) +{ + structtype inb[500]; + unsigned long inb_len = 0; + structtype *outb = NULL; + unsigned long outb_size = 0; + unsigned long outb_len = 0; + + printf("srv_midltests_fn: Start\n"); + + do { + inp.pull(inp.state, inb, sizeof(inb), &inb_len); + printf("pull inp_len[%u]\n", inb_len); + } while (inb_len > 0); + + outb_size = 5; + do { + outp.alloc(outp.state, outb_size, &outb, &outb_len); + memset(outb, 0xCC, outb_len * sizeof(*outb)); + outp.push(outp.state, outb, outb_len); + printf("push outb_len[%u]\n", outb_len); + //Sleep(1000); + outb_size--; + } while (outb_len > 0); + + out1->l = 3; + out1->m = (unsigned char *)malloc(out1->l); + memset(out1->m, 0xBB, out1->l); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +long srv_midltests_ping( + /* [in] */ struct msg in1) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} +#endif diff --git a/testprogs/win32/midltests/todo/midltests-pipe-first.idl b/testprogs/win32/midltests/todo/midltests-pipe-first.idl new file mode 100755 index 0000000..ef28943 --- /dev/null +++ b/testprogs/win32/midltests/todo/midltests-pipe-first.idl @@ -0,0 +1,233 @@ +#ifndef MIDLTESTS_C_CODE +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ +/* typedef struct st_wire { + long len; + //[size_is(len)] char data[*]; + [size_is(l2)] char *d2; + long l2; + } st_wire_t; + struct st_local { + short s1; + short s2; + }; + typedef [transmit_as(st_wire_t)] struct st_local st_local_t; + + long midltests_fn( + [in] st_local_t st + + ); +*/ +/* struct my_ace { + long ace1; + long ace2; + }; + struct my_acl { + long revision; + long num_aces; + [size_is(num_aces)] struct my_ace *aces; + }; + long midltests_fn( + [in,ref] struct my_acl *acl + ); +*/ +/* struct my_str { + long l1; + [string] wchar_t str[260+1]; + long l2; + }; + long midltests_fn( + [in,out,ref] struct my_str *str + ); +*/ + long foo(); + long midltests_fn( + [in] long size, + [out,ref,size_is(size),length_is(*length)] byte *bytes, + [out,ref] long *length + ); + + typedef pipe byte BYTE_PIPE; + typedef pipe long LONG_PIPE; + + long midltests_fn_pipe( + [in] long count, + [out,ref] long *start_magic, + [out] BYTE_PIPE b, + [out, ref] long *mid_magic, + [out] LONG_PIPE l, + [out,ref] long *end_magic + ); + +} +#elif MIDLTESTS_C_CODE +/* +void __RPC_USER st_local_t_to_xmit(st_local_t *l, st_wire_t **w) +{ + *w = malloc(4+ sizeof(st_wire_t)); + (*w)->len = sizeof(st_local_t); + //(*w)->data = malloc((*w)->len); + memcpy((*w)->data, l, sizeof(st_local_t)); + //memset(*w, 0xcd, sizeof(st_wire_t)); +} + +void __RPC_USER st_local_t_from_xmit(st_wire_t *w, st_local_t *l) +{ + memcpy(l, w->data, sizeof(st_local_t)); +// memset(l, 0, sizeof(st_local_t)); +} + +void __RPC_USER st_local_t_free_inst(st_local_t *l) +{ + +} + +void __RPC_USER st_local_t_free_xmit(st_wire_t *w) +{ + //free(w->data); + free(w); +} +*/ + +void __RPC_USER cli_push_b(char * state, + byte * buf, + unsigned long ecount) +{ + printf("cli_push_b ecount[%lu]\n", ecount); +} + +void __RPC_USER cli_alloc_b(char * state, + unsigned long bsize, + byte * * buf, + unsigned long * bcount ) +{ + printf("cli_alloc_b bsize[%lu]\n", bsize); + *buf = NULL; + *bcount = 0; +} + +void __RPC_USER cli_push_l(char * state, + long * buf, + unsigned long ecount) +{ + printf("cli_push_l ecount[%lu]\n", ecount); +} + +void __RPC_USER cli_alloc_l(char * state, + unsigned long bsize, + long * * buf, + unsigned long * bcount ) +{ + printf("cli_alloc_l bsize[%lu]\n", bsize); + *buf = NULL; + *bcount = 0; +} + +static void midltests() +{ +/* st_local_t st; + st.s1 = 1; + st.s2 = 2; + cli_midltests_fn(st); +*/ +/* struct my_acl acl; + struct my_ace aces[3]; + aces[0].ace1 = 1; + aces[0].ace2 = 2; + aces[1].ace1 = 1; + aces[1].ace2 = 2; + aces[2].ace1 = 1; + aces[2].ace2 = 2; + acl.revision = 5; + acl.num_aces = 1; + acl.aces = aces; + cli_midltests_fn(&acl); +*/ +/* struct my_str str; + memset(&str, 0, sizeof(str)); + str.l1 = 1; + printf("here: %d\n", __LINE__); + //wcscpy(str.str, L'Hello World\0'); + str.l2 = 2; + printf("here: %d\n", __LINE__); + cli_midltests_fn(&str); +*/ + byte buf[10]; + long length = 0; + memset(buf, 0xdf, sizeof(buf)); +// cli_midltests_fn(sizeof(buf), buf, &length); + +/* long count = 2; + long start_magic; + BYTE_PIPE b; + long mid_magic; + LONG_PIPE l; + long end_magic; + + + memset(&b, 0, sizeof(b)); + memset(&l, 0, sizeof(l)); + + b.alloc = cli_alloc_b; + b.push = cli_push_b; + + l.alloc = cli_alloc_l; + l.push = cli_push_l; + + printf("cli call start\n"); + cli_midltests_fn(count, + &start_magic, + b, + &mid_magic, + l, + &end_magic); + printf("cli call end\n"); +*/ +} + +//long srv_midltests_fn(struct my_str *str)//struct my_acl *acl)//st_local_t st) +//long srv_midltests_fn(long size, byte *bytes, long *length) +#if 1 +long srv_midltests_fn( + /* [in] */ long count, + /* [ref][out] */ long *start_magic, + /* [out] */ BYTE_PIPE b, + /* [ref][out] */ long *mid_magic, + /* [out] */ LONG_PIPE l, + /* [ref][out] */ long *end_magic) +#endif +{ +/* byte bytes[10]; + long longs[10]; + int i; +*/ + printf("srv_midltests_fn: Start\n"); + //printf("s1[%d] s2[%d]\n", st.s1, st.s2); + //printf(l1[%d] str[%s] l2[%d]\n", str->l1, str->str, str->l2); + +/* *start_magic = 0x01234567; + *mid_magic = 0x88888888; + *end_magic = 0xFEDCBA09; + + memset(bytes, 0xBE, sizeof(bytes)); + memset(longs, 0xAC, sizeof(longs)); + + for (i=0; i < count; i++) { + b.push(b.state, bytes, sizeof(bytes)/sizeof(bytes[0])); + } + b.push(b.state, NULL, 0); + + for (i=0; i < count; i++) { + l.push(l.state, longs, sizeof(longs)/sizeof(longs[0])); + } + l.push(l.state, NULL, 0); +*/ + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif \ No newline at end of file diff --git a/testprogs/win32/midltests/todo/midltests-pipe-sync-ndr32-downgrade-02.idl b/testprogs/win32/midltests/todo/midltests-pipe-sync-ndr32-downgrade-02.idl new file mode 100644 index 0000000..760401e --- /dev/null +++ b/testprogs/win32/midltests/todo/midltests-pipe-sync-ndr32-downgrade-02.idl @@ -0,0 +1,296 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ + +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") + + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef pipe char pipe_char; + typedef pipe hyper pipe_hyper; + typedef struct { + long l; + short s; + } structtype; + typedef pipe structtype pipe_structtype; + + struct msg { + long l; + [size_is(l)] char *m; + }; + + long midltests_fn( + [out,ref] struct msg *out1, + [out] pipe_structtype outp, + [in] pipe_structtype inp, + [in] struct msg in1 + ); + + long midltests_ping( [in] struct msg in1); + +} + +#elif MIDLTESTS_C_CODE + +struct pipe_char_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_char_pull( + char * _state, + unsigned char * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_char_push( + char * _state, + unsigned char * buf, + unsigned long ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_char_alloc( + char * _state, + unsigned long bsize, + unsigned char * * buf, + unsigned long * bcount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} + +struct pipe_hyper_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_hyper_pull( + char * _state, + hyper * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_hyper_push( + char * _state, + hyper * buf, + unsigned long ecount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_hyper_alloc( + char * _state, + unsigned long bsize, + hyper * * buf, + unsigned long * bcount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} +struct pipe_structtype_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_structtype_pull( + char * _state, + structtype * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_structtype_push( + char * _state, + structtype * buf, + unsigned long ecount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_structtype_alloc( + char * _state, + unsigned long bsize, + structtype * * buf, + unsigned long * bcount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} +static void midltests(void) +{ + struct msg out1; + unsigned char out1b[3]; + struct pipe_structtype_state outs; + pipe_structtype outp; + struct pipe_structtype_state ins; + pipe_structtype inp; + struct msg in1; + unsigned char in1b[5000]; + + in1.l = sizeof(in1b); + memset(&in1b, 0xAA, sizeof(in1b)); + in1.m = in1b; + + memset(&outs, 0, sizeof(outs)); + outs.name = "outp"; + memset(&outp, 0, sizeof(outp)); + outp.pull = pipe_structtype_pull; + outp.push = pipe_structtype_push; + outp.alloc = pipe_structtype_alloc; + outp.state = (char *)&outs; + + memset(&ins, 0, sizeof(ins)); + ins.name = "inp"; + ins.count = 100; + memset(&inp, 0, sizeof(inp)); + inp.pull = pipe_structtype_pull; + inp.push = pipe_structtype_push; + inp.alloc = pipe_structtype_alloc; + inp.state = (char *)&ins; + + out1.l = sizeof(out1b); + memset(&out1b, 0xFF, sizeof(out1b)); + out1.m = out1b; + + cli_midltests_ping(in1); + cli_midltests_fn(&out1, outp, inp, in1); +} + +long srv_midltests_fn( + /* [ref][out] */ struct msg *out1, + /* [out] */ pipe_structtype outp, + /* [in] */ pipe_structtype inp, + /* [in] */ struct msg in1) +{ + structtype inb[500]; + unsigned long inb_len = 0; + structtype *outb = NULL; + unsigned long outb_size = 0; + unsigned long outb_len = 0; + + printf("srv_midltests_fn: Start\n"); + + do { + inp.pull(inp.state, inb, sizeof(inb), &inb_len); + printf("pull inp_len[%u]\n", inb_len); + } while (inb_len > 0); + + outb_size = 5; + do { + outp.alloc(outp.state, outb_size, &outb, &outb_len); + memset(outb, 0xCC, outb_len * sizeof(*outb)); + outp.push(outp.state, outb, outb_len); + printf("push outb_len[%u]\n", outb_len); + //Sleep(1000); + outb_size--; + } while (outb_len > 0); + + out1->l = 3; + out1->m = (unsigned char *)malloc(out1->l); + memset(out1->m, 0xBB, out1->l); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +long srv_midltests_ping( + /* [in] */ struct msg in1) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} +#endif diff --git a/testprogs/win32/midltests/todo/midltests-string-in-out-ref.idl b/testprogs/win32/midltests/todo/midltests-string-in-out-ref.idl new file mode 100644 index 0000000..4db6f96 --- /dev/null +++ b/testprogs/win32/midltests/todo/midltests-string-in-out-ref.idl @@ -0,0 +1,33 @@ +#ifndef MIDLTESTS_C_CODE + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + long midltests_fn( + [in,out,ref,string] wchar_t *s + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + wchar_t s[] = { 's', 'a', 'm', 'b', 'a', 0 }; + + cli_midltests_fn(s); +} + +long srv_midltests_fn(wchar_t *s) +{ + printf("srv_midltests_fn: Start\n"); + s[1] = 0; + s[2] = 'M'; + s[5] = '4'; + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/todo/midltests-transmit-as.idl b/testprogs/win32/midltests/todo/midltests-transmit-as.idl new file mode 100755 index 0000000..bf5bc3f --- /dev/null +++ b/testprogs/win32/midltests/todo/midltests-transmit-as.idl @@ -0,0 +1,59 @@ +#ifndef MIDLTESTS_C_CODE +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef struct st_wire { + char data[20]; + } st_wire_t; + struct st_local { + short s1; + short s2; + }; + typedef [transmit_as(st_wire_t)] struct st_local st_local_t; + + long midltests_fn( + [in] st_local_t st + ); +} +#elif MIDLTESTS_C_CODE + +void __RPC_USER st_local_t_to_xmit(st_local_t *l, st_wire_t **w) +{ + *w = malloc(sizeof(st_wire_t)); + memset(*w, 0xcd, sizeof(st_wire_t)); +} + +void __RPC_USER st_local_t_from_xmit(st_wire_t *w, st_local_t *l) +{ + memset(l, 0, sizeof(st_local_t)); +} + +void __RPC_USER st_local_t_free_inst(st_local_t *l) +{ + +} + +void __RPC_USER st_local_t_free_xmit(st_wire_t *w) +{ + free(w); +} + +static void midltests() +{ + char s[64]; + st_local_t st; + strcpy(s, "TestString"); + cli_midltests_fn(st); +} + +long srv_midltests_fn(st_local_t st) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif \ No newline at end of file diff --git a/testprogs/win32/midltests/todo/midltests_pointer_default.idl b/testprogs/win32/midltests/todo/midltests_pointer_default.idl new file mode 100755 index 0000000..9e0c18f --- /dev/null +++ b/testprogs/win32/midltests/todo/midltests_pointer_default.idl @@ -0,0 +1,20 @@ +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(ptr) +] +interface midltests +{ + struct midltests_struct { + [ref] long ****p; + [ref] long **a; + [ref] long **b; + [ref] long **c; + }; + + void midltests_fn( + //[in] long size, + [in,out,ref] struct midltests_struct *s + //[in,ref,size_is(,size)] long ***array + ); + +} \ No newline at end of file diff --git a/testprogs/win32/midltests/utils.c b/testprogs/win32/midltests/utils.c new file mode 100644 index 0000000..8c4833d --- /dev/null +++ b/testprogs/win32/midltests/utils.c @@ -0,0 +1,32 @@ +/* + MIDLTESTS utility functions. + + Copyright (C) Tim Potter 2003 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include "midltests.h" + +/* MIDL allocate and free functions */ + +void __RPC_FAR *__RPC_USER midl_user_allocate(size_t len) +{ + return(malloc(len)); +} + +void __RPC_USER midl_user_free(void __RPC_FAR *ptr) +{ + free(ptr); +} diff --git a/testprogs/win32/midltests/valid/README.txt b/testprogs/win32/midltests/valid/README.txt new file mode 100644 index 0000000..9208fae --- /dev/null +++ b/testprogs/win32/midltests/valid/README.txt @@ -0,0 +1,6 @@ +This directory contains IDL files which demonstrate +the relationship between IDL definitions and NDR representation. + +In order to test them, you can compile them as midltests.idl. + +Note: some examples trigger runtime errors. diff --git a/testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-01.idl b/testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-01.idl new file mode 100644 index 0000000..26ef939 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-01.idl @@ -0,0 +1,296 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef pipe char pipe_char; + typedef pipe hyper pipe_hyper; + typedef struct { + long l; + short s; + } structtype; + typedef pipe structtype pipe_structtype; + + struct msg { + long l; + [size_is(l)] char *m; + }; + + long midltests_fn( + [out,ref] struct msg *out1, + [out] pipe_structtype outp, + [in] pipe_structtype inp, + [in] struct msg in1 + ); + + long midltests_ping( [in] struct msg in1); + +} + +#elif MIDLTESTS_C_CODE + +struct pipe_char_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_char_pull( + char * _state, + unsigned char * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_char_push( + char * _state, + unsigned char * buf, + unsigned long ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_char_alloc( + char * _state, + unsigned long bsize, + unsigned char * * buf, + unsigned long * bcount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} + +struct pipe_hyper_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_hyper_pull( + char * _state, + hyper * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_hyper_push( + char * _state, + hyper * buf, + unsigned long ecount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_hyper_alloc( + char * _state, + unsigned long bsize, + hyper * * buf, + unsigned long * bcount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} +struct pipe_structtype_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_structtype_pull( + char * _state, + structtype * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_structtype_push( + char * _state, + structtype * buf, + unsigned long ecount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_structtype_alloc( + char * _state, + unsigned long bsize, + structtype * * buf, + unsigned long * bcount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} +static void midltests(void) +{ + struct msg out1; + unsigned char out1b[3]; + struct pipe_structtype_state outs; + pipe_structtype outp; + struct pipe_structtype_state ins; + pipe_structtype inp; + struct msg in1; + unsigned char in1b[3]; + + in1.l = sizeof(in1b); + memset(&in1b, 0xAA, sizeof(in1b)); + in1.m = in1b; + + memset(&outs, 0, sizeof(outs)); + outs.name = "outp"; + memset(&outp, 0, sizeof(outp)); + outp.pull = pipe_structtype_pull; + outp.push = pipe_structtype_push; + outp.alloc = pipe_structtype_alloc; + outp.state = (char *)&outs; + + memset(&ins, 0, sizeof(ins)); + ins.name = "inp"; + ins.count = 1; + memset(&inp, 0, sizeof(inp)); + inp.pull = pipe_structtype_pull; + inp.push = pipe_structtype_push; + inp.alloc = pipe_structtype_alloc; + inp.state = (char *)&ins; + + out1.l = sizeof(out1b); + memset(&out1b, 0xFF, sizeof(out1b)); + out1.m = out1b; + + cli_midltests_ping(in1); + cli_midltests_fn(&out1, outp, inp, in1); +} + +long srv_midltests_fn( + /* [ref][out] */ struct msg *out1, + /* [out] */ pipe_structtype outp, + /* [in] */ pipe_structtype inp, + /* [in] */ struct msg in1) +{ + structtype inb[500]; + unsigned long inb_len = 0; + structtype *outb = NULL; + unsigned long outb_size = 0; + unsigned long outb_len = 0; + + printf("srv_midltests_fn: Start\n"); + + do { + inp.pull(inp.state, inb, sizeof(inb), &inb_len); + printf("pull inp_len[%u]\n", inb_len); + } while (inb_len > 0); + + outb_size = 5; + do { + outp.alloc(outp.state, outb_size, &outb, &outb_len); + memset(outb, 0xCC, outb_len * sizeof(*outb)); + outp.push(outp.state, outb, outb_len); + printf("push outb_len[%u]\n", outb_len); + //Sleep(1000); + outb_size--; + } while (outb_len > 0); + + out1->l = 3; + out1->m = (unsigned char *)malloc(out1->l); + memset(out1->m, 0xBB, out1->l); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +long srv_midltests_ping( + /* [in] */ struct msg in1) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} +#endif diff --git a/testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-01.txt b/testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-01.txt new file mode 100644 index 0000000..1c8d003 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-01.txt @@ -0,0 +1,138 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[39] plen[15] + +[000] 03 00 00 00 00 00 02 00 03 00 00 00 AA AA AA ........ ....... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] + +[000] 54 72 75 65 True + +ndr32: got NDR32 + +alloc1:inp: bsize[5000], bcount[0] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[1] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[0] +ndr32:in => out: ptype[alter_req] flen[72] call[3] contexts[1] + + +ndr32:out => in: ptype[alter_ack] flen[56] call[3] + +ndr32:in => out: ptype[request] flen[56] plen[32] + +[000] 03 00 00 00 00 00 02 00 03 00 00 00 AA AA AA 00 ........ ........ +[010] 01 00 00 00 DD DD DD DD DD DD 08 00 00 00 00 00 ........ ........ + +srv_midltests_fn: Start +pull inp_len[1] +pull inp_len[0] +push outb_len[5] +push outb_len[4] +push outb_len[3] +push outb_len[2] +push outb_len[1] +push outb_len[0] +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[188] plen[164] + +[000] 05 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[010] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[020] CC CC CC CC CC CC CC CC CC CC 00 00 04 00 00 00 ........ ........ +[030] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[040] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[050] 03 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[060] CC CC CC CC CC CC CC CC CC CC 00 00 02 00 00 00 ........ ........ +[070] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[080] 01 00 00 00 CC CC CC CC CC CC 00 00 00 00 00 00 ........ ........ +[090] 03 00 00 00 00 00 02 00 03 00 00 00 BB BB BB 00 ........ ........ +[0A0] 54 72 75 65 True + +alloc1:outp: bsize[6664], bcount[1] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[15] +push:outp: ecount[0] +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[51] plen[27] + +[000] 03 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 ........ ........ +[010] 03 00 00 00 00 00 00 00 AA AA AA ........ ... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] + +[000] 54 72 75 65 True + + +ndr64: got NDR32 downgrade + + +alloc1:inp: bsize[5000], bcount[0] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[1] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[0] +ndr64:in => out: ptype[alter_req] flen[72] call[3] contexts[1] + + +ndr64:out => in: ptype[alter_ack] flen[56] call[3] + +ndr64:in => out: ptype[request] flen[56] plen[32] + +[000] 03 00 00 00 00 00 02 00 03 00 00 00 AA AA AA 00 ........ ........ +[010] 01 00 00 00 DD DD DD DD DD DD 00 00 00 00 00 00 ........ ........ + +srv_midltests_fn: Start +pull inp_len[1] +pull inp_len[0] +push outb_len[5] +push outb_len[4] +push outb_len[3] +push outb_len[2] +push outb_len[1] +push outb_len[0] +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[188] plen[164] + +[000] 05 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[010] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[020] CC CC CC CC CC CC CC CC CC CC 00 00 04 00 00 00 ........ ........ +[030] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[040] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[050] 03 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[060] CC CC CC CC CC CC CC CC CC CC 00 00 02 00 00 00 ........ ........ +[070] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[080] 01 00 00 00 CC CC CC CC CC CC 00 00 00 00 00 00 ........ ........ +[090] 03 00 00 00 00 00 02 00 03 00 00 00 BB BB BB 00 ........ ........ +[0A0] 54 72 75 65 True + +alloc1:outp: bsize[6664], bcount[1] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[15] +push:outp: ecount[0] +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-02.idl b/testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-02.idl new file mode 100644 index 0000000..888ba79 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-02.idl @@ -0,0 +1,300 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef pipe char pipe_char; + typedef pipe hyper pipe_hyper; + typedef struct { + long l; + short s; + } structtype; + typedef pipe structtype pipe_structtype; + + struct msg { + long l; + [size_is(l)] char *m; + }; + + long midltests_fn( + [out,ref] struct msg *out1, + [out] pipe_structtype outp, + [in] pipe_structtype inp, + [in] struct msg in1 + ); + + long midltests_ping( [in] struct msg in1); + +} + +#elif MIDLTESTS_C_CODE + +struct pipe_char_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_char_pull( + char * _state, + unsigned char * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_char_push( + char * _state, + unsigned char * buf, + unsigned long ecount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_char_alloc( + char * _state, + unsigned long bsize, + unsigned char * * buf, + unsigned long * bcount) +{ + struct pipe_char_state *state = (struct pipe_char_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} + +struct pipe_hyper_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_hyper_pull( + char * _state, + hyper * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_hyper_push( + char * _state, + hyper * buf, + unsigned long ecount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_hyper_alloc( + char * _state, + unsigned long bsize, + hyper * * buf, + unsigned long * bcount) +{ + struct pipe_hyper_state *state = (struct pipe_hyper_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} +struct pipe_structtype_state { + const char *name; + unsigned long count; + unsigned long sleep; +}; + +void pipe_structtype_pull( + char * _state, + structtype * buf, + unsigned long esize, + unsigned long * ecount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("pull1:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); + *ecount = state->count--; + if (*ecount > esize) { + *ecount = esize; + } + memset(buf, 0xDD, *ecount * sizeof(*buf)); + printf("pull2:%s: esize[%u] ecount[%u]\n", + state->name, esize, *ecount); +} + +void pipe_structtype_push( + char * _state, + structtype * buf, + unsigned long ecount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("push:%s: ecount[%u]\n", + state->name, ecount); +} + +void pipe_structtype_alloc( + char * _state, + unsigned long bsize, + structtype * * buf, + unsigned long * bcount) +{ + struct pipe_structtype_state *state = (struct pipe_structtype_state *)_state; + + printf("alloc1:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); + *bcount = bsize / sizeof(**buf); + *buf = malloc(*bcount * sizeof(**buf)); + printf("alloc2:%s: bsize[%u], bcount[%u]\n", + state->name, bsize, *bcount); +} +static void midltests(void) +{ + struct msg out1; + unsigned char out1b[3]; + struct pipe_structtype_state outs; + pipe_structtype outp; + struct pipe_structtype_state ins; + pipe_structtype inp; + struct msg in1; + unsigned char in1b[3000]; + + in1.l = sizeof(in1b); + memset(&in1b, 0xAA, sizeof(in1b)); + in1.m = in1b; + + memset(&outs, 0, sizeof(outs)); + outs.name = "outp"; + memset(&outp, 0, sizeof(outp)); + outp.pull = pipe_structtype_pull; + outp.push = pipe_structtype_push; + outp.alloc = pipe_structtype_alloc; + outp.state = (char *)&outs; + + memset(&ins, 0, sizeof(ins)); + ins.name = "inp"; + ins.count = 35; + memset(&inp, 0, sizeof(inp)); + inp.pull = pipe_structtype_pull; + inp.push = pipe_structtype_push; + inp.alloc = pipe_structtype_alloc; + inp.state = (char *)&ins; + + out1.l = sizeof(out1b); + memset(&out1b, 0xFF, sizeof(out1b)); + out1.m = out1b; + + cli_midltests_ping(in1); + cli_midltests_fn(&out1, outp, inp, in1); +} + +long srv_midltests_fn( + /* [ref][out] */ struct msg *out1, + /* [out] */ pipe_structtype outp, + /* [in] */ pipe_structtype inp, + /* [in] */ struct msg in1) +{ + structtype inb[2500]; + unsigned long inb_len = 0; + structtype *outb = NULL; + unsigned long outb_size = 0; + unsigned long outb_len = 0; + + printf("srv_midltests_fn: Start\n"); + fflush(stdout); + + do { + inp.pull(inp.state, inb, sizeof(inb), &inb_len); + printf("pull inp_len[%u]\n", inb_len); + fflush(stdout); + } while (inb_len > 0); + + outb_size = 50; + do { + outp.alloc(outp.state, outb_size, &outb, &outb_len); + memset(outb, 0xCC, outb_len * sizeof(*outb)); + printf("push outb_len[%u]\n", outb_len); + fflush(stdout); + outp.push(outp.state, outb, outb_len); + //Sleep(1000); + outb_size--; + } while (outb_len > 0); + + out1->l = 3; + out1->m = (unsigned char *)malloc(out1->l); + memset(out1->m, 0xBB, out1->l); + printf("srv_midltests_fn: End\n"); + fflush(stdout); + return 0x65757254; +} + +long srv_midltests_ping( + /* [in] */ struct msg in1) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} +#endif diff --git a/testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-02.txt b/testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-02.txt new file mode 100644 index 0000000..9ae037e --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests-pipe-sync-ndr32-downgrade-02.txt @@ -0,0 +1,3266 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[3036] plen[3012] ahint[3012] + +[000] B8 0B 00 00 00 00 02 00 B8 0B 00 00 AA AA AA AA ........ ........ +[010] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[020] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[030] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[040] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[050] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[060] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[070] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[080] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[090] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[100] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[110] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[120] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[130] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[140] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[150] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[160] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[170] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[180] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[190] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[200] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[210] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[220] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[230] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[240] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[250] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[260] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[270] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[280] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[290] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[300] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[310] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[320] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[330] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[340] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[350] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[360] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[370] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[380] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[390] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[400] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[410] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[420] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[430] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[440] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[450] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[460] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[470] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[480] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[490] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[500] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[510] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[520] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[530] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[540] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[550] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[560] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[570] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[580] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[590] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[600] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[610] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[620] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[630] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[640] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[650] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[660] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[670] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[680] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[690] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[700] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[710] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[720] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[730] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[740] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[750] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[760] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[770] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[780] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[790] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[800] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[810] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[820] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[830] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[840] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[850] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[860] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[870] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[880] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[890] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[900] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[910] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[920] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[930] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[940] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[950] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[960] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[970] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[980] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[990] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A00] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A10] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A20] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A30] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A40] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A50] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A60] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A70] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A80] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A90] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AA0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AB0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AC0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AD0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AE0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AF0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B00] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B10] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B20] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B30] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B40] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B50] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B60] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B70] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B80] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B90] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[BA0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[BB0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[BC0] AA AA AA AA .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32: disable NDR64 + +alloc1:inp: bsize[5000], bcount[0] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[35] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[34] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[33] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[32] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[31] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[30] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[29] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[28] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[27] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[26] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[25] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[24] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[23] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[22] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[21] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[20] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[19] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[18] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[17] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[16] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[15] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[14] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[13] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[12] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[11] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[10] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[9] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[8] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[7] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[6] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[5] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[4] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[3] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[2] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[1] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[0] +ndr32:in => out: ptype[request] flen[5840] plen[5816] ahint[3012] + +[000] B8 0B 00 00 00 00 02 00 B8 0B 00 00 AA AA AA AA ........ ........ +[010] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[020] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[030] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[040] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[050] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[060] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[070] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[080] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[090] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[100] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[110] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[120] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[130] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[140] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[150] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[160] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[170] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[180] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[190] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[200] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[210] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[220] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[230] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[240] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[250] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[260] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[270] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[280] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[290] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[300] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[310] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[320] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[330] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[340] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[350] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[360] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[370] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[380] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[390] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[400] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[410] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[420] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[430] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[440] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[450] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[460] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[470] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[480] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[490] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[500] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[510] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[520] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[530] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[540] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[550] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[560] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[570] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[580] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[590] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[600] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[610] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[620] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[630] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[640] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[650] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[660] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[670] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[680] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[690] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[700] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[710] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[720] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[730] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[740] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[750] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[760] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[770] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[780] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[790] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[800] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[810] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[820] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[830] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[840] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[850] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[860] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[870] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[880] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[890] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[900] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[910] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[920] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[930] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[940] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[950] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[960] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[970] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[980] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[990] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A00] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A10] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A20] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A30] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A40] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A50] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A60] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A70] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A80] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A90] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AA0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AB0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AC0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AD0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AE0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AF0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B00] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B10] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B20] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B30] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B40] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B50] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B60] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B70] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B80] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B90] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[BA0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[BB0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[BC0] AA AA AA AA 23 00 00 00 DD DD DD DD DD DD DD DD ....#... ........ +[BD0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[BE0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[BF0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C00] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C10] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C20] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C30] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C40] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C50] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C60] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C70] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C80] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C90] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[CA0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[CB0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[CC0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[CD0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD 00 00 ........ ........ +[CE0] 22 00 00 00 DD DD DD DD DD DD DD DD DD DD DD DD "....... ........ +[CF0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D00] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D10] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D20] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D30] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D40] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D50] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D60] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D70] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D80] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D90] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[DA0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[DB0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[DC0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[DD0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[DE0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[DF0] DD DD 00 00 21 00 00 00 DD DD DD DD DD DD DD DD ....!... ........ +[E00] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E10] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E20] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E30] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E40] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E50] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E60] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E70] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E80] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E90] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[EA0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[EB0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[EC0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[ED0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[EE0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[EF0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD 00 00 ........ ........ +[F00] 20 00 00 00 DD DD DD DD DD DD DD DD DD DD DD DD ....... ........ +[F10] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F20] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F30] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F40] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F50] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F60] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F70] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F80] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F90] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[FA0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[FB0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[FC0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[FD0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[FE0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[FF0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1000] DD DD 00 00 1F 00 00 00 DD DD DD DD DD DD DD DD ........ ........ +[1010] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1020] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1030] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1040] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1050] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1060] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1070] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1080] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1090] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[10A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[10B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[10C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[10D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[10E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[10F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD 00 00 ........ ........ +[1100] 1E 00 00 00 DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1110] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1120] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1130] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1140] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1150] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1160] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1170] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1180] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1190] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[11A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[11B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[11C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[11D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[11E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[11F0] DD DD 00 00 1D 00 00 00 DD DD DD DD DD DD DD DD ........ ........ +[1200] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1210] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1220] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1230] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1240] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1250] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1260] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1270] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1280] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1290] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[12A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[12B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[12C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[12D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD 00 00 ........ ........ +[12E0] 1C 00 00 00 DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[12F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1300] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1310] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1320] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1330] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1340] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1350] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1360] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1370] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1380] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1390] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[13A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[13B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[13C0] DD DD 00 00 1B 00 00 00 DD DD DD DD DD DD DD DD ........ ........ +[13D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[13E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[13F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1400] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1410] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1420] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1430] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1440] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1450] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1460] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1470] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1480] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1490] DD DD DD DD DD DD DD DD DD DD DD DD DD DD 00 00 ........ ........ +[14A0] 1A 00 00 00 DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[14B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[14C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[14D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[14E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[14F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1500] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1510] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1520] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1530] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1540] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1550] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1560] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1570] DD DD 00 00 19 00 00 00 DD DD DD DD DD DD DD DD ........ ........ +[1580] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1590] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[15A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[15B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[15C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[15D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[15E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[15F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1600] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1610] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1620] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1630] DD DD DD DD DD DD DD DD DD DD DD DD DD DD 00 00 ........ ........ +[1640] 18 00 00 00 DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1650] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1660] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1670] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1680] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1690] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[16A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[16B0] DD DD DD DD DD DD DD DD ........ + +srv_midltests_fn: Start +pull inp_len[344] +ndr32:in => out: ptype[request] flen[2404] plen[2380] ahint[2380] + +[000] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[010] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[020] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[030] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[040] DD DD DD DD DD DD DD DD DD DD 00 00 17 00 00 00 ........ ........ +[050] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[060] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[070] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[080] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[090] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[0A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[0B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[0C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[0D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[0E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[0F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[100] DD DD DD DD DD DD AA AA 16 00 00 00 DD DD DD DD ........ ........ +[110] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[120] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[130] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[140] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[150] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[160] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[170] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[180] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[190] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1B0] DD DD DD DD DD DD DD DD DD DD AA AA 15 00 00 00 ........ ........ +[1C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[200] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[210] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[220] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[230] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[240] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[250] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[260] DD DD DD DD DD DD AA AA 14 00 00 00 DD DD DD DD ........ ........ +[270] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[280] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[290] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[2A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[2B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[2C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[2D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[2E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[2F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[300] DD DD DD DD DD DD DD DD DD DD AA AA 13 00 00 00 ........ ........ +[310] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[320] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[330] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[340] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[350] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[360] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[370] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[380] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[390] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[3A0] DD DD DD DD DD DD AA AA 12 00 00 00 DD DD DD DD ........ ........ +[3B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[3C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[3D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[3E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[3F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[400] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[410] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[420] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[430] DD DD DD DD DD DD DD DD DD DD AA AA 11 00 00 00 ........ ........ +[440] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[450] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[460] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[470] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[480] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[490] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[4A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[4B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[4C0] DD DD DD DD DD DD AA AA 10 00 00 00 DD DD DD DD ........ ........ +[4D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[4E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[4F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[500] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[510] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[520] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[530] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[540] DD DD DD DD DD DD DD DD DD DD AA AA 0F 00 00 00 ........ ........ +[550] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[560] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[570] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[580] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[590] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[5A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[5B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[5C0] DD DD DD DD DD DD AA AA 0E 00 00 00 DD DD DD DD ........ ........ +[5D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[5E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[5F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[600] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[610] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[620] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[630] DD DD DD DD DD DD DD DD DD DD AA AA 0D 00 00 00 ........ ........ +[640] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[650] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[660] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[670] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[680] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[690] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[6A0] DD DD DD DD DD DD AA AA 0C 00 00 00 DD DD DD DD ........ ........ +[6B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[6C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[6D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[6E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[6F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[700] DD DD DD DD DD DD DD DD DD DD AA AA 0B 00 00 00 ........ ........ +[710] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[720] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[730] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[740] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[750] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[760] DD DD DD DD DD DD AA AA 0A 00 00 00 DD DD DD DD ........ ........ +[770] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[780] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[790] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[7A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[7B0] DD DD DD DD DD DD DD DD DD DD AA AA 09 00 00 00 ........ ........ +[7C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[7D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[7E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[7F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[800] DD DD DD DD DD DD AA AA 08 00 00 00 DD DD DD DD ........ ........ +[810] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[820] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[830] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[840] DD DD DD DD DD DD DD DD DD DD AA AA 07 00 00 00 ........ ........ +[850] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[860] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[870] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[880] DD DD DD DD DD DD AA AA 06 00 00 00 DD DD DD DD ........ ........ +[890] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[8A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[8B0] DD DD DD DD DD DD DD DD DD DD AA AA 05 00 00 00 ........ ........ +[8C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[8D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[8E0] DD DD DD DD DD DD AA AA 04 00 00 00 DD DD DD DD ........ ........ +[8F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[900] DD DD DD DD DD DD DD DD DD DD AA AA 03 00 00 00 ........ ........ +[910] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[920] DD DD DD DD DD DD AA AA 02 00 00 00 DD DD DD DD ........ ........ +[930] DD DD DD DD DD DD DD DD DD DD AA AA 01 00 00 00 ........ ........ +[940] DD DD DD DD DD DD AA AA 00 00 00 00 ........ .... + +pull inp_len[286] +pull inp_len[0] +push outb_len[50] +push outb_len[49] +push outb_len[48] +push outb_len[47] +push outb_len[46] +push outb_len[45] +push outb_len[44] +push outb_len[43] +push outb_len[42] +push outb_len[41] +push outb_len[40] +push outb_len[39] +push outb_len[38] +push outb_len[37] +push outb_len[36] +push outb_len[35] +push outb_len[34] +push outb_len[33] +push outb_len[32] +push outb_len[31] +push outb_len[30] +push outb_len[29] +push outb_len[28] +push outb_len[27] +push outb_len[26] +push outb_len[25] +push outb_len[24] +push outb_len[23] +push outb_len[22] +push outb_len[21] +push outb_len[20] +push outb_len[19] +push outb_len[18] +push outb_len[17] +push outb_len[16] +push outb_len[15] +push outb_len[14] +push outb_len[13] +push outb_len[12] +push outb_len[11] +push outb_len[10] +push outb_len[9] +push outb_len[8] +push outb_len[7] +push outb_len[6] +push outb_len[5] +push outb_len[4] +push outb_len[3] +push outb_len[2] +push outb_len[1] +push outb_len[0] +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[5840] plen[5816] ahint[5816] + +[000] 32 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC 2....... ........ +[010] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[020] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[030] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[040] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[050] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[060] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[070] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[080] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[090] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[100] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[110] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[120] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[130] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[140] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[150] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[160] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[170] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[180] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[190] CC CC 00 00 31 00 00 00 CC CC CC CC CC CC CC CC ....1... ........ +[1A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[200] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[210] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[220] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[230] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[240] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[250] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[260] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[270] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[280] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[290] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[300] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[310] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[320] 30 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC 0....... ........ +[330] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[340] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[350] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[360] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[370] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[380] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[390] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[400] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[410] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[420] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[430] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[440] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[450] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[460] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[470] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[480] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[490] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4A0] CC CC 00 00 2F 00 00 00 CC CC CC CC CC CC CC CC ..../... ........ +[4B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[500] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[510] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[520] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[530] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[540] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[550] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[560] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[570] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[580] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[590] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[600] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[610] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[620] 2E 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[630] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[640] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[650] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[660] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[670] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[680] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[690] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[700] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[710] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[720] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[730] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[740] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[750] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[760] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[770] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[780] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[790] CC CC 00 00 2D 00 00 00 CC CC CC CC CC CC CC CC ....-... ........ +[7A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[800] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[810] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[820] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[830] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[840] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[850] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[860] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[870] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[880] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[890] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[900] 2C 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC ,....... ........ +[910] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[920] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[930] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[940] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[950] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[960] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[970] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[980] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[990] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A60] CC CC 00 00 2B 00 00 00 CC CC CC CC CC CC CC CC ....+... ........ +[A70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[BC0] 2A 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC *....... ........ +[BD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D10] CC CC 00 00 29 00 00 00 CC CC CC CC CC CC CC CC ....)... ........ +[D20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[E60] 28 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC (....... ........ +[E70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[ED0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FA0] CC CC 00 00 27 00 00 00 CC CC CC CC CC CC CC CC ....'... ........ +[FB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1000] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1010] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1020] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1030] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1040] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1050] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1060] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1070] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1080] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1090] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[10E0] 26 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC &....... ........ +[10F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1100] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1110] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1120] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1130] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1140] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1150] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1160] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1170] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1180] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1190] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1200] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1210] CC CC 00 00 25 00 00 00 CC CC CC CC CC CC CC CC ....%... ........ +[1220] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1230] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1240] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1250] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1260] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1270] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1280] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1290] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[12A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[12B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[12C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[12D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[12E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[12F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1300] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1310] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1320] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1330] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[1340] 24 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC $....... ........ +[1350] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1360] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1370] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1380] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1390] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[13A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[13B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[13C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[13D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[13E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[13F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1400] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1410] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1420] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1430] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1440] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1450] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1460] CC CC 00 00 23 00 00 00 CC CC CC CC CC CC CC CC ....#... ........ +[1470] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1480] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1490] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[14A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[14B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[14C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[14D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[14E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[14F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1500] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1510] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1520] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1530] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1540] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1550] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1560] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1570] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[1580] 22 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC "....... ........ +[1590] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[15A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[15B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[15C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[15D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[15E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[15F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1600] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1610] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1620] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1630] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1640] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1650] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1660] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1670] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1680] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1690] CC CC 00 00 21 00 00 00 CC CC CC CC CC CC CC CC ....!... ........ +[16A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[16B0] CC CC CC CC CC CC CC CC ........ + + +ndr32:out => in: ptype[response] flen[4632] plen[4608] ahint[4608] + +[000] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[010] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[020] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[030] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[040] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[050] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[060] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[070] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[080] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[090] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0E0] CC CC CC CC CC CC 00 00 20 00 00 00 CC CC CC CC ........ ....... +[0F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[100] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[110] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[120] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[130] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[140] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[150] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[160] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[170] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[180] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[190] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1E0] CC CC CC CC CC CC CC CC CC CC CC CC 1F 00 00 00 ........ ........ +[1F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[200] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[210] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[220] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[230] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[240] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[250] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[260] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[270] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[280] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[290] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2E0] CC CC CC CC CC CC CC CC 1E 00 00 00 CC CC CC CC ........ ........ +[2F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[300] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[310] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[320] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[330] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[340] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[350] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[360] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[370] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[380] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[390] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3D0] CC CC CC CC CC CC CC CC CC CC CC CC 1D 00 00 00 ........ ........ +[3E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[400] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[410] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[420] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[430] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[440] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[450] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[460] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[470] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[480] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[490] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4C0] CC CC CC CC CC CC CC CC 1C 00 00 00 CC CC CC CC ........ ........ +[4D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[500] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[510] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[520] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[530] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[540] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[550] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[560] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[570] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[580] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[590] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5A0] CC CC CC CC CC CC CC CC CC CC CC CC 1B 00 00 00 ........ ........ +[5B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[600] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[610] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[620] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[630] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[640] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[650] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[660] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[670] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[680] CC CC CC CC CC CC CC CC 1A 00 00 00 CC CC CC CC ........ ........ +[690] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[700] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[710] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[720] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[730] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[740] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[750] CC CC CC CC CC CC CC CC CC CC CC CC 19 00 00 00 ........ ........ +[760] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[770] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[780] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[790] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[800] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[810] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[820] CC CC CC CC CC CC CC CC 18 00 00 00 CC CC CC CC ........ ........ +[830] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[840] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[850] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[860] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[870] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[880] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[890] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8E0] CC CC CC CC CC CC CC CC CC CC CC CC 17 00 00 00 ........ ........ +[8F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[900] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[910] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[920] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[930] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[940] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[950] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[960] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[970] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[980] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[990] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9A0] CC CC CC CC CC CC CC CC 16 00 00 00 CC CC CC CC ........ ........ +[9B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A50] CC CC CC CC CC CC CC CC CC CC CC CC 15 00 00 00 ........ ........ +[A60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B00] CC CC CC CC CC CC CC CC 14 00 00 00 CC CC CC CC ........ ........ +[B10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BA0] CC CC CC CC CC CC CC CC CC CC CC CC 13 00 00 00 ........ ........ +[BB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C40] CC CC CC CC CC CC CC CC 12 00 00 00 CC CC CC CC ........ ........ +[C50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CD0] CC CC CC CC CC CC CC CC CC CC CC CC 11 00 00 00 ........ ........ +[CE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D60] CC CC CC CC CC CC CC CC 10 00 00 00 CC CC CC CC ........ ........ +[D70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DE0] CC CC CC CC CC CC CC CC CC CC CC CC 0F 00 00 00 ........ ........ +[DF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E60] CC CC CC CC CC CC CC CC 0E 00 00 00 CC CC CC CC ........ ........ +[E70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[ED0] CC CC CC CC CC CC CC CC CC CC CC CC 0D 00 00 00 ........ ........ +[EE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F40] CC CC CC CC CC CC CC CC 0C 00 00 00 CC CC CC CC ........ ........ +[F50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FA0] CC CC CC CC CC CC CC CC CC CC CC CC 0B 00 00 00 ........ ........ +[FB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1000] CC CC CC CC CC CC CC CC 0A 00 00 00 CC CC CC CC ........ ........ +[1010] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1020] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1030] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1040] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1050] CC CC CC CC CC CC CC CC CC CC CC CC 09 00 00 00 ........ ........ +[1060] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1070] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1080] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1090] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10A0] CC CC CC CC CC CC CC CC 08 00 00 00 CC CC CC CC ........ ........ +[10B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10E0] CC CC CC CC CC CC CC CC CC CC CC CC 07 00 00 00 ........ ........ +[10F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1100] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1110] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1120] CC CC CC CC CC CC CC CC 06 00 00 00 CC CC CC CC ........ ........ +[1130] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1140] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1150] CC CC CC CC CC CC CC CC CC CC CC CC 05 00 00 00 ........ ........ +[1160] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1170] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1180] CC CC CC CC CC CC CC CC 04 00 00 00 CC CC CC CC ........ ........ +[1190] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11A0] CC CC CC CC CC CC CC CC CC CC CC CC 03 00 00 00 ........ ........ +[11B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11C0] CC CC CC CC CC CC CC CC 02 00 00 00 CC CC CC CC ........ ........ +[11D0] CC CC CC CC CC CC CC CC CC CC CC CC 01 00 00 00 ........ ........ +[11E0] CC CC CC CC CC CC CC CC 00 00 00 00 03 00 00 00 ........ ........ +[11F0] 00 00 02 00 03 00 00 00 BB BB BB 00 54 72 75 65 ........ ....True + +alloc1:outp: bsize[6664], bcount[1] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[27] +push:outp: ecount[0] +NDRTcpThread[ndr32] stop +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[3048] plen[3024] ahint[3024] + +[000] B8 0B 00 00 00 00 00 00 00 00 02 00 00 00 00 00 ........ ........ +[010] B8 0B 00 00 00 00 00 00 AA AA AA AA AA AA AA AA ........ ........ +[020] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[030] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[040] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[050] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[060] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[070] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[080] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[090] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[100] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[110] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[120] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[130] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[140] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[150] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[160] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[170] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[180] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[190] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[200] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[210] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[220] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[230] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[240] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[250] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[260] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[270] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[280] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[290] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[300] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[310] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[320] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[330] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[340] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[350] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[360] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[370] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[380] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[390] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[400] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[410] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[420] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[430] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[440] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[450] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[460] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[470] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[480] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[490] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[500] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[510] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[520] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[530] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[540] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[550] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[560] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[570] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[580] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[590] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[600] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[610] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[620] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[630] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[640] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[650] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[660] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[670] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[680] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[690] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[700] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[710] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[720] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[730] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[740] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[750] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[760] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[770] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[780] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[790] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[800] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[810] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[820] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[830] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[840] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[850] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[860] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[870] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[880] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[890] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[900] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[910] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[920] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[930] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[940] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[950] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[960] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[970] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[980] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[990] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A00] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A10] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A20] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A30] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A40] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A50] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A60] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A70] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A80] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A90] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AA0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AB0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AC0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AD0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AE0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AF0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B00] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B10] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B20] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B30] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B40] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B50] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B60] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B70] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B80] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B90] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[BA0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[BB0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[BC0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64: got NDR64 + +alloc1:inp: bsize[5000], bcount[0] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[35] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[34] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[33] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[32] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[31] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[30] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[29] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[28] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[27] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[26] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[25] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[24] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[23] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[22] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[21] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[20] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[19] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[18] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[17] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[16] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[15] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[14] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[13] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[12] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[11] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[10] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[9] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[8] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[7] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[6] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[5] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[4] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[3] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[2] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[1] +alloc1:inp: bsize[5000], bcount[625] +alloc2:inp: bsize[5000], bcount[625] +pull1:inp: esize[78] ecount[78] +pull2:inp: esize[78] ecount[0] + +ndr64: got NDR32 downgrade + + +ndr64:in => out: ptype[alter_req] flen[72] call[3] contexts[1] + + +ndr64:out => in: ptype[alter_ack] flen[56] call[3] + +ndr64:in => out: ptype[request] flen[5840] plen[5816] ahint[3012] + +[000] B8 0B 00 00 00 00 02 00 B8 0B 00 00 AA AA AA AA ........ ........ +[010] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[020] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[030] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[040] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[050] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[060] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[070] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[080] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[090] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[0F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[100] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[110] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[120] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[130] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[140] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[150] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[160] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[170] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[180] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[190] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[1F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[200] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[210] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[220] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[230] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[240] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[250] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[260] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[270] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[280] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[290] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[2F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[300] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[310] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[320] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[330] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[340] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[350] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[360] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[370] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[380] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[390] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[3F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[400] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[410] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[420] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[430] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[440] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[450] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[460] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[470] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[480] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[490] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[4F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[500] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[510] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[520] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[530] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[540] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[550] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[560] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[570] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[580] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[590] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[5F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[600] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[610] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[620] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[630] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[640] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[650] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[660] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[670] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[680] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[690] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[6F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[700] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[710] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[720] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[730] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[740] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[750] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[760] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[770] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[780] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[790] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[7F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[800] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[810] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[820] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[830] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[840] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[850] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[860] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[870] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[880] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[890] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[8F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[900] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[910] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[920] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[930] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[940] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[950] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[960] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[970] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[980] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[990] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9A0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9B0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9C0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9D0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9E0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[9F0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A00] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A10] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A20] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A30] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A40] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A50] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A60] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A70] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A80] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[A90] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AA0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AB0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AC0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AD0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AE0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[AF0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B00] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B10] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B20] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B30] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B40] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B50] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B60] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B70] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B80] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[B90] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[BA0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[BB0] AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ........ ........ +[BC0] AA AA AA AA 23 00 00 00 DD DD DD DD DD DD DD DD ....#... ........ +[BD0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[BE0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[BF0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C00] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C10] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C20] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C30] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C40] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C50] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C60] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C70] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C80] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[C90] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[CA0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[CB0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[CC0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[CD0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD 00 00 ........ ........ +[CE0] 22 00 00 00 DD DD DD DD DD DD DD DD DD DD DD DD "....... ........ +[CF0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D00] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D10] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D20] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D30] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D40] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D50] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D60] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D70] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D80] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[D90] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[DA0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[DB0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[DC0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[DD0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[DE0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[DF0] DD DD 00 00 21 00 00 00 DD DD DD DD DD DD DD DD ....!... ........ +[E00] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E10] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E20] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E30] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E40] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E50] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E60] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E70] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E80] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[E90] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[EA0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[EB0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[EC0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[ED0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[EE0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[EF0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD 00 00 ........ ........ +[F00] 20 00 00 00 DD DD DD DD DD DD DD DD DD DD DD DD ....... ........ +[F10] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F20] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F30] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F40] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F50] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F60] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F70] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F80] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[F90] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[FA0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[FB0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[FC0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[FD0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[FE0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[FF0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1000] DD DD 00 00 1F 00 00 00 DD DD DD DD DD DD DD DD ........ ........ +[1010] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1020] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1030] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1040] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1050] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1060] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1070] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1080] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1090] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[10A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[10B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[10C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[10D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[10E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[10F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD 00 00 ........ ........ +[1100] 1E 00 00 00 DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1110] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1120] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1130] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1140] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1150] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1160] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1170] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1180] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1190] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[11A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[11B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[11C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[11D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[11E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[11F0] DD DD 00 00 1D 00 00 00 DD DD DD DD DD DD DD DD ........ ........ +[1200] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1210] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1220] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1230] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1240] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1250] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1260] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1270] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1280] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1290] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[12A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[12B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[12C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[12D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD 00 00 ........ ........ +[12E0] 1C 00 00 00 DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[12F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1300] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1310] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1320] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1330] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1340] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1350] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1360] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1370] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1380] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1390] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[13A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[13B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[13C0] DD DD 00 00 1B 00 00 00 DD DD DD DD DD DD DD DD ........ ........ +[13D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[13E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[13F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1400] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1410] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1420] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1430] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1440] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1450] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1460] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1470] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1480] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1490] DD DD DD DD DD DD DD DD DD DD DD DD DD DD 00 00 ........ ........ +[14A0] 1A 00 00 00 DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[14B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[14C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[14D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[14E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[14F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1500] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1510] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1520] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1530] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1540] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1550] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1560] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1570] DD DD 00 00 19 00 00 00 DD DD DD DD DD DD DD DD ........ ........ +[1580] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1590] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[15A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[15B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[15C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[15D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[15E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[15F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1600] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1610] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1620] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1630] DD DD DD DD DD DD DD DD DD DD DD DD DD DD 00 00 ........ ........ +[1640] 18 00 00 00 DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1650] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1660] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1670] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1680] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1690] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[16A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[16B0] DD DD DD DD DD DD DD DD ........ + +srv_midltests_fn: Start +pull inp_len[344] +ndr64:in => out: ptype[request] flen[2404] plen[2380] ahint[2380] + +[000] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[010] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[020] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[030] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[040] DD DD DD DD DD DD DD DD DD DD 00 00 17 00 00 00 ........ ........ +[050] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[060] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[070] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[080] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[090] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[0A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[0B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[0C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[0D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[0E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[0F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[100] DD DD DD DD DD DD AA AA 16 00 00 00 DD DD DD DD ........ ........ +[110] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[120] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[130] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[140] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[150] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[160] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[170] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[180] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[190] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1B0] DD DD DD DD DD DD DD DD DD DD AA AA 15 00 00 00 ........ ........ +[1C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[1F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[200] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[210] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[220] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[230] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[240] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[250] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[260] DD DD DD DD DD DD AA AA 14 00 00 00 DD DD DD DD ........ ........ +[270] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[280] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[290] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[2A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[2B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[2C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[2D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[2E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[2F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[300] DD DD DD DD DD DD DD DD DD DD AA AA 13 00 00 00 ........ ........ +[310] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[320] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[330] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[340] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[350] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[360] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[370] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[380] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[390] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[3A0] DD DD DD DD DD DD AA AA 12 00 00 00 DD DD DD DD ........ ........ +[3B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[3C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[3D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[3E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[3F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[400] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[410] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[420] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[430] DD DD DD DD DD DD DD DD DD DD AA AA 11 00 00 00 ........ ........ +[440] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[450] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[460] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[470] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[480] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[490] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[4A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[4B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[4C0] DD DD DD DD DD DD AA AA 10 00 00 00 DD DD DD DD ........ ........ +[4D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[4E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[4F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[500] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[510] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[520] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[530] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[540] DD DD DD DD DD DD DD DD DD DD AA AA 0F 00 00 00 ........ ........ +[550] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[560] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[570] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[580] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[590] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[5A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[5B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[5C0] DD DD DD DD DD DD AA AA 0E 00 00 00 DD DD DD DD ........ ........ +[5D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[5E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[5F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[600] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[610] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[620] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[630] DD DD DD DD DD DD DD DD DD DD AA AA 0D 00 00 00 ........ ........ +[640] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[650] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[660] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[670] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[680] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[690] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[6A0] DD DD DD DD DD DD AA AA 0C 00 00 00 DD DD DD DD ........ ........ +[6B0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[6C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[6D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[6E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[6F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[700] DD DD DD DD DD DD DD DD DD DD AA AA 0B 00 00 00 ........ ........ +[710] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[720] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[730] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[740] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[750] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[760] DD DD DD DD DD DD AA AA 0A 00 00 00 DD DD DD DD ........ ........ +[770] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[780] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[790] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[7A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[7B0] DD DD DD DD DD DD DD DD DD DD AA AA 09 00 00 00 ........ ........ +[7C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[7D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[7E0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[7F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[800] DD DD DD DD DD DD AA AA 08 00 00 00 DD DD DD DD ........ ........ +[810] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[820] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[830] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[840] DD DD DD DD DD DD DD DD DD DD AA AA 07 00 00 00 ........ ........ +[850] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[860] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[870] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[880] DD DD DD DD DD DD AA AA 06 00 00 00 DD DD DD DD ........ ........ +[890] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[8A0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[8B0] DD DD DD DD DD DD DD DD DD DD AA AA 05 00 00 00 ........ ........ +[8C0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[8D0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[8E0] DD DD DD DD DD DD AA AA 04 00 00 00 DD DD DD DD ........ ........ +[8F0] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[900] DD DD DD DD DD DD DD DD DD DD AA AA 03 00 00 00 ........ ........ +[910] DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD ........ ........ +[920] DD DD DD DD DD DD AA AA 02 00 00 00 DD DD DD DD ........ ........ +[930] DD DD DD DD DD DD DD DD DD DD AA AA 01 00 00 00 ........ ........ +[940] DD DD DD DD DD DD AA AA 00 00 00 00 ........ .... + +pull inp_len[286] +pull inp_len[0] +push outb_len[50] +push outb_len[49] +push outb_len[48] +push outb_len[47] +push outb_len[46] +push outb_len[45] +push outb_len[44] +push outb_len[43] +push outb_len[42] +push outb_len[41] +push outb_len[40] +push outb_len[39] +push outb_len[38] +push outb_len[37] +push outb_len[36] +push outb_len[35] +push outb_len[34] +push outb_len[33] +push outb_len[32] +push outb_len[31] +push outb_len[30] +push outb_len[29] +push outb_len[28] +push outb_len[27] +push outb_len[26] +push outb_len[25] +push outb_len[24] +push outb_len[23] +push outb_len[22] +push outb_len[21] +push outb_len[20] +push outb_len[19] +push outb_len[18] +push outb_len[17] +push outb_len[16] +push outb_len[15] +push outb_len[14] +push outb_len[13] +push outb_len[12] +push outb_len[11] +push outb_len[10] +push outb_len[9] +push outb_len[8] +push outb_len[7] +push outb_len[6] +push outb_len[5] +push outb_len[4] +push outb_len[3] +push outb_len[2] +push outb_len[1] +push outb_len[0] +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[5840] plen[5816] ahint[5816] + +[000] 32 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC 2....... ........ +[010] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[020] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[030] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[040] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[050] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[060] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[070] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[080] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[090] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[100] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[110] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[120] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[130] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[140] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[150] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[160] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[170] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[180] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[190] CC CC 00 00 31 00 00 00 CC CC CC CC CC CC CC CC ....1... ........ +[1A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[200] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[210] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[220] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[230] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[240] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[250] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[260] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[270] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[280] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[290] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[300] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[310] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[320] 30 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC 0....... ........ +[330] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[340] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[350] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[360] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[370] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[380] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[390] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[400] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[410] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[420] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[430] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[440] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[450] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[460] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[470] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[480] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[490] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4A0] CC CC 00 00 2F 00 00 00 CC CC CC CC CC CC CC CC ..../... ........ +[4B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[500] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[510] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[520] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[530] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[540] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[550] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[560] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[570] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[580] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[590] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[600] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[610] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[620] 2E 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[630] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[640] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[650] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[660] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[670] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[680] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[690] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[700] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[710] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[720] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[730] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[740] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[750] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[760] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[770] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[780] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[790] CC CC 00 00 2D 00 00 00 CC CC CC CC CC CC CC CC ....-... ........ +[7A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[800] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[810] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[820] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[830] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[840] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[850] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[860] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[870] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[880] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[890] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[900] 2C 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC ,....... ........ +[910] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[920] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[930] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[940] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[950] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[960] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[970] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[980] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[990] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A60] CC CC 00 00 2B 00 00 00 CC CC CC CC CC CC CC CC ....+... ........ +[A70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[BC0] 2A 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC *....... ........ +[BD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D10] CC CC 00 00 29 00 00 00 CC CC CC CC CC CC CC CC ....)... ........ +[D20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[E60] 28 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC (....... ........ +[E70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[ED0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FA0] CC CC 00 00 27 00 00 00 CC CC CC CC CC CC CC CC ....'... ........ +[FB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1000] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1010] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1020] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1030] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1040] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1050] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1060] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1070] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1080] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1090] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[10E0] 26 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC &....... ........ +[10F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1100] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1110] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1120] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1130] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1140] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1150] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1160] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1170] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1180] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1190] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1200] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1210] CC CC 00 00 25 00 00 00 CC CC CC CC CC CC CC CC ....%... ........ +[1220] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1230] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1240] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1250] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1260] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1270] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1280] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1290] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[12A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[12B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[12C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[12D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[12E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[12F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1300] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1310] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1320] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1330] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[1340] 24 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC $....... ........ +[1350] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1360] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1370] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1380] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1390] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[13A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[13B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[13C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[13D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[13E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[13F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1400] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1410] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1420] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1430] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1440] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1450] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1460] CC CC 00 00 23 00 00 00 CC CC CC CC CC CC CC CC ....#... ........ +[1470] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1480] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1490] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[14A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[14B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[14C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[14D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[14E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[14F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1500] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1510] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1520] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1530] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1540] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1550] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1560] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1570] CC CC CC CC CC CC CC CC CC CC CC CC CC CC 00 00 ........ ........ +[1580] 22 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC "....... ........ +[1590] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[15A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[15B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[15C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[15D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[15E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[15F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1600] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1610] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1620] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1630] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1640] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1650] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1660] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1670] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1680] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1690] CC CC 00 00 21 00 00 00 CC CC CC CC CC CC CC CC ....!... ........ +[16A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[16B0] CC CC CC CC CC CC CC CC ........ + + +ndr64:out => in: ptype[response] flen[4632] plen[4608] ahint[4608] + +[000] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[010] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[020] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[030] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[040] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[050] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[060] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[070] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[080] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[090] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[0E0] CC CC CC CC CC CC 00 00 20 00 00 00 CC CC CC CC ........ ....... +[0F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[100] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[110] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[120] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[130] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[140] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[150] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[160] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[170] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[180] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[190] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1E0] CC CC CC CC CC CC CC CC CC CC CC CC 1F 00 00 00 ........ ........ +[1F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[200] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[210] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[220] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[230] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[240] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[250] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[260] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[270] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[280] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[290] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[2E0] CC CC CC CC CC CC CC CC 1E 00 00 00 CC CC CC CC ........ ........ +[2F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[300] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[310] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[320] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[330] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[340] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[350] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[360] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[370] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[380] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[390] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3D0] CC CC CC CC CC CC CC CC CC CC CC CC 1D 00 00 00 ........ ........ +[3E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[3F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[400] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[410] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[420] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[430] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[440] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[450] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[460] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[470] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[480] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[490] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4C0] CC CC CC CC CC CC CC CC 1C 00 00 00 CC CC CC CC ........ ........ +[4D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[4F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[500] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[510] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[520] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[530] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[540] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[550] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[560] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[570] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[580] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[590] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5A0] CC CC CC CC CC CC CC CC CC CC CC CC 1B 00 00 00 ........ ........ +[5B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[5F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[600] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[610] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[620] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[630] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[640] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[650] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[660] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[670] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[680] CC CC CC CC CC CC CC CC 1A 00 00 00 CC CC CC CC ........ ........ +[690] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[6F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[700] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[710] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[720] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[730] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[740] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[750] CC CC CC CC CC CC CC CC CC CC CC CC 19 00 00 00 ........ ........ +[760] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[770] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[780] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[790] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[7F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[800] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[810] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[820] CC CC CC CC CC CC CC CC 18 00 00 00 CC CC CC CC ........ ........ +[830] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[840] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[850] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[860] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[870] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[880] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[890] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8A0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[8E0] CC CC CC CC CC CC CC CC CC CC CC CC 17 00 00 00 ........ ........ +[8F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[900] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[910] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[920] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[930] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[940] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[950] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[960] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[970] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[980] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[990] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9A0] CC CC CC CC CC CC CC CC 16 00 00 00 CC CC CC CC ........ ........ +[9B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9E0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[9F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A50] CC CC CC CC CC CC CC CC CC CC CC CC 15 00 00 00 ........ ........ +[A60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[A90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[AF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B00] CC CC CC CC CC CC CC CC 14 00 00 00 CC CC CC CC ........ ........ +[B10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[B90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BA0] CC CC CC CC CC CC CC CC CC CC CC CC 13 00 00 00 ........ ........ +[BB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[BF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C40] CC CC CC CC CC CC CC CC 12 00 00 00 CC CC CC CC ........ ........ +[C50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[C90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CD0] CC CC CC CC CC CC CC CC CC CC CC CC 11 00 00 00 ........ ........ +[CE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[CF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D60] CC CC CC CC CC CC CC CC 10 00 00 00 CC CC CC CC ........ ........ +[D70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[D90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[DE0] CC CC CC CC CC CC CC CC CC CC CC CC 0F 00 00 00 ........ ........ +[DF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E40] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E60] CC CC CC CC CC CC CC CC 0E 00 00 00 CC CC CC CC ........ ........ +[E70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[E90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EA0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[ED0] CC CC CC CC CC CC CC CC CC CC CC CC 0D 00 00 00 ........ ........ +[EE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[EF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F00] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F10] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F20] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F30] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F40] CC CC CC CC CC CC CC CC 0C 00 00 00 CC CC CC CC ........ ........ +[F50] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F60] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F70] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F80] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[F90] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FA0] CC CC CC CC CC CC CC CC CC CC CC CC 0B 00 00 00 ........ ........ +[FB0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FC0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FD0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FE0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[FF0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1000] CC CC CC CC CC CC CC CC 0A 00 00 00 CC CC CC CC ........ ........ +[1010] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1020] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1030] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1040] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1050] CC CC CC CC CC CC CC CC CC CC CC CC 09 00 00 00 ........ ........ +[1060] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1070] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1080] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1090] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10A0] CC CC CC CC CC CC CC CC 08 00 00 00 CC CC CC CC ........ ........ +[10B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10C0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10D0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[10E0] CC CC CC CC CC CC CC CC CC CC CC CC 07 00 00 00 ........ ........ +[10F0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1100] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1110] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1120] CC CC CC CC CC CC CC CC 06 00 00 00 CC CC CC CC ........ ........ +[1130] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1140] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1150] CC CC CC CC CC CC CC CC CC CC CC CC 05 00 00 00 ........ ........ +[1160] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1170] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[1180] CC CC CC CC CC CC CC CC 04 00 00 00 CC CC CC CC ........ ........ +[1190] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11A0] CC CC CC CC CC CC CC CC CC CC CC CC 03 00 00 00 ........ ........ +[11B0] CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC ........ ........ +[11C0] CC CC CC CC CC CC CC CC 02 00 00 00 CC CC CC CC ........ ........ +[11D0] CC CC CC CC CC CC CC CC CC CC CC CC 01 00 00 00 ........ ........ +[11E0] CC CC CC CC CC CC CC CC 00 00 00 00 03 00 00 00 ........ ........ +[11F0] 00 00 02 00 03 00 00 00 BB BB BB 00 54 72 75 65 ........ ....True + +alloc1:outp: bsize[6664], bcount[1] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[104] +alloc1:outp: bsize[6664], bcount[833] +alloc2:outp: bsize[6664], bcount[833] +push:outp: ecount[27] +push:outp: ecount[0] +NDRTcpThread[ndr64] stop +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.idl b/testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.idl new file mode 100644 index 0000000..73aeb16 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.idl @@ -0,0 +1,64 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + + typedef struct { + [range(1,10000)] long cb; + [size_is(cb)] char rcg[]; + } DRS_EXTENSIONS; + + long midltests_fn( + [out] DRS_EXTENSIONS **e + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + DRS_EXTENSIONS *e = NULL; + cli_midltests_fn(&e); +} + +long srv_midltests_fn(DRS_EXTENSIONS **_e) +{ + DRS_EXTENSIONS *e; + printf("srv_midltests_fn: Start\n"); + e = (DRS_EXTENSIONS *)malloc(sizeof(DRS_EXTENSIONS) + 0x34); + e->cb = 0x34; + memset(e->rcg, 0xcd, e->cb); + *_e = e; + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.out b/testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.out new file mode 100644 index 0000000..e0b3a0e --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_DRS_EXTENSIONS.out @@ -0,0 +1,43 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[24] plen[0] ahint[0] + + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[92] plen[68] ahint[68] + +[000] 00 00 02 00 34 00 00 00 34 00 00 00 CD CD CD CD ....4... 4....... +[010] CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........ +[020] CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........ +[030] CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........ +[040] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[24] plen[0] ahint[0] + + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[100] plen[76] ahint[76] + +[000] 00 00 02 00 00 00 00 00 34 00 00 00 00 00 00 00 ........ 4....... +[010] 34 00 00 00 CD CD CD CD CD CD CD CD CD CD CD CD 4....... ........ +[020] CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........ +[030] CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........ +[040] CD CD CD CD CD CD CD CD 54 72 75 65 ........ True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_fixed_size_in_array_01.idl b/testprogs/win32/midltests/valid/midltests_fixed_size_in_array_01.idl new file mode 100644 index 0000000..170b147 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_fixed_size_in_array_01.idl @@ -0,0 +1,29 @@ +#ifndef MIDLTESTS_C_CODE + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + long midltests_fn( + [in] long a[2] + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + long a[2] = { 1, 2 }; + cli_midltests_fn(a); +} + +long srv_midltests_fn(long a[2]) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_fixed_size_in_array_01.txt b/testprogs/win32/midltests/valid/midltests_fixed_size_in_array_01.txt new file mode 100644 index 0000000..8903c4c --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_fixed_size_in_array_01.txt @@ -0,0 +1,6 @@ +[in] Buffer[8/24] +[000] 01 00 00 00 02 00 00 00 ........ +srv_midltests_fn: Start +srv_midltests_fn: End +[out] Buffer[4] +[000] 54 72 75 65 True diff --git a/testprogs/win32/midltests/valid/midltests_strings_array_01.err.txt b/testprogs/win32/midltests/valid/midltests_strings_array_01.err.txt new file mode 100644 index 0000000..dbbc89a --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_strings_array_01.err.txt @@ -0,0 +1,13 @@ +[in] Buffer[53/53] +[000] 03 00 00 00 03 00 00 00 00 00 02 00 04 00 02 00 ........ ........ +[010] 00 00 00 00 04 00 00 00 00 00 00 00 04 00 00 00 ........ ........ +[020] 66 6F 6F 00 05 00 00 00 00 00 00 00 05 00 00 00 foo..... ........ +[030] 62 61 72 32 00 bar2. +srv_midltests_fn: Start +srv_midltests_fn: End +[out] Buffer[60] +[000] 03 00 00 00 03 00 00 00 00 00 02 00 04 00 02 00 ........ ........ +[010] 00 00 00 00 04 00 00 00 00 00 00 00 04 00 00 00 ........ ........ +[020] 66 6F 6F 00 05 00 00 00 00 00 00 00 05 00 00 00 foo..... ........ +[030] 62 61 72 32 00 00 00 00 54 72 75 65 bar2.... True +Runtime error 0x6f7 diff --git a/testprogs/win32/midltests/valid/midltests_strings_array_01.idl b/testprogs/win32/midltests/valid/midltests_strings_array_01.idl new file mode 100644 index 0000000..db05bb2 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_strings_array_01.idl @@ -0,0 +1,44 @@ +#ifndef MIDLTESTS_C_CODE + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + struct strings { + long count; + [size_is(count),string] char *val[]; + }; + + long midltests_fn( + [in,out,ref] struct strings *s + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + const char *s1 = "foo"; + const char *s2 = "bar"; + char *a[] = { "foo", "bar2", NULL }; + char buffer[1024]; + struct strings *s = buffer; + + s->count = 3; + s->val[0] = "foo"; + s->val[1] = "bar2"; + s->val[2] = NULL; + + cli_midltests_fn(s); +} + +long srv_midltests_fn(struct strings *a) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_strings_array_02.idl b/testprogs/win32/midltests/valid/midltests_strings_array_02.idl new file mode 100644 index 0000000..46154c9 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_strings_array_02.idl @@ -0,0 +1,44 @@ +#ifndef MIDLTESTS_C_CODE + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + struct strings { + long count; + [size_is(count),string] char *val[]; + }; + + long midltests_fn( + [in,ref] struct strings *s + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + const char *s1 = "foo"; + const char *s2 = "bar"; + char *a[] = { "foo", "bar2", NULL }; + char buffer[1024]; + struct strings *s = buffer; + + s->count = 3; + s->val[0] = "foo"; + s->val[1] = "bar2"; + s->val[2] = NULL; + + cli_midltests_fn(s); +} + +long srv_midltests_fn(struct strings *a) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_strings_array_02.txt b/testprogs/win32/midltests/valid/midltests_strings_array_02.txt new file mode 100644 index 0000000..2bec6a0 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_strings_array_02.txt @@ -0,0 +1,9 @@ +[in] Buffer[53/53] +[000] 03 00 00 00 03 00 00 00 00 00 02 00 04 00 02 00 ........ ........ +[010] 00 00 00 00 04 00 00 00 00 00 00 00 04 00 00 00 ........ ........ +[020] 66 6F 6F 00 05 00 00 00 00 00 00 00 05 00 00 00 foo..... ........ +[030] 62 61 72 32 00 bar2. +srv_midltests_fn: Start +srv_midltests_fn: End +[out] Buffer[4] +[000] 54 72 75 65 True diff --git a/testprogs/win32/midltests/valid/midltests_union_align_01.idl b/testprogs/win32/midltests/valid/midltests_union_align_01.idl new file mode 100644 index 0000000..fcea072 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_01.idl @@ -0,0 +1,42 @@ +#ifndef MIDLTESTS_C_CODE + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + [switch_type(short)] union u { + [case(0)]; + [case(2)] short s; + [case(4)] long l; + [case(8)] hyper h; + }; + + long midltests_fn( + [in] short level, + [in,switch_is(level)] union u u + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + cli_midltests_fn(0, u); + cli_midltests_fn(2, u); + cli_midltests_fn(4, u); + cli_midltests_fn(8, u); +} + +long srv_midltests_fn(short level, union u u) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_01.txt b/testprogs/win32/midltests/valid/midltests_union_align_01.txt new file mode 100644 index 0000000..cc372c8 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_01.txt @@ -0,0 +1,24 @@ +[in] Buffer[4/8] +[000] 00 00 00 00 .... +srv_midltests_fn: Start +srv_midltests_fn: End +[out] Buffer[4] +[000] 54 72 75 65 True +[in] Buffer[6/10] +[000] 02 00 02 00 FF FF ...... +srv_midltests_fn: Start +srv_midltests_fn: End +[out] Buffer[4] +[000] 54 72 75 65 True +[in] Buffer[8/12] +[000] 04 00 04 00 FF FF FF FF ........ +srv_midltests_fn: Start +srv_midltests_fn: End +[out] Buffer[4] +[000] 54 72 75 65 True +[in] Buffer[16/16] +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ +srv_midltests_fn: Start +srv_midltests_fn: End +[out] Buffer[4] +[000] 54 72 75 65 True diff --git a/testprogs/win32/midltests/valid/midltests_union_align_02.idl b/testprogs/win32/midltests/valid/midltests_union_align_02.idl new file mode 100644 index 0000000..dc2d84d --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_02.idl @@ -0,0 +1,61 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef [switch_type(char)] union { + [case(1)] char c; + } u; + long midltests_fn( + [in] char l, + [in,switch_is(l)] u u + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + char l; + u u; + + l = 1; + u.c = 'A'; + cli_midltests_fn(l,u); +} + +long srv_midltests_fn(char l, u u) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_02.txt b/testprogs/win32/midltests/valid/midltests_union_align_02.txt new file mode 100644 index 0000000..16186ea --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_02.txt @@ -0,0 +1,37 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[27] plen[3] ahint[3] + +[000] 01 01 41 ..A + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[27] plen[3] ahint[3] + +[000] 01 01 41 ..A + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_03.idl b/testprogs/win32/midltests/valid/midltests_union_align_03.idl new file mode 100644 index 0000000..699dd6c --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_03.idl @@ -0,0 +1,64 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef [switch_type(short)] union { + [case(1)] char c; + } u; + long midltests_fn( + [in] short l, + [in] char v, + [in,switch_is(l)] u u + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + short l; + char v; + u u; + + l = 1; + v = 'V'; + u.c = 'C'; + cli_midltests_fn(l, v, u); +} + +long srv_midltests_fn(short l, char v, u u) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_03.txt b/testprogs/win32/midltests/valid/midltests_union_align_03.txt new file mode 100644 index 0000000..7078dd3 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_03.txt @@ -0,0 +1,37 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[31] plen[7] ahint[7] + +[000] 01 00 56 00 01 00 43 ..V...C + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[31] plen[7] ahint[7] + +[000] 01 00 56 00 01 00 43 ..V...C + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_04.idl b/testprogs/win32/midltests/valid/midltests_union_align_04.idl new file mode 100644 index 0000000..a7c6ad7 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_04.idl @@ -0,0 +1,64 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef [switch_type(long)] union { + [case(1)] char c; + } u; + long midltests_fn( + [in] long l, + [in] char v, + [in,switch_is(l)] u u + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + long l; + char v; + u u; + + l = 1; + v = 'V'; + u.c = 'C'; + cli_midltests_fn(l, v, u); +} + +long srv_midltests_fn(long l, char v, u u) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_04.txt b/testprogs/win32/midltests/valid/midltests_union_align_04.txt new file mode 100644 index 0000000..d323860 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_04.txt @@ -0,0 +1,37 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[37] plen[13] ahint[13] + +[000] 01 00 00 00 56 00 00 00 01 00 00 00 43 ....V... ....C + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[37] plen[13] ahint[13] + +[000] 01 00 00 00 56 00 00 00 01 00 00 00 43 ....V... ....C + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_05.idl b/testprogs/win32/midltests/valid/midltests_union_align_05.idl new file mode 100644 index 0000000..da46bab --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_05.idl @@ -0,0 +1,61 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef [switch_type(char)] union { + [case(1)] short c; + } u; + long midltests_fn( + [in] char l, + [in,switch_is(l)] u u + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + char l; + u u; + + l = 1; + u.c = 'C'; + cli_midltests_fn(l, u); +} + +long srv_midltests_fn(hyper l, u u) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_05.txt b/testprogs/win32/midltests/valid/midltests_union_align_05.txt new file mode 100644 index 0000000..1938b0a --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_05.txt @@ -0,0 +1,37 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[28] plen[4] ahint[4] + +[000] 01 01 43 00 ..C. + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[30] plen[6] ahint[6] + +[000] 01 00 01 00 43 00 ....C. + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_06.idl b/testprogs/win32/midltests/valid/midltests_union_align_06.idl new file mode 100644 index 0000000..63fb310 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_06.idl @@ -0,0 +1,61 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef [switch_type(char)] union { + [case(1)] long c; + } u; + long midltests_fn( + [in] char l, + [in,switch_is(l)] u u + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + char l; + u u; + + l = 1; + u.c = 'C'; + cli_midltests_fn(l, u); +} + +long srv_midltests_fn(hyper l, u u) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_06.txt b/testprogs/win32/midltests/valid/midltests_union_align_06.txt new file mode 100644 index 0000000..c864e51 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_06.txt @@ -0,0 +1,37 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[32] plen[8] ahint[8] + +[000] 01 01 00 00 43 00 00 00 ....C... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[36] plen[12] ahint[12] + +[000] 01 00 00 00 01 00 00 00 43 00 00 00 ........ C... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_07.idl b/testprogs/win32/midltests/valid/midltests_union_align_07.idl new file mode 100644 index 0000000..892460d --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_07.idl @@ -0,0 +1,61 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef [switch_type(char)] union { + [case(1)] hyper c; + } u; + long midltests_fn( + [in] char l, + [in,switch_is(l)] u u + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + char l; + u u; + + l = 1; + u.c = 'C'; + cli_midltests_fn(l, u); +} + +long srv_midltests_fn(hyper l, u u) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_07.txt b/testprogs/win32/midltests/valid/midltests_union_align_07.txt new file mode 100644 index 0000000..88b44ec --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_07.txt @@ -0,0 +1,38 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[40] plen[16] ahint[16] + +[000] 01 01 00 00 00 00 00 00 43 00 00 00 00 00 00 00 ........ C....... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[48] plen[24] ahint[24] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] 43 00 00 00 00 00 00 00 C....... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_08.idl b/testprogs/win32/midltests/valid/midltests_union_align_08.idl new file mode 100644 index 0000000..0cbdbfe --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_08.idl @@ -0,0 +1,68 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + [switch_type(char)] union u { + [case(0)]; + [case(1)] char c; + [case(2)] short s; + [case(4)] long l; + [case(8)] hyper h; + }; + + long midltests_fn( + [in] char level, + [in,switch_is(level)] union u u + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + cli_midltests_fn(0, u); + cli_midltests_fn(1, u); + cli_midltests_fn(2, u); + cli_midltests_fn(4, u); + cli_midltests_fn(8, u); +} + +long srv_midltests_fn(char level, union u u) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_08.txt b/testprogs/win32/midltests/valid/midltests_union_align_08.txt new file mode 100644 index 0000000..1bf5cd9 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_08.txt @@ -0,0 +1,129 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[26] plen[2] ahint[2] + +[000] 00 00 .. + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[27] plen[3] ahint[3] + +[000] 01 01 FF ... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[28] plen[4] ahint[4] + +[000] 02 02 FF FF .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[32] plen[8] ahint[8] + +[000] 04 04 00 00 FF FF FF FF ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[40] plen[16] ahint[16] + +[000] 08 08 00 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[40] plen[16] ahint[16] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF . + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[42] plen[18] ahint[18] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF .. + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[44] plen[20] ahint[20] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[48] plen[24] ahint[24] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_09.idl b/testprogs/win32/midltests/valid/midltests_union_align_09.idl new file mode 100644 index 0000000..358a598 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_09.idl @@ -0,0 +1,69 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + ms_union, + pointer_default(unique) +] +interface midltests +{ + [switch_type(char)] union u { + [case(0)]; + [case(1)] char c; + [case(2)] short s; + [case(4)] long l; + [case(8)] hyper h; + }; + + long midltests_fn( + [in] char level, + [in,switch_is(level)] union u u + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + cli_midltests_fn(0, u); + cli_midltests_fn(1, u); + cli_midltests_fn(2, u); + cli_midltests_fn(4, u); + cli_midltests_fn(8, u); +} + +long srv_midltests_fn(char level, union u u) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_09.txt b/testprogs/win32/midltests/valid/midltests_union_align_09.txt new file mode 100644 index 0000000..5e7e192 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_09.txt @@ -0,0 +1,129 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[32] plen[8] ahint[8] + +[000] 00 00 00 00 00 00 00 00 ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[33] plen[9] ahint[9] + +[000] 01 01 00 00 00 00 00 00 FF ........ . + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[34] plen[10] ahint[10] + +[000] 02 02 00 00 00 00 00 00 FF FF ........ .. + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[36] plen[12] ahint[12] + +[000] 04 04 00 00 00 00 00 00 FF FF FF FF ........ .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[40] plen[16] ahint[16] + +[000] 08 08 00 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[40] plen[16] ahint[16] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF . + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[42] plen[18] ahint[18] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF .. + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[44] plen[20] ahint[20] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[48] plen[24] ahint[24] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_10.idl b/testprogs/win32/midltests/valid/midltests_union_align_10.idl new file mode 100644 index 0000000..6d66272 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_10.idl @@ -0,0 +1,71 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + ms_union, + pointer_default(unique) +] +interface midltests +{ + enum level_enum { ZERO = 0, ONE = 1, TWO = 2, FOUR = 4, EIGHT = 8 }; + + [switch_type(long)] union u { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + }; + + long midltests_fn( + [in] enum level_enum level, + [in,switch_is(level)] union u u + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + cli_midltests_fn(ZERO, u); + cli_midltests_fn(ONE, u); + cli_midltests_fn(TWO, u); + cli_midltests_fn(FOUR, u); + cli_midltests_fn(EIGHT, u); +} + +long srv_midltests_fn(char level, union u u) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_10.txt b/testprogs/win32/midltests/valid/midltests_union_align_10.txt new file mode 100644 index 0000000..babae12 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_10.txt @@ -0,0 +1,129 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[32] plen[8] ahint[8] + +[000] 00 00 00 00 00 00 00 00 ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[33] plen[9] ahint[9] + +[000] 01 00 00 00 01 00 00 00 FF ........ . + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[34] plen[10] ahint[10] + +[000] 02 00 00 00 02 00 00 00 FF FF ........ .. + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[36] plen[12] ahint[12] + +[000] 04 00 00 00 04 00 00 00 FF FF FF FF ........ .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[40] plen[16] ahint[16] + +[000] 08 00 00 00 08 00 00 00 FF FF FF FF FF FF FF FF ........ ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[40] plen[16] ahint[16] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF . + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[42] plen[18] ahint[18] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF .. + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[44] plen[20] ahint[20] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[48] plen[24] ahint[24] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_11.idl b/testprogs/win32/midltests/valid/midltests_union_align_11.idl new file mode 100644 index 0000000..1036abe --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_11.idl @@ -0,0 +1,70 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + enum level_enum { ZERO = 0, ONE = 1, TWO = 2, FOUR = 4, EIGHT = 8 }; + + [switch_type(long)] union u { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + }; + + long midltests_fn( + [in] enum level_enum level, + [in,switch_is(level)] union u u + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + cli_midltests_fn(ZERO, u); + cli_midltests_fn(ONE, u); + cli_midltests_fn(TWO, u); + cli_midltests_fn(FOUR, u); + cli_midltests_fn(EIGHT, u); +} + +long srv_midltests_fn(char level, union u u) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_11.txt b/testprogs/win32/midltests/valid/midltests_union_align_11.txt new file mode 100644 index 0000000..babae12 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_11.txt @@ -0,0 +1,129 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[32] plen[8] ahint[8] + +[000] 00 00 00 00 00 00 00 00 ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[33] plen[9] ahint[9] + +[000] 01 00 00 00 01 00 00 00 FF ........ . + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[34] plen[10] ahint[10] + +[000] 02 00 00 00 02 00 00 00 FF FF ........ .. + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[36] plen[12] ahint[12] + +[000] 04 00 00 00 04 00 00 00 FF FF FF FF ........ .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[40] plen[16] ahint[16] + +[000] 08 00 00 00 08 00 00 00 FF FF FF FF FF FF FF FF ........ ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[40] plen[16] ahint[16] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF . + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[42] plen[18] ahint[18] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF .. + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[44] plen[20] ahint[20] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[48] plen[24] ahint[24] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_12.idl b/testprogs/win32/midltests/valid/midltests_union_align_12.idl new file mode 100644 index 0000000..6b27cb9 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_12.idl @@ -0,0 +1,70 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + enum level_enum { ZERO = 0, ONE = 1, TWO = 2, FOUR = 4, EIGHT = 8 }; + + [switch_type(enum level_enum)] union u { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + }; + + long midltests_fn( + [in] enum level_enum level, + [in,switch_is(level)] union u u + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + cli_midltests_fn(ZERO, u); + cli_midltests_fn(ONE, u); + cli_midltests_fn(TWO, u); + cli_midltests_fn(FOUR, u); + cli_midltests_fn(EIGHT, u); +} + +long srv_midltests_fn(char level, union u u) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_12.txt b/testprogs/win32/midltests/valid/midltests_union_align_12.txt new file mode 100644 index 0000000..1a32739 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_12.txt @@ -0,0 +1,129 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[28] plen[4] ahint[4] + +[000] 00 00 00 00 .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[29] plen[5] ahint[5] + +[000] 01 00 01 00 FF ..... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[30] plen[6] ahint[6] + +[000] 02 00 02 00 FF FF ...... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[32] plen[8] ahint[8] + +[000] 04 00 04 00 FF FF FF FF ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[40] plen[16] ahint[16] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[40] plen[16] ahint[16] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF . + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[42] plen[18] ahint[18] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF .. + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[44] plen[20] ahint[20] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[48] plen[24] ahint[24] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_13.idl b/testprogs/win32/midltests/valid/midltests_union_align_13.idl new file mode 100644 index 0000000..a29dcb9 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_13.idl @@ -0,0 +1,71 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + ms_union, + pointer_default(unique) +] +interface midltests +{ + enum level_enum { ZERO = 0, ONE = 1, TWO = 2, FOUR = 4, EIGHT = 8 }; + + [switch_type(enum level_enum)] union u { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + }; + + long midltests_fn( + [in] enum level_enum level, + [in,switch_is(level)] union u u + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + cli_midltests_fn(ZERO, u); + cli_midltests_fn(ONE, u); + cli_midltests_fn(TWO, u); + cli_midltests_fn(FOUR, u); + cli_midltests_fn(EIGHT, u); +} + +long srv_midltests_fn(char level, union u u) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_13.txt b/testprogs/win32/midltests/valid/midltests_union_align_13.txt new file mode 100644 index 0000000..8f0563b --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_13.txt @@ -0,0 +1,129 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[32] plen[8] ahint[8] + +[000] 00 00 00 00 00 00 00 00 ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[33] plen[9] ahint[9] + +[000] 01 00 01 00 00 00 00 00 FF ........ . + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[34] plen[10] ahint[10] + +[000] 02 00 02 00 00 00 00 00 FF FF ........ .. + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[36] plen[12] ahint[12] + +[000] 04 00 04 00 00 00 00 00 FF FF FF FF ........ .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[40] plen[16] ahint[16] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[40] plen[16] ahint[16] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF . + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[42] plen[18] ahint[18] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF .. + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[44] plen[20] ahint[20] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[48] plen[24] ahint[24] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF ........ + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_14.idl b/testprogs/win32/midltests/valid/midltests_union_align_14.idl new file mode 100644 index 0000000..c029f5a --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_14.idl @@ -0,0 +1,71 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + enum level_enum { ZERO = 0, ONE = 1, TWO = 2, FOUR = 4, EIGHT = 8 }; + + [switch_type(enum level_enum)] union u { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + }; + + long midltests_fn( + [in] enum level_enum level, + [in,switch_is(level)] union u u, + [in] char c + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + cli_midltests_fn(ZERO, u, 'c'); + cli_midltests_fn(ONE, u, 'c'); + cli_midltests_fn(TWO, u, 'c'); + cli_midltests_fn(FOUR, u, 'c'); + cli_midltests_fn(EIGHT, u, 'c'); +} + +long srv_midltests_fn(char level, union u u, char c) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_14.txt b/testprogs/win32/midltests/valid/midltests_union_align_14.txt new file mode 100644 index 0000000..9713788 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_14.txt @@ -0,0 +1,131 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[29] plen[5] ahint[5] + +[000] 00 00 00 00 63 ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[30] plen[6] ahint[6] + +[000] 01 00 01 00 FF 63 .....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[31] plen[7] ahint[7] + +[000] 02 00 02 00 FF FF 63 ......c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[33] plen[9] ahint[9] + +[000] 04 00 04 00 FF FF FF FF 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[42] plen[18] ahint[18] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF 63 .c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[43] plen[19] ahint[19] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF 63 ..c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[45] plen[21] ahint[21] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF 63 ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[49] plen[25] ahint[25] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_15.idl b/testprogs/win32/midltests/valid/midltests_union_align_15.idl new file mode 100644 index 0000000..c8037b8 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_15.idl @@ -0,0 +1,72 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + ms_union, + pointer_default(unique) +] +interface midltests +{ + enum level_enum { ZERO = 0, ONE = 1, TWO = 2, FOUR = 4, EIGHT = 8 }; + + [switch_type(enum level_enum)] union u { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + }; + + long midltests_fn( + [in] enum level_enum level, + [in,switch_is(level)] union u u, + [in] char c + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + cli_midltests_fn(ZERO, u, 'c'); + cli_midltests_fn(ONE, u, 'c'); + cli_midltests_fn(TWO, u, 'c'); + cli_midltests_fn(FOUR, u, 'c'); + cli_midltests_fn(EIGHT, u, 'c'); +} + +long srv_midltests_fn(char level, union u u, char c) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_15.txt b/testprogs/win32/midltests/valid/midltests_union_align_15.txt new file mode 100644 index 0000000..4754930 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_15.txt @@ -0,0 +1,131 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[33] plen[9] ahint[9] + +[000] 00 00 00 00 00 00 00 00 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[34] plen[10] ahint[10] + +[000] 01 00 01 00 00 00 00 00 FF 63 ........ .c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[35] plen[11] ahint[11] + +[000] 02 00 02 00 00 00 00 00 FF FF 63 ........ ..c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[37] plen[13] ahint[13] + +[000] 04 00 04 00 00 00 00 00 FF FF FF FF 63 ........ ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr32:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[42] plen[18] ahint[18] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF 63 .c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[43] plen[19] ahint[19] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF 63 ..c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[45] plen[21] ahint[21] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF 63 ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +ndr64:in => out: ptype[request] flen[49] plen[25] ahint[25] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_16.idl b/testprogs/win32/midltests/valid/midltests_union_align_16.idl new file mode 100644 index 0000000..683a79a --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_16.idl @@ -0,0 +1,93 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + enum level_enum { ZERO = 0, ONE = 1, TWO = 2, FOUR = 4, EIGHT = 8 }; + + [switch_type(enum level_enum)] union u { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + }; + + struct us { + enum level_enum level; + [switch_is(level)] union { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + } u; + }; + + void midltests_fn( + [in,ref] enum level_enum *level, + [in,switch_is(*level)] union u u, + [out,ref] struct us *us, + [in,out,ref] char *c + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + enum level_enum level; + unsigned char c = 'c'; + struct us us; + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + level = ZERO; + cli_midltests_fn(&level, u, &us, &c); + level = ONE; + cli_midltests_fn(&level, u, &us, &c); + level = TWO; + cli_midltests_fn(&level, u, &us, &c); + level = FOUR; + cli_midltests_fn(&level, u, &us, &c); + level = EIGHT; + cli_midltests_fn(&level, u, &us, &c); +} + +void srv_midltests_fn(enum level_enum *level, union u u, struct us *us, unsigned char *c) +{ + printf("srv_midltests_fn: Start\n"); + us->level = *level; + us->u.h = u.h; + printf("srv_midltests_fn: End\n"); + return; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_16.txt b/testprogs/win32/midltests/valid/midltests_union_align_16.txt new file mode 100644 index 0000000..5366c14 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_16.txt @@ -0,0 +1,137 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[29] plen[5] ahint[5] + +[000] 00 00 00 00 63 ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[29] plen[5] ahint[5] + +[000] 00 00 00 00 63 ....c + +ndr32:in => out: ptype[request] flen[30] plen[6] ahint[6] + +[000] 01 00 01 00 FF 63 .....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[30] plen[6] ahint[6] + +[000] 01 00 01 00 FF 63 .....c + +ndr32:in => out: ptype[request] flen[31] plen[7] ahint[7] + +[000] 02 00 02 00 FF FF 63 ......c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[31] plen[7] ahint[7] + +[000] 02 00 02 00 FF FF 63 ......c + +ndr32:in => out: ptype[request] flen[33] plen[9] ahint[9] + +[000] 04 00 04 00 FF FF FF FF 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[33] plen[9] ahint[9] + +[000] 04 00 04 00 FF FF FF FF 63 ........ c + +ndr32:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[41] plen[17] ahint[17] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ +[010] 63 c + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[41] plen[17] ahint[17] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ +[010] 63 c + +ndr64:in => out: ptype[request] flen[42] plen[18] ahint[18] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF 63 .c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF 00 00 00 00 00 00 00 63 ........ c + +ndr64:in => out: ptype[request] flen[43] plen[19] ahint[19] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF 63 ..c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF 00 00 00 00 00 00 63 ........ c + +ndr64:in => out: ptype[request] flen[45] plen[21] ahint[21] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF 63 ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF 00 00 00 00 63 ........ c + +ndr64:in => out: ptype[request] flen[49] plen[25] ahint[25] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF 63 ........ c + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_17.idl b/testprogs/win32/midltests/valid/midltests_union_align_17.idl new file mode 100644 index 0000000..f151452 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_17.idl @@ -0,0 +1,94 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + ms_union, + pointer_default(unique) +] +interface midltests +{ + enum level_enum { ZERO = 0, ONE = 1, TWO = 2, FOUR = 4, EIGHT = 8 }; + + [switch_type(enum level_enum)] union u { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + }; + + struct us { + enum level_enum level; + [switch_is(level)] union { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + } u; + }; + + void midltests_fn( + [in,ref] enum level_enum *level, + [in,switch_is(*level)] union u u, + [out,ref] struct us *us, + [in,out,ref] char *c + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + enum level_enum level; + char c = 'c'; + struct us us; + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + level = ZERO; + cli_midltests_fn(&level, u, &us, &c); + level = ONE; + cli_midltests_fn(&level, u, &us, &c); + level = TWO; + cli_midltests_fn(&level, u, &us, &c); + level = FOUR; + cli_midltests_fn(&level, u, &us, &c); + level = EIGHT; + cli_midltests_fn(&level, u, &us, &c); +} + +void srv_midltests_fn(enum level_enum *level, union u u, struct us *us, char *c) +{ + printf("srv_midltests_fn: Start\n"); + us->level = *level; + us->u.h = u.h; + printf("srv_midltests_fn: End\n"); + return; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_17.txt b/testprogs/win32/midltests/valid/midltests_union_align_17.txt new file mode 100644 index 0000000..7b62241 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_17.txt @@ -0,0 +1,137 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[33] plen[9] ahint[9] + +[000] 00 00 00 00 00 00 00 00 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[33] plen[9] ahint[9] + +[000] 00 00 00 00 00 00 00 00 63 ........ c + +ndr32:in => out: ptype[request] flen[34] plen[10] ahint[10] + +[000] 01 00 01 00 00 00 00 00 FF 63 ........ .c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[34] plen[10] ahint[10] + +[000] 01 00 01 00 00 00 00 00 FF 63 ........ .c + +ndr32:in => out: ptype[request] flen[35] plen[11] ahint[11] + +[000] 02 00 02 00 00 00 00 00 FF FF 63 ........ ..c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[35] plen[11] ahint[11] + +[000] 02 00 02 00 00 00 00 00 FF FF 63 ........ ..c + +ndr32:in => out: ptype[request] flen[37] plen[13] ahint[13] + +[000] 04 00 04 00 00 00 00 00 FF FF FF FF 63 ........ ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[37] plen[13] ahint[13] + +[000] 04 00 04 00 00 00 00 00 FF FF FF FF 63 ........ ....c + +ndr32:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[41] plen[17] ahint[17] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ +[010] 63 c + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[41] plen[17] ahint[17] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ +[010] 63 c + +ndr64:in => out: ptype[request] flen[42] plen[18] ahint[18] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF 63 .c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF 00 00 00 00 00 00 00 63 ........ c + +ndr64:in => out: ptype[request] flen[43] plen[19] ahint[19] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF 63 ..c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF 00 00 00 00 00 00 63 ........ c + +ndr64:in => out: ptype[request] flen[45] plen[21] ahint[21] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF 63 ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF 00 00 00 00 63 ........ c + +ndr64:in => out: ptype[request] flen[49] plen[25] ahint[25] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF 63 ........ c + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_18.idl b/testprogs/win32/midltests/valid/midltests_union_align_18.idl new file mode 100644 index 0000000..542973b --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_18.idl @@ -0,0 +1,93 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + enum level_enum { ZERO = 0, ONE = 1, TWO = 2, FOUR = 4, EIGHT = 8 }; + + [switch_type(enum level_enum),ms_union] union u { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + }; + + struct us { + enum level_enum level; + [switch_is(level)] union { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + } u; + }; + + void midltests_fn( + [in,ref] enum level_enum *level, + [in,switch_is(*level)] union u u, + [out,ref] struct us *us, + [in,out,ref] char *c + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + enum level_enum level; + char c = 'c'; + struct us us; + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + level = ZERO; + cli_midltests_fn(&level, u, &us, &c); + level = ONE; + cli_midltests_fn(&level, u, &us, &c); + level = TWO; + cli_midltests_fn(&level, u, &us, &c); + level = FOUR; + cli_midltests_fn(&level, u, &us, &c); + level = EIGHT; + cli_midltests_fn(&level, u, &us, &c); +} + +void srv_midltests_fn(enum level_enum *level, union u u, struct us *us, char *c) +{ + printf("srv_midltests_fn: Start\n"); + us->level = *level; + us->u.h = u.h; + printf("srv_midltests_fn: End\n"); + return; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_18.txt b/testprogs/win32/midltests/valid/midltests_union_align_18.txt new file mode 100644 index 0000000..5693dd3 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_18.txt @@ -0,0 +1,137 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[33] plen[9] ahint[9] + +[000] 00 00 00 00 00 00 00 00 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[29] plen[5] ahint[5] + +[000] 00 00 00 00 63 ....c + +ndr32:in => out: ptype[request] flen[34] plen[10] ahint[10] + +[000] 01 00 01 00 00 00 00 00 FF 63 ........ .c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[30] plen[6] ahint[6] + +[000] 01 00 01 00 FF 63 .....c + +ndr32:in => out: ptype[request] flen[35] plen[11] ahint[11] + +[000] 02 00 02 00 00 00 00 00 FF FF 63 ........ ..c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[31] plen[7] ahint[7] + +[000] 02 00 02 00 FF FF 63 ......c + +ndr32:in => out: ptype[request] flen[37] plen[13] ahint[13] + +[000] 04 00 04 00 00 00 00 00 FF FF FF FF 63 ........ ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[33] plen[9] ahint[9] + +[000] 04 00 04 00 FF FF FF FF 63 ........ c + +ndr32:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[41] plen[17] ahint[17] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ +[010] 63 c + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[41] plen[17] ahint[17] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ +[010] 63 c + +ndr64:in => out: ptype[request] flen[42] plen[18] ahint[18] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF 63 .c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF 00 00 00 00 00 00 00 63 ........ c + +ndr64:in => out: ptype[request] flen[43] plen[19] ahint[19] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF 63 ..c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF 00 00 00 00 00 00 63 ........ c + +ndr64:in => out: ptype[request] flen[45] plen[21] ahint[21] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF 63 ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF 00 00 00 00 63 ........ c + +ndr64:in => out: ptype[request] flen[49] plen[25] ahint[25] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF 63 ........ c + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_19.idl b/testprogs/win32/midltests/valid/midltests_union_align_19.idl new file mode 100644 index 0000000..b8ff0d6 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_19.idl @@ -0,0 +1,90 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + enum level_enum { ZERO = 0, ONE = 1, TWO = 2, FOUR = 4, EIGHT = 8 }; + + [switch_type(enum level_enum)] union u { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + }; + + union ue switch(enum level_enum level) u { + case(ZERO):; + case(ONE): char c; + case(TWO): short s; + case(FOUR): long l; + case(EIGHT): hyper h; + }; + + void midltests_fn( + [in,out,ref] enum level_enum *level, + [in,switch_is(*level)] union u u, + [out,ref] union ue *ue, + [in,out,ref] char *c + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + enum level_enum level; + unsigned char c = 'c'; + struct ue ue; + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + level = ZERO; + cli_midltests_fn(&level, u, &ue, &c); + level = ONE; + cli_midltests_fn(&level, u, &ue, &c); + level = TWO; + cli_midltests_fn(&level, u, &ue, &c); + level = FOUR; + cli_midltests_fn(&level, u, &ue, &c); + level = EIGHT; + cli_midltests_fn(&level, u, &ue, &c); +} + +void srv_midltests_fn(enum level_enum *level, union u u, struct ue *ue, unsigned char *c) +{ + printf("srv_midltests_fn: Start\n"); + ue->level = *level; + ue->u.h = u.h; + printf("srv_midltests_fn: End\n"); + return; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_19.txt b/testprogs/win32/midltests/valid/midltests_union_align_19.txt new file mode 100644 index 0000000..804f0ed --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_19.txt @@ -0,0 +1,137 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[29] plen[5] ahint[5] + +[000] 00 00 00 00 63 ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[29] plen[5] ahint[5] + +[000] 00 00 00 00 63 ....c + +ndr32:in => out: ptype[request] flen[30] plen[6] ahint[6] + +[000] 01 00 01 00 FF 63 .....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[30] plen[6] ahint[6] + +[000] 01 00 01 00 FF 63 .....c + +ndr32:in => out: ptype[request] flen[31] plen[7] ahint[7] + +[000] 02 00 02 00 FF FF 63 ......c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[31] plen[7] ahint[7] + +[000] 02 00 02 00 FF FF 63 ......c + +ndr32:in => out: ptype[request] flen[33] plen[9] ahint[9] + +[000] 04 00 04 00 FF FF FF FF 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[33] plen[9] ahint[9] + +[000] 04 00 04 00 FF FF FF FF 63 ........ c + +ndr32:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[41] plen[17] ahint[17] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ +[010] 63 c + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[41] plen[17] ahint[17] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ +[010] 63 c + +ndr64:in => out: ptype[request] flen[42] plen[18] ahint[18] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF 63 .c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[42] plen[18] ahint[18] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF 63 .c + +ndr64:in => out: ptype[request] flen[43] plen[19] ahint[19] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF 63 ..c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[43] plen[19] ahint[19] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF 63 ..c + +ndr64:in => out: ptype[request] flen[45] plen[21] ahint[21] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF 63 ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[45] plen[21] ahint[21] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF 63 ....c + +ndr64:in => out: ptype[request] flen[49] plen[25] ahint[25] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF 63 ........ c + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_union_align_20.idl b/testprogs/win32/midltests/valid/midltests_union_align_20.idl new file mode 100644 index 0000000..fe8bb72 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_20.idl @@ -0,0 +1,91 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + ms_union, + pointer_default(unique) +] +interface midltests +{ + enum level_enum { ZERO = 0, ONE = 1, TWO = 2, FOUR = 4, EIGHT = 8 }; + + [switch_type(enum level_enum)] union u { + [case(ZERO)]; + [case(ONE)] char c; + [case(TWO)] short s; + [case(FOUR)] long l; + [case(EIGHT)] hyper h; + }; + + union ue switch(enum level_enum level) u { + case(ZERO):; + case(ONE): char c; + case(TWO): short s; + case(FOUR): long l; + case(EIGHT): hyper h; + }; + + void midltests_fn( + [in,out,ref] enum level_enum *level, + [in,switch_is(*level)] union u u, + [out,ref] union ue *ue, + [in,out,ref] char *c + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + enum level_enum level; + unsigned char c = 'c'; + struct ue ue; + union u u; + u.h = 0xFFFFFFFFFFFFFFFFLL; + + level = ZERO; + cli_midltests_fn(&level, u, &ue, &c); + level = ONE; + cli_midltests_fn(&level, u, &ue, &c); + level = TWO; + cli_midltests_fn(&level, u, &ue, &c); + level = FOUR; + cli_midltests_fn(&level, u, &ue, &c); + level = EIGHT; + cli_midltests_fn(&level, u, &ue, &c); +} + +void srv_midltests_fn(enum level_enum *level, union u u, struct ue *ue, unsigned char *c) +{ + printf("srv_midltests_fn: Start\n"); + ue->level = *level; + ue->u.h = u.h; + printf("srv_midltests_fn: End\n"); + return; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_union_align_20.txt b/testprogs/win32/midltests/valid/midltests_union_align_20.txt new file mode 100644 index 0000000..84d62aa --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_union_align_20.txt @@ -0,0 +1,137 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[33] plen[9] ahint[9] + +[000] 00 00 00 00 00 00 00 00 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[29] plen[5] ahint[5] + +[000] 00 00 00 00 63 ....c + +ndr32:in => out: ptype[request] flen[34] plen[10] ahint[10] + +[000] 01 00 01 00 00 00 00 00 FF 63 ........ .c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[30] plen[6] ahint[6] + +[000] 01 00 01 00 FF 63 .....c + +ndr32:in => out: ptype[request] flen[35] plen[11] ahint[11] + +[000] 02 00 02 00 00 00 00 00 FF FF 63 ........ ..c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[31] plen[7] ahint[7] + +[000] 02 00 02 00 FF FF 63 ......c + +ndr32:in => out: ptype[request] flen[37] plen[13] ahint[13] + +[000] 04 00 04 00 00 00 00 00 FF FF FF FF 63 ........ ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[33] plen[9] ahint[9] + +[000] 04 00 04 00 FF FF FF FF 63 ........ c + +ndr32:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[41] plen[17] ahint[17] + +[000] 08 00 08 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ ........ +[010] 63 c + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[41] plen[17] ahint[17] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ +[010] 63 c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[41] plen[17] ahint[17] + +[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ +[010] 63 c + +ndr64:in => out: ptype[request] flen[42] plen[18] ahint[18] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF 63 .c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[42] plen[18] ahint[18] + +[000] 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ........ ........ +[010] FF 63 .c + +ndr64:in => out: ptype[request] flen[43] plen[19] ahint[19] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF 63 ..c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[43] plen[19] ahint[19] + +[000] 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ........ ........ +[010] FF FF 63 ..c + +ndr64:in => out: ptype[request] flen[45] plen[21] ahint[21] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF 63 ....c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[45] plen[21] ahint[21] + +[000] 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF 63 ....c + +ndr64:in => out: ptype[request] flen[49] plen[25] ahint[25] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF 63 ........ c + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[49] plen[25] ahint[25] + +[000] 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ........ ........ +[010] FF FF FF FF FF FF FF FF 63 ........ c + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/midltests/valid/midltests_v1_enum_01.idl b/testprogs/win32/midltests/valid/midltests_v1_enum_01.idl new file mode 100644 index 0000000..18a5ceb --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_v1_enum_01.idl @@ -0,0 +1,56 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef [v1_enum] enum { + value1 = -1 + } midltests_enum; + + long midltests_fn( + midltests_enum v + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + cli_midltests_fn(value1); +} + +long srv_midltests_fn(enum midltests_enum v) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_v1_enum_01.txt b/testprogs/win32/midltests/valid/midltests_v1_enum_01.txt new file mode 100644 index 0000000..d4d018c --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_v1_enum_01.txt @@ -0,0 +1,37 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[28] plen[4] ahint[4] + +[000] FF FF FF FF .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[28] plen[4] ahint[4] + +[000] FF FF FF FF .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK diff --git a/testprogs/win32/npecho/GNUmakefile b/testprogs/win32/npecho/GNUmakefile new file mode 100755 index 0000000..5b4f976 --- /dev/null +++ b/testprogs/win32/npecho/GNUmakefile @@ -0,0 +1,24 @@ +INCLUDES=-I. +CFLAGS=$(INCLUDES) + +NPECHO = npecho_client.exe +#npecho_server.exe + +NPECHO2 = npecho_client2.exe npecho_server2.exe + +all: $(NPECHO) $(NPECHO2) + +MINGW_CC = i586-mingw32msvc-cc +CC = $(MINGW_CC) + +.SUFFIXES: .c .obj .exe + +.c.obj: + $(CC) $(CFLAGS) -c $< -o $@ + +.obj.exe: + $(CC) $(CFLAGS) -o $@ $< $(LIBS) + +clean: + rm -f *~ *.obj *.exe + diff --git a/testprogs/win32/npecho/NMakefile b/testprogs/win32/npecho/NMakefile new file mode 100755 index 0000000..a0e61d7 --- /dev/null +++ b/testprogs/win32/npecho/NMakefile @@ -0,0 +1,26 @@ +# +# use nmake /f NMakefile [] +# +INCLUDES=-I +CFLAGS=$(INCLUDES) -Zi -nologo + +NPECHO = npecho_client.exe +# missing npecho_server.exe +NPECHO2 = npecho_client2.exe npecho_server2.exe + +all: $(NPECHO) $(NPECHO2) + +clean: + del *~ *.obj *.exe + +npecho_client.exe: npecho_client.obj + $(CC) $(CFLAGS) -o npecho_client.exe npecho_client.obj $(LIBS) + +npecho_server.exe: npecho_server.obj + $(CC) $(CFLAGS) -o npecho_server.exe npecho_server.obj $(LIBS) + +npecho_client2.exe: npecho_client2.obj + $(CC) $(CFLAGS) -o npecho_client2.exe npecho_client2.obj $(LIBS) + +npecho_server2.exe: npecho_server2.obj + $(CC) $(CFLAGS) -o npecho_server2.exe npecho_server2.obj $(LIBS) diff --git a/testprogs/win32/npecho/npecho_client.c b/testprogs/win32/npecho/npecho_client.c new file mode 100755 index 0000000..97d31c4 --- /dev/null +++ b/testprogs/win32/npecho/npecho_client.c @@ -0,0 +1,50 @@ +/* + * Simple Named Pipe Client + * (C) 2005 Jelmer Vernooij + * Published to the public domain + */ + +#include +#include + +#define ECHODATA "Black Dog" + +int main(int argc, char *argv[]) +{ + HANDLE h; + DWORD numread = 0; + char *outbuffer = malloc(strlen(ECHODATA)); + + if (argc == 1) { + printf("Usage: %s pipename\n", argv[0]); + printf(" Where pipename is something like \\\\servername\\NPECHO\n"); + return -1; + } + + h = CreateFile(argv[1], GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); + if (h == INVALID_HANDLE_VALUE) { + printf("Error opening: %d\n", GetLastError()); + return -1; + } + + if (!WriteFile(h, ECHODATA, strlen(ECHODATA), &numread, NULL)) { + printf("Error writing: %d\n", GetLastError()); + return -1; + } + + if (!ReadFile(h, outbuffer, strlen(ECHODATA), &numread, NULL)) { + printf("Error reading: %d\n", GetLastError()); + return -1; + } + + printf("Read: %s\n", outbuffer); + + if (!TransactNamedPipe(h, ECHODATA, strlen(ECHODATA), outbuffer, strlen(ECHODATA), &numread, NULL)) { + printf("TransactNamedPipe failed: %d!\n", GetLastError()); + return -1; + } + + printf("Result: %s\n", outbuffer); + + return 0; +} diff --git a/testprogs/win32/npecho/npecho_client2.c b/testprogs/win32/npecho/npecho_client2.c new file mode 100755 index 0000000..ebf4f9a --- /dev/null +++ b/testprogs/win32/npecho/npecho_client2.c @@ -0,0 +1,117 @@ +/* + * Simple Named Pipe Client + * (C) 2005 Jelmer Vernooij + * (C) 2009 Stefan Metzmacher + * Published to the public domain + */ + +#include +#include + +#define ECHODATA "Black Dog" + +int main(int argc, char *argv[]) +{ + HANDLE h; + DWORD numread = 0; + char *outbuffer = malloc(sizeof(ECHODATA)*2); + BOOL small_reads = FALSE; + DWORD state = 0; + DWORD flags = 0; + + if (argc == 1) { + goto usage; + } else if (argc >= 3) { + if (strcmp(argv[2], "large") == 0) { + small_reads = FALSE; + } else if (strcmp(argv[2], "small") == 0) { + small_reads = TRUE; + } else { + goto usage; + } + } + + h = CreateFile(argv[1], GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); + if (h == INVALID_HANDLE_VALUE) { + printf("Error opening: %d\n", GetLastError()); + return -1; + } + + GetNamedPipeHandleState(h, &state, NULL, NULL, NULL, NULL, 0); + + if (state & PIPE_READMODE_MESSAGE) { + printf("message read mode\n"); + } else { + printf("byte read mode\n"); + } + + Sleep(5000); + + if (small_reads) { + DWORD ofs, size, nread; + const char *more = ""; + printf("small reads\n"); + numread = 0; + ofs = 0; + size = sizeof(ECHODATA)/2; + if (ReadFile(h, outbuffer+ofs, size, &nread, NULL)) { + if (state & PIPE_READMODE_MESSAGE) { + printf("Error message mode small read succeeded\n"); + return -1; + } + } else if (GetLastError() == ERROR_MORE_DATA) { + if (!(state & PIPE_READMODE_MESSAGE)) { + printf("Error byte mode small read returned ERROR_MORE_DATA\n"); + return -1; + } + more = " more data"; + } else { + printf("Error reading: %d\n", GetLastError()); + return -1; + } + printf("Small Read: %d%s\n", nread, more); + numread += nread; + ofs = size; + size = sizeof(ECHODATA) - ofs; + if (!ReadFile(h, outbuffer+ofs, size, &nread, NULL)) { + printf("Error reading: %d\n", GetLastError()); + return -1; + } + printf("Small Read: %d\n", nread); + numread += nread; + } else { + printf("large read\n"); + if (!ReadFile(h, outbuffer, sizeof(ECHODATA)*2, &numread, NULL)) { + printf("Error reading: %d\n", GetLastError()); + return -1; + } + } + printf("Read: %s %d\n", outbuffer, numread); + if (state & PIPE_READMODE_MESSAGE) { + if (numread != sizeof(ECHODATA)) { + printf("message mode returned %d bytes should be %s\n", + numread, sizeof(ECHODATA)); + return -1; + } + } else { + if (numread != (sizeof(ECHODATA)*2)) { + printf("message mode returned %d bytes should be %s\n", + numread, (sizeof(ECHODATA)*2)); + return -1; + } + } + + if (!ReadFile(h, outbuffer, sizeof(ECHODATA)*2, &numread, NULL)) { + printf("Error reading: %d\n", GetLastError()); + return -1; + } + + printf("Read: %s %d\n", outbuffer, numread); + + return 0; +usage: + printf("Usage: %s pipename [read]\n", argv[0]); + printf(" Where pipename is something like \\\\servername\\NPECHO\n"); + printf(" Where read is something 'large' or 'small'\n"); + return -1; +} diff --git a/testprogs/win32/npecho/npecho_server2.c b/testprogs/win32/npecho/npecho_server2.c new file mode 100755 index 0000000..281fc45 --- /dev/null +++ b/testprogs/win32/npecho/npecho_server2.c @@ -0,0 +1,76 @@ +/* + * Simple Named Pipe Client + * (C) 2005 Jelmer Vernooij + * (C) 2009 Stefan Metzmacher + * Published to the public domain + */ + +#include +#include + +#define ECHODATA "Black Dog" + +int main(int argc, char *argv[]) +{ + HANDLE h; + DWORD numread = 0; + char *outbuffer = malloc(sizeof(ECHODATA)); + BOOL msgmode = FALSE; + DWORD type = 0; + + if (argc == 1) { + goto usage; + } else if (argc >= 3) { + if (strcmp(argv[2], "byte") == 0) { + msgmode = FALSE; + } else if (strcmp(argv[2], "message") == 0) { + msgmode = TRUE; + } else { + goto usage; + } + } + + if (msgmode == TRUE) { + printf("using message mode\n"); + type = PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT; + } else { + printf("using byte mode\n"); + type = PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT; + } + + h = CreateNamedPipe(argv[1], + PIPE_ACCESS_DUPLEX, + type, + PIPE_UNLIMITED_INSTANCES, + 1024, + 1024, + 0, + NULL); + if (h == INVALID_HANDLE_VALUE) { + printf("Error opening: %d\n", GetLastError()); + return -1; + } + + ConnectNamedPipe(h, NULL); + + if (!WriteFile(h, ECHODATA, sizeof(ECHODATA), &numread, NULL)) { + printf("Error writing: %d\n", GetLastError()); + return -1; + } + + if (!WriteFile(h, ECHODATA, sizeof(ECHODATA), &numread, NULL)) { + printf("Error writing: %d\n", GetLastError()); + return -1; + } + + FlushFileBuffers(h); + DisconnectNamedPipe(h); + CloseHandle(h); + + return 0; +usage: + printf("Usage: %s pipename [mode]\n", argv[0]); + printf(" Where pipename is something like \\\\servername\\PIPE\\NPECHO\n"); + printf(" Where mode is 'byte' or 'message'\n"); + return -1; +} diff --git a/testprogs/win32/prepare_dcpromo/GNUmakefile b/testprogs/win32/prepare_dcpromo/GNUmakefile new file mode 100755 index 0000000..1c95613 --- /dev/null +++ b/testprogs/win32/prepare_dcpromo/GNUmakefile @@ -0,0 +1,21 @@ +INCLUDES=-I. +CFLAGS=$(INCLUDES) +LIBS=-ladvapi32 + +PREPARE_DCPROMO = prepare_dcpromo.exe + +all: $(PREPARE_DCPROMO) + +MINGW_CC = i586-mingw32msvc-cc +CC = $(MINGW_CC) + +.SUFFIXES: .c .obj .exe + +.c.obj: + $(CC) $(CFLAGS) -c $< -o $@ + +.obj.exe: + $(CC) $(CFLAGS) -o $@ $< $(LIBS) + +clean: + rm -f *~ *.obj *.exe diff --git a/testprogs/win32/prepare_dcpromo/NMakefile b/testprogs/win32/prepare_dcpromo/NMakefile new file mode 100755 index 0000000..6f810ee --- /dev/null +++ b/testprogs/win32/prepare_dcpromo/NMakefile @@ -0,0 +1,16 @@ +# +# use nmake /f NMakefile [] +# +INCLUDES=-I +CFLAGS=$(INCLUDES) -Zi -nologo -Dsnprintf=sprintf_s +LIBS=advapi32.lib + +PREPARE_DCPROMO = prepare_dcpromo.exe + +all: $(PREPARE_DCPROMO) + +clean: + del *~ *.obj *.exe + +prepare_dcpromo.exe: prepare_dcpromo.obj + $(CC) $(CFLAGS) -o prepare_dcpromo.exe prepare_dcpromo.obj $(LIBS) diff --git a/testprogs/win32/prepare_dcpromo/prepare_dcpromo.c b/testprogs/win32/prepare_dcpromo/prepare_dcpromo.c new file mode 100755 index 0000000..91b819b --- /dev/null +++ b/testprogs/win32/prepare_dcpromo/prepare_dcpromo.c @@ -0,0 +1,1074 @@ +/* + Copyright (C) Stefan Metzmacher 2010 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + Published to the public domain + */ + +/* + * This tool can set the DOMAIN-SID and nextRid counter in + * the local SAM on windows servers (tested with w2k8r2) + * + * dcpromo will use this values for the ad domain it creates. + * + * This might be useful for upgrades from a Samba3 domain. + */ + +#include +#include +#include +#include + +/* Convert a binary SID to a character string */ +static DWORD SidToString(const SID *sid, + char **string) +{ + DWORD id_auth; + int i, ofs, maxlen; + char *result; + + if (!sid) { + return ERROR_INVALID_SID; + } + + maxlen = sid->SubAuthorityCount * 11 + 25; + + result = (char *)malloc(maxlen); + if (result == NULL) { + return ERROR_NOT_ENOUGH_MEMORY; + } + + /* + * BIG NOTE: this function only does SIDS where the identauth is not + * >= ^32 in a range of 2^48. + */ + + id_auth = sid->IdentifierAuthority.Value[5] + + (sid->IdentifierAuthority.Value[4] << 8) + + (sid->IdentifierAuthority.Value[3] << 16) + + (sid->IdentifierAuthority.Value[2] << 24); + + ofs = snprintf(result, maxlen, "S-%u-%lu", + (unsigned int)sid->Revision, (unsigned long)id_auth); + + for (i = 0; i < sid->SubAuthorityCount; i++) { + ofs += snprintf(result + ofs, maxlen - ofs, "-%lu", + (unsigned long)sid->SubAuthority[i]); + } + + *string = result; + return ERROR_SUCCESS; +} + +static DWORD StringToSid(const char *str, + SID *sid) +{ + const char *p; + char *q; + DWORD x; + + if (!sid) { + return ERROR_INVALID_PARAMETER; + } + + /* Sanity check for either "S-" or "s-" */ + + if (!str + || (str[0]!='S' && str[0]!='s') + || (str[1]!='-')) + { + return ERROR_INVALID_PARAMETER; + } + + /* Get the SID revision number */ + + p = str+2; + x = (DWORD)strtol(p, &q, 10); + if (x==0 || !q || *q!='-') { + return ERROR_INVALID_SID; + } + sid->Revision = (BYTE)x; + + /* Next the Identifier Authority. This is stored in big-endian + in a 6 byte array. */ + + p = q+1; + x = (DWORD)strtol(p, &q, 10); + if (!q || *q!='-') { + return ERROR_INVALID_SID; + } + sid->IdentifierAuthority.Value[5] = (x & 0x000000ff); + sid->IdentifierAuthority.Value[4] = (x & 0x0000ff00) >> 8; + sid->IdentifierAuthority.Value[3] = (x & 0x00ff0000) >> 16; + sid->IdentifierAuthority.Value[2] = (x & 0xff000000) >> 24; + sid->IdentifierAuthority.Value[1] = 0; + sid->IdentifierAuthority.Value[0] = 0; + + /* now read the the subauthorities */ + + p = q +1; + sid->SubAuthorityCount = 0; + while (sid->SubAuthorityCount < 6) { + x=(DWORD)strtoul(p, &q, 10); + if (p == q) + break; + if (q == NULL) { + return ERROR_INVALID_SID; + } + sid->SubAuthority[sid->SubAuthorityCount++] = x; + + if ((*q!='-') || (*q=='\0')) + break; + p = q + 1; + } + + /* IF we ended early, then the SID could not be converted */ + + if (q && *q!='\0') { + return ERROR_INVALID_SID; + } + + return ERROR_SUCCESS; +} + +#define MIN(a,b) ((a)<(b)?(a):(b)) +static void print_asc(const unsigned char *buf,int len) +{ + int i; + for (i=0;i8) printf(" "); + while (n--) printf(" "); + n = MIN(8,i%16); + print_asc(&buf[i-(i%16)],n); printf( " " ); + n = (i%16) - n; + if (n>0) print_asc(&buf[i-n],n); + printf("\n"); + } +} + +static DWORD calc_tmp_HKLM_SECURITY_SD(SECURITY_DESCRIPTOR *old_sd, + SID *current_user_sid, + SECURITY_DESCRIPTOR **_old_parent_sd, + SECURITY_DESCRIPTOR **_old_child_sd, + SECURITY_DESCRIPTOR **_new_parent_sd, + SECURITY_DESCRIPTOR **_new_child_sd) +{ + LONG status; + DWORD cbSecurityDescriptor = 0; + SECURITY_DESCRIPTOR *old_parent_sd = NULL; + SECURITY_DESCRIPTOR *old_child_sd = NULL; + SECURITY_DESCRIPTOR *new_parent_sd = NULL; + SECURITY_DESCRIPTOR *new_child_sd = NULL; + BOOL ok; + ACL *old_Dacl = NULL; + ACL *new_Dacl = NULL; + ACL_SIZE_INFORMATION dacl_info; + DWORD i = 0; + SECURITY_DESCRIPTOR *AbsoluteSD = NULL; + DWORD dwAbsoluteSDSize = 0; + DWORD dwRelativeSDSize = 0; + DWORD dwDaclSize = 0; + ACL *Sacl = NULL; + DWORD dwSaclSize = 0; + SID *Owner = NULL; + DWORD dwOwnerSize = 0; + SID *PrimaryGroup = NULL; + DWORD dwPrimaryGroupSize = 0; + ACCESS_ALLOWED_ACE *ace = NULL; + + ok = MakeAbsoluteSD(old_sd, + NULL, + &dwAbsoluteSDSize, + NULL, + &dwDaclSize, + NULL, + &dwSaclSize, + NULL, + &dwOwnerSize, + NULL, + &dwPrimaryGroupSize); + if (!ok) { + status = GetLastError(); + } + if (status != ERROR_INSUFFICIENT_BUFFER) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + AbsoluteSD = (SECURITY_DESCRIPTOR *)malloc(dwAbsoluteSDSize+1024); + if (AbsoluteSD == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return ERROR_NOT_ENOUGH_MEMORY; + } + old_Dacl = (ACL *)malloc(dwDaclSize + 1024); + if (old_Dacl == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return ERROR_NOT_ENOUGH_MEMORY; + } + Sacl = (ACL *)malloc(dwSaclSize); + if (Sacl == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return ERROR_NOT_ENOUGH_MEMORY; + } + Owner = (SID *)malloc(dwOwnerSize); + if (Owner == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return ERROR_NOT_ENOUGH_MEMORY; + } + PrimaryGroup = (SID *)malloc(dwPrimaryGroupSize); + if (PrimaryGroup == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return ERROR_NOT_ENOUGH_MEMORY; + } + + ok = MakeAbsoluteSD(old_sd, + AbsoluteSD, + &dwAbsoluteSDSize, + old_Dacl, + &dwDaclSize, + Sacl, + &dwSaclSize, + Owner, + &dwOwnerSize, + PrimaryGroup, + &dwPrimaryGroupSize); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + AbsoluteSD->Control |= SE_DACL_AUTO_INHERITED | SE_DACL_AUTO_INHERIT_REQ | SE_DACL_PROTECTED; + dwRelativeSDSize = 0; + ok = MakeSelfRelativeSD(AbsoluteSD, + NULL, + &dwRelativeSDSize); + if (!ok) { + status = GetLastError(); + } + if (status != ERROR_INSUFFICIENT_BUFFER) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return ERROR_NOT_ENOUGH_MEMORY; + } + + old_parent_sd = (SECURITY_DESCRIPTOR *)malloc(dwRelativeSDSize); + if (old_parent_sd == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return ERROR_NOT_ENOUGH_MEMORY; + } + + ok = MakeSelfRelativeSD(AbsoluteSD, + old_parent_sd, + &dwRelativeSDSize); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + ok = GetAclInformation(old_Dacl, + &dacl_info, + sizeof(dacl_info), + AclSizeInformation); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + new_Dacl = (ACL *)calloc(dacl_info.AclBytesInUse + 1024, 1); + if (new_Dacl == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return ERROR_NOT_ENOUGH_MEMORY; + } + + InitializeAcl(new_Dacl, dacl_info.AclBytesInUse + 1024, ACL_REVISION); + + ok = AddAccessAllowedAce(new_Dacl, ACL_REVISION, + KEY_ALL_ACCESS, current_user_sid); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + ok = GetAce(new_Dacl, 0, (LPVOID *)&ace); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + ace->Header.AceFlags |= CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE; + + for (i=0; i < dacl_info.AceCount; i++) { + ok = GetAce(old_Dacl, i, (LPVOID *)&ace); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + ok = AddAce(new_Dacl, ACL_REVISION, MAXDWORD, + ace, ace->Header.AceSize); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + } + + AbsoluteSD->Dacl = new_Dacl; + dwRelativeSDSize = 0; + ok = MakeSelfRelativeSD(AbsoluteSD, + NULL, + &dwRelativeSDSize); + if (!ok) { + status = GetLastError(); + } + if (status != ERROR_INSUFFICIENT_BUFFER) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return ERROR_NOT_ENOUGH_MEMORY; + } + + new_parent_sd = (SECURITY_DESCRIPTOR *)malloc(dwRelativeSDSize); + if (new_parent_sd == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return ERROR_NOT_ENOUGH_MEMORY; + } + + ok = MakeSelfRelativeSD(AbsoluteSD, + new_parent_sd, + &dwRelativeSDSize); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + for (i=0; i < dacl_info.AceCount; i++) { + ok = GetAce(old_Dacl, i, (LPVOID *)&ace); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + ace->Header.AceFlags |= INHERITED_ACE; + } + + AbsoluteSD->Control &= ~SE_DACL_PROTECTED; + AbsoluteSD->Dacl = old_Dacl; + dwRelativeSDSize = 0; + ok = MakeSelfRelativeSD(AbsoluteSD, + NULL, + &dwRelativeSDSize); + if (!ok) { + status = GetLastError(); + } + if (status != ERROR_INSUFFICIENT_BUFFER) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return ERROR_NOT_ENOUGH_MEMORY; + } + + old_child_sd = (SECURITY_DESCRIPTOR *)malloc(dwRelativeSDSize); + if (old_child_sd == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return ERROR_NOT_ENOUGH_MEMORY; + } + + ok = MakeSelfRelativeSD(AbsoluteSD, + old_child_sd, + &dwRelativeSDSize); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + for (i=0; i < dacl_info.AceCount + 1; i++) { + ok = GetAce(new_Dacl, i, (LPVOID *)&ace); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + ace->Header.AceFlags |= INHERITED_ACE; + } + + AbsoluteSD->Dacl = new_Dacl; + dwRelativeSDSize = 0; + ok = MakeSelfRelativeSD(AbsoluteSD, + NULL, + &dwRelativeSDSize); + if (!ok) { + status = GetLastError(); + } + if (status != ERROR_INSUFFICIENT_BUFFER) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return ERROR_NOT_ENOUGH_MEMORY; + } + + new_child_sd = (SECURITY_DESCRIPTOR *)malloc(dwRelativeSDSize); + if (new_child_sd == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return ERROR_NOT_ENOUGH_MEMORY; + } + + ok = MakeSelfRelativeSD(AbsoluteSD, + new_child_sd, + &dwRelativeSDSize); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + *_old_parent_sd = old_parent_sd; + *_old_child_sd = old_child_sd; + *_new_parent_sd = new_parent_sd; + *_new_child_sd = new_child_sd; + return ERROR_SUCCESS; +} + +static DWORD inherit_SD(HKEY parent_hk, + char *current_key, + BOOL reset, + SECURITY_DESCRIPTOR *current_sd, + SECURITY_DESCRIPTOR *child_sd) +{ + DWORD status; + DWORD i = 0; + HKEY current_hk; + + if (!reset) { + status = RegOpenKeyEx(parent_hk, + current_key, + 0, /* options */ + WRITE_DAC, /* samDesired */ + ¤t_hk); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + status = RegSetKeySecurity(current_hk, + DACL_SECURITY_INFORMATION | + PROTECTED_DACL_SECURITY_INFORMATION | + UNPROTECTED_DACL_SECURITY_INFORMATION | + UNPROTECTED_SACL_SECURITY_INFORMATION, + current_sd /* pSecurityDescriptor */ + ); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + RegCloseKey(current_hk); + } + + status = RegOpenKeyEx(parent_hk, + current_key, + 0, /* options */ + KEY_ENUMERATE_SUB_KEYS, /* samDesired */ + ¤t_hk); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + for (i=0; ; i++) { + char subkey[10240]; + HKEY hk_child; + + memset(subkey, 0, sizeof(subkey)); + status = RegEnumKey(current_hk, i, subkey, sizeof(subkey)); + if (status == ERROR_NO_MORE_ITEMS) { + break; + } + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + +#if 0 + printf("subkey: %s\n", subkey); +#endif + + status = inherit_SD(current_hk, subkey, reset, + child_sd, child_sd); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + } + + RegCloseKey(current_hk); + + if (reset) { + status = RegOpenKeyEx(parent_hk, + current_key, + 0, /* options */ + WRITE_DAC, /* samDesired */ + ¤t_hk); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + status = RegSetKeySecurity(current_hk, + DACL_SECURITY_INFORMATION | + PROTECTED_DACL_SECURITY_INFORMATION | + UNPROTECTED_DACL_SECURITY_INFORMATION | + UNPROTECTED_SACL_SECURITY_INFORMATION, + current_sd /* pSecurityDescriptor */ + ); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + RegCloseKey(current_hk); + } + + return ERROR_SUCCESS; +} + +static DWORD replaceSIDBuffer(BYTE *buf, DWORD len, + SID *oldDomainSid, + SID *newDomainSid) +{ + DWORD ret = 0; + BYTE *oldb = ((BYTE *)oldDomainSid)+2; + BYTE *newb = ((BYTE *)newDomainSid)+2; + int cmp; + +#if 0 + printf("replaceSIDBuffer: %u\n", len); + dump_data(buf, len); +#endif + + if (len < 24) { + return 0; + } + + if (buf[0] != SID_REVISION) { + return 0; + } + + switch (buf[1]) { + case 4: + ret = 24; + break; + case 5: + if (len < 28) { + return 0; + } + ret = 28; + break; + default: + return 0; + } + +#if 0 + printf("oldb:\n"); + dump_data(oldb, 22); +#endif + cmp = memcmp(&buf[2], oldb, 22); + if (cmp != 0) { + return 0; + } + + memcpy(&buf[2], newb, 22); + + return ret; +} + +static DWORD replaceSID(HKEY parent_hk, + const char *parent_path, + const char *current_key, + SID *oldDomainSid, + SID *newDomainSid) +{ + DWORD status; + DWORD i = 0; + HKEY current_hk; + char current_path[10240]; + + snprintf(current_path, sizeof(current_path), "%s\\%s", + parent_path, current_key); + + status = RegOpenKeyEx(parent_hk, + current_key, + 0, /* options */ + KEY_ALL_ACCESS, /* samDesired */ + ¤t_hk); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + for (i=0; ; i++) { + char subkey[10240]; + HKEY hk_child; + + memset(subkey, 0, sizeof(subkey)); + status = RegEnumKey(current_hk, i, subkey, sizeof(subkey)); + if (status == ERROR_NO_MORE_ITEMS) { + break; + } + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + +#if 0 + printf("subkey: %s\n", subkey); +#endif + + status = replaceSID(current_hk, current_path, subkey, + oldDomainSid, newDomainSid); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + } + + for (i=0; ; i++) { + char valueName[10240]; + DWORD cbValueName; + DWORD valueType = 0; + BYTE *valueData = NULL; + DWORD cbValueData = 0; + DWORD ofs = 0; + BOOL modified = FALSE; + + memset(valueName, 0, sizeof(valueName)); + cbValueName = sizeof(valueName)-1; + status = RegEnumValue(current_hk, i, + valueName, &cbValueName, + NULL, NULL, + NULL, &cbValueData); + if (status == ERROR_NO_MORE_ITEMS) { + break; + } + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + valueData = (BYTE *)malloc(cbValueData); + if (valueData == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return ERROR_NOT_ENOUGH_MEMORY; + } + + cbValueName = sizeof(valueName)-1; + status = RegEnumValue(current_hk, i, + valueName, &cbValueName, + NULL, &valueType, + valueData, &cbValueData); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + if (valueType != REG_BINARY) { + free(valueData); + continue; + } + + for (ofs=0; ofs < cbValueData;) { + DWORD len; + + len = replaceSIDBuffer(valueData + ofs, + cbValueData - ofs, + oldDomainSid, + newDomainSid); + if (len == 0) { + ofs += 4; + continue; + } + +#if 0 + printf("%s value[%u]:%s modified ofs:%u (0x%X) len:%u\n", + current_path, i, valueName, ofs, ofs, len); +#endif + + ofs += len; + modified = TRUE; + } + + if (!modified) { + free(valueData); + continue; + } + + printf("%s value[%u]:%s replacing data\n", + current_path, i, valueName); + status = RegSetValueEx(current_hk, + valueName, + 0, + valueType, + valueData, + cbValueData); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + free(valueData); + } + + RegCloseKey(current_hk); + + return ERROR_SUCCESS; +} + +int main(int argc, char *argv[]) +{ + LONG status; + HANDLE tokenHandle = NULL; + TOKEN_USER *tokenUser = NULL; + DWORD cbTokenUser = 0; + HKEY hklm; + HKEY hk_security; + HKEY hk_account_domain; + DWORD cbSecurityDescriptor = 0; + SECURITY_DESCRIPTOR *security_old_sd = NULL; + SECURITY_DESCRIPTOR *security_parent_old_sd = NULL; + SECURITY_DESCRIPTOR *security_child_old_sd = NULL; + SECURITY_DESCRIPTOR *security_parent_new_sd = NULL; + SECURITY_DESCRIPTOR *security_child_new_sd = NULL; + SID *currentUserSid = NULL; + char *currentUserSidString = NULL; + BOOL ok; + DWORD cbTmp = 0; + BYTE *AccountDomainF = NULL; + DWORD cbAccountDomainF = 0; + DWORD AccountDomainFType = 0; + DWORD *nextRid = NULL; + DWORD oldNextRid = 0; + DWORD newNextRid = 0; + BYTE *AccountDomainV = NULL; + DWORD cbAccountDomainV = 0; + SID *oldDomainSid = NULL; + char *oldDomainSidString = NULL; + SID *newDomainSid = NULL; + const char *newDomainSidString = NULL; + + if (argc < 2 || argc > 3) { + printf("Usage: %s []\n", argv[0]); + return -1; + } + + newDomainSidString = argv[1]; + + newDomainSid = (SID *)malloc(24); + if (newDomainSid == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return -1; + } + + status = StringToSid(newDomainSidString, newDomainSid); + if (status != ERROR_SUCCESS) { + printf("Failed to parse DOMAINSID[%s]: Error: %d (0x%X)\n", + newDomainSidString, status, status); + return -1; + } + if (newDomainSid->SubAuthorityCount != 4) { + printf("DOMAINSID[%s]: Invalid SubAuthorityCount[%u] should be 4\n", + newDomainSidString, newDomainSid->SubAuthorityCount); + return -1; + } + + if (argc == 3) { + char *q = NULL; + newNextRid = (DWORD)strtoul(argv[2], &q, 10); + if (newNextRid == 0 || newNextRid == 0xFFFFFFFF || !q || *q!='\0') { + printf("Invalid newNextRid[%s]\n", argv[2]); + return -1; + } + if (newNextRid < 1000) { + printf("newNextRid[%u] < 1000\n", newNextRid); + return -1; + } + } + + ok = OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &tokenHandle); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + ok = GetTokenInformation(tokenHandle, TokenUser, + NULL, 0, &cbTokenUser); + if (!ok) { + status = GetLastError(); + } + if (status != ERROR_INSUFFICIENT_BUFFER) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + tokenUser = (TOKEN_USER *)malloc(cbTokenUser); + if (tokenUser == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return -1; + } + + ok = GetTokenInformation(tokenHandle, TokenUser, + tokenUser, cbTokenUser, &cbTokenUser); + if (!ok) { + status = GetLastError(); + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + currentUserSid = tokenUser->User.Sid; + + status = SidToString(currentUserSid, ¤tUserSidString); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + + status = RegConnectRegistry(NULL, HKEY_LOCAL_MACHINE, &hklm); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + + status = RegOpenKeyEx(hklm, "SECURITY", + 0, /* options */ + READ_CONTROL, /* samDesired */ + &hk_security); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + + status = RegGetKeySecurity(hk_security, + OWNER_SECURITY_INFORMATION | + GROUP_SECURITY_INFORMATION | + DACL_SECURITY_INFORMATION | + PROTECTED_DACL_SECURITY_INFORMATION | + UNPROTECTED_DACL_SECURITY_INFORMATION | + UNPROTECTED_SACL_SECURITY_INFORMATION, + NULL, /* pSecurityDescriptor */ + &cbSecurityDescriptor /* lpcbSecurityDescriptor */ + ); + if (status != ERROR_INSUFFICIENT_BUFFER) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + + security_old_sd = (SECURITY_DESCRIPTOR *)malloc(cbSecurityDescriptor); + if (security_old_sd == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return -1; + } + + status = RegGetKeySecurity(hk_security, + OWNER_SECURITY_INFORMATION | + GROUP_SECURITY_INFORMATION | + DACL_SECURITY_INFORMATION | + PROTECTED_DACL_SECURITY_INFORMATION | + UNPROTECTED_DACL_SECURITY_INFORMATION | + UNPROTECTED_SACL_SECURITY_INFORMATION, + security_old_sd, /* pSecurityDescriptor */ + &cbSecurityDescriptor /* lpcbSecurityDescriptor */ + ); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + + RegCloseKey(hk_security); + + printf("currentUserSid: %s\n", currentUserSidString); + + status = calc_tmp_HKLM_SECURITY_SD(security_old_sd, + currentUserSid, + &security_parent_old_sd, + &security_child_old_sd, + &security_parent_new_sd, + &security_child_new_sd); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + + printf("Grant full access to HKLM\\SECURITY\n"); + status = inherit_SD(hklm, "SECURITY", FALSE, + security_parent_new_sd, security_child_new_sd); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + + status = RegOpenKeyEx(hklm, "SECURITY\\SAM\\Domains\\Account", + 0, /* options */ + KEY_ALL_ACCESS, /* samDesired */ + &hk_account_domain); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + + status = RegQueryValueEx(hk_account_domain, + "F", NULL, NULL, + NULL, + &cbAccountDomainF); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + + AccountDomainF = (BYTE *)malloc(cbAccountDomainF); + if (AccountDomainF == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return -1; + } + + status = RegQueryValueEx(hk_account_domain, + "F", NULL, NULL, + AccountDomainF, + &cbAccountDomainF); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + + nextRid = (DWORD *)((BYTE *)AccountDomainF + 0x48); + oldNextRid = *nextRid; + if (newNextRid == 0) { + newNextRid = oldNextRid; + } + printf("AccountDomainF: %u bytes\n", cbAccountDomainF); + + status = RegQueryValueEx(hk_account_domain, + "V", NULL, NULL, + NULL, + &cbAccountDomainV); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + + AccountDomainV = (BYTE *)malloc(cbAccountDomainV); + if (AccountDomainV == NULL) { + printf("LINE:%u: Error: no memory\n", __LINE__); + return -1; + } + + status = RegQueryValueEx(hk_account_domain, + "V", NULL, NULL, + AccountDomainV, + &cbAccountDomainV); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + + printf("AccountDomainV: %u bytes\n", cbAccountDomainV); + oldDomainSid = (SID *)((BYTE *)AccountDomainV + (cbAccountDomainV - 24)); + + status = SidToString(oldDomainSid, &oldDomainSidString); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + + printf("Old Domain:%s, NextRid: %u (0x%08X)\n", + oldDomainSidString, oldNextRid, oldNextRid); + printf("New Domain:%s, NextRid: %u (0x%08X)\n", + newDomainSidString, newNextRid, newNextRid); + + status = replaceSID(hklm, "HKLM", "SECURITY\\SAM\\Domains", + oldDomainSid, newDomainSid); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + goto failed; + } + + status = RegQueryValueEx(hk_account_domain, + "F", NULL, &AccountDomainFType, + AccountDomainF, + &cbAccountDomainF); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + nextRid = (DWORD *)((BYTE *)AccountDomainF + 0x48); + *nextRid = newNextRid; + + printf("AccountDomainF replacing data (nextRid)\n"); + status = RegSetValueEx(hk_account_domain, + "F", + 0, + AccountDomainFType, + AccountDomainF, + cbAccountDomainF); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return status; + } + + printf("Withdraw full access to HKLM\\SECURITY\n"); + status = inherit_SD(hklm, "SECURITY", TRUE, + security_parent_old_sd, security_child_old_sd); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + printf("DONE!\n"); + return 0; +failed: + printf("Withdraw full access to HKLM\\SECURITY\n"); + status = inherit_SD(hklm, "SECURITY", TRUE, + security_parent_old_sd, security_child_old_sd); + if (status != ERROR_SUCCESS) { + printf("LINE:%u: Error: %d (0x%X)\n", __LINE__, status, status); + return -1; + } + printf("FAILED!\n"); + return 0; +} diff --git a/testprogs/win32/rpcecho/Makefile b/testprogs/win32/rpcecho/Makefile new file mode 100644 index 0000000..ca0c823 --- /dev/null +++ b/testprogs/win32/rpcecho/Makefile @@ -0,0 +1,23 @@ +INCLUDES=-I +CFLAGS=$(INCLUDES) -Zi -nologo +LIBS=rpcrt4.lib + +all: client server + +clean: + del *~ *.obj client server rpcecho_c.c rpcecho_s.c rpcecho.h + +rpcecho.h rpcecho_s.c rpcecho_c.c: rpcecho.idl rpcecho.acf + midl rpcecho.idl + +client: client.obj rpcecho_c.obj utils.obj + $(CC) $(CFLAGS) -o client client.obj rpcecho_c.obj utils.obj $(LIBS) + +server: server.obj rpcecho_s.obj utils.obj + $(CC) $(CFLAGS) -o server server.obj rpcecho_s.obj utils.obj $(LIBS) + +client.obj: rpcecho.h client.c +server.obj: rpcecho.h server.c +rpcecho_c.obj: rpcecho.h rpcecho_c.c +rpcecho_s.obj: rpcecho.h rpcecho_s.c +utils.obj: rpcecho.h utils.c diff --git a/testprogs/win32/rpcecho/README b/testprogs/win32/rpcecho/README new file mode 100644 index 0000000..2eb6ab9 --- /dev/null +++ b/testprogs/win32/rpcecho/README @@ -0,0 +1,46 @@ +This directory contains two win32 programs to test large RPC requests +and responses. The two programs are: + + server A command line RPC server that listens and processes + RPC requests on the \pipe\rpcecho named pipe. + + client A command line RPC client program that + +Samba also implements the client and server sides of the rpcecho pipe +if the --enable-developer option to configure has been used. The +rpcclient(1) program is used to implement the client side RPC +operations. + +There are currently four RPC calls defined in the rpcecho pipe. They +are: + + AddOne Adds one to an integer sent by the client + + EchoData The client sends an array of bytes and it is echoed + back by the server. + + SourceData The client sends an array of bytes and it is discarded + by the server. + + SinkData The server returns an array of bytes. + +The Ethereal network protocol decoder (http://www.ethereal.com/) also +contains support for the rpcecho pipe as part of its DCERPC for +Windows. + +Starting the win32 server program is easy. Just run server.exe in a +command window. The win32 client program is also run from a command +window. The usage information is shown below: + + Usage: client hostname cmd [args] + + Where hostname is the name of the host to connect to, + and cmd is the command to execute with optional args: + + addone num Add one to num and return the result + echodata size Send an array of size bytes and receive it back + sinkdata size Send an array of size bytes + sourcedata size Receive an array of size bytes + +Tim Potter +tpot@samba.org diff --git a/testprogs/win32/rpcecho/client.c b/testprogs/win32/rpcecho/client.c new file mode 100644 index 0000000..dae2a4b --- /dev/null +++ b/testprogs/win32/rpcecho/client.c @@ -0,0 +1,367 @@ +/* + RPC echo client. + + Copyright (C) Tim Potter 2003 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include +#include +#include +#include "rpcecho.h" + +void main(int argc, char **argv) +{ + RPC_STATUS status; + char *binding = NULL; + const char *username=NULL; + const char *password=NULL; + const char *domain=NULL; + unsigned sec_options = 0; + + argv += 1; + argc -= 1; + + while (argc > 2 && argv[0][0] == '-') { + const char *option; + + switch (argv[0][1]) { + case 'e': + binding = argv[1]; + break; + case 'u': + username = argv[1]; + break; + case 'p': + password = argv[1]; + break; + case 'd': + domain = argv[1]; + break; + case '-': + option = &argv[0][2]; + if (strcmp(option, "sign") == 0) { + if (sec_options == RPC_C_AUTHN_LEVEL_PKT_PRIVACY) { + printf("You must choose sign or seal, not both\n"); + exit(1); + } + sec_options = RPC_C_AUTHN_LEVEL_PKT_INTEGRITY; + } else if (strcmp(option, "seal") == 0) { + if (sec_options == RPC_C_AUTHN_LEVEL_PKT_INTEGRITY) { + printf("You must choose sign or seal, not both\n"); + exit(1); + } + sec_options = RPC_C_AUTHN_LEVEL_PKT_PRIVACY; + } else { + printf("Bad security option '%s'\n", option); + exit(1); + } + argv++; + argc--; + continue; + default: + printf("Bad option -%c\n", argv[0][0]); + exit(1); + } + argv += 2; + argc -= 2; + } + + if (argc < 2) { + printf("Usage: client [options] hostname cmd [args]\n\n"); + printf("Where hostname is the name of the host to connect to,\n"); + printf("and cmd is the command to execute with optional args:\n\n"); + printf("\taddone num\tAdd one to num and return the result\n"); + printf("\techodata size\tSend an array of size bytes and receive it back\n"); + printf("\tsinkdata size\tSend an array of size bytes\n"); + printf("\tsourcedata size\tReceive an array of size bytes\n"); + printf("\ttest\trun testcall\n"); + printf("\noptions:\n"); + printf("\t-u username -d domain -p password -e endpoint\n"); + printf("\t--sign --seal\n"); + printf("\nExamples:\n"); + printf("\tclient HOSTNAME addone 3\n"); + printf("\tclient 192.168.115.1 addone 3\n"); + printf("\tclient -e ncacn_np:HOSTNAME[\\\\pipe\\\\rpcecho] addone 3\n"); + printf("\tclient -e ncacn_ip_tcp:192.168.115.1 addone 3\n"); + printf("\tclient -e ncacn_ip_tcp:192.168.115.1 -u tridge -d MYDOMAIN -p PASSWORD addone 3\n"); + exit(0); + } + + + if (!binding) { + char *network_address = argv[0]; + + argc--; + argv++; + + status = RpcStringBindingCompose( + NULL, /* uuid */ + "ncacn_np", + network_address, + "\\pipe\\rpcecho", + NULL, /* options */ + &binding); + + if (status) { + printf("RpcStringBindingCompose returned %d\n", status); + exit(status); + } + } + + printf("Endpoint is %s\n", binding); + + status = RpcBindingFromStringBinding( + binding, + &rpcecho_IfHandle); + + if (status) { + printf("RpcBindingFromStringBinding returned %d\n", status); + exit(status); + } + + if (username) { + SEC_WINNT_AUTH_IDENTITY ident = { username, strlen(username), + domain, strlen(domain), + password, strlen(password), + SEC_WINNT_AUTH_IDENTITY_ANSI }; + + status = RpcBindingSetAuthInfo(rpcecho_IfHandle, NULL, + sec_options, + RPC_C_AUTHN_WINNT, + &ident, 0); + if (status) { + printf ("RpcBindingSetAuthInfo failed: 0x%x\n", status); + exit (1); + } + } + + + while (argc > 0) { + RpcTryExcept { + + /* Add one to a number */ + + if (strcmp(argv[0], "addone") == 0) { + int arg, result; + + if (argc < 2) { + printf("Usage: addone num\n"); + exit(1); + } + + arg = atoi(argv[1]); + + AddOne(arg, &result); + printf("%d + 1 = %d\n", arg, result); + + argc -= 2; + argv += 2; + continue; + } + + /* Echo an array */ + + if (strcmp(argv[0], "echodata") == 0) { + int arg, i; + char *indata, *outdata; + + if (argc < 2) { + printf("Usage: echo num\n"); + exit(1); + } + + arg = atoi(argv[1]); + + if ((indata = malloc(arg)) == NULL) { + printf("Error allocating %d bytes for input\n", arg); + exit(1); + } + + if ((outdata = malloc(arg)) == NULL) { + printf("Error allocating %d bytes for output\n", arg); + exit(1); + } + + for (i = 0; i < arg; i++) + indata[i] = i & 0xff; + + EchoData(arg, indata, outdata); + + printf("echo %d\n", arg); + + for (i = 0; i < arg; i++) { + if (indata[i] != outdata[i]) { + printf("data mismatch at offset %d, %d != %d\n", + i, indata[i], outdata[i]); + exit(0); + } + } + + argc -= 2; + argv += 2; + continue; + } + + if (strcmp(argv[0], "sinkdata") == 0) { + int arg, i; + char *indata; + + if (argc < 2) { + printf("Usage: sinkdata num\n"); + exit(1); + } + + arg = atoi(argv[1]); + + if ((indata = malloc(arg)) == NULL) { + printf("Error allocating %d bytes for input\n", arg); + exit(1); + } + + for (i = 0; i < arg; i++) + indata[i] = i & 0xff; + + SinkData(arg, indata); + + printf("sinkdata %d\n", arg); + argc -= 2; + argv += 2; + continue; + } + + if (strcmp(argv[0], "sourcedata") == 0) { + int arg, i; + unsigned char *outdata; + + if (argc < 2) { + printf("Usage: sourcedata num\n"); + exit(1); + } + + arg = atoi(argv[1]); + + if ((outdata = malloc(arg)) == NULL) { + printf("Error allocating %d bytes for output\n", arg); + exit(1); + } + + SourceData(arg, outdata); + + printf("sourcedata %d\n", arg); + + for (i = 0; i < arg; i++) { + if (outdata[i] != (i & 0xff)) { + printf("data mismatch at offset %d, %d != %d\n", + i, outdata[i], i & 0xff); + } + } + + argc -= 2; + argv += 2; + continue; + } + + if (strcmp(argv[0], "test") == 0) { + printf("no TestCall\n"); + + argc -= 1; + argv += 1; + continue; + } + + + if (strcmp(argv[0], "enum") == 0) { + enum echo_Enum1 v = ECHO_ENUM1; + echo_Enum2 e2; + echo_Enum3 e3; + + e2.e1 = 76; + e2.e2 = ECHO_ENUM1_32; + e3.e1 = ECHO_ENUM2; + + argc -= 1; + argv += 1; + + echo_TestEnum(&v, &e2, &e3); + + continue; + } + + if (strcmp(argv[0], "double") == 0) { + typedef unsigned short uint16; + uint16 v = 13; + uint16 *pv = &v; + uint16 **ppv = &pv; + uint16 ret; + + argc -= 1; + argv += 1; + + ret = echo_TestDoublePointer(&ppv); + + printf("TestDoublePointer v=%d ret=%d\n", v, ret); + + continue; + } + + if (strcmp(argv[0], "sleep") == 0) { + long arg, result; + + if (argc < 2) { + printf("Usage: sleep num\n"); + exit(1); + } + + arg = atoi(argv[1]); + +// result = TestSleep(arg); +// printf("Slept for %d seconds\n", result); + printf("Sleep disabled (need async code)\n"); + + argc -= 2; + argv += 2; + continue; + } + + printf("Invalid command '%s'\n", argv[0]); + goto done; + + } RpcExcept(1) { + unsigned long ex; + + ex = RpcExceptionCode(); + printf("Runtime error 0x%x\n", ex); + } RpcEndExcept + } + +done: + + status = RpcStringFree(&binding); + + if (status) { + printf("RpcStringFree returned %d\n", status); + exit(status); + } + + status = RpcBindingFree(&rpcecho_IfHandle); + + if (status) { + printf("RpcBindingFree returned %d\n", status); + exit(status); + } + + exit(0); +} diff --git a/testprogs/win32/rpcecho/rpcecho.acf b/testprogs/win32/rpcecho/rpcecho.acf new file mode 100644 index 0000000..56c7d33 --- /dev/null +++ b/testprogs/win32/rpcecho/rpcecho.acf @@ -0,0 +1,26 @@ +/* + RPC echo ACF. + + Copyright (C) Tim Potter 2003 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +[ + implicit_handle (handle_t rpcecho_IfHandle) +] +interface rpcecho +{ +/* [async] TestSleep(); */ +} diff --git a/testprogs/win32/rpcecho/rpcecho.idl b/testprogs/win32/rpcecho/rpcecho.idl new file mode 100644 index 0000000..b0ddb81 --- /dev/null +++ b/testprogs/win32/rpcecho/rpcecho.idl @@ -0,0 +1,146 @@ +/* + RPC echo IDL. + + Copyright (C) Tim Potter 2003 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef __PIDL__ +#define unistr [string] wchar_t * +#endif + +[ +uuid(60a15ec5-4de8-11d7-a637-005056a20182), +version(1.0) +] +interface rpcecho +{ + // Add one to an integer + void AddOne( + [in] int in_data, + [out] int *out_data + ); + // Echo an array of bytes back at the caller + void EchoData( + [in] int len, + [in] [size_is(len)] char in_data[], + [out] [size_is(len)] char out_data[] + ); + // Sink data to the server + void SinkData( + [in] int len, + [in] [size_is(len)] char in_data[] + ); + // Source data from server + void SourceData( + [in] int len, + [out] [size_is(len)] char out_data[] + ); + const long myconstant = 42; + + /* test strings */ + void TestCall ( + [in] unistr *s1, + [out] unistr *s2 + ); + + /* test some alignment issues */ + typedef struct { + char v; + } echo_info1; + + typedef struct { + short v; + } echo_info2; + + typedef struct { + long v; + } echo_info3; + + typedef struct { + hyper v; + } echo_info4; + + typedef struct { + char v1; + hyper v2; + } echo_info5; + + typedef struct { + char v1; + echo_info1 info1; + } echo_info6; + + typedef struct { + char v1; + echo_info4 info4; + } echo_info7; + + typedef union { + [case(1)] echo_info1 info1; + [case(2)] echo_info2 info2; + [case(3)] echo_info3 info3; + [case(4)] echo_info4 info4; + [case(5)] echo_info5 info5; + [case(6)] echo_info6 info6; + [case(7)] echo_info7 info7; + } echo_Info; + + long TestCall2 ( + [in] short level, + [out,switch_is(level)] echo_Info **info + ); + + long TestSleep( + [in] long seconds + ); + + typedef enum { + ECHO_ENUM1 = 1, + ECHO_ENUM2 = 2 + } echo_Enum1; + + typedef [v1_enum] enum { + ECHO_ENUM1_32 = 1, + ECHO_ENUM2_32 = 2 + } echo_Enum1_32; + + typedef struct { + echo_Enum1 e1; + echo_Enum1_32 e2; + } echo_Enum2; + + typedef union { + [case(ECHO_ENUM1)] echo_Enum1 e1; + [case(ECHO_ENUM2)] echo_Enum2 e2; + } echo_Enum3; + + void echo_TestEnum( + [in,out,ref] echo_Enum1 *foo1, + [in,out,ref] echo_Enum2 *foo2, + [in,out,ref,switch_is(*foo1)] echo_Enum3 *foo3 + ); + + typedef struct { + long x; + [size_is(x)] short surrounding[*]; + } echo_Surrounding; + + void echo_TestSurrounding( + [in,out,ref] echo_Surrounding *data + ); + + short echo_TestDoublePointer([in] short ***data); +} diff --git a/testprogs/win32/rpcecho/server.c b/testprogs/win32/rpcecho/server.c new file mode 100644 index 0000000..b092852 --- /dev/null +++ b/testprogs/win32/rpcecho/server.c @@ -0,0 +1,208 @@ +/* + RPC echo server. + + Copyright (C) Tim Potter 2003 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#define _WIN32_WINNT 0x0500 + +#include +#include +#include +#include "rpcecho.h" + +#define RPC_MIN_CALLS 1 +#define RPC_MAX_CALLS 20 +#define RPC_ENDPOINT "\\pipe\\rpcecho" + +void AddOne(int in_data, __RPC_FAR int *out_data) +{ + printf("AddOne: got in_data = %d\n", in_data); + *out_data = in_data + 1; +} + +void EchoData(int len, unsigned char __RPC_FAR in_data[], + unsigned char __RPC_FAR out_data[]) +{ + printf("EchoData: got len = %d\n", len); + + memcpy(out_data, in_data, len); +} + +void SinkData(int len, unsigned char __RPC_FAR in_data[ ]) +{ + printf("SinkData: got len = %d\n", len); +} + +void SourceData(int len, unsigned char __RPC_FAR out_data[ ]) +{ + int i; + + printf("SourceData: got len = %d\n", len); + + for (i = 0; i < len; i++) + out_data[i] = i & 0xff; +} + +void TestCall(wchar_t **s1, wchar_t **s2) +{ + if (*s1) { + printf("s1='%S'\n", *s1); + } else { + printf("s1=NULL\n"); + } + *s2 = L"test string"; +} + +long TestCall2(short level, echo_Info **info) +{ + static echo_Info i; + + printf("TestCall2 level %d\n", level); + + *info = &i; + + switch (level) { + case 1: + i.info1.v = 10; + break; + case 2: + i.info2.v = 20; + break; + case 3: + i.info3.v = 30; + break; + case 4: + i.info4.v = 40; + break; + case 5: + i.info5.v1 = 50; + i.info5.v2 = 51; + break; + case 6: + i.info6.v1 = 60; + i.info6.info1.v = 61; + break; + case 7: + i.info7.v1 = 70; + i.info7.info4.v = 71; + break; + default: + return -1; + } + return 0; +} + +#if 0 +void TestSleep(PRPC_ASYNC_STATE pAsync, long seconds) +{ + long ret; + printf("async Sleeping for %d seconds\n", seconds); + Sleep(1000 * seconds); + ret = seconds; + RpcAsyncCompleteCall(pAsync, &ret); +} +#else +long TestSleep(long seconds) +{ + printf("non-async Sleeping for %d seconds\n", seconds); + Sleep(1000 * seconds); + return seconds; +} +#endif + + +void echo_TestEnum(echo_Enum1 *foo1, + echo_Enum2 *foo2, + echo_Enum3 *foo3) +{ + foo2->e1 = ECHO_ENUM2; +} + +void echo_TestSurrounding(echo_Surrounding *data) +{ + printf("Incoming array of size %d\n", data->x); + data->x *= 2; +} + +short echo_TestDoublePointer(short ***data) +{ + if (!*data) { + printf("WARNING: *data == NULL\n"); + return 0; + } + if (!**data) { + printf("WARNING: **data == NULL\n"); + return 0; + } + printf("Incoming double pointer: %d\n", ***data); + return ***data; +} + +void main(int argc, char **argv) +{ + RPC_STATUS status; + RPC_BINDING_VECTOR *pBindingVector; + + if (argc != 1) { + printf("Usage: rpcechosrv\n"); + exit(0); + } + + status = RpcServerUseProtseqEp("ncacn_np", RPC_MAX_CALLS, "\\pipe\\rpcecho", NULL); + if (status) { + printf("Failed to register ncacn_np endpoint\n"); + exit(status); + } + + status = RpcServerUseProtseqEp("ncacn_ip_tcp", RPC_MAX_CALLS, "1234", NULL); + if (status) { + printf("Failed to register ncacn_ip_tcp endpoint\n"); + exit(status); + } + + status = RpcServerInqBindings(&pBindingVector); + if (status) { + printf("Failed RpcServerInqBindings\n"); + exit(status); + } + + status = RpcEpRegister(rpcecho_v1_0_s_ifspec, pBindingVector, NULL, "rpcecho server"); + if (status) { + printf("Failed RpcEpRegister\n"); + exit(status); + } + + status = RpcServerRegisterIf(rpcecho_v1_0_s_ifspec, NULL, NULL); + + if (status) { + printf("Failed to register interface\n"); + exit(status); + } + + status = RpcServerRegisterAuthInfo(NULL, RPC_C_AUTHN_GSS_NEGOTIATE, NULL, NULL); + if (status) { + printf("Failed to setup auth info\n"); + } + + status = RpcServerListen(RPC_MIN_CALLS, RPC_MAX_CALLS, FALSE); + + if (status) { + printf("RpcServerListen returned error %d\n", status); + exit(status); + } +} + diff --git a/testprogs/win32/rpcecho/utils.c b/testprogs/win32/rpcecho/utils.c new file mode 100644 index 0000000..09a81d1 --- /dev/null +++ b/testprogs/win32/rpcecho/utils.c @@ -0,0 +1,32 @@ +/* + RPC echo utility functions. + + Copyright (C) Tim Potter 2003 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include "rpcecho.h" + +/* MIDL allocate and free functions */ + +void __RPC_FAR *__RPC_USER midl_user_allocate(size_t len) +{ + return(malloc(len)); +} + +void __RPC_USER midl_user_free(void __RPC_FAR *ptr) +{ + free(ptr); +} diff --git a/testprogs/win32/spoolss/GNUmakefile b/testprogs/win32/spoolss/GNUmakefile new file mode 100644 index 0000000..0321a65 --- /dev/null +++ b/testprogs/win32/spoolss/GNUmakefile @@ -0,0 +1,23 @@ +CFLAGS=-I../../../ +MINGW_CC = i586-mingw32msvc-cc +CC = $(MINGW_CC) + +LIBS=-lwinspool + +all: testspoolss.exe + +clean: + rm -vf *.exe tags + +ctags: + ctags `find . -name "*.[ch]" | grep -v include/proto.h` + ctags --c-kinds=-p -a `find /usr/i686-pc-mingw32/sys-root/mingw/include -name "*.[ch]" | grep -v /CVS/` + +proto: + mkproto.pl printlib.c --private=printlib_proto.h --public=printlib_proto_pub.h --srcdir=. --builddir=. + mkproto.pl torture.c --private=torture_proto.h --public=torture_proto_pub.h --srcdir=. --builddir=. + +testspoolss.exe: testspoolss.c printlib.c torture.c error.c + @echo Compiling testspoolss.exe + @$(CC) $(CFLAGS) $(LDFLAGS) testspoolss.c printlib.c torture.c error.c $(LIBS) -o testspoolss.exe + diff --git a/testprogs/win32/spoolss/NMakefile b/testprogs/win32/spoolss/NMakefile new file mode 100644 index 0000000..949104e --- /dev/null +++ b/testprogs/win32/spoolss/NMakefile @@ -0,0 +1,43 @@ +# +# use nmake /f NMakefile [] +# +CFLAGS = /nologo /Zi /MT /Gm- /W4 /FR /D_CRT_SECURE_NO_WARNINGS +LIBS = kernel32.lib gdi32.lib user32.lib shell32.lib \ + advapi32.lib ole32.lib ws2_32.lib rpcrt4.lib +WINSPOOL_LIBS = winspool.lib + +all: testspoolss.exe + +.cpp.obj: + cl /c $(CFLAGS) $*.cpp + +.c.obj: + cl /c $(CFLAGS) $*.c + +clean: cleantmp + -del *.dll 2>nul + +cleantmp: + -del *~ *.o *.obj *.sbr *.bsc *.pdb *.lib *.ilk *.exp 2>nul + -del test_s.c test_c.c test.h 2>nul + +############################### +# helpers +############################### + +printlib.obj: printlib.c + +error.obj: error.c + +torture.obj: torture.c + +############################### +# binaries +############################### + +testspoolss.obj: testspoolss.c + +testspoolss.exe: testspoolss.obj printlib.obj error.obj torture.obj + cl $(CFLAGS) /Fe$@ testspoolss.obj printlib.obj error.obj torture.obj \ + /link /incremental:no /subsystem:console $(LIBS) $(WINSPOOL_LIBS) + diff --git a/testprogs/win32/spoolss/README.win32 b/testprogs/win32/spoolss/README.win32 new file mode 100644 index 0000000..f43a9c7 --- /dev/null +++ b/testprogs/win32/spoolss/README.win32 @@ -0,0 +1,65 @@ + +This directory holds sources for a Win32 test utility to test the "spoolss" +(print spool subsystem) functions of either a Windows or a Samba server. The +sources are known to build with (free as in beer) Microsoft Visual C++ 2008 +Express Edition's "nmake.exe" on Windows XP Professional. + + +How to build +------------ + +Use the Microsoft "nmake" command to build the *.exe. This command is in your +%path% if you start the "Visual Studio 2008 Command Prompt" from your Start +menu. + +Currently the real build target is named "testspoolss.exe". Run + + nmake /f Makefile + +to build the testspoolss.exe. After a successful build you may want to clean up +temporary files: + + nmake /f Makefile cleantmp + + +How to use +---------- + +Running testspoolss.exe with no additional params displays a short usage info. + +.............................................................................. +usage: testspoolss.exe [print] [samba3] [architecture=ARCHITECTURE] + + can be a server or printer name URI + [print] will print all data that has been retrieved + from the printserver + [samba3] will skip some tests samba servers are known + not to have implemented + [architecture=X] allows one to define a specific + architecture to test with. choose between: + "Windows NT x86" or "Windows x64" +.............................................................................. + +The utility may be most useful if you use the "print" parameter to output all +data received from the print server. You may re-direct the data into log files +for later evaluation like this: + + testspoolss.exe \\smbserver print samba3 1>smbserver.log 2>smbserver.err + testspoolss.exe \\smbserver print 1>smbserver.log 2>smbserver.err + testspoolss.exe \\winserver print 1>winserver.log 2>winserver.err + +One interesting source of learning could be to compare the output for (maybe +"the same") printers/drivers as installed on a Windows and on a Samba print +server: + + testspoolss.exe \\winserver\printername print 1>winprinter.log 2>winprinter.err + testspoolss.exe \\smbserver\printername print 1>smbprinter.log 2>smbprinter.err + +and then compare the respective log files with a diff utility of your choice. +To install "the same" printer/driver on a Samba server as on a Windows server, +you can use the Samba "net" utility, which has the following syntax: + + net rpc printer MIGRATE PRINTERS printername \ + --server=winserver \ + --destination=smbserver \ + -UAdministrator%secretpassword diff --git a/testprogs/win32/spoolss/error.c b/testprogs/win32/spoolss/error.c new file mode 100644 index 0000000..3f96594 --- /dev/null +++ b/testprogs/win32/spoolss/error.c @@ -0,0 +1,137 @@ +/* + Unix SMB/CIFS implementation. + test suite for spoolss rpc operations + + Copyright (C) Guenther Deschner 2009 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include "testspoolss.h" + +const char *errstr(DWORD error) +{ + static char tmp[20]; + + switch (error) { + case ERROR_FILE_NOT_FOUND: + return "ERROR_FILE_NOT_FOUND"; + case ERROR_ACCESS_DENIED: + return "ERROR_ACCESS_DENIED"; + case ERROR_INVALID_PARAMETER: + return "ERROR_INVALID_PARAMETER"; + case ERROR_INVALID_HANDLE: + return "ERROR_INVALID_HANDLE"; + case ERROR_CALL_NOT_IMPLEMENTED: + return "ERROR_CALL_NOT_IMPLEMENTED"; + case ERROR_INSUFFICIENT_BUFFER: + return "ERROR_INSUFFICIENT_BUFFER"; + case ERROR_INVALID_NAME: + return "ERROR_INVALID_NAME"; + case ERROR_INVALID_LEVEL: + return "ERROR_INVALID_LEVEL"; + case ERROR_INVALID_DATA: + return "ERROR_INVALID_DATA"; + case ERROR_MORE_DATA: + return "ERROR_MORE_DATA"; + case ERROR_NO_MORE_ITEMS: + return "ERROR_NO_MORE_ITEMS"; +#ifdef ERROR_INVALID_DATATYPE + case ERROR_INVALID_DATATYPE: + return "ERROR_INVALID_DATATYPE"; +#endif + case ERROR_INVALID_ENVIRONMENT: + return "ERROR_INVALID_ENVIRONMENT"; + case ERROR_INVALID_PRINTER_COMMAND: + return "ERROR_INVALID_PRINTER_COMMAND"; + case ERROR_PRINTER_ALREADY_EXISTS: + return "ERROR_PRINTER_ALREADY_EXISTS"; + case ERROR_INVALID_PRINTER_NAME: + return "ERROR_INVALID_PRINTER_NAME"; + case ERROR_INVALID_PRIORITY: + return "ERROR_INVALID_PRIORITY"; + case ERROR_INVALID_SEPARATOR_FILE: + return "ERROR_INVALID_SEPARATOR_FILE"; + case ERROR_UNKNOWN_PRINTPROCESSOR: + return "ERROR_UNKNOWN_PRINTPROCESSOR"; + case ERROR_UNKNOWN_PRINTER_DRIVER: + return "ERROR_UNKNOWN_PRINTER_DRIVER"; + case ERROR_UNKNOWN_PORT: + return "ERROR_UNKNOWN_PORT"; + case ERROR_PRINTER_DRIVER_ALREADY_INSTALLED: + return "ERROR_PRINTER_DRIVER_ALREADY_INSTALLED"; + case ERROR_UNKNOWN_PRINT_MONITOR: + return "ERROR_UNKNOWN_PRINT_MONITOR"; + case ERROR_PRINTER_DRIVER_IN_USE: + return "ERROR_PRINTER_DRIVER_IN_USE"; + case ERROR_SPOOL_FILE_NOT_FOUND: + return "ERROR_SPOOL_FILE_NOT_FOUND"; + case ERROR_SPL_NO_STARTDOC: + return "ERROR_SPL_NO_STARTDOC"; + case ERROR_SPL_NO_ADDJOB: + return "ERROR_SPL_NO_ADDJOB"; + case ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED: + return "ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED"; + case ERROR_PRINT_MONITOR_ALREADY_INSTALLED: + return "ERROR_PRINT_MONITOR_ALREADY_INSTALLED"; + case ERROR_INVALID_PRINT_MONITOR: + return "ERROR_INVALID_PRINT_MONITOR"; + case ERROR_PRINT_MONITOR_IN_USE: + return "ERROR_PRINT_MONITOR_IN_USE"; + case ERROR_PRINTER_HAS_JOBS_QUEUED: + return "ERROR_PRINTER_HAS_JOBS_QUEUED"; + case ERROR_PRINTER_NOT_FOUND: + return "ERROR_PRINTER_NOT_FOUND"; + case ERROR_PRINTER_DRIVER_WARNED: + return "ERROR_PRINTER_DRIVER_WARNED"; + case ERROR_PRINTER_DRIVER_BLOCKED: + return "ERROR_PRINTER_DRIVER_BLOCKED"; +#ifdef ERROR_PRINTER_DRIVER_PACKAGE_IN_USE + case ERROR_PRINTER_DRIVER_PACKAGE_IN_USE: + return "ERROR_PRINTER_DRIVER_PACKAGE_IN_USE"; +#endif +#ifdef ERROR_CORE_DRIVER_PACKAGE_NOT_FOUND + case ERROR_CORE_DRIVER_PACKAGE_NOT_FOUND: + return "ERROR_CORE_DRIVER_PACKAGE_NOT_FOUND"; +#endif +#ifdef ERROR_PRINTER_DRIVER_DOWNLOAD_NEEDED + case ERROR_PRINTER_DRIVER_DOWNLOAD_NEEDED: + return "ERROR_PRINTER_DRIVER_DOWNLOAD_NEEDED"; +#endif +#ifdef ERROR_PRINT_JOB_RESTART_REQUIRED + case ERROR_PRINT_JOB_RESTART_REQUIRED: + return "ERROR_PRINT_JOB_RESTART_REQUIRED"; +#endif + case ERROR_CANCELLED: + return "ERROR_CANCELLED"; + case ERROR_NOACCESS: + return "ERROR_NOACCESS"; + case RPC_X_NULL_REF_POINTER: + return "RPC_X_NULL_REF_POINTER"; + case RPC_S_PROCNUM_OUT_OF_RANGE: + return "RPC_S_PROCNUM_OUT_OF_RANGE"; + case RPC_S_SERVER_UNAVAILABLE: + return "RPC_S_SERVER_UNAVAILABLE"; + case RPC_S_INVALID_NET_ADDR: + return "RPC_S_INVALID_NET_ADDR"; + case RPC_S_CALL_FAILED: + return "RPC_S_CALL_FAILED"; + default: + break; + } + + sprintf(tmp, "0x%08x", error); + + return tmp; +} diff --git a/testprogs/win32/spoolss/error.h b/testprogs/win32/spoolss/error.h new file mode 100644 index 0000000..581c109 --- /dev/null +++ b/testprogs/win32/spoolss/error.h @@ -0,0 +1,36 @@ +/* + Unix SMB/CIFS implementation. + test suite for spoolss rpc operations + + Copyright (C) Guenther Deschner 2009 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef ERROR_INVALID_PARAMETER +#define ERROR_INVALID_PARAMETER 87 +#endif + +#ifndef ERROR_INSUFFICIENT_BUFFER +#define ERROR_INSUFFICIENT_BUFFER 0x007a +#endif + +#if 0 +#ifdef STATUS_PENDING +#undef STATUS_PENDING +#define STATUS_PENDING 0x0103 +#endif +#endif + +const char *errstr(DWORD error); diff --git a/testprogs/win32/spoolss/printlib.c b/testprogs/win32/spoolss/printlib.c new file mode 100644 index 0000000..1dd1277 --- /dev/null +++ b/testprogs/win32/spoolss/printlib.c @@ -0,0 +1,1386 @@ +/* + Unix SMB/CIFS implementation. + test suite for spoolss rpc operations + + Copyright (C) Gerald (Jerry) Carter 2007 + Copyright (C) Guenther Deschner 2009-2010 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include +#include +#include +#include + +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif + +void print_devmode(DEVMODE *pDevModeIn) +{ + if (pDevModeIn == NULL) { + printf("\tDevice Mode\t= (null)\n"); + return; + } + + printf("\tDEVMODE:----------\n"); + printf("\tDeviceName: [%s]\n", pDevModeIn->dmDeviceName); + printf("\tSpecVersion: %d\n", pDevModeIn->dmSpecVersion); + printf("\tDriverVersion: %d\n", pDevModeIn->dmDriverVersion); + printf("\tSize: %d\n", pDevModeIn->dmSize); + printf("\tDriverExtra: %d\n", pDevModeIn->dmDriverExtra); + printf("\tFields: 0x%x\n", pDevModeIn->dmFields); + + if (pDevModeIn->dmFields & DM_ORIENTATION) + printf("\tOrientation: %d\n", pDevModeIn->dmOrientation); + if (pDevModeIn->dmFields & DM_PAPERSIZE) + printf("\tPaperSize: %d\n", pDevModeIn->dmPaperSize); + if (pDevModeIn->dmFields & DM_PAPERLENGTH) + printf("\tPaperLength: %d\n", pDevModeIn->dmPaperLength); + if (pDevModeIn->dmFields & DM_PAPERWIDTH) + printf("\tPaperWidth: %d\n", pDevModeIn->dmPaperWidth); +// if (pDevModeIn->dmFields & DM_POSITION) +// printf("\tPosition: %d\n", pDevModeIn->dmPosition); + if (pDevModeIn->dmFields & DM_SCALE) + printf("\tScale: %d\n", pDevModeIn->dmScale); + if (pDevModeIn->dmFields & DM_COPIES) + printf("\tCopies: %d\n", pDevModeIn->dmCopies ); + if (pDevModeIn->dmFields & DM_DEFAULTSOURCE) + printf("\tDefaultSource: %d\n", pDevModeIn->dmDefaultSource); + if (pDevModeIn->dmFields & DM_PRINTQUALITY) + printf("\tPrintQuality: %d\n", pDevModeIn->dmPrintQuality); + if (pDevModeIn->dmFields & DM_COLOR) + printf("\tColor: %d\n", pDevModeIn->dmColor); + if (pDevModeIn->dmFields & DM_DUPLEX) + printf("\tDuplex: %d\n", pDevModeIn->dmDuplex); + if (pDevModeIn->dmFields & DM_YRESOLUTION) + printf("\tYResolution: %d\n", pDevModeIn->dmYResolution); + if (pDevModeIn->dmFields & DM_TTOPTION) + printf("\tTTOption: %d\n", pDevModeIn->dmTTOption); + if (pDevModeIn->dmFields & DM_COLLATE) + printf("\tCollate: %d\n", pDevModeIn->dmCollate); + if (pDevModeIn->dmFields & DM_FORMNAME) + printf("\tForm: [%s]\n", pDevModeIn->dmFormName); + if (pDevModeIn->dmFields & DM_LOGPIXELS) + printf("\tLogPixels: %d\n", pDevModeIn->dmLogPixels); + if (pDevModeIn->dmFields & DM_BITSPERPEL) + printf("\tBitsPerPel: %d\n", pDevModeIn->dmBitsPerPel); + if (pDevModeIn->dmFields & DM_PELSWIDTH) + printf("\tPelsWidth: %d\n", pDevModeIn->dmPelsWidth); + if (pDevModeIn->dmFields & DM_PELSHEIGHT) + printf("\tPelsHeight: %d\n", pDevModeIn->dmPelsHeight); + if (pDevModeIn->dmFields & DM_DISPLAYFLAGS) + printf("\tDisplayFlags: %d\n", pDevModeIn->dmDisplayFlags); +// if (pDevModeIn->dmFields & DM_NUP) +// printf("\tNup: %d\n", pDevModeIn->dmNup); + if (pDevModeIn->dmFields & DM_DISPLAYFREQUENCY) + printf("\tDisplayFrequency:%d\n", pDevModeIn->dmDisplayFrequency); + if (pDevModeIn->dmFields & DM_ICMMETHOD) + printf("\tICMMethod: %d\n", pDevModeIn->dmICMMethod); + if (pDevModeIn->dmFields & DM_ICMINTENT) + printf("\tICMIntent: %d\n", pDevModeIn->dmICMIntent); + if (pDevModeIn->dmFields & DM_MEDIATYPE) + printf("\tMediaType: %d\n", pDevModeIn->dmMediaType); + if (pDevModeIn->dmFields & DM_DITHERTYPE) + printf("\tDitherType: %d\n", pDevModeIn->dmDitherType); +// if (pDevModeIn->dmFields & DM_PANNINGWIDTH) +// printf("\tPanningWidth: %d\n", pDevModeIn->dmPanningWidth); +// if (pDevModeIn->dmFields & DM_PANNINGHEIGHT) +// printf("\tPanningHeight: %d\n", pDevModeIn->dmPanningHeight); + +#if 0 + if (bForceIn) { + printf("DEVMODE\n"); + Dump((BYTE*)pDevModeIn, sizeof(DEVMODE), LEADER); + + if (pDevModeIn->dmDriverExtra) { + printf("DriverExtra\n"); + Dump((BYTE*)pDevModeIn + sizeof(DEVMODE), pDevModeIn->dmDriverExtra, LEADER); + } + } +#endif + + return; +} + +void print_acl(const char* str, ACL *acl) +{ + printf("%s\n", str); + if (acl == NULL) + return; + + printf("\t\tACL Revision \t\t 0x%x\n", acl->AclRevision); + printf("\t\tSbz1\t\t 0x%x\n", acl->Sbz1); + printf("\t\tSbz2\t\t 0x%x\n", acl->Sbz2); + printf("\t\tACL Size\t\t 0x%x\n", acl->AclSize); + printf("\t\tACL Count\t\t 0x%x\n", acl->AceCount); + + return; +} + +void PrintLastError(); + +void print_sid(LPSTR str, PSID sid) +{ + LPSTR sid_string; + + printf("%s\n", str); + + if (sid == NULL) { + printf("(null sid)\n"); + return; + } + + if (!ConvertSidToStringSid(sid, &sid_string)) { + PrintLastError(); + return; + } + + printf("%s\n", sid_string); + LocalFree(sid_string); + + return; +} + +void print_secdesc(SECURITY_DESCRIPTOR *secdesc) +{ + LPSTR sd_string; + + if (secdesc == NULL) { + printf("\tSecurity Descriptor\t= (null)\n"); + return; + } + + if (!ConvertSecurityDescriptorToStringSecurityDescriptor(secdesc, 1, 7, &sd_string, NULL)) { + PrintLastError(); + return; + } + + printf("%s\n", sd_string); + LocalFree(sd_string); + +#if 0 + printf("\tRevision\t= 0x%x\n", secdesc->Revision); + printf("\tSbz1\t\t= 0x%x\n", secdesc->Sbz1); + printf("\tControl\t\t= 0x%x\n", secdesc->Control); + print_sid("\tOwner\t\t= ", secdesc->Owner); + print_sid("\tGroup\t\t= ",secdesc->Group); + print_acl("\tSacl\t\t= ", secdesc->Sacl); + print_acl("\tDacl\t\t= ", secdesc->Dacl); +#endif + return; +} + +void PrintLastError() +{ + LPVOID lpMsgBuf; + DWORD status; + + status = GetLastError(); + + FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language + (LPTSTR)&lpMsgBuf, 0, NULL); + printf("ERROR [0x%x] : %s\n", status, (char*)lpMsgBuf); + LocalFree(lpMsgBuf); + + return; +} + + +void print_job_info_1(PJOB_INFO_1 info) +{ + printf("\tJob ID\t\t= %d\n", info->JobId); + printf("\tPrinter Name\t= %s\n", info->pPrinterName); + printf("\tMachine Name\t= %s\n", info->pMachineName); + printf("\tUser Name\t= %s\n", info->pUserName); + printf("\tDocument\t= %s\n", info->pDocument); + printf("\tDatatype\t= %s\n", info->pDatatype); + printf("\tStatus\t\t= %s\n", info->pStatus); + printf("\tStatus\t= %d\n", info->Status); + printf("\tPriority\t= %d\n", info->Priority); + printf("\tPosition\t= %d\n", info->Position); + printf("\tTotal Pages\t= %d\n", info->TotalPages); + printf("\tPages Printed\t= %d\n", info->PagesPrinted); + printf("\tSubmitted (DD:MM:YY HH:MM:SS)\t= %d:%d:%d %d:%d:%d UTC\n", + info->Submitted.wDay, info->Submitted.wMonth, + info->Submitted.wYear, info->Submitted.wHour, + info->Submitted.wMinute, info->Submitted.wSecond); + + return; +} + +void print_job_info_2(PJOB_INFO_2 info) +{ + printf("\tJob ID\t\t= %d\n", info->JobId); + printf("\tPrinter Name\t= %s\n", info->pPrinterName); + printf("\tMachine Name\t= %s\n", info->pMachineName); + printf("\tUser Name\t= %s\n", info->pUserName); + printf("\tDocument\t= %s\n", info->pDocument); + printf("\tDatatype\t= %s\n", info->pDatatype); + printf("\tNotify Name\t= %s\n", info->pNotifyName); + printf("\tPrint Processor\t= %s\n", info->pPrintProcessor); + printf("\tParameters\t= %s\n", info->pParameters); + printf("\tDriver Name\t= %s\n", info->pDriverName); + printf("\tStatus\t\t= %s\n", info->pStatus); + printf("\tStatus\t\t= %d\n", info->Status); + printf("\tPriority\t= %d\n", info->Priority); + printf("\tPosition\t= %d\n", info->Position); + printf("\tTotal Pages\t= %d\n", info->TotalPages); + printf("\tPages Printed\t= %d\n", info->PagesPrinted); + printf("\tStart Time\t= %d\n", info->StartTime); + printf("\tUntil Time\t= %d\n", info->UntilTime); + printf("\tTime\t\t= %d\n", info->Time); + printf("\tSize\t\t= %d\n", info->Size); + printf("\tSubmitted (DD:MM:YY HH:MM:SS)\t= %d:%d:%d %d:%d:%d UTC\n", + info->Submitted.wDay, info->Submitted.wMonth, + info->Submitted.wYear, info->Submitted.wHour, + info->Submitted.wMinute, info->Submitted.wSecond); + printf("\tDevice Mode Information\n"); + printf("\t-----------------------\n"); + print_devmode(info->pDevMode); + printf("\tSecurity Descriptor Information\n"); + printf("\t-------------------------------\n"); + print_secdesc(info->pSecurityDescriptor); + + return; +} + +void print_job_info_3(PJOB_INFO_3 info) +{ + printf("\tJob ID\t\t= %d\n", info->JobId); + printf("\tJob ID Next Job\t= %d\n", info->NextJobId); + printf("\tReserved (must be 0)\t= %d\n",info->Reserved); + + return; +} + +void print_job_info_4(PJOB_INFO_4 info) +{ + printf("\tJob ID\t\t= %d\n", info->JobId); + printf("\tPrinter Name\t= %s\n", info->pPrinterName); + printf("\tMachine Name\t= %s\n", info->pMachineName); + printf("\tUser Name\t= %s\n", info->pUserName); + printf("\tDocument\t= %s\n", info->pDocument); + printf("\tDatatype\t= %s\n", info->pDatatype); + printf("\tNotify Name\t= %s\n", info->pNotifyName); + printf("\tPrint Processor\t= %s\n", info->pPrintProcessor); + printf("\tDriver Name\t= %s\n", info->pDriverName); + printf("\tStatus\t\t= %s\n", info->pStatus); + printf("\tStatus\t\t= %d\n", info->Status); + printf("\tPriority\t= %d\n", info->Priority); + printf("\tPosition\t= %d\n", info->Position); + printf("\tTotal Pages\t= %d\n", info->TotalPages); + printf("\tPages Printed\t= %d\n", info->PagesPrinted); + printf("\tStart Time\t= %d\n", info->StartTime); + printf("\tUntil Time\t= %d\n", info->UntilTime); + printf("\tTime\t\t= %d\n", info->Time); + printf("\tSize\t\t= %d\n", info->Size); + printf("\tSize High\t\t= 0x%016x\n", info->SizeHigh); + printf("\tSubmitted (DD:MM:YY HH:MM:SS)\t= %d:%d:%d %d:%d:%d UTC\n", + info->Submitted.wDay, info->Submitted.wMonth, + info->Submitted.wYear, info->Submitted.wHour, + info->Submitted.wMinute, info->Submitted.wSecond); + printf("\tDevice Mode Information\n"); + printf("\t-----------------------\n"); + print_devmode(info->pDevMode); + printf("\tSecurity Descriptor Information\n"); + printf("\t-------------------------------\n"); + print_secdesc(info->pSecurityDescriptor); + + return; +} + +void print_job_info_bylevel(DWORD level, LPBYTE buffer, DWORD count) +{ + DWORD i; + PJOB_INFO_1 buffer1 = NULL; + PJOB_INFO_2 buffer2 = NULL; + PJOB_INFO_3 buffer3 = NULL; + PJOB_INFO_4 buffer4 = NULL; + + if (!buffer) { + return; + } + + switch (level) { + case 1: + buffer1 = (PJOB_INFO_1)buffer; + break; + case 2: + buffer2 = (PJOB_INFO_2)buffer; + break; + case 3: + buffer3 = (PJOB_INFO_3)buffer; + break; + case 4: + buffer4 = (PJOB_INFO_4)buffer; + break; + default: + break; + } + + printf("Job Info Level %d:\n", level); + + switch (level) { + case 1: + for (i=0; ipName); + + return; +} + +void print_monitor_info_2(PMONITOR_INFO_2 info) +{ + printf("\tMonitor Name\t= %s\n", info->pName); + printf("\tEnvironment\t= %s\n", info->pEnvironment); + printf("\tDLL Name\t= %s\n", info->pDLLName); + + return; +} + +void print_monitor_info_bylevel(DWORD level, LPBYTE buffer, DWORD count) +{ + DWORD i; + PMONITOR_INFO_1 buffer1 = NULL; + PMONITOR_INFO_2 buffer2 = NULL; + + if (!buffer) { + return; + } + + switch (level) { + case 1: + buffer1 = (PMONITOR_INFO_1)buffer; + break; + case 2: + buffer2 = (PMONITOR_INFO_2)buffer; + break; + default: + break; + } + + printf("Monitor Info Level %d:\n", level); + + switch (level) { + case 1: + for (i=0; ipName); + return; +} + +void print_port_info_2(PPORT_INFO_2 info) +{ + printf("\tPort Name\t= %s\n", info->pPortName); + printf("\tMonitor Name\t= %s\n",info->pMonitorName); + printf("\tDescription\t= %s\n", info->pDescription); + printf("\tPort Type\t= 0x%08x\n", info->fPortType); + printf("\tReserved\t= 0x%08x\n", info->Reserved); + return; +} + +void print_port_info_3(PPORT_INFO_3 info) +{ + printf("\tStatus\t= 0x%08x\n", info->dwStatus); + printf("\tStatus String\t= %s\n", info->pszStatus); + printf("\tSeverity\t= 0x%08x\n", info->dwSeverity); + return; +} + +void print_port_info_bylevel(DWORD level, LPBYTE buffer, DWORD count) +{ + DWORD i; + PPORT_INFO_1 buffer1 = NULL; + PPORT_INFO_2 buffer2 = NULL; + PPORT_INFO_3 buffer3 = NULL; + + if (!buffer) { + return; + } + + switch (level) { + case 1: + buffer1 = (PPORT_INFO_1)buffer; + break; + case 2: + buffer2 = (PPORT_INFO_2)buffer; + break; + case 3: + buffer3 = (PPORT_INFO_3)buffer; + break; + default: + break; + } + + printf("Port Info Level %d:\n", level); + + switch (level) { + case 1: + for (i=0; ipName); + printf("\tFlags\t\t= 0x%x\n", info->Flags); + printf("\tSize\t\t= %d x %d\n", info->Size.cx, info->Size.cy); + printf("\tRectangle\t= [left]%d [right]%d [top]%d [bottom]%d\n", + info->ImageableArea.left, info->ImageableArea.right, + info->ImageableArea.top, info->ImageableArea.bottom); + + return; +} + +void print_form_info_2(PFORM_INFO_2 info) +{ + printf("\tForm Name\t= %s\n", info->pName); + printf("\tFlags\t\t= 0x%x\n", info->Flags); + printf("\tSize\t\t= %d x %d\n", info->Size.cx, info->Size.cy); + printf("\tRectangle\t= [left]%d [right]%d [top]%d [bottom]%d\n", + info->ImageableArea.left, info->ImageableArea.right, + info->ImageableArea.top, info->ImageableArea.bottom); + printf("\tKeyword\t= %s\n", info->pKeyword); + printf("\tString Type\t= 0x%08x\n", info->StringType); + printf("\tMui DLL\t= %s\n", info->pMuiDll); + printf("\tResource Id\t= 0x%08x\n", info->dwResourceId); + printf("\tDisplay Name\t= %s\n",info->pDisplayName); + printf("\tLang Id\t= 0x%04x\n", info->wLangId); + + return; +} + +void print_form_info_bylevel(DWORD level, LPBYTE buffer, DWORD count) +{ + DWORD i; + PFORM_INFO_1 buffer1 = NULL; + PFORM_INFO_2 buffer2 = NULL; + + if (!buffer) { + return; + } + + switch (level) { + case 1: + buffer1 = (PFORM_INFO_1)buffer; + break; + case 2: + buffer2 = (PFORM_INFO_2)buffer; + break; + default: + break; + } + + printf("Form Info Level %d:\n", level); + + switch (level) { + case 1: + for (i=0; ipName); + printf("\tDescription\t= %s\n", info->pDescription); + printf("\tComment\t\t= %s\n", info->pComment); + printf("\tFlags\t\t= 0x%x\n", info->Flags); + + return; +} + +void print_printer_info_2(PPRINTER_INFO_2 info) +{ + printf("\tServer Name\t\t= %s\n", info->pServerName); + printf("\tPrinter Name\t\t= %s\n", info->pPrinterName); + printf("\tPort Name\t\t= %s\n", info->pPortName); + printf("\tShare Name\t\t= %s\n", info->pShareName); + printf("\tDriver Name\t\t= %s\n", info->pDriverName); + printf("\tComment\t\t\t= %s\n", info->pComment); + printf("\tLocation\t\t= %s\n", info->pLocation); + printf("\tSeparator File\t\t= %s\n", info->pSepFile); + printf("\tDefault Data Type\t= %s\n", info->pDatatype); + printf("\tPrint Processor\t\t= %s\n", info->pPrintProcessor); + printf("\tParameters\t\t= %s\n", info->pParameters); + printf("\tAttributes\t\t= 0x%x\n", info->Attributes); + printf("\tPriority\t\t= 0x%x\n", info->Priority); + printf("\tDefault Priority\t= 0x%x\n", info->DefaultPriority); + printf("\tStart Time\t\t= 0x%x\n", info->StartTime); + printf("\tUntil Time\t\t= 0x%x\n", info->UntilTime); + printf("\tStatus\t\t\t= 0x%x\n", info->Status); + printf("\tcJobs\t\t\t= 0x%x\n", info->cJobs); + printf("\tAverage PPM\t\t= 0x%x\n", info->AveragePPM); + + printf("\tDevice Mode Information\n"); + printf("\t-----------------------\n"); + print_devmode(info->pDevMode); + printf("\tSecurity Descriptor Information\n"); + printf("\t-------------------------------\n"); + print_secdesc(info->pSecurityDescriptor); + return; +} + +void print_printer_info_3(PPRINTER_INFO_3 info) +{ + printf("\tSecurity Descriptor Information\n"); + printf("\t-------------------------------\n"); + print_secdesc(info->pSecurityDescriptor); + return; +} + +void print_printer_info_4(PPRINTER_INFO_4 info) +{ + printf("\tServer Name\t\t= %s\n", info->pServerName); + printf("\tPrinter Name\t\t= %s\n", info->pPrinterName); + printf("\tAttributes\t\t= 0x%x\n", info->Attributes); + return; +} + +void print_printer_info_5(PPRINTER_INFO_5 info) +{ + printf("\tPrinter Name\t\t\t= %s\n", info->pPrinterName); + printf("\tPort Name\t\t\t= %s\n", info->pPortName); + printf("\tAttributes\t\t\t= 0x%x\n", info->Attributes); + printf("\tDev NotSelect Timeout\t= 0x%x\n", info->DeviceNotSelectedTimeout); + printf("\tTX RetryTimeout\t\t= 0x%x\n", info->TransmissionRetryTimeout); + return; +} + +void print_printer_info_6(PPRINTER_INFO_6 info) +{ + printf("\tStatus\t\t\t= 0x%x\n", info->dwStatus); + return; +} + +void print_printer_info_7(PPRINTER_INFO_7 info) +{ + printf("\tObject GUID\t\t\t= %s\n", info->pszObjectGUID); + printf("\tAction\t\t\t= 0x%x\n", info->dwAction); + return; +} + +void print_printer_info_8(PPRINTER_INFO_8 info) +{ + print_devmode(info->pDevMode); +} + +void print_printer_info_9(PPRINTER_INFO_9 info) +{ + print_devmode(info->pDevMode); +} + +void print_printer_info_bylevel(DWORD level, LPBYTE buffer, DWORD count) +{ + DWORD i; + PPRINTER_INFO_1 buffer1 = NULL; + PPRINTER_INFO_2 buffer2 = NULL; + PPRINTER_INFO_3 buffer3 = NULL; + PPRINTER_INFO_4 buffer4 = NULL; + PPRINTER_INFO_5 buffer5 = NULL; + PPRINTER_INFO_6 buffer6 = NULL; + PPRINTER_INFO_7 buffer7 = NULL; + PPRINTER_INFO_8 buffer8 = NULL; + PPRINTER_INFO_9 buffer9 = NULL; + + if (!buffer) { + return; + } + + switch (level) { + case 1: + buffer1 = (PPRINTER_INFO_1)buffer; + break; + case 2: + buffer2 = (PPRINTER_INFO_2)buffer; + break; + case 3: + buffer3 = (PPRINTER_INFO_3)buffer; + break; + case 4: + buffer4 = (PPRINTER_INFO_4)buffer; + break; + case 5: + buffer5 = (PPRINTER_INFO_5)buffer; + break; + case 6: + buffer6 = (PPRINTER_INFO_6)buffer; + break; + case 7: + buffer7 = (PPRINTER_INFO_7)buffer; + break; + case 8: + buffer8 = (PPRINTER_INFO_8)buffer; + break; + case 9: + buffer9 = (PPRINTER_INFO_9)buffer; + break; + default: + break; + } + + printf("Printer Info Level %d:\n", level); + + switch (level) { + case 1: + for (i=0; ipName); + + return; +} + +void print_printprocessor_info_bylevel(DWORD level, LPBYTE buffer, DWORD count) +{ + DWORD i; + PPRINTPROCESSOR_INFO_1 buffer1 = NULL; + + if (!buffer) { + return; + } + + switch (level) { + case 1: + buffer1 = (PPRINTPROCESSOR_INFO_1)buffer; + break; + default: + break; + } + + printf("Print Processor Info Level %d:\n", level); + + switch (level) { + case 1: + for (i=0; ipName); + + return; +} + +void print_datatypes_info_bylevel(DWORD level, LPBYTE buffer, DWORD count) +{ + DWORD i; + PDATATYPES_INFO_1 buffer1 = NULL; + + if (!buffer) { + return; + } + + switch (level) { + case 1: + buffer1 = (PDATATYPES_INFO_1)buffer; + break; + default: + break; + } + + printf("DataTypes Info Level %d:\n", level); + + switch (level) { + case 1: + for (i=0; ipName); + + return; +} + +void print_driver_info_2(PDRIVER_INFO_2 info) +{ + printf("\tDriver Name\t= %s\n", info->pName); + printf("\tEnvironment\t= %s\n", info->pEnvironment); + printf("\tVersion\t\t= %d\n", info->cVersion); + printf("\tDriver Path\t= %s\n", info->pDriverPath); + printf("\tData File\t= %s\n", info->pDataFile); + printf("\tConfig File\t= %s\n\n", info->pConfigFile); + + return; +} + +void print_driver_info_3(PDRIVER_INFO_3 info) +{ + char *ptr = NULL; + + printf("\tDriver Name\t= %s\n", info->pName); + printf("\tEnvironment\t= %s\n", info->pEnvironment); + printf("\tVersion\t\t= %d\n", info->cVersion); + printf("\tDriver Path\t= %s\n", info->pDriverPath); + printf("\tData File\t= %s\n", info->pDataFile); + printf("\tConfig File\t= %s\n", info->pConfigFile); + printf("\tHelp Path\t= %s\n", info->pHelpFile); + printf("\tMonitor Name\t= %s\n", info->pMonitorName); + printf("\tData Type\t= %s\n", info->pDefaultDataType); + ptr = (char*)info->pDependentFiles; + while ((ptr != NULL) && (*ptr != '\0')) { + printf("\tDependent Files\t= %s\n", ptr); + for (;*ptr != '\0'; ptr++) + /* printf("%s\n", ptr); */ + ; + ptr++; + } + + return; +} + +void print_driver_info_4(PDRIVER_INFO_4 info) +{ + char *ptr = NULL; + + printf("\tDriver Name\t= %s\n", info->pName); + printf("\tEnvironment\t= %s\n", info->pEnvironment); + printf("\tVersion\t\t= %d\n", info->cVersion); + printf("\tDriver Path\t= %s\n", info->pDriverPath); + printf("\tData File\t= %s\n", info->pDataFile); + printf("\tConfig File\t= %s\n", info->pConfigFile); + printf("\tHelp Path\t= %s\n", info->pHelpFile); + printf("\tMonitor Name\t= %s\n", info->pMonitorName); + printf("\tData Type\t= %s\n", info->pDefaultDataType); + printf("\tPrevious Names\t= %s\n", info->pszzPreviousNames); + ptr = (char*)info->pDependentFiles; + while ((ptr != NULL) && (*ptr != '\0')) { + printf("\tDependent Files\t= %s\n", ptr); + for (;*ptr != '\0'; ptr++) + /* printf("%s\n", ptr); */ + ; + ptr++; + } + + return; +} + +void print_driver_info_5(PDRIVER_INFO_5 info) +{ + printf("\tDriver Name\t= %s\n", info->pName); + printf("\tEnvironment\t= %s\n", info->pEnvironment); + printf("\tVersion\t\t= %d\n", info->cVersion); + printf("\tDriver Path\t= %s\n", info->pDriverPath); + printf("\tData File\t= %s\n", info->pDataFile); + printf("\tConfig File\t= %s\n", info->pConfigFile); + printf("\tDriver Attributes\t= %d\n", info->dwDriverAttributes); + printf("\tConfig Version\t= %d\n", info->dwConfigVersion); + printf("\tDriver Version\t= %d\n", info->dwDriverVersion); + + return; +} + +void print_driver_info_6(PDRIVER_INFO_6 info) +{ + char *ptr = NULL; + + printf("\tDriver Name\t= %s\n", info->pName); + printf("\tEnvironment\t= %s\n", info->pEnvironment); + printf("\tVersion\t\t= %d\n", info->cVersion); + printf("\tDriver Path\t= %s\n", info->pDriverPath); + printf("\tData File\t= %s\n", info->pDataFile); + printf("\tConfig File\t= %s\n", info->pConfigFile); + printf("\tHelp Path\t= %s\n", info->pHelpFile); + printf("\tMonitor Name\t= %s\n", info->pMonitorName); + printf("\tData Type\t= %s\n", info->pDefaultDataType); + printf("\tPrevious Names\t= %s\n", info->pszzPreviousNames); + ptr = (char*)info->pDependentFiles; + if (ptr != NULL) { + while (*ptr != '\0') { + printf("\tDependent Files\t= %s\n", ptr); + for (;*ptr != '\0'; ptr++) + /* printf("%s\n", ptr); */ + ; + ptr++; + } + } else { + printf("\tPrevious Names\t= (null)\n"); + } + + ptr = (char*)info->pszzPreviousNames; + if (ptr != NULL) { + while (*ptr != '\0') { + printf("\tPrevious Names\t= %s\n", ptr); + for (;*ptr != '\0'; ptr++) + /* printf("%s\n", ptr); */ + ; + ptr++; + } + } else { + printf("\tPrevious Names\t= (null)\n"); + } + + printf("\tDriver Date\t= %d (%08x:%08x)\n", + info->ftDriverDate, + info->ftDriverDate.dwLowDateTime, + info->ftDriverDate.dwHighDateTime); + printf("\t\t"); + print_file_time(&info->ftDriverDate); + printf("\tDriver Version\t= %d\n", info->dwlDriverVersion); + printf("\tManufacture Name = %s\n", info->pszMfgName); + printf("\tOEM URL\t\t= %s\n", info->pszOEMUrl); + printf("\tHardware ID\t= %s\n", info->pszHardwareID); + printf("\tProvider\t= %s\n", info->pszProvider); + return; +} + +static void print_multi_sz(LPSTR multisz) +{ + char *ptr = NULL; + + ptr = (char *)multisz; + + if (!ptr) { + printf("(null)\n"); + return; + } + + while (*ptr != '\0') { + printf("%s\n", ptr); + for (; *ptr != '\0'; ptr++) { + /* printf("%s\n", ptr); */ + ; + } + ptr++; + } +} + +void print_driver_info_8(PDRIVER_INFO_8 info) +{ + printf("\tDriver Name\t= %s\n", info->pName); + printf("\tEnvironment\t= %s\n", info->pEnvironment); + printf("\tVersion\t\t= %d\n", info->cVersion); + printf("\tDriver Path\t= %s\n", info->pDriverPath); + printf("\tData File\t= %s\n", info->pDataFile); + printf("\tConfig File\t= %s\n", info->pConfigFile); + printf("\tHelp Path\t= %s\n", info->pHelpFile); + printf("\tMonitor Name\t= %s\n", info->pMonitorName); + printf("\tData Type\t= %s\n", info->pDefaultDataType); + printf("\tPrevious Names\t=\n"); + print_multi_sz(info->pszzPreviousNames); + printf("\tDependent Files\t=\n"); + print_multi_sz(info->pDependentFiles); + printf("\tDriver Date\t= %d (%08x:%08x)\n", + info->ftDriverDate, + info->ftDriverDate.dwLowDateTime, + info->ftDriverDate.dwHighDateTime); + printf("\t\t"); + print_file_time(&info->ftDriverDate); + printf("\tDriver Version\t= %d\n", info->dwlDriverVersion); + printf("\tManufacture Name = %s\n", info->pszMfgName); + printf("\tOEM URL\t\t= %s\n", info->pszOEMUrl); + printf("\tHardware ID\t= %s\n", info->pszHardwareID); + printf("\tProvider\t= %s\n", info->pszProvider); + printf("\tPrint Processor\t= %s\n", info->pszPrintProcessor); + printf("\tVendor Setup\t= %s\n", info->pszVendorSetup); + printf("\tColor Profiles\t=\n"); + print_multi_sz(info->pszzColorProfiles); + printf("\tInf Path\t= %s\n", info->pszInfPath); + printf("\tPrinter Driver Attributes = %d\n", info->dwPrinterDriverAttributes); + printf("\tCore Driver Dependencies\t=\n"); + print_multi_sz(info->pszzCoreDriverDependencies); + printf("\tMin Inbox Driver VerDate\t= %d (%08x:%08x)\n", + info->ftMinInboxDriverVerDate, + info->ftMinInboxDriverVerDate.dwLowDateTime, + info->ftMinInboxDriverVerDate.dwHighDateTime); + printf("\t\t"); + print_file_time(&info->ftMinInboxDriverVerDate); + printf("\tMin Inbox Driver VerVersion\t= %d\n", info->dwlMinInboxDriverVerVersion); + return; +} + +void print_driver_info_bylevel(DWORD level, LPBYTE buffer, DWORD count) +{ + DWORD i; + PDRIVER_INFO_1 buffer1 = NULL; + PDRIVER_INFO_2 buffer2 = NULL; + PDRIVER_INFO_3 buffer3 = NULL; + PDRIVER_INFO_4 buffer4 = NULL; + PDRIVER_INFO_5 buffer5 = NULL; + PDRIVER_INFO_6 buffer6 = NULL; + PDRIVER_INFO_8 buffer8 = NULL; + + if (!buffer) { + return; + } + + switch (level) { + case 1: + buffer1 = (PDRIVER_INFO_1)buffer; + break; + case 2: + buffer2 = (PDRIVER_INFO_2)buffer; + break; + case 3: + buffer3 = (PDRIVER_INFO_3)buffer; + break; + case 4: + buffer4 = (PDRIVER_INFO_4)buffer; + break; + case 5: + buffer5 = (PDRIVER_INFO_5)buffer; + break; + case 6: + buffer6 = (PDRIVER_INFO_6)buffer; + break; + case 8: + buffer8 = (PDRIVER_INFO_8)buffer; + break; + default: + break; + } + + printf("Driver Info Level %d:\n", level); + + switch (level) { + case 1: + for (i=0; ipDocName); + printf("\tOutput Filename\t= %s\n", info->pOutputFile); + printf("\tDatatype\t= %s\n", info->pDatatype); + return; +} + +void print_printer_keys(LPSTR buffer) +{ + LPSTR p = NULL; + + p = buffer; + + while (p && *p) { + printf("%s\n", p); + for (; *p; p = CharNext(p)) { + p = CharNext(p); + } + } +} + +LPSTR reg_type_str(DWORD type) +{ + switch (type) { + case REG_DWORD: + return "REG_DWORD"; + case REG_SZ: + return "REG_SZ"; + case REG_MULTI_SZ: + return "REG_MULTI_SZ"; + case REG_BINARY: + return "REG_BINARY"; + default: + return NULL; + } +} + +void print_asc(const BYTE *buf, DWORD len) +{ + int i; + for (i=0; i 0) && + (len > i+16) && + (memcmp(&buf[i], &empty, 16) == 0)) + { + i +=16; + continue; + } + + if (i8) printf(" "); + while (n--) printf(" "); + n = MIN(8,i%16); + print_asc(&buf[i-(i%16)],n); printf( " " ); + n = (i%16) - n; + if (n>0) print_asc(&buf[i-n],n); + printf("\n"); + } +} + +static void dump_printer_data(DWORD size, LPBYTE buffer, DWORD type) +{ + DWORD i = 0; + LPSTR p = NULL; + + switch (type) { + case REG_SZ: + dump_data(buffer, size); + break; + case REG_MULTI_SZ: + dump_data(buffer, size); + p = (LPSTR)buffer; + while (p && *p) { + printf("\t\t%s\n", p); + for (; *p; p = CharNext(p)) { + p = CharNext(p); + } + } + break; + case REG_DWORD: + assert(size == 4); + printf("\t\t0x%08x\n", (DWORD)*buffer); + break; + case REG_BINARY: + dump_data(buffer, size); + break; + default: + break; + } +} + +void print_printer_data(LPSTR keyname, LPSTR valuename, DWORD size, LPBYTE buffer, DWORD type) +{ + if (keyname) { + printf("\tKey Name:\t%s\n", keyname); + } + + printf("\tValue Name:\t%s\n", valuename); + printf("\tSize:\t\t0x%x (%d)\n", size, size); + printf("\tType:\t\t%s\n", reg_type_str(type)); + + if (buffer == NULL || size == 0) { + return; + } + + dump_printer_data(size, buffer, type); +} + +void print_printer_dataw(LPCWSTR keyname, LPCWSTR valuename, DWORD size, LPBYTE buffer, DWORD type) +{ + if (keyname) { + printf("\tKey Name:\t%ls\n", keyname); + } + + printf("\tValue Name:\t%ls\n", valuename); + printf("\tSize:\t\t0x%x (%d)\n", size, size); + printf("\tType:\t\t%s\n", reg_type_str(type)); + + if (buffer == NULL || size == 0) { + return; + } + + dump_printer_data(size, buffer, type); +} + + +void print_printer_enum_values(PRINTER_ENUM_VALUES *info) +{ + print_printer_data(NULL, info->pValueName, info->cbData, info->pData, info->dwType); +} + +void print_file_time(const FILETIME *t) +{ + SYSTEMTIME s; + LPSTR dayofweek = NULL; + LPSTR month = NULL; + + if (!FileTimeToSystemTime(t, &s)) { + printf("Failed to convert FILETIME to SYSTEMTIME\n"); + return; + } + switch (s.wDayOfWeek) { + case 0: + dayofweek = "Sun"; + break; + case 1: + dayofweek = "Mon"; + break; + case 2: + dayofweek = "Tue"; + break; + case 3: + dayofweek = "Wed"; + break; + case 4: + dayofweek = "Thu"; + break; + case 5: + dayofweek = "Fri"; + break; + case 6: + dayofweek = "Sat"; + break; + default: + break; + } + + switch (s.wMonth) { + case 1: + month = "Jan"; + break; + case 2: + month = "Feb"; + break; + case 3: + month = "Mar"; + break; + case 4: + month = "Apr"; + break; + case 5: + month = "May"; + break; + case 6: + month = "Jun"; + break; + case 7: + month = "Jul"; + break; + case 8: + month = "Aug"; + break; + case 9: + month = "Sep"; + break; + case 10: + month = "Oct"; + break; + case 11: + month = "Nov"; + break; + case 12: + month = "Dec"; + break; + default: + break; + } + + printf("%s %s %02d %02d:%02d:%02d %04d\n", + dayofweek, month, s.wDay, + s.wHour, s.wMinute, s.wSecond, s.wYear); +} diff --git a/testprogs/win32/spoolss/printlib_proto.h b/testprogs/win32/spoolss/printlib_proto.h new file mode 100644 index 0000000..704cdbf --- /dev/null +++ b/testprogs/win32/spoolss/printlib_proto.h @@ -0,0 +1,67 @@ +#ifndef __PRINTLIB_PROTO_H__ +#define __PRINTLIB_PROTO_H__ + +#undef _PRINTF_ATTRIBUTE +#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) +/* This file was automatically generated by mkproto.pl. DO NOT EDIT */ + +/* this file contains prototypes for functions that are private + * to this subsystem or library. These functions should not be + * used outside this particular subsystem! */ + + +/* The following definitions come from printlib.c */ + +void print_devmode(DEVMODE *pDevModeIn); +void print_acl(const char* str, ACL *acl); +void print_sid(const char* str, SID *sid); +void print_secdesc(SECURITY_DESCRIPTOR *secdesc); +void PrintLastError(); +void print_job_info_1(PJOB_INFO_1 info); +void print_job_info_2(PJOB_INFO_2 info); +void print_job_info_3(PJOB_INFO_3 info); +void print_job_info_4(PJOB_INFO_4 info); +void print_job_info_bylevel(DWORD level, LPBYTE buffer, DWORD count); +void print_monitor_info_1(PMONITOR_INFO_1 info); +void print_monitor_info_2(PMONITOR_INFO_2 info); +void print_monitor_info_bylevel(DWORD level, LPBYTE buffer, DWORD count); +void print_port_info_1(PPORT_INFO_1 info); +void print_port_info_2(PPORT_INFO_2 info); +void print_port_info_3(PPORT_INFO_3 info); +void print_port_info_bylevel(DWORD level, LPBYTE buffer, DWORD count); +void print_form_info_1(PFORM_INFO_1 info); +void print_form_info_2(PFORM_INFO_2 info); +void print_form_info_bylevel(DWORD level, LPBYTE buffer, DWORD count); +void print_printer_info_1(PPRINTER_INFO_1 info); +void print_printer_info_2(PPRINTER_INFO_2 info); +void print_printer_info_5(PPRINTER_INFO_5 info); +void print_printer_info_6(PPRINTER_INFO_6 info); +void print_printer_info_7(PPRINTER_INFO_7 info); +void print_printer_info_8(PPRINTER_INFO_8 info); +void print_printer_info_9(PPRINTER_INFO_9 info); +void print_printer_info_bylevel(DWORD level, LPBYTE buffer, DWORD count); +void print_printprocessor_info_1(PPRINTPROCESSOR_INFO_1 info); +void print_printprocessor_info_bylevel(DWORD level, LPBYTE buffer, DWORD count); +void print_datatypes_info_1(PDATATYPES_INFO_1 info); +void print_datatypes_info_bylevel(DWORD level, LPBYTE buffer, DWORD count); +void print_driver_info_1(PDRIVER_INFO_1 info); +void print_driver_info_2(PDRIVER_INFO_2 info); +void print_driver_info_3(PDRIVER_INFO_3 info); +void print_driver_info_4(PDRIVER_INFO_4 info); +void print_driver_info_5(PDRIVER_INFO_5 info); +void print_driver_info_6(PDRIVER_INFO_6 info); +void print_driver_info_8(PDRIVER_INFO_8 info); +void print_driver_info_bylevel(DWORD level, LPBYTE buffer, DWORD count); +void print_doc_info_1(PDOC_INFO_1 info); +void print_printer_keys(LPSTR buffer); +LPSTR reg_type_str(DWORD type); +void print_printer_data(LPSTR keyname, LPSTR valuename, DWORD size, LPBYTE buffer, DWORD type); +void print_printer_dataw(LPCWSTR keyname, LPCWSTR valuename, DWORD size, LPBYTE buffer, DWORD type); +void print_printer_enum_values(PRINTER_ENUM_VALUES *info); +void print_file_time(const FILETIME *t); + +#undef _PRINTF_ATTRIBUTE +#define _PRINTF_ATTRIBUTE(a1, a2) + +#endif /* __PRINTLIB_PROTO_H__ */ + diff --git a/testprogs/win32/spoolss/string.h b/testprogs/win32/spoolss/string.h new file mode 100644 index 0000000..17561eb --- /dev/null +++ b/testprogs/win32/spoolss/string.h @@ -0,0 +1,15 @@ +/* __location__ macro replacement taken from talloc.h */ + +/* + this uses a little trick to allow __LINE__ to be stringified +*/ +#ifndef __location__ +#define __STRING_LINE1__(s) #s +#define __STRING_LINE2__(s) __STRING_LINE1__(s) +#define __STRING_LINE3__ __STRING_LINE2__(__LINE__) +#define __location__ __FILE__ ":" __STRING_LINE3__ +#endif + +#ifndef __STRING +#define __STRING(s) #s +#endif diff --git a/testprogs/win32/spoolss/testspoolss.c b/testprogs/win32/spoolss/testspoolss.c new file mode 100644 index 0000000..794e545 --- /dev/null +++ b/testprogs/win32/spoolss/testspoolss.c @@ -0,0 +1,1842 @@ +/* + Unix SMB/CIFS implementation. + test suite for spoolss rpc operations + + Copyright (C) Guenther Deschner 2009-2010 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/**************************************************************************** +****************************************************************************/ + +#include "testspoolss.h" +#include "string.h" +#include "torture.h" + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_OpenPrinter(struct torture_context *tctx, + LPSTR printername, + LPPRINTER_DEFAULTS defaults, + LPHANDLE handle) +{ + torture_comment(tctx, "Testing OpenPrinter(%s)", printername); + + if (!OpenPrinter(printername, handle, defaults)) { + char tmp[1024]; + sprintf(tmp, "failed to open printer %s, error was: 0x%08x\n", + printername, GetLastError()); + torture_fail(tctx, tmp); + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_ClosePrinter(struct torture_context *tctx, + HANDLE handle) +{ + torture_comment(tctx, "Testing ClosePrinter"); + + if (!ClosePrinter(handle)) { + char tmp[1024]; + sprintf(tmp, "failed to close printer, error was: %s\n", + errstr(GetLastError())); + torture_fail(tctx, tmp); + } + + return TRUE; +} + + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_EnumPrinters(struct torture_context *tctx, + LPSTR servername) +{ + DWORD levels[] = { 1, 2, 5 }; + DWORD success[] = { 1, 1, 1 }; + DWORD i; + DWORD flags = PRINTER_ENUM_NAME; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD returned = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing EnumPrinters level %d", levels[i]); + + EnumPrinters(flags, servername, levels[i], NULL, 0, &needed, &returned); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!EnumPrinters(flags, servername, levels[i], buffer, needed, &needed, &returned)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "EnumPrinters failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], servername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + print_printer_info_bylevel(levels[i], buffer, returned); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_EnumDrivers(struct torture_context *tctx, + LPSTR servername, + LPSTR architecture) +{ + DWORD levels[] = { 1, 2, 3, 4, 5, 6 }; + DWORD success[] = { 1, 1, 1, 1, 1, 1 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD returned = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing EnumPrinterDrivers(%s) level %d", + architecture, levels[i]); + + EnumPrinterDrivers(servername, architecture, levels[i], NULL, 0, &needed, &returned); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!EnumPrinterDrivers(servername, architecture, levels[i], buffer, needed, &needed, &returned)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "EnumPrinterDrivers failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], servername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + print_driver_info_bylevel(levels[i], buffer, returned); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_GetForm(struct torture_context *tctx, + LPSTR servername, + HANDLE handle, + LPSTR formname) +{ + DWORD levels[] = { 1, 2 }; + DWORD success[] = { 1, 0 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing GetForm(%s) level %d", formname, levels[i]); + + GetForm(handle, formname, levels[i], NULL, 0, &needed); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!GetForm(handle, formname, levels[i], buffer, needed, &needed)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "GetForm failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], servername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + print_form_info_bylevel(levels[i], buffer, 1); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_EnumForms(struct torture_context *tctx, + LPSTR servername, + HANDLE handle) +{ + DWORD levels[] = { 1, 2 }; + DWORD success[] = { 1, 1 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD returned = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing EnumForms level %d", levels[i]); + + if (tctx->samba3 && levels[i] == 2) { + torture_comment(tctx, "skipping level %d enum against samba\n", levels[i]); + continue; + } + + EnumForms(handle, levels[i], NULL, 0, &needed, &returned); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!EnumForms(handle, levels[i], buffer, needed, &needed, &returned)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "EnumForms failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], servername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + print_form_info_bylevel(levels[i], buffer, returned); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_EnumPorts(struct torture_context *tctx, + LPSTR servername) +{ + DWORD levels[] = { 1, 2 }; + DWORD success[] = { 1, 1 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD returned = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing EnumPorts level %d", levels[i]); + + EnumPorts(servername, levels[i], NULL, 0, &needed, &returned); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!EnumPorts(servername, levels[i], buffer, needed, &needed, &returned)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "EnumPorts failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], servername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + print_port_info_bylevel(levels[i], buffer, returned); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_EnumMonitors(struct torture_context *tctx, + LPSTR servername) +{ + DWORD levels[] = { 1, 2 }; + DWORD success[] = { 1, 1 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD returned = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing EnumMonitors level %d", levels[i]); + + EnumMonitors(servername, levels[i], NULL, 0, &needed, &returned); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!EnumMonitors(servername, levels[i], buffer, needed, &needed, &returned)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "EnumMonitors failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], servername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + print_monitor_info_bylevel(levels[i], buffer, returned); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_EnumPrintProcessors(struct torture_context *tctx, + LPSTR servername, + LPSTR architecture) +{ + DWORD levels[] = { 1 }; + DWORD success[] = { 1 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD returned = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing EnumPrintProcessors(%s) level %d", architecture, levels[i]); + + EnumPrintProcessors(servername, architecture, levels[i], NULL, 0, &needed, &returned); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!EnumPrintProcessors(servername, architecture, levels[i], buffer, needed, &needed, &returned)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "EnumPrintProcessors failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], servername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + print_printprocessor_info_bylevel(levels[i], buffer, returned); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_EnumPrintProcessorDatatypes(struct torture_context *tctx, + LPSTR servername) +{ + DWORD levels[] = { 1 }; + DWORD success[] = { 1 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD returned = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing EnumPrintProcessorDatatypes level %d", levels[i]); + + EnumPrintProcessorDatatypes(servername, "winprint", levels[i], NULL, 0, &needed, &returned); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!EnumPrintProcessorDatatypes(servername, "winprint", levels[i], buffer, needed, &needed, &returned)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "EnumPrintProcessorDatatypes failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], servername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + print_datatypes_info_bylevel(levels[i], buffer, returned); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_EnumPrinterKey(struct torture_context *tctx, + LPSTR servername, + HANDLE handle, + LPCSTR key) +{ + LPSTR buffer = NULL; + DWORD needed = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing EnumPrinterKey(%s)", key); + + err = EnumPrinterKey(handle, key, NULL, 0, &needed); + if (err == ERROR_MORE_DATA) { + buffer = (LPTSTR)malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + err = EnumPrinterKey(handle, key, buffer, needed, &needed); + } + if (err) { + sprintf(tmp, "EnumPrinterKey(%s) failed on [%s] (buffer size = %d), error: %s\n", + key, servername, needed, errstr(err)); + torture_fail(tctx, tmp); + } + + if (tctx->print) { + print_printer_keys(buffer); + } + + free(buffer); + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_GetPrinter(struct torture_context *tctx, + LPSTR printername, + HANDLE handle) +{ + DWORD levels[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; + DWORD success[] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing GetPrinter level %d", levels[i]); + + GetPrinter(handle, levels[i], NULL, 0, &needed); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!GetPrinter(handle, levels[i], buffer, needed, &needed)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "GetPrinter failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], printername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + print_printer_info_bylevel(levels[i], buffer, 1); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_GetPrinterDriver(struct torture_context *tctx, + LPSTR printername, + LPSTR architecture, + HANDLE handle) +{ + DWORD levels[] = { 1, 2, 3, 4, 5, 6, 8 }; + DWORD success[] = { 1, 1, 1, 1, 1, 1, 1 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing GetPrinterDriver(%s) level %d", + architecture, levels[i]); + + GetPrinterDriver(handle, architecture, levels[i], NULL, 0, &needed); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!GetPrinterDriver(handle, architecture, levels[i], buffer, needed, &needed)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "GetPrinterDriver failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], printername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + print_driver_info_bylevel(levels[i], buffer, 1); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_EnumJobs(struct torture_context *tctx, + LPSTR printername, + HANDLE handle) +{ + DWORD levels[] = { 1, 2, 3, 4 }; + DWORD success[] = { 1, 1, 1, 1 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD returned = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing EnumJobs level %d", levels[i]); + + if (tctx->samba3 && levels[i] == 4) { + torture_comment(tctx, "skipping level %d enum against samba\n", levels[i]); + continue; + } + + EnumJobs(handle, 0, 100, levels[i], NULL, 0, &needed, &returned); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!EnumJobs(handle, 0, 100, levels[i], buffer, needed, &needed, &returned)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "EnumJobs failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], printername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + print_job_info_bylevel(levels[i], buffer, returned); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_EnumPrinterData(struct torture_context *tctx, + LPSTR servername, + HANDLE handle) +{ + DWORD err = 0; + LPTSTR value_name; + LPBYTE data; + DWORD index = 0; + DWORD type; + DWORD value_offered = 0, value_needed; + DWORD data_offered = 0, data_needed; + char tmp[1024]; + + torture_comment(tctx, "Testing EnumPrinterData(%d) (value offered: %d, data_offered: %d)\n", + index, value_offered, data_offered); + + err = EnumPrinterData(handle, 0, NULL, 0, &value_needed, NULL, NULL, 0, &data_needed); + if (err) { + sprintf(tmp, "EnumPrinterData(%d) failed on [%s] (value size = %d, data size = %d), error: %s\n", + index, servername, value_offered, data_offered, errstr(err)); + torture_fail(tctx, tmp); + } + + value_name = malloc(value_needed); + torture_assert(tctx, value_name, "malloc failed"); + data = malloc(data_needed); + torture_assert(tctx, data, "malloc failed"); + + value_offered = value_needed; + data_offered = data_needed; + + do { + + value_needed = 0; + data_needed = 0; + + torture_comment(tctx, "Testing EnumPrinterData(%d) (value offered: %d, data_offered: %d)\n", + index, value_offered, data_offered); + + err = EnumPrinterData(handle, index++, value_name, value_offered, &value_needed, &type, data, data_offered, &data_needed); + if (err == ERROR_NO_MORE_ITEMS) { + break; + } + if (err) { + sprintf(tmp, "EnumPrinterData(%d) failed on [%s] (value size = %d, data size = %d), error: %s\n", + index, servername, value_offered, data_offered, errstr(err)); + torture_fail(tctx, tmp); + } + + if (tctx->print) { + print_printer_data(NULL, value_name, data_needed, data, type); + } + + } while (err != ERROR_NO_MORE_ITEMS); + + free(value_name); + free(data); + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_EnumPrinterDataEx(struct torture_context *tctx, + LPSTR servername, + LPSTR keyname, + HANDLE handle, + LPBYTE *buffer_p, + DWORD *returned_p) +{ + LPBYTE buffer = NULL; + DWORD needed = 0; + DWORD returned = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing EnumPrinterDataEx(%s)", keyname); + + err = EnumPrinterDataEx(handle, keyname, NULL, 0, &needed, &returned); + if (err == ERROR_MORE_DATA) { + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + err = EnumPrinterDataEx(handle, keyname, buffer, needed, &needed, &returned); + } + if (err) { + sprintf(tmp, "EnumPrinterDataEx(%s) failed on [%s] (buffer size = %d), error: %s\n", + keyname, servername, needed, errstr(err)); + torture_fail(tctx, tmp); + } + + if (tctx->print) { + DWORD i; + LPPRINTER_ENUM_VALUES v = (LPPRINTER_ENUM_VALUES)buffer; + for (i=0; i < returned; i++) { + print_printer_enum_values(&v[i]); + } + } + + if (returned_p) { + *returned_p = returned; + } + + if (buffer_p) { + *buffer_p = buffer; + } else { + free(buffer); + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_devicemode_equal(struct torture_context *tctx, + const DEVMODE *d1, + const DEVMODE *d2) +{ + if (d1 == d2) { + return TRUE; + } + + if (!d1 || !d2) { + torture_comment(tctx, "%s\n", __location__); + return FALSE; + } + + torture_assert_str_equal(tctx, (const char *)d1->dmDeviceName, (const char *)d2->dmDeviceName, "dmDeviceName mismatch"); + torture_assert_int_equal(tctx, d1->dmSpecVersion, d2->dmSpecVersion, "dmSpecVersion mismatch"); + torture_assert_int_equal(tctx, d1->dmDriverVersion, d2->dmDriverVersion, "dmDriverVersion mismatch"); + torture_assert_int_equal(tctx, d1->dmSize, d2->dmSize, "size mismatch"); + torture_assert_int_equal(tctx, d1->dmDriverExtra, d2->dmDriverExtra, "dmDriverExtra mismatch"); + torture_assert_int_equal(tctx, d1->dmFields, d2->dmFields, "dmFields mismatch"); + + torture_assert_int_equal(tctx, d1->dmOrientation, d2->dmOrientation, "dmOrientation mismatch"); + torture_assert_int_equal(tctx, d1->dmPaperSize, d2->dmPaperSize, "dmPaperSize mismatch"); + torture_assert_int_equal(tctx, d1->dmPaperLength, d2->dmPaperLength, "dmPaperLength mismatch"); + torture_assert_int_equal(tctx, d1->dmPaperWidth, d2->dmPaperWidth, "dmPaperWidth mismatch"); + torture_assert_int_equal(tctx, d1->dmScale, d2->dmScale, "dmScale mismatch"); + torture_assert_int_equal(tctx, d1->dmCopies, d2->dmCopies, "dmCopies mismatch"); + torture_assert_int_equal(tctx, d1->dmDefaultSource, d2->dmDefaultSource, "dmDefaultSource mismatch"); + torture_assert_int_equal(tctx, d1->dmPrintQuality, d2->dmPrintQuality, "dmPrintQuality mismatch"); + + torture_assert_int_equal(tctx, d1->dmColor, d2->dmColor, "dmColor mismatch"); + torture_assert_int_equal(tctx, d1->dmDuplex, d2->dmDuplex, "dmDuplex mismatch"); + torture_assert_int_equal(tctx, d1->dmYResolution, d2->dmYResolution, "dmYResolution mismatch"); + torture_assert_int_equal(tctx, d1->dmTTOption, d2->dmTTOption, "dmTTOption mismatch"); + torture_assert_int_equal(tctx, d1->dmCollate, d2->dmCollate, "dmCollate mismatch"); + torture_assert_str_equal(tctx, (const char *)d1->dmFormName, (const char *)d2->dmFormName, "dmFormName mismatch"); + torture_assert_int_equal(tctx, d1->dmLogPixels, d2->dmLogPixels, "dmLogPixels mismatch"); + torture_assert_int_equal(tctx, d1->dmBitsPerPel, d2->dmBitsPerPel, "dmBitsPerPel mismatch"); + torture_assert_int_equal(tctx, d1->dmPelsWidth, d2->dmPelsWidth, "dmPelsWidth mismatch"); + torture_assert_int_equal(tctx, d1->dmPelsHeight, d2->dmPelsHeight, "dmPelsHeight mismatch"); + + torture_assert_int_equal(tctx, d1->dmDisplayFlags, d2->dmDisplayFlags, "dmDisplayFlags mismatch"); + /* or dmNup ? */ + torture_assert_int_equal(tctx, d1->dmDisplayFrequency, d2->dmDisplayFrequency, "dmDisplayFrequency mismatch"); + + torture_assert_int_equal(tctx, d1->dmICMMethod, d2->dmICMMethod, "dmICMMethod mismatch"); + torture_assert_int_equal(tctx, d1->dmICMIntent, d2->dmICMIntent, "dmICMIntent mismatch"); + torture_assert_int_equal(tctx, d1->dmMediaType, d2->dmMediaType, "dmMediaType mismatch"); + torture_assert_int_equal(tctx, d1->dmDitherType, d2->dmDitherType, "dmDitherType mismatch"); + torture_assert_int_equal(tctx, d1->dmReserved1, d2->dmReserved1, "dmReserved1 mismatch"); + torture_assert_int_equal(tctx, d1->dmReserved2, d2->dmReserved2, "reserved2 mismatch"); + + torture_assert_int_equal(tctx, d1->dmPanningWidth, d2->dmPanningWidth, "dmPanningWidth mismatch"); + torture_assert_int_equal(tctx, d1->dmPanningHeight, d2->dmPanningHeight, "dmPanningHeight mismatch"); + + /* torture_assert_mem_equal(tctx, d1 + d1->dmSize, d2 + d2->dmSize, d1->dmDriverExtra, "private extra data mismatch"); */ + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_DeviceModes(struct torture_context *tctx, + LPSTR printername, + HANDLE handle) +{ + PPRINTER_INFO_2 info2 = NULL; + PPRINTER_INFO_8 info8 = NULL; + DWORD needed = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing DeviceModes"); + + torture_comment(tctx, "Testing GetPrinter level %d", 2); + + GetPrinter(handle, 2, NULL, 0, &needed); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + info2 = (PPRINTER_INFO_2)malloc(needed); + torture_assert(tctx, (LPBYTE)info2, "malloc failed"); + if (!GetPrinter(handle, 2, (LPBYTE)info2, needed, &needed)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "GetPrinter failed level %d on [%s] (buffer size = %d), error: %s\n", + 2, printername, needed, errstr(err)); + torture_fail(tctx, tmp); + } + + if (tctx->print) { + print_printer_info_2(info2); + } + + torture_comment(tctx, "Testing GetPrinter level %d", 8); + + GetPrinter(handle, 8, NULL, 0, &needed); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + info8 = (PPRINTER_INFO_8)malloc(needed); + torture_assert(tctx, (LPBYTE)info8, "malloc failed"); + if (!GetPrinter(handle, 8, (LPBYTE)info8, needed, &needed)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "GetPrinter failed level %d on [%s] (buffer size = %d), error: %s\n", + 8, printername, needed, errstr(err)); + torture_fail(tctx, tmp); + } + + if (tctx->print) { + print_printer_info_8(info8); + } + + torture_assert(tctx, test_devicemode_equal(tctx, info2->pDevMode, info8->pDevMode), ""); + + free(info2); + free(info8); + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_GetJob(struct torture_context *tctx, + LPSTR printername, + HANDLE handle, + DWORD job_id) +{ + DWORD levels[] = { 1, 2, 3, 4 }; + DWORD success[] = { 1, 1, 1, 1 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing GetJob(%d) level %d", job_id, levels[i]); + + if (tctx->samba3 && (levels[i] == 4) || (levels[i] == 3)) { + torture_comment(tctx, "skipping level %d getjob against samba\n", levels[i]); + continue; + } + + GetJob(handle, job_id, levels[i], NULL, 0, &needed); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!GetJob(handle, job_id, levels[i], buffer, needed, &needed)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "GetJob failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], printername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + print_job_info_bylevel(levels[i], buffer, 1); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_EachJob(struct torture_context *tctx, + LPSTR printername, + HANDLE handle) +{ + DWORD i; + PJOB_INFO_1 buffer = NULL; + DWORD needed = 0; + DWORD returned = 0; + DWORD err = 0; + DWORD level = 1; + char tmp[1024]; + BOOL ret = TRUE; + + torture_comment(tctx, "Testing Each PrintJob %d"); + + EnumJobs(handle, 0, 100, level, NULL, 0, &needed, &returned); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = (PJOB_INFO_1)malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!EnumJobs(handle, 0, 100, level, (LPBYTE)buffer, needed, &needed, &returned)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "EnumJobs failed level %d on [%s] (buffer size = %d), error: %s\n", + level, printername, needed, errstr(err)); + torture_fail(tctx, tmp); + } + + if (tctx->print) { + print_job_info_bylevel(level, (LPBYTE)buffer, returned); + } + + for (i=0; i < returned; i++) { + ret = test_GetJob(tctx, printername, handle, buffer[i].JobId); + } + + free(buffer); + + return ret; + +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_OnePrinter(struct torture_context *tctx, + LPSTR printername, + LPSTR architecture, + LPPRINTER_DEFAULTS defaults) +{ + HANDLE handle; + BOOL ret = TRUE; + + torture_comment(tctx, "Testing Printer %s", printername); + + ret &= test_OpenPrinter(tctx, printername, defaults, &handle); + ret &= test_GetPrinter(tctx, printername, handle); + ret &= test_GetPrinterDriver(tctx, printername, architecture, handle); + ret &= test_EnumForms(tctx, printername, handle); + ret &= test_EnumJobs(tctx, printername, handle); + ret &= test_EachJob(tctx, printername, handle); + ret &= test_EnumPrinterKey(tctx, printername, handle, ""); + ret &= test_EnumPrinterKey(tctx, printername, handle, "PrinterDriverData"); + ret &= test_EnumPrinterData(tctx, printername, handle); + ret &= test_EnumPrinterDataEx(tctx, printername, "PrinterDriverData", handle, NULL, NULL); + ret &= test_DeviceModes(tctx, printername, handle); +#if 0 + /* don't run these at the moment, behaviour is PrinterData API calls (not + * dcerpc calls) is almost unpredictable - gd */ + ret &= test_PrinterData(tctx, printername, handle); + ret &= test_PrinterDataW(tctx, printername, handle); +#endif + ret &= test_ClosePrinter(tctx, handle); + + return ret; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_EachPrinter(struct torture_context *tctx, + LPSTR servername, + LPSTR architecture, + LPPRINTER_DEFAULTS defaults) +{ + DWORD needed = 0; + DWORD returned = 0; + DWORD err = 0; + char tmp[1024]; + DWORD i; + DWORD flags = PRINTER_ENUM_NAME; + PPRINTER_INFO_1 buffer = NULL; + BOOL ret = TRUE; + + torture_comment(tctx, "Testing EnumPrinters level %d", 1); + + EnumPrinters(flags, servername, 1, NULL, 0, &needed, &returned); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = (PPRINTER_INFO_1)malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!EnumPrinters(flags, servername, 1, (LPBYTE)buffer, needed, &needed, &returned)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "EnumPrinters failed level %d on [%s] (buffer size = %d), error: %s\n", + 1, servername, needed, errstr(err)); + torture_fail(tctx, tmp); + } + + for (i=0; i < returned; i++) { + ret &= test_OnePrinter(tctx, buffer[i].pName, architecture, defaults); + } + + free(buffer); + + return ret; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_GetPrintProcessorDirectory(struct torture_context *tctx, + LPSTR servername, + LPSTR architecture) +{ + DWORD levels[] = { 1 }; + DWORD success[] = { 1 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing GetPrintProcessorDirectory(%s) level %d", + architecture, levels[i]); + + GetPrintProcessorDirectory(servername, architecture, levels[i], NULL, 0, &needed); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!GetPrintProcessorDirectory(servername, architecture, levels[i], buffer, needed, &needed)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "GetPrintProcessorDirectory failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], servername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + printf("\tPrint Processor Directory\t= %s\n\n", (LPSTR)buffer); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_GetPrinterDriverDirectory(struct torture_context *tctx, + LPSTR servername, + LPSTR architecture) +{ + DWORD levels[] = { 1 }; + DWORD success[] = { 1 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing GetPrinterDriverDirectory(%s) level %d", + architecture, levels[i]); + + GetPrinterDriverDirectory(servername, architecture, levels[i], NULL, 0, &needed); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + if (!GetPrinterDriverDirectory(servername, architecture, levels[i], buffer, needed, &needed)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, "GetPrinterDriverDirectory failed level %d on [%s] (buffer size = %d), error: %s\n", + levels[i], servername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx->print) { + printf("\tPrinter Driver Directory\t= %s\n\n", (LPSTR)buffer); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_GetPrinterData(struct torture_context *tctx, + LPSTR servername, + LPSTR valuename, + HANDLE handle, + DWORD *type_p, + LPBYTE *buffer_p, + DWORD *size_p) +{ + LPBYTE buffer = NULL; + DWORD needed = 0; + DWORD type; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing GetPrinterData(%s)", valuename); + + err = GetPrinterData(handle, valuename, &type, NULL, 0, &needed); + if (err == ERROR_MORE_DATA) { + buffer = (LPBYTE)malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + err = GetPrinterData(handle, valuename, &type, buffer, needed, &needed); + } + if (err) { + sprintf(tmp, "GetPrinterData(%s) failed on [%s] (buffer size = %d), error: %s\n", + valuename, servername, needed, errstr(err)); + torture_fail(tctx, tmp); + } + + if (tctx->print) { + print_printer_data("PrinterDriverData", valuename, needed, buffer, type); + } + + if (type_p) { + *type_p = type; + } + + if (size_p) { + *size_p = needed; + } + + if (buffer_p) { + *buffer_p = buffer; + } else { + free(buffer); + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_GetPrinterDataEx(struct torture_context *tctx, + LPSTR servername, + LPSTR keyname, + LPSTR valuename, + HANDLE handle, + DWORD *type_p, + LPBYTE *buffer_p, + DWORD *size_p) +{ + LPBYTE buffer = NULL; + DWORD needed = 0; + DWORD type; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing GetPrinterDataEx(%s - %s)", keyname, valuename); + + err = GetPrinterDataEx(handle, keyname, valuename, &type, NULL, 0, &needed); + if (err == ERROR_MORE_DATA) { + buffer = (LPBYTE)malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + err = GetPrinterDataEx(handle, keyname, valuename, &type, buffer, needed, &needed); + } + if (err) { + sprintf(tmp, "GetPrinterDataEx(%s) failed on [%s] (buffer size = %d), error: %s\n", + valuename, servername, needed, errstr(err)); + torture_fail(tctx, tmp); + } + + if (tctx->print) { + print_printer_data(keyname, valuename, needed, buffer, type); + } + + if (type_p) { + *type_p = type; + } + + if (size_p) { + *size_p = needed; + } + + if (buffer_p) { + *buffer_p = buffer; + } else { + free(buffer); + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_GetPrinterDataExW(struct torture_context *tctx, + LPSTR servername, + LPCWSTR keyname, + LPCWSTR valuename, + HANDLE handle, + DWORD *type_p, + LPBYTE *buffer_p, + DWORD *size_p) +{ + LPBYTE buffer = NULL; + DWORD needed = 0; + DWORD type; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing GetPrinterDataExW(%ls - %ls)", keyname, valuename); + + err = GetPrinterDataExW(handle, keyname, valuename, &type, NULL, 0, &needed); + if (err == ERROR_MORE_DATA) { + buffer = (LPBYTE)malloc(needed); + torture_assert(tctx, buffer, "malloc failed"); + err = GetPrinterDataExW(handle, keyname, valuename, &type, buffer, needed, &needed); + } + if (err) { + sprintf(tmp, "GetPrinterDataExW(%ls) failed on [%s] (buffer size = %d), error: %s\n", + valuename, servername, needed, errstr(err)); + torture_fail(tctx, tmp); + } + + if (tctx->print) { + print_printer_dataw(keyname, valuename, needed, buffer, type); + } + + if (type_p) { + *type_p = type; + } + + if (size_p) { + *size_p = needed; + } + + if (buffer_p) { + *buffer_p = buffer; + } else { + free(buffer); + } + + return TRUE; +} + + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_DeletePrinterDataEx(struct torture_context *tctx, + LPSTR servername, + LPSTR keyname, + LPSTR valuename, + HANDLE handle) +{ + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing DeletePrinterDataEx(%s - %s)", keyname, valuename); + + err = DeletePrinterDataEx(handle, keyname, valuename); + if (err) { + sprintf(tmp, "DeletePrinterDataEx(%s - %s) failed on [%s], error: %s\n", + keyname, valuename, servername, errstr(err)); + torture_fail(tctx, tmp); + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_DeletePrinterDataExW(struct torture_context *tctx, + LPSTR servername, + LPCWSTR keyname, + LPCWSTR valuename, + HANDLE handle) +{ + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing DeletePrinterDataExW(%ls - %ls)", keyname, valuename); + + err = DeletePrinterDataExW(handle, keyname, valuename); + if (err) { + sprintf(tmp, "DeletePrinterDataExW(%ls - %ls) failed on [%s], error: %s\n", + keyname, valuename, servername, errstr(err)); + torture_fail(tctx, tmp); + } + + return TRUE; +} + + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_DeletePrinterKey(struct torture_context *tctx, + LPSTR servername, + LPSTR keyname, + HANDLE handle) +{ + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing DeletePrinterKey(%s)", keyname); + + err = DeletePrinterKey(handle, keyname); + if (err) { + sprintf(tmp, "DeletePrinterKey(%s) failed on [%s], error: %s\n", + keyname, servername, errstr(err)); + torture_fail(tctx, tmp); + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_DeletePrinterKeyW(struct torture_context *tctx, + LPSTR servername, + LPCWSTR keyname, + HANDLE handle) +{ + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing DeletePrinterKeyW(%ls)", keyname); + + err = DeletePrinterKeyW(handle, keyname); + if (err) { + sprintf(tmp, "DeletePrinterKeyW(%ls) failed on [%s], error: %s\n", + keyname, servername, errstr(err)); + torture_fail(tctx, tmp); + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_SetPrinterDataEx(struct torture_context *tctx, + LPSTR servername, + LPSTR keyname, + LPSTR valuename, + HANDLE handle, + DWORD type, + LPBYTE buffer, + DWORD offered) +{ + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing SetPrinterDataEx(%s - %s)", keyname, valuename); + + err = SetPrinterDataEx(handle, keyname, valuename, type, buffer, offered); + if (err) { + sprintf(tmp, "SetPrinterDataEx(%s) failed on [%s] (buffer size = %d), error: %s\n", + valuename, servername, offered, errstr(err)); + torture_fail(tctx, tmp); + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_SetPrinterDataExW(struct torture_context *tctx, + LPCSTR servername, + LPCWSTR keyname, + LPCWSTR valuename, + HANDLE handle, + DWORD type, + LPBYTE buffer, + DWORD offered) +{ + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing SetPrinterDataExW(%ls - %ls)", keyname, valuename); + + err = SetPrinterDataExW(handle, keyname, valuename, type, buffer, offered); + if (err) { + sprintf(tmp, "SetPrinterDataExW(%ls) failed on [%s] (buffer size = %d), error: %s\n", + valuename, servername, offered, errstr(err)); + torture_fail(tctx, tmp); + } + + return TRUE; +} + + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_PrinterData_Server(struct torture_context *tctx, + LPSTR servername, + HANDLE handle) +{ + BOOL ret = TRUE; + DWORD i; + DWORD type, type_ex; + LPBYTE buffer, buffer_ex; + DWORD size, size_ex; + LPSTR valuenames[] = { + SPLREG_DEFAULT_SPOOL_DIRECTORY, + SPLREG_MAJOR_VERSION, + SPLREG_MINOR_VERSION, + SPLREG_DS_PRESENT, + SPLREG_DNS_MACHINE_NAME, + SPLREG_ARCHITECTURE, + SPLREG_OS_VERSION + }; + + for (i=0; i < ARRAY_SIZE(valuenames); i++) { + ret &= test_GetPrinterData(tctx, servername, valuenames[i], handle, &type, &buffer, &size); + ret &= test_GetPrinterDataEx(tctx, servername, "random", valuenames[i], handle, &type_ex, &buffer_ex, &size_ex); + torture_assert_int_equal(tctx, type, type_ex, "type mismatch"); + torture_assert_int_equal(tctx, size, size_ex, "size mismatch"); + torture_assert_mem_equal(tctx, buffer, buffer_ex, size, "buffer mismatch"); + free(buffer); + free(buffer_ex); + } + + return ret; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL PrinterDataEqual(struct torture_context *tctx, + DWORD type1, DWORD type2, + DWORD size1, DWORD size2, + LPBYTE buffer1, LPBYTE buffer2) +{ + torture_assert_int_equal(tctx, type1, type2, "type mismatch"); + torture_assert_int_equal(tctx, size1, size2, "size mismatch"); + torture_assert_mem_equal(tctx, buffer1, buffer2, size1, "buffer mismatch"); + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_PrinterData(struct torture_context *tctx, + LPSTR printername, + HANDLE handle) +{ + char tmp[1024]; + LPSTR keyname = "torture_key"; + LPSTR valuename = "torture_value"; + BOOL ret = TRUE; + DWORD types[] = { + REG_SZ, + REG_DWORD, + REG_BINARY + }; + DWORD value = 12345678; + LPSTR str = "abcdefghijklmnopqrstuvwxzy"; + DWORD t, s; + + for (t=0; t < ARRAY_SIZE(types); t++) { + for (s=0; s < strlen(str); s++) { + + DWORD type, type_ex; + LPBYTE buffer, buffer_ex; + DWORD size, size_ex; + + if (types[t] == REG_DWORD) { + s = 0xffff; + } + + switch (types[t]) { + case REG_BINARY: + buffer = malloc(s); + memcpy(buffer, str, s); + size = s; + break; + case REG_DWORD: + buffer = malloc(4); + memcpy(buffer, &value, 4); + size = 4; + break; + case REG_SZ: + buffer = malloc(s); + memcpy(buffer, str, s); + size = s; + break; + default: + sprintf(tmp, "type %d untested\n", types[t]); + torture_fail(tctx, tmp); + break; + } + + type = types[t]; + + torture_comment(tctx, "Testing PrinterData (type: %s, size: 0x%08x)", reg_type_str(type), size); + + torture_assert(tctx, + test_SetPrinterDataEx(tctx, printername, keyname, valuename, handle, type, buffer, size), + "failed to call SetPrinterDataEx"); + torture_assert(tctx, + test_GetPrinterDataEx(tctx, printername, keyname, valuename, handle, &type_ex, &buffer_ex, &size_ex), + "failed to call GetPrinterDataEx"); + + if (!PrinterDataEqual(tctx, type_ex, type, size_ex, size, buffer_ex, buffer)) { + torture_warning(tctx, "GetPrinterDataEx does not return the same info as we set with SetPrinterDataEx"); + ret = FALSE; + } + ret &= test_DeletePrinterDataEx(tctx, printername, keyname, valuename, handle); + ret &= test_DeletePrinterKey(tctx, printername, keyname, handle); + + free(buffer); + free(buffer_ex); + } + } + + return ret; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL test_PrinterDataW(struct torture_context *tctx, + LPSTR printername, + HANDLE handle) +{ + char tmp[1024]; + LPCWSTR keyname = L"torture_key"; + LPCWSTR valuename = L"torture_value"; + BOOL ret = TRUE; + DWORD types[] = { + REG_SZ, + REG_DWORD, + REG_BINARY + }; + DWORD value = 12345678; + LPSTR str = "abcdefghijklmnopqrstuvwxzy"; + DWORD t, s; + + for (t=0; t < ARRAY_SIZE(types); t++) { + for (s=0; s < strlen(str); s++) { + + DWORD type, type_ex; + LPBYTE buffer, buffer_ex; + DWORD size, size_ex; + + if (types[t] == REG_DWORD) { + s = 0xffff; + } + + switch (types[t]) { + case REG_BINARY: + buffer = malloc(s); + memcpy(buffer, str, s); + size = s; + break; + case REG_DWORD: + buffer = malloc(4); + memcpy(buffer, &value, 4); + size = 4; + break; + case REG_SZ: + buffer = malloc(s); + memcpy(buffer, str, s); + size = s; + break; + default: + sprintf(tmp, "type %d untested\n", types[t]); + torture_fail(tctx, tmp); + break; + } + + type = types[t]; + + torture_comment(tctx, "Testing PrinterDataW (type: %s, size: 0x%08x)", reg_type_str(type), size); + + torture_assert(tctx, + test_SetPrinterDataExW(tctx, printername, keyname, valuename, handle, type, buffer, size), + "failed to call SetPrinterDataExW"); + torture_assert(tctx, + test_GetPrinterDataExW(tctx, printername, keyname, valuename, handle, &type_ex, &buffer_ex, &size_ex), + "failed to call GetPrinterDataExW"); + + if (!PrinterDataEqual(tctx, type_ex, type, size_ex, size, buffer_ex, buffer)) { + torture_warning(tctx, "GetPrinterDataExW does not return the same info as we set with SetPrinterDataExW"); + ret = FALSE; + } + ret &= test_DeletePrinterDataExW(tctx, printername, keyname, valuename, handle); + ret &= test_DeletePrinterKeyW(tctx, printername, keyname, handle); + + free(buffer); + free(buffer_ex); + } + } + + return ret; +} + +/**************************************************************************** +****************************************************************************/ + +const char *get_string_param(const char *str) +{ + const char *p; + + p = strchr(str, '='); + if (!p) { + return NULL; + } + + return (p+1); +} + +/**************************************************************************** +****************************************************************************/ + +int main(int argc, char *argv[]) +{ + BOOL ret = FALSE; + LPSTR servername; + LPSTR architecture = "Windows NT x86"; + HANDLE server_handle; + PRINTER_DEFAULTS defaults_admin, defaults_use; + struct torture_context *tctx; + int i; + + if (argc < 2) { + fprintf(stderr, "usage: %s [print] [samba3] [architecture=ARCHITECTURE]\n\n", argv[0]); + fprintf(stderr, "\t can be a server or printer name URI\n"); + fprintf(stderr, "\t[print] will print all data that has been retrieved\n"); + fprintf(stderr, "\t from the printserver\n"); + fprintf(stderr, "\t[samba3] will skip some tests samba servers are known\n"); + fprintf(stderr, "\t not to have implemented\n"); + fprintf(stderr, "\t[architecture=X] allows one to define a specific\n"); + fprintf(stderr, "\t architecture to test with. choose between:\n"); + fprintf(stderr, "\t \"Windows NT x86\" or \"Windows x64\"\n"); + exit(-1); + } + + tctx = malloc(sizeof(struct torture_context)); + if (!tctx) { + fprintf(stderr, "out of memory\n"); + exit(-1); + } + memset(tctx, '\0', sizeof(*tctx)); + + servername = argv[1]; + + for (i=1; i < argc; i++) { + if (strcmp(argv[i], "print") == 0) { + tctx->print = TRUE; + } + if (strcmp(argv[i], "samba3") == 0) { + tctx->samba3 = TRUE; + } + if (strncmp(argv[i], "architecture", strlen("architecture")) == 0) { + architecture = get_string_param(argv[i]); + } + } + + printf("Running testsuite with architecture: %s\n", architecture); + + defaults_admin.pDatatype = NULL; + defaults_admin.pDevMode = NULL; + defaults_admin.DesiredAccess = PRINTER_ACCESS_ADMINISTER; + + defaults_use.pDatatype = NULL; + defaults_use.pDevMode = NULL; + defaults_use.DesiredAccess = PRINTER_ACCESS_USE; + + if ((servername[0] == '\\') && (servername[1] == '\\')) { + LPSTR p = servername+2; + LPSTR p2; + if ((p2 = strchr(p, '\\')) != NULL) { + ret = test_OnePrinter(tctx, servername, architecture, &defaults_admin); + goto done; + } + } + + ret &= test_EnumPrinters(tctx, servername); + ret &= test_EnumDrivers(tctx, servername, architecture); + ret &= test_OpenPrinter(tctx, servername, NULL, &server_handle); +/* ret &= test_EnumPrinterKey(tctx, servername, server_handle, ""); */ + ret &= test_PrinterData_Server(tctx, servername, server_handle); + ret &= test_EnumForms(tctx, servername, server_handle); + ret &= test_ClosePrinter(tctx, server_handle); + ret &= test_EnumPorts(tctx, servername); + ret &= test_EnumMonitors(tctx, servername); + ret &= test_EnumPrintProcessors(tctx, servername, architecture); + ret &= test_EnumPrintProcessorDatatypes(tctx, servername); + ret &= test_GetPrintProcessorDirectory(tctx, servername, architecture); + ret &= test_GetPrinterDriverDirectory(tctx, servername, architecture); + ret &= test_EachPrinter(tctx, servername, architecture, &defaults_admin); + + done: + if (!ret) { + if (tctx->last_reason) { + fprintf(stderr, "failed: %s\n", tctx->last_reason); + } + free(tctx); + return -1; + } + + printf("%s run successfully\n", argv[0]); + + free(tctx); + return 0; +} diff --git a/testprogs/win32/spoolss/testspoolss.h b/testprogs/win32/spoolss/testspoolss.h new file mode 100644 index 0000000..eb19c64 --- /dev/null +++ b/testprogs/win32/spoolss/testspoolss.h @@ -0,0 +1,51 @@ +/* + Unix SMB/CIFS implementation. + test suite for spoolss rpc operations + + Copyright (C) Guenther Deschner 2009 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#if 0 +#include "lib/replace/replace.h" +#endif + +#include +#include + +#include "error.h" +#include "printlib_proto.h" + +#if 0 +#include +#include "libcli/util/ntstatus.h" +#include "lib/torture/torture.h" +#endif + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) +#endif + +#ifndef true +#define true TRUE +#endif + +#ifndef false +#define false FALSE +#endif + +#ifndef PRINTER_ENUM_NAME +#define PRINTER_ENUM_NAME 8 +#endif diff --git a/testprogs/win32/spoolss/testspoolss.sln b/testprogs/win32/spoolss/testspoolss.sln new file mode 100644 index 0000000..2082f5a --- /dev/null +++ b/testprogs/win32/spoolss/testspoolss.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testspoolss", "testspoolss.vcproj", "{60508731-0901-4B1D-9B11-DE070147DEF7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {60508731-0901-4B1D-9B11-DE070147DEF7}.Debug|Win32.ActiveCfg = Debug|Win32 + {60508731-0901-4B1D-9B11-DE070147DEF7}.Debug|Win32.Build.0 = Debug|Win32 + {60508731-0901-4B1D-9B11-DE070147DEF7}.Release|Win32.ActiveCfg = Release|Win32 + {60508731-0901-4B1D-9B11-DE070147DEF7}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/testprogs/win32/spoolss/testspoolss.vcproj b/testprogs/win32/spoolss/testspoolss.vcproj new file mode 100644 index 0000000..45544bc --- /dev/null +++ b/testprogs/win32/spoolss/testspoolss.vcproj @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testprogs/win32/spoolss/torture.c b/testprogs/win32/spoolss/torture.c new file mode 100644 index 0000000..ff2824a --- /dev/null +++ b/testprogs/win32/spoolss/torture.c @@ -0,0 +1,106 @@ +/* + Unix SMB/CIFS implementation. + SMB torture UI functions + + Copyright (C) Jelmer Vernooij 2006 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include "testspoolss.h" +#include "torture.h" + +/**************************************************************************** +****************************************************************************/ + +void torture_warning(struct torture_context *context, const char *comment, ...) +{ + va_list ap; + char tmp[1024]; + +#if 0 + if (!context->results->ui_ops->warning) + return; +#endif + + va_start(ap, comment); + if (vsprintf(tmp, comment, ap) == -1) { + return; + } + va_end(ap); + + fprintf(stderr, "WARNING: %s\n", tmp); +#if 0 + context->results->ui_ops->warning(context, tmp); + + free(tmp); +#endif +} + +/**************************************************************************** +****************************************************************************/ + +void torture_result(struct torture_context *context, + enum torture_result result, const char *fmt, ...) +{ + va_list ap; + char tmp[1024]; + + va_start(ap, fmt); + + if (context->last_reason) { + torture_warning(context, "%s", context->last_reason); + free(context->last_reason); + context->last_reason = NULL; + } + + context->last_result = result; + if (vsprintf(tmp, fmt, ap) == -1) { + return; + } + context->last_reason = malloc(sizeof(tmp)); + if (!context->last_reason) { + return; + } + memcpy(context->last_reason, tmp, sizeof(tmp)); + + va_end(ap); +} + +/**************************************************************************** +****************************************************************************/ + +void torture_comment(struct torture_context *context, const char *comment, ...) +{ + va_list ap; + char tmp[1024]; +#if 0 + if (!context->results->ui_ops->comment) + return; +#endif + va_start(ap, comment); + if (vsprintf(tmp, comment, ap) == -1) { + return; + } + va_end(ap); + +#if 0 + context->results->ui_ops->comment(context, tmp); +#endif + fprintf(stdout, "%s\n", tmp); + +#if 0 + free(tmp); +#endif +} diff --git a/testprogs/win32/spoolss/torture.h b/testprogs/win32/spoolss/torture.h new file mode 100644 index 0000000..7c9c443 --- /dev/null +++ b/testprogs/win32/spoolss/torture.h @@ -0,0 +1,92 @@ +/* + Unix SMB/CIFS implementation. + SMB torture UI functions + + Copyright (C) Jelmer Vernooij 2006 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef __TORTURE_UI_H__ +#define __TORTURE_UI_H__ + +/**************************************************************************** +****************************************************************************/ + +enum torture_result { + TORTURE_OK=0, + TORTURE_FAIL=1, + TORTURE_ERROR=2, + TORTURE_SKIP=3 +}; + +struct torture_context { + enum torture_result last_result; + char *last_reason; + BOOL print; + BOOL samba3; +}; + +/**************************************************************************** +****************************************************************************/ + +#define torture_assert(torture_ctx,expr,cmt) do {\ + if (!(expr)) {\ + torture_result(torture_ctx, TORTURE_FAIL, __location__": Expression `%s' failed: %s", __STRING(expr), cmt); \ + return false;\ + }\ +} while(0) + +#define torture_assert_str_equal(torture_ctx,got,expected,cmt)\ + do { const char *__got = (got), *__expected = (expected); \ + if (strcmp(__got, __expected) != 0) { \ + torture_result(torture_ctx, TORTURE_FAIL, \ + __location__": "#got" was %s, expected %s: %s", \ + __got, __expected, cmt); \ + return false; \ + } \ + } while(0) + +#define torture_assert_int_equal(torture_ctx,got,expected,cmt)\ + do { int __got = (got), __expected = (expected); \ + if (__got != __expected) { \ + torture_result(torture_ctx, TORTURE_FAIL, \ + __location__": "#got" was %d, expected %d: %s", \ + __got, __expected, cmt); \ + return false; \ + } \ + } while(0) + +#define torture_assert_mem_equal(torture_ctx,got,expected,len,cmt)\ + do { const void *__got = (got), *__expected = (expected); \ + if (memcmp(__got, __expected, len) != 0) { \ + torture_result(torture_ctx, TORTURE_FAIL, \ + __location__": "#got" of len %d did not match "#expected": %s", (int)len, cmt); \ + return false; \ + } \ + } while(0) + +#define torture_skip(torture_ctx,cmt) do {\ + torture_result(torture_ctx, TORTURE_SKIP, __location__": %s", cmt);\ + return true; \ + } while(0) + +#define torture_fail(torture_ctx,cmt) do {\ + torture_result(torture_ctx, TORTURE_FAIL, __location__": %s", cmt);\ + return false; \ + } while (0) + +#include "torture_proto.h" + +#endif diff --git a/testprogs/win32/spoolss/torture_proto.h b/testprogs/win32/spoolss/torture_proto.h new file mode 100644 index 0000000..5d1dd88 --- /dev/null +++ b/testprogs/win32/spoolss/torture_proto.h @@ -0,0 +1,32 @@ +#ifndef __TORTURE_PROTO_H__ +#define __TORTURE_PROTO_H__ + +#undef _PRINTF_ATTRIBUTE +#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) +/* This file was automatically generated by mkproto.pl. DO NOT EDIT */ + +/* this file contains prototypes for functions that are private + * to this subsystem or library. These functions should not be + * used outside this particular subsystem! */ + + +/* The following definitions come from torture.c */ + + +/**************************************************************************** +****************************************************************************/ +void torture_warning(struct torture_context *context, const char *comment, ...); + +/**************************************************************************** +****************************************************************************/ +void torture_result(struct torture_context *context, + enum torture_result result, const char *fmt, ...); + +/**************************************************************************** +****************************************************************************/ +void torture_comment(struct torture_context *context, const char *comment, ...); +#undef _PRINTF_ATTRIBUTE +#define _PRINTF_ATTRIBUTE(a1, a2) + +#endif /* __TORTURE_PROTO_H__ */ + diff --git a/testprogs/win32/testmailslot/GNUmakefile b/testprogs/win32/testmailslot/GNUmakefile new file mode 100644 index 0000000..a41fb91 --- /dev/null +++ b/testprogs/win32/testmailslot/GNUmakefile @@ -0,0 +1,16 @@ +INCLUDES=-I. +CFLAGS=$(INCLUDES) +MINGW_CC = i586-mingw32msvc-cc +CC = $(MINGW_CC) + +all: testmailslot.exe + +clean: + rm -f *~ *.obj testmailslot.exe + +.SUFFIXES: .obj .exe .c + +testmailslot.exe: testmailslot.c + +.c.exe: + $(CC) $(CFLAGS) -o $@ $^ $(LIBS) diff --git a/testprogs/win32/testmailslot/NMakefile b/testprogs/win32/testmailslot/NMakefile new file mode 100644 index 0000000..7551d7b --- /dev/null +++ b/testprogs/win32/testmailslot/NMakefile @@ -0,0 +1,13 @@ +# +# use nmake /f NMakefile [] +# +INCLUDES=-I +CFLAGS=$(INCLUDES) -Zi -nologo + +all: testmailslot.exe + +clean: + del *~ *.obj testmailslot.exe + +testmailslot.exe: testmailslot.obj + $(CC) $(CFLAGS) -o testmailslot.exe testmailslot.obj $(LIBS) diff --git a/testprogs/win32/testmailslot/testmailslot.c b/testprogs/win32/testmailslot/testmailslot.c new file mode 100644 index 0000000..b953636 --- /dev/null +++ b/testprogs/win32/testmailslot/testmailslot.c @@ -0,0 +1,80 @@ +/* + * Very simple test application for mailslots + * (C) 2005 Jelmer Vernooij + * Published to the public domain + */ + +#include +#include + +int read_slot(const char *mailslotname) +{ + HANDLE h; + DWORD nr; + char data[30000]; + DWORD nextsize, nummsg = 0; + + if (strncmp(mailslotname, "\\\\.\\mailslot\\", 13) && strncmp(mailslotname, "\\\\*\\mailslot\\", 13)) { + printf("Must specify local mailslot name (starting with \\\\.\\mailslot\\)\n"); + return 1; + } + + h = CreateMailslot(mailslotname, 0, MAILSLOT_WAIT_FOREVER, NULL); + + if (h == INVALID_HANDLE_VALUE) { + printf("Unable to create mailslot %s: %d\n", mailslotname, GetLastError()); + return 1; + } + + if (!ReadFile(h, data, sizeof(data)-1, &nr, NULL)) { + printf("Error reading: %d\n", GetLastError()); + return 1; + } + + data[nr] = '\0'; + + printf("%s\n", data); + + CloseHandle(h); +} + +int write_slot(const char *mailslotname) +{ + HANDLE h; + DWORD nw; + char data[30000]; + h = CreateFile(mailslotname, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + + if (h == INVALID_HANDLE_VALUE) { + printf("Unable to open file: %d\n", GetLastError()); + return 1; + } + + gets(data); + + if (!WriteFile(h, data, strlen(data), &nw, NULL)) { + printf("Error writing file: %d\n", GetLastError()); + return 1; + } + + CloseHandle(h); +} + +int main(int argc, char **argv) +{ + if (argc < 3 || + (strcmp(argv[1], "read") && strcmp(argv[1], "write"))) { + printf("Usage: %s read|write mailslot\n", argv[0]); + return 1; + } + + if (!strcmp(argv[1], "read")) { + return read_slot(argv[2]); + } + + if (!strcmp(argv[1], "write")) { + return write_slot(argv[2]); + } + + return 0; +} diff --git a/testprogs/win32/vs2010-metze.cmd b/testprogs/win32/vs2010-metze.cmd new file mode 100644 index 0000000..de7a9d4 --- /dev/null +++ b/testprogs/win32/vs2010-metze.cmd @@ -0,0 +1,24 @@ +@echo off +set ComSpec=C:\Windows\system32\cmd.exe +set DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ +set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include; +set LIB=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib; +set LIBPATH=C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Windows\Microsoft.NET\Framework\v3.5;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB; +set Path=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VSTSDB\Deploy;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Windows\Microsoft.NET\Framework\v3.5;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\VCPackages;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\idmu\common +set PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC +set PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ +set VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ +set VisualStudioDir=C:\Users\Administrator\Documents\Visual Studio 2010 +set VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\ +set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 10.0\ +set WindowsSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\ +cls +cd C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC +C: +call vcvarsall.bat help + +echo # +echo # You may want to enter 'C:' followed by 'vcvarsall.bat amd64' and 'Y:' +echo # +Y: +@cmd.exe diff --git a/testprogs/win32/wmi/echoprocessor.vbs b/testprogs/win32/wmi/echoprocessor.vbs new file mode 100755 index 0000000..8ce6f7a --- /dev/null +++ b/testprogs/win32/wmi/echoprocessor.vbs @@ -0,0 +1,10 @@ +For Each Host In WScript.Arguments + Set WMIservice = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & host & "\root\cimv2") + + Set colsettings = WMIservice.ExecQuery("SELECT * FROM Win32_Processor") + + + For Each proc In colsettings + Wscript.Echo(host & ": " & proc.description) + Next +Next -- cgit v1.2.3