The branch, v3-6-test has been updated via c725e48 s3:cli_np_tstream: if SMBtrans is desired, the readv needs to wait for the last writev chunk. via f1dea84 s3:rpc_client: implement rpc_transport_np_init() on top of rpc_transport_tstream_init() via 651cb0e s3:rpc_client: implement rpc_transport_sock_init() on top of rpc_transport_tstream_init() via f01e117 s3:rpc_client/rpc_transport_tstream.c: add some logic to handle cli_np tstreams via 5f3100d s3:rpc_client/rpc_transport_tstream: timeout should be unsigned int via 13920b0 s3:rpc_client: let rpc_transport_tstream_init() create read and write queue via a58a8d2 s3:libsmb: add tstream_cli_np_get_cli_state() via 609094b s3:libsmb: add tstream_cli_np_set_timeout() via 98a0c58 s3:libsmb: add tstream_cli_np_use_trans() and the needed logic via ce61a39 s3:libsmb: add tstream_is_cli_np() via e12452b s3:libsmb: add cli_np_tstream.c via 1d4196d s3: Fix some typos (cherry picked from commit 43e42b4e77244602e6eb85f64bfc9d50d1c5f6ab) via f6b40be pidl: use $CC -E if $CPP is not defined, if both undefined use cpp via 8792637 selftest: Support multiple instances of $LISTOPT. (cherry picked from commit 002acbbbd03d506b3a2280fa85b719792178f75d) via ae53248 filter-subunit: Add --list argument. (cherry picked from commit 3b1ed52f2f067c8bb895c6058de08c0b07e6f80c) via 3ac8128 selftest: Check exit code when listing tests. (cherry picked from commit 5f6dd9a608271948bb1d4a1fb975e889db70512c) via c4d831d selftest: Rename $LIST to $LISTOPT for consistency with testrepository. (cherry picked from commit a957d8c80f532654f502fdd37aecd34b231a00e8) via 8e4035c selftest: add --list option. (cherry picked from commit e6974b0ff0100bb292d57e58ae11bc2e6b0d4053) via 32539b9 selftest: Document --testenv in --help output, remove documentation for now obsolete --analyse-cmd. (cherry picked from commit 34adc745efa242b7e4167b581d6770560e759e40) via f936eaf s4-lsa Implement kerberos ticket life policy via 7075fcd librpc/ndr/ndr_*.c - remove "const" from OIDs (cherry picked from commit 464b8fa3173de7cc801195a28b84786cb1c63833) via 0a120c8 ndr: Another try to support the build on non-IPv6 systems via 04f8d07 lib/torture: add torture_assert_u64_equal_goto() via de35420 replace: add comments to make the #ifdef/#else/endif more readable (cherry picked from commit 993b4aa07e35b612a4f9b6eddecae704b8e01aaa) via 8c47c36 lib/util/asn1.c - remove the "const" specifier from OID via 33ed1f0 lib/util/fault.c - fix "pid_t" printf warning on Solaris via c2a6ee2 lib: Protect against tevent nterror mismatches via aba8a28 libcli/security: remove unused variable. via 65170eb libcli/security Add sid_blob_parse() to directly parse a binary SID blob (cherry picked from commit 4a4d8e4b0fae1288cbdf6c8a95a2863c84676106) via b7bd87b s4:fix some shadowed declaration warnings on Solaris by renaming the symbols (cherry picked from commit 93d85ca5fd57d87e720ab627865f0e5af25e07b5) from 8dc88f1 s3:libsmb/namequery.c: don't leak 'pserver'
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log ----------------------------------------------------------------- commit c725e48a278a8c646aa929d83cc8b616ee008abb Author: Stefan Metzmacher <me...@samba.org> Date: Tue Dec 21 15:43:44 2010 +0100 s3:cli_np_tstream: if SMBtrans is desired, the readv needs to wait for the last writev chunk. metze Autobuild-User: Stefan Metzmacher <me...@samba.org> Autobuild-Date: Tue Dec 21 17:43:06 CET 2010 on sn-devel-104 (cherry picked from commit 7a47aed770c60af56be65bf7c8c64cdb162754ae) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit f1dea849ba4e77e23290a35fefd86c9fcb2ce64f Author: Stefan Metzmacher <me...@samba.org> Date: Mon Sep 6 17:31:15 2010 +0200 s3:rpc_client: implement rpc_transport_np_init() on top of rpc_transport_tstream_init() This also makes use of tstream_cli_np_open() to get the tstream. metze Autobuild-User: Stefan Metzmacher <me...@samba.org> Autobuild-Date: Wed Dec 15 16:12:30 CET 2010 on sn-devel-104 (cherry picked from commit 8b47fcea043086e4ec7abbc4d4394f69caac08d0) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 651cb0e5684857ea274ba6da4adc0609c13f6f25 Author: Stefan Metzmacher <me...@samba.org> Date: Mon Sep 6 17:31:27 2010 +0200 s3:rpc_client: implement rpc_transport_sock_init() on top of rpc_transport_tstream_init() metze (cherry picked from commit 0342ed3ee0f8d9f29c6fcabbca1fab4f6514b78b) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit f01e117226a5733c31592c0d6d463f08c4a9a711 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Dec 14 18:20:25 2010 +0100 s3:rpc_client/rpc_transport_tstream.c: add some logic to handle cli_np tstreams metze (cherry picked from commit 122dc1e213d1049568cc49f305f82063b3fa20ba) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 5f3100d079997525d400ab171104625ae9db6e9a Author: Stefan Metzmacher <me...@samba.org> Date: Tue Dec 14 18:19:14 2010 +0100 s3:rpc_client/rpc_transport_tstream: timeout should be unsigned int metze (cherry picked from commit 9a14dace227245c7b5bb751f7c534e338337bea9) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 13920b080f43a8b7e68b2807245d675a4872987c Author: Stefan Metzmacher <me...@samba.org> Date: Tue Jun 22 18:01:45 2010 -0400 s3:rpc_client: let rpc_transport_tstream_init() create read and write queue metze (cherry picked from commit e55426fe7926ae6f8afe5fa6cfc009e0c3b54e38) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit a58a8d20d4c55479aa498ee076af75adc90abd5d Author: Stefan Metzmacher <me...@samba.org> Date: Tue Dec 14 18:18:13 2010 +0100 s3:libsmb: add tstream_cli_np_get_cli_state() metze (cherry picked from commit 07ba35adcbb9feb551125034f091e8d4cb4aa0e8) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 609094bc0143dc9620219bdf12f5aeaa60dbe9a6 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Dec 14 18:17:45 2010 +0100 s3:libsmb: add tstream_cli_np_set_timeout() metze (cherry picked from commit c0f9e963b66fa8c97a4c0ea38367443dd6127509) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 98a0c5816bf3e21e2a73b37f0005f09def455608 Author: Stefan Metzmacher <me...@samba.org> Date: Sat Sep 4 11:01:55 2010 +0200 s3:libsmb: add tstream_cli_np_use_trans() and the needed logic tstream_cli_np_use_trans() defers the next tstream_writev to the next tstream_readv and send both as an SMBtrans request. metze (cherry picked from commit 0df669e14111de741ded8445a2acc00a51a50413) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit ce61a391cbc0eb88240d40b12cfab9153b7eb3b6 Author: Stefan Metzmacher <me...@samba.org> Date: Sat Sep 4 11:00:31 2010 +0200 s3:libsmb: add tstream_is_cli_np() metze (cherry picked from commit e08c324fc5ed9d7d4970fc7a7b6b13bff38ace59) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit e12452b2ef66522b139b94ee26aea5ec159314a9 Author: Stefan Metzmacher <me...@samba.org> Date: Thu Aug 12 12:00:15 2010 +0200 s3:libsmb: add cli_np_tstream.c This abstracts a named pipe over smb as a tstream, which will make it easier to implement the dcerpc layer in a more generic way. metze (cherry picked from commit c0ac1cebfbf7b562bad368b14d8004495a59e574) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 1d4196d858c7faf109420716580f6d3b6c6f0900 Author: Volker Lendecke <v...@samba.org> Date: Mon Dec 6 14:05:49 2010 +0100 s3: Fix some typos (cherry picked from commit 43e42b4e77244602e6eb85f64bfc9d50d1c5f6ab) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit f6b40be811555ce2bb20247daec288379be60b69 Author: Matthieu Patou <m...@matws.net> Date: Fri Dec 10 02:03:40 2010 +0300 pidl: use $CC -E if $CPP is not defined, if both undefined use cpp Autobuild-User: Matthieu Patou <m...@samba.org> Autobuild-Date: Fri Dec 10 01:26:44 CET 2010 on sn-devel-104 (cherry picked from commit 21b0d5e3b10711e6ce3bfad0c1ee2da09a60e232) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 87926375bbfb539d25c7981e891e6952ff9c4d89 Author: Jelmer Vernooij <jel...@samba.org> Date: Sat Dec 11 18:21:58 2010 +0100 selftest: Support multiple instances of $LISTOPT. (cherry picked from commit 002acbbbd03d506b3a2280fa85b719792178f75d) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit ae5324884ffcc2cd50dff35811ae8af445ee1cb4 Author: Jelmer Vernooij <jel...@samba.org> Date: Sat Dec 11 18:21:27 2010 +0100 filter-subunit: Add --list argument. (cherry picked from commit 3b1ed52f2f067c8bb895c6058de08c0b07e6f80c) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 3ac8128a903794a8a9e15ee3fe426b452facbdfa Author: Jelmer Vernooij <jel...@samba.org> Date: Thu Dec 9 16:48:24 2010 +0100 selftest: Check exit code when listing tests. (cherry picked from commit 5f6dd9a608271948bb1d4a1fb975e889db70512c) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit c4d831dbfb2cd38b00f40027403b4faaa18871d4 Author: Jelmer Vernooij <jel...@samba.org> Date: Thu Dec 9 15:35:23 2010 +0100 selftest: Rename $LIST to $LISTOPT for consistency with testrepository. (cherry picked from commit a957d8c80f532654f502fdd37aecd34b231a00e8) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 8e4035cc2649343c9c2dd33422994535d7df197e Author: Jelmer Vernooij <jel...@samba.org> Date: Thu Dec 9 14:46:09 2010 +0100 selftest: add --list option. (cherry picked from commit e6974b0ff0100bb292d57e58ae11bc2e6b0d4053) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 32539b9d677c471c67b4475ac65f894081c8fe78 Author: Jelmer Vernooij <jel...@samba.org> Date: Thu Dec 9 13:37:13 2010 +0100 selftest: Document --testenv in --help output, remove documentation for now obsolete --analyse-cmd. (cherry picked from commit 34adc745efa242b7e4167b581d6770560e759e40) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit f936eaf333d953918e5cf46cf0d8c1c942978895 Author: Andrew Bartlett <abart...@samba.org> Date: Thu Dec 9 14:17:54 2010 +1100 s4-lsa Implement kerberos ticket life policy We now no longer print tickets with a potentially infinite life, and we report the same life over LSA as we use in the KDC. We should get this from group policy, but for now it's parametric smb.conf options. Andrew Bartlett (cherry picked from commit f681859eb819b441da41e2985586bfc59dff2ec5) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 7075fcd72153c85b0d8ebfb89145ff3a14169474 Author: Matthias Dieter Wallnöfer <m...@samba.org> Date: Wed Dec 15 17:21:04 2010 +0100 librpc/ndr/ndr_*.c - remove "const" from OIDs (cherry picked from commit 464b8fa3173de7cc801195a28b84786cb1c63833) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 0a120c814cdefac205e504d39f4b0e3fc267053a Author: Kai Blin <k...@samba.org> Date: Mon Dec 6 07:43:35 2010 +0100 ndr: Another try to support the build on non-IPv6 systems Signed-off-by: Matthieu Patou <m...@matws.net> Autobuild-User: Matthieu Patou <m...@samba.org> Autobuild-Date: Wed Dec 8 10:26:00 CET 2010 on sn-devel-104 (cherry picked from commit af3414feb6cb9f3d4ca602725582220e7b626df3) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 04f8d07c02370affb0b756c65731b586bf1bb45e Author: Stefan Metzmacher <me...@samba.org> Date: Mon Nov 22 12:38:41 2010 +0100 lib/torture: add torture_assert_u64_equal_goto() metze Autobuild-User: Stefan Metzmacher <me...@samba.org> Autobuild-Date: Sat Dec 4 12:55:44 CET 2010 on sn-devel-104 (cherry picked from commit 929063bb126b45cfe175a0e9518905bfcc8c95a2) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit de35420a1bc790906eb4cdbdc4920698c4c76a95 Author: Matthieu Patou <m...@matws.net> Date: Sun Dec 12 12:04:51 2010 +0300 replace: add comments to make the #ifdef/#else/endif more readable (cherry picked from commit 993b4aa07e35b612a4f9b6eddecae704b8e01aaa) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 8c47c368910d62d5ed38573b7b9cf2dd648fc6d2 Author: Matthias Dieter Wallnöfer <m...@samba.org> Date: Wed Dec 15 17:02:49 2010 +0100 lib/util/asn1.c - remove the "const" specifier from OID There is no reason to have it "const" since it's an allocated thing. (cherry picked from commit 3b591caed00790c5d21b8774c7af87357c329d1c) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 33ed1f0cca9f73dee31137c295c35bda07b9445c Author: Matthias Dieter Wallnöfer <m...@samba.org> Date: Mon Dec 6 11:27:05 2010 +0100 lib/util/fault.c - fix "pid_t" printf warning on Solaris According to "http://www.ibm.com/developerworks/linux/library/l-solar/" it's generally a 32bit "int" - therefore this cast should fit. (cherry picked from commit 619a49c4219282bf8776183e76c1b4f0629a6d4c) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit c2a6ee26a9b13c0ea7125c4ee3171149b29eab2b Author: Volker Lendecke <v...@samba.org> Date: Sun Dec 19 14:22:28 2010 +0100 lib: Protect against tevent nterror mismatches Autobuild-User: Volker Lendecke <vlen...@samba.org> Autobuild-Date: Mon Dec 20 00:12:02 CET 2010 on sn-devel-104 (cherry picked from commit 49dc973586b4b9b72ffcac3bbb5dc7fda0d1ad4e) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit aba8a285ad693abf5cb782f7bacdc1dd295ec541 Author: Günther Deschner <g...@samba.org> Date: Fri Dec 17 12:47:13 2010 +0100 libcli/security: remove unused variable. Guenther Autobuild-User: Günther Deschner <g...@samba.org> Autobuild-Date: Fri Dec 17 13:56:27 CET 2010 on sn-devel-104 (cherry picked from commit 10eaad29777589e8bd797e3f0bad3a3a9fbf8577) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 65170ebd6dd5d040793a058fb5dde249b685c903 Author: Andrew Bartlett <abart...@samba.org> Date: Wed Dec 15 15:47:01 2010 +1100 libcli/security Add sid_blob_parse() to directly parse a binary SID blob (cherry picked from commit 4a4d8e4b0fae1288cbdf6c8a95a2863c84676106) Signed-off-by: Stefan Metzmacher <me...@samba.org> commit b7bd87b856ee6c37ac432ddd2a1da8c0a7b19113 Author: Matthias Dieter Wallnöfer <m...@samba.org> Date: Mon Dec 6 11:06:27 2010 +0100 s4:fix some shadowed declaration warnings on Solaris by renaming the symbols (cherry picked from commit 93d85ca5fd57d87e720ab627865f0e5af25e07b5) Signed-off-by: Stefan Metzmacher <me...@samba.org> ----------------------------------------------------------------------- Summary of changes: docs-xml/manpages-3/vfs_crossrename.8.xml | 2 +- lib/replace/system/network.h | 6 +- lib/torture/torture.h | 13 + lib/util/asn1.c | 17 +- lib/util/asn1.h | 6 +- lib/util/fault.c | 2 +- lib/util/tests/asn1_tests.c | 4 +- lib/util/tevent_ntstatus.c | 26 +- libcli/security/access_check.h | 2 +- libcli/security/dom_sid.h | 1 + libcli/security/util_sid.c | 15 +- librpc/idl/lsa.idl | 5 +- librpc/ndr/ndr_basic.c | 6 +- librpc/ndr/ndr_drsblobs.c | 2 +- librpc/ndr/ndr_drsuapi.c | 2 +- pidl/lib/Parse/Pidl/IDL.pm | 10 +- selftest/filter-subunit | 10 + selftest/selftest.pl | 33 +- source3/Makefile.in | 1 + source3/include/proto.h | 6 +- source3/lib/util_sock.c | 2 +- source3/libsmb/cli_np_tstream.c | 1039 ++++++++++++++++++++ source3/libsmb/cli_np_tstream.h | 56 ++ source3/rpc_client/rpc_transport_np.c | 419 +-------- source3/rpc_client/rpc_transport_sock.c | 244 +----- source3/rpc_client/rpc_transport_tstream.c | 243 +++++- source3/rpc_server/rpc_ncacn_np.c | 16 +- source3/smbd/filename.c | 6 +- source3/smbd/vfs.c | 2 +- source3/winbindd/idmap_hash/idmap_hash.c | 2 +- source4/dsdb/common/dsdb_access.c | 11 +- source4/dsdb/samdb/ldb_modules/acl_util.c | 25 +- source4/kdc/db-glue.c | 26 +- .../libnet/grouptest.h => kdc/kdc-policy.h} | 9 +- source4/kdc/policy.c | 50 + source4/kdc/samba_kdc.h | 1 + source4/kdc/wscript_build | 9 +- source4/lib/ldb/common/ldb_dn.c | 4 +- source4/lib/ldb/include/ldb.h | 2 +- source4/rpc_server/lsa/dcesrv_lsa.c | 12 +- source4/rpc_server/wscript_build | 2 +- source4/selftest/wscript | 6 +- 42 files changed, 1622 insertions(+), 733 deletions(-) create mode 100644 source3/libsmb/cli_np_tstream.c create mode 100644 source3/libsmb/cli_np_tstream.h copy source4/{torture/libnet/grouptest.h => kdc/kdc-policy.h} (78%) create mode 100644 source4/kdc/policy.c Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/vfs_crossrename.8.xml b/docs-xml/manpages-3/vfs_crossrename.8.xml index f5a4444..ba7c7c8 100644 --- a/docs-xml/manpages-3/vfs_crossrename.8.xml +++ b/docs-xml/manpages-3/vfs_crossrename.8.xml @@ -31,7 +31,7 @@ <para>The <command>vfs_crossrename</command> VFS module allows server side rename operations even if source and target are on - differen physical devices. A "move" in Explorer is usually a + different physical devices. A "move" in Explorer is usually a rename operation if it is inside of a single share or device. Usually such a rename operation returns NT_STATUS_NOT_SAME_DEVICE and the client has to move the file by diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h index 93d533c..f7c1bcf 100644 --- a/lib/replace/system/network.h +++ b/lib/replace/system/network.h @@ -307,12 +307,12 @@ typedef unsigned short int sa_family_t; #define sockaddr_storage sockaddr_in6 #define ss_family sin6_family #define HAVE_SS_FAMILY 1 -#else +#else /*HAVE_STRUCT_SOCKADDR_IN6*/ #define sockaddr_storage sockaddr_in #define ss_family sin_family #define HAVE_SS_FAMILY 1 -#endif -#endif +#endif /*HAVE_STRUCT_SOCKADDR_IN6*/ +#endif /*HAVE_STRUCT_SOCKADDR_STORAGE*/ #ifndef HAVE_SS_FAMILY #ifdef HAVE___SS_FAMILY diff --git a/lib/torture/torture.h b/lib/torture/torture.h index 83714fe..39f83df 100644 --- a/lib/torture/torture.h +++ b/lib/torture/torture.h @@ -426,6 +426,19 @@ void torture_result(struct torture_context *test, } \ } while(0) +#define torture_assert_u64_equal_goto(torture_ctx,got,expected,ret,label,cmt)\ + do { uint64_t __got = (got), __expected = (expected); \ + if (__got != __expected) { \ + torture_result(torture_ctx, TORTURE_FAIL, \ + __location__": "#got" was %llu (0x%llX), expected %llu (0x%llX): %s", \ + (unsigned long long)__got, (unsigned long long)__got, \ + (unsigned long long)__expected, (unsigned long long)__expected, \ + cmt); \ + ret = false; \ + goto label; \ + } \ + } while(0) + #define torture_assert_errno_equal(torture_ctx,expected,cmt)\ do { int __expected = (expected); \ if (errno != __expected) { \ diff --git a/lib/util/asn1.c b/lib/util/asn1.c index 21d4bd4..f4a6bc5 100644 --- a/lib/util/asn1.c +++ b/lib/util/asn1.c @@ -660,7 +660,7 @@ int asn1_tag_remaining(struct asn1_data *data) * till buffer ends or not valid sub-identifier is found. */ static bool _ber_read_OID_String_impl(TALLOC_CTX *mem_ctx, DATA_BLOB blob, - const char **OID, size_t *bytes_eaten) + char **OID, size_t *bytes_eaten) { int i; uint8_t *b; @@ -699,7 +699,7 @@ nomem: } /* read an object ID from a data blob */ -bool ber_read_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, const char **OID) +bool ber_read_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, char **OID) { size_t bytes_eaten; @@ -715,14 +715,15 @@ bool ber_read_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, const char **OID) * 1:2.5.6:0x81 * 1:2.5.6:0x8182 */ -bool ber_read_partial_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, const char **partial_oid) +bool ber_read_partial_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, + char **partial_oid) { size_t bytes_left; size_t bytes_eaten; char *identifier = NULL; char *tmp_oid = NULL; - if (!_ber_read_OID_String_impl(mem_ctx, blob, (const char **)&tmp_oid, &bytes_eaten)) + if (!_ber_read_OID_String_impl(mem_ctx, blob, &tmp_oid, &bytes_eaten)) return false; if (bytes_eaten < blob.length) { @@ -746,7 +747,7 @@ nomem: } /* read an object ID from a ASN1 buffer */ -bool asn1_read_OID(struct asn1_data *data, TALLOC_CTX *mem_ctx, const char **OID) +bool asn1_read_OID(struct asn1_data *data, TALLOC_CTX *mem_ctx, char **OID) { DATA_BLOB blob; int len; @@ -785,16 +786,16 @@ bool asn1_read_OID(struct asn1_data *data, TALLOC_CTX *mem_ctx, const char **OID /* check that the next object ID is correct */ bool asn1_check_OID(struct asn1_data *data, const char *OID) { - const char *id; + char *id; if (!asn1_read_OID(data, data, &id)) return false; if (strcmp(id, OID) != 0) { - talloc_free(discard_const(id)); + talloc_free(id); data->has_error = true; return false; } - talloc_free(discard_const(id)); + talloc_free(id); return true; } diff --git a/lib/util/asn1.h b/lib/util/asn1.h index 266a9a3..568b4e4 100644 --- a/lib/util/asn1.h +++ b/lib/util/asn1.h @@ -84,9 +84,9 @@ bool asn1_peek_tag(struct asn1_data *data, uint8_t tag); bool asn1_start_tag(struct asn1_data *data, uint8_t tag); bool asn1_end_tag(struct asn1_data *data); int asn1_tag_remaining(struct asn1_data *data); -bool ber_read_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, const char **OID); -bool ber_read_partial_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, const char **partial_oid); -bool asn1_read_OID(struct asn1_data *data, TALLOC_CTX *mem_ctx, const char **OID); +bool ber_read_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, char **OID); +bool ber_read_partial_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, char **partial_oid); +bool asn1_read_OID(struct asn1_data *data, TALLOC_CTX *mem_ctx, char **OID); bool asn1_check_OID(struct asn1_data *data, const char *OID); bool asn1_read_LDAPString(struct asn1_data *data, TALLOC_CTX *mem_ctx, char **s); bool asn1_read_GeneralString(struct asn1_data *data, TALLOC_CTX *mem_ctx, char **s); diff --git a/lib/util/fault.c b/lib/util/fault.c index 11b31d7..bbb3190 100644 --- a/lib/util/fault.c +++ b/lib/util/fault.c @@ -125,7 +125,7 @@ _PUBLIC_ _NORETURN_ void smb_panic(const char *why) char pidstr[20]; char cmdstring[200]; safe_strcpy(cmdstring, panic_action, sizeof(cmdstring)); - snprintf(pidstr, sizeof(pidstr), "%u", getpid()); + snprintf(pidstr, sizeof(pidstr), "%d", (int) getpid()); all_string_sub(cmdstring, "%PID%", pidstr, sizeof(cmdstring)); if (progname) { all_string_sub(cmdstring, "%PROG%", progname, sizeof(cmdstring)); diff --git a/lib/util/tests/asn1_tests.c b/lib/util/tests/asn1_tests.c index 5cc5146..ac8ca53 100644 --- a/lib/util/tests/asn1_tests.c +++ b/lib/util/tests/asn1_tests.c @@ -148,7 +148,7 @@ static bool test_ber_write_OID_String(struct torture_context *tctx) static bool test_ber_read_OID_String(struct torture_context *tctx) { int i; - const char *oid; + char *oid; DATA_BLOB oid_blob; TALLOC_CTX *mem_ctx; const struct oid_data *data = oid_data_ok; @@ -221,7 +221,7 @@ static bool test_ber_write_partial_OID_String(struct torture_context *tctx) static bool test_ber_read_partial_OID_String(struct torture_context *tctx) { int i; - const char *oid; + char *oid; DATA_BLOB oid_blob; TALLOC_CTX *mem_ctx; const struct oid_data *data = oid_data_ok; diff --git a/lib/util/tevent_ntstatus.c b/lib/util/tevent_ntstatus.c index c4dd074..764d251 100644 --- a/lib/util/tevent_ntstatus.c +++ b/lib/util/tevent_ntstatus.c @@ -20,12 +20,29 @@ #include "../replace/replace.h" #include "tevent_ntstatus.h" +#define TEVENT_NTERROR_MAGIC (0x917b5acd) + bool _tevent_req_nterror(struct tevent_req *req, NTSTATUS status, const char *location) { - return _tevent_req_error(req, NT_STATUS_V(status), - location); + uint64_t err; + + if (NT_STATUS_IS_OK(status)) { + return false; + } + + /* + * I've put this variable here, because I'm not 100% certain + * how to correctly assign a 64-bit constant and left-shift it + * by 32 bits in a single expression. If anyone knows, feel + * free :-) + */ + err = TEVENT_NTERROR_MAGIC; + err <<= 32; + err |= NT_STATUS_V(status); + + return _tevent_req_error(req, err, location); } bool tevent_req_is_nterror(struct tevent_req *req, NTSTATUS *status) @@ -44,7 +61,10 @@ bool tevent_req_is_nterror(struct tevent_req *req, NTSTATUS *status) *status = NT_STATUS_NO_MEMORY; break; case TEVENT_REQ_USER_ERROR: - *status = NT_STATUS(err); + if ((err >> 32) != TEVENT_NTERROR_MAGIC) { + abort(); + } + *status = NT_STATUS(err & 0xffffffff); break; default: *status = NT_STATUS_INTERNAL_ERROR; diff --git a/libcli/security/access_check.h b/libcli/security/access_check.h index 700f981..c4923eb 100644 --- a/libcli/security/access_check.h +++ b/libcli/security/access_check.h @@ -75,4 +75,4 @@ struct object_tree *get_object_tree_by_GUID(struct object_tree *root, /* Change the granted access per each ACE */ void object_tree_modify_access(struct object_tree *root, - uint32_t access); + uint32_t access_mask); diff --git a/libcli/security/dom_sid.h b/libcli/security/dom_sid.h index 3d1161f..8d59b18 100644 --- a/libcli/security/dom_sid.h +++ b/libcli/security/dom_sid.h @@ -81,6 +81,7 @@ bool sid_split_rid(struct dom_sid *sid, uint32_t *rid); bool sid_peek_rid(const struct dom_sid *sid, uint32_t *rid); bool sid_peek_check_rid(const struct dom_sid *exp_dom_sid, const struct dom_sid *sid, uint32_t *rid); void sid_copy(struct dom_sid *dst, const struct dom_sid *src); +bool sid_blob_parse(DATA_BLOB in, struct dom_sid *sid); bool sid_parse(const char *inbuf, size_t len, struct dom_sid *sid); int sid_compare_domain(const struct dom_sid *sid1, const struct dom_sid *sid2); bool sid_equal(const struct dom_sid *sid1, const struct dom_sid *sid2); diff --git a/libcli/security/util_sid.c b/libcli/security/util_sid.c index 9ba28eb..52d48ce 100644 --- a/libcli/security/util_sid.c +++ b/libcli/security/util_sid.c @@ -233,13 +233,12 @@ void sid_copy(struct dom_sid *dst, const struct dom_sid *src) } /***************************************************************** - Parse a on-the-wire SID to a struct dom_sid. + Parse a on-the-wire SID (in a DATA_BLOB) to a struct dom_sid. *****************************************************************/ -bool sid_parse(const char *inbuf, size_t len, struct dom_sid *sid) +bool sid_blob_parse(DATA_BLOB in, struct dom_sid *sid) { enum ndr_err_code ndr_err; - DATA_BLOB in = data_blob_const(inbuf, len); ndr_err = ndr_pull_struct_blob_all(&in, NULL, sid, (ndr_pull_flags_fn_t)ndr_pull_dom_sid); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { @@ -249,6 +248,16 @@ bool sid_parse(const char *inbuf, size_t len, struct dom_sid *sid) } /***************************************************************** + Parse a on-the-wire SID to a struct dom_sid. +*****************************************************************/ + +bool sid_parse(const char *inbuf, size_t len, struct dom_sid *sid) +{ + DATA_BLOB in = data_blob_const(inbuf, len); + return sid_blob_parse(in, sid); +} + +/***************************************************************** See if 2 SIDs are in the same domain this just compares the leading sub-auths *****************************************************************/ diff --git a/librpc/idl/lsa.idl b/librpc/idl/lsa.idl index 869a97a..abad501 100644 --- a/librpc/idl/lsa.idl +++ b/librpc/idl/lsa.idl @@ -1064,11 +1064,14 @@ import "misc.idl", "security.idl"; ); /* Function 0x35 */ + typedef [bitmap32bit] bitmap { + LSA_POLICY_KERBEROS_VALIDATE_CLIENT = 0x00000080 + } lsa_krbAuthenticationOptions; /* w2k3 returns either 0x000bbbd000000000 or 0x000a48e800000000 for reserved - gd */ typedef struct { - uint32 enforce_restrictions; + lsa_krbAuthenticationOptions authentication_options; hyper service_tkt_lifetime; hyper user_tkt_lifetime; hyper user_tkt_renewaltime; diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c index 96f7323..ff207f4 100644 --- a/librpc/ndr/ndr_basic.c +++ b/librpc/ndr/ndr_basic.c @@ -848,7 +848,6 @@ _PUBLIC_ void ndr_print_ipv4address(struct ndr_print *ndr, const char *name, ndr->print(ndr, "%-25s: %s", name, address); } -#ifdef AF_INET6 /* pull a ipv6address */ @@ -877,6 +876,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_ipv6address(struct ndr_pull *ndr, int ndr_fl */ _PUBLIC_ enum ndr_err_code ndr_push_ipv6address(struct ndr_push *ndr, int ndr_flags, const char *address) { +#ifdef AF_INET6 uint8_t addr[IPV6_BYTES]; int ret; @@ -893,6 +893,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_ipv6address(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_array_uint8(ndr, ndr_flags, addr, IPV6_BYTES)); return NDR_ERR_SUCCESS; +#else + return NDR_ERR_IPV6ADDRESS; +#endif } /* @@ -904,7 +907,6 @@ _PUBLIC_ void ndr_print_ipv6address(struct ndr_print *ndr, const char *name, ndr->print(ndr, "%-25s: %s", name, address); } #undef IPV6_BYTES -#endif _PUBLIC_ void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type) { diff --git a/librpc/ndr/ndr_drsblobs.c b/librpc/ndr/ndr_drsblobs.c index 51880bb..32176a7 100644 --- a/librpc/ndr/ndr_drsblobs.c +++ b/librpc/ndr/ndr_drsblobs.c @@ -138,7 +138,7 @@ _PUBLIC_ void ndr_print_drsuapi_MSPrefixMap_Entry(struct ndr_print *ndr, const c char *partial_oid = NULL; DATA_BLOB oid_blob = data_blob_const(r->binary_oid, r->length); char *hex_str = data_blob_hex_string_upper(ndr, &oid_blob); - ber_read_partial_OID_String(ndr, oid_blob, (const char **)&partial_oid); + ber_read_partial_OID_String(ndr, oid_blob, &partial_oid); ndr->depth++; ndr->print(ndr, "%-25s: 0x%s (%s)", "binary_oid", hex_str, partial_oid); ndr->depth--; diff --git a/librpc/ndr/ndr_drsuapi.c b/librpc/ndr/ndr_drsuapi.c index 999aef9..86ecdcb 100644 --- a/librpc/ndr/ndr_drsuapi.c +++ b/librpc/ndr/ndr_drsuapi.c @@ -76,7 +76,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaOID(struct ndr_print *ndr, const char * char *partial_oid = NULL; DATA_BLOB oid_blob = data_blob_const(r->binary_oid, r->length); char *hex_str = data_blob_hex_string_upper(ndr, &oid_blob); - ber_read_partial_OID_String(ndr, oid_blob, (const char **)&partial_oid); + ber_read_partial_OID_String(ndr, oid_blob, &partial_oid); ndr->depth++; ndr->print(ndr, "%-25s: 0x%s (%s)", "binary_oid", hex_str, partial_oid); ndr->depth--; diff --git a/pidl/lib/Parse/Pidl/IDL.pm b/pidl/lib/Parse/Pidl/IDL.pm index de605c7..bafa2ce 100644 --- a/pidl/lib/Parse/Pidl/IDL.pm +++ b/pidl/lib/Parse/Pidl/IDL.pm @@ -2619,11 +2619,17 @@ sub parse_file($$) my $saved_delim = $/; undef $/; my $cpp = $ENV{CPP}; + my $options = ""; if (! defined $cpp) { - $cpp = "cpp"; + if (defined $ENV{CC}) { + $cpp = "$ENV{CC}"; + $options = "-E"; + } else { + $cpp = "cpp"; + } } my $includes = join('',map { " -I$_" } @$incdirs); - my $data = `$cpp -D__PIDL__$includes -xc "$filename"`; + my $data = `$cpp $options -D__PIDL__$includes -xc "$filename"`; $/ = $saved_delim; return parse_string($data, $filename); diff --git a/selftest/filter-subunit b/selftest/filter-subunit index 84b6610..5f062d1 100755 --- a/selftest/filter-subunit +++ b/selftest/filter-subunit @@ -25,8 +25,18 @@ parser.add_option("--prefix", type="string", help="Add prefix to all test names") parser.add_option("--fail-on-empty", default=False, action="store_true", help="Fail if there was no subunit output") +parser.add_option("--list", default=False, + action="store_true", help="Operate in list mode") opts, args = parser.parse_args() +if opts.list: + prefix = opts.prefix + if not prefix: + prefix = "" + for l in sys.stdin: + sys.stdout.write("%s%s\n" % (prefix, l.rstrip())) + sys.exit(0) + if opts.expected_failures: expected_failures = subunithelper.read_test_regexes(opts.expected_failures) else: diff --git a/selftest/selftest.pl b/selftest/selftest.pl index d82930d..9759220 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -153,6 +153,7 @@ my @opt_include = (); my $opt_verbose = 0; my $opt_image = undef; my $opt_testenv = 0; +my $opt_list = 0; my $ldap = undef; my $opt_resetup_env = undef; my $opt_bindir = undef; @@ -325,7 +326,8 @@ Behaviour: --quick run quick overall test --one abort when the first test fails --verbose be verbose - --analyse-cmd CMD command to run after each test + --testenv run a shell in the requested test environment + --list list available tests "; exit(0); } @@ -346,6 +348,7 @@ my $result = GetOptions ( 'exeext=s' => \$exeext, 'verbose' => \$opt_verbose, 'testenv' => \$opt_testenv, + 'list' => \$opt_list, 'ldap:s' => \$ldap, 'resetup-environment' => \$opt_resetup_env, 'bindir:s' => \$opt_bindir, @@ -358,6 +361,8 @@ exit(1) if (not $result); ShowHelp() if ($opt_help); +die("--list and --testenv are mutually exclusive") if ($opt_list and $opt_testenv); + # we want unbuffered output $| = 1; @@ -940,6 +945,32 @@ SMB_CONF_PATH=\$SMB_CONF_PATH $envvarstr \" && LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH} bash'"); teardown_env($testenv_name); +} elsif ($opt_list) { + foreach (@todo) { + my $cmd = $$_[2]; + my $name = $$_[0]; + my $envname = $$_[1]; + + unless($cmd =~ /\$LISTOPT/) { + warn("Unable to list tests in $name"); + next; + } + + $cmd =~ s/\$LISTOPT/--list/g; + + system($cmd); + + if ($? == -1) { + die("Unable to run $cmd: $!"); + } elsif ($? & 127) { + die(snprintf("%s died with signal %d, %s coredump\n", $cmd, ($? & 127), ($? & 128) ? 'with' : 'without')); + } + + my $exitcode = $? >> 8; + if ($exitcode != 0) { + die("$cmd exited with exit code $exitcode"); + } + } } else { foreach (@todo) { $i++; diff --git a/source3/Makefile.in b/source3/Makefile.in index 1525888..c1b6c8b 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -591,6 +591,7 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \ libsmb/clistr.o libsmb/cliquota.o libsmb/clifsinfo.o libsmb/clidfs.o \ libsmb/clioplock.o libsmb/clirap2.o \ libsmb/smb_seal.o libsmb/async_smb.o \ + libsmb/cli_np_tstream.o \ $(LIBSAMBA_OBJ) \ $(LIBNMB_OBJ) \ $(LIBNBT_OBJ) \ -- Samba Shared Repository