The branch, v4-6-test has been updated via 5fe0984 Re-enable token groups fallback via 501d5d9 winbindd: find the domain based on the sid within wb_lookupusergroups_send() via d08929e Revert "winbind: Remove wb_lookupusergroups" via 86c025f Revert "winbind: Remove wbint_LookupUserGroups" via 0c68d73 Revert "winbind: Remove wb_cache_lookup_usergroups" via 06f5398 Revert "winbind: Remove wcache_lookup_usergroups" via 3e6f1d5 Revert "winbind: Remove validate_ug" via f4d5d16 Revert "winbind: Remove "lookup_usergroups" winbind method" via d7b5e92 Revert "winbind: Remove rpc_lookup_usergroups" via 76e643c WHATSNEW: Add release notes for Samba 4.6.0. via 53b73f1 s4:ldap_server: match windows in the error messages of failing LDAP Bind requests via 00e45e9 ldb-samba: remember the error string of a failing bind in ildb_connect() via 632c6b5 s3: smbd: Restart reading the incoming SMB2 fd when the send queue is drained. via 525752e0 s3:winbindd: fix endless forest trust scan via 605e069 vfs_fruit: enabling AAPL extensions must be a global switch via f9755bf ctdb-logging: CID 1396883 Dereference null return value (NULL_RETURNS) via 888f433 WHATSNEW: Add idmap_hash deprecation warning via 824faf6 idmap_hash: Add a deprecation message via fdb1522 docs: Improve the idmap_hash manpage via 145e98c s3:librpc: Handle gss_min in gse_get_client_auth_token() correctly via f43ff04 gensec:spnego: Add debug message for the failed principal via 83628b4 vfs_fruit: only veto AppleDouble files with fruit:resource=file via f355f68 s4/torture: vfs_fruit: add stream with illegal ntfs characters to copyile test via 9b9e88b vfs_fruit: use stat info from base_fsp via d35e6f6 s4/torture: vfs_fruit: test invalid AFPINFO_STREAM_NAME via 05d0b6d vfs_fruit: ignore or delete invalid AFP_AfpInfo streams via aad3ccc selftest: add shares without vfs_fruit for the vfs_fruit tests via 0631c0e s4/torture: change shares in used torture_suite_add_2ns_smb2_test() via 8478500 docs/vfs_fruit: document known limitations with fruit:encoding=native via 5f1284e s4/torture: add test for AAPL find with name with illegal NTFS characters via 7f3c130 lib/torture: add torture_assert_mem_equal_goto via 72031de s4/torture: add a vfs_fruit renaming test with open rsrc fork via 81c8fd4 s4/torture: vfs_fruit: test deleting a file with resource fork via 3d5674d s4/torture: vfs_fruit: add test_null_afpinfo test via 64feccf selftest: add description to vfs_fruit testsuites via 82b2bb2 selftest: also run vfs_fruit tests with streams_depot via d6197d6 selftest: run vfs_fruit tests against share with fruit:metadata=stream via b98e7ac selftest: move vfs_fruit tests that require "fruit:metadata=netatalk" to vfs.fruit_netatalk via 7fb2f57 selftest: reenable vfs_fruit tests via 31f7562 vfs_fruit: refactor fruit_ftruncate and use new adouble API via 94616d1 vfs_fruit: use fio in fruit_fallocate via 3e1a5bb vfs_fruit: refactor fruit_fstat and use new adouble API via 408d21f vfs_fruit: refactor fruit_pread and fruit_pwrite and use new adouble API via 96b51a4 vfs_fruit: refactor fruit_open and use new adouble API via a55528b vfs_fruit: rework struct adouble API via db79f89 selftest: disable vfs_fruit tests via a6a0583 vfs_fruit: fix fruit_check_access() via abf4ab6 vfs_fruit: remove base_fsp name translation via d8d8360 vfs_fruit: use SMB_VFS_NEXT_OPEN in two places via 3c7331a vfs_fruit: refactor readdir_attr_macmeta() resource fork size via 9870810 vfs_fruit: refactor fruit_ftruncate() and fix stream case via 744a042 vfs_fruit: fix fruit_ntimes() for the fruit:metadata!=netatalk case via 41407c6 vfs_fruit: refactor fruit_streaminfo() via ad59cbc vfs_fruit: add fruit_stat_rsrc_xattr() implementation via 39c321f vfs_fruit: add fruit_stat_rsrc_stream() implementation via 2a76f87 vfs_fruit: refactor fruit_stat_rsrc() via 70842a8 vfs_fruit: refactor fruit_open_rsrc() via 5a54bed vfs_fruit: in fruit_rmdir() check ._ files before deleting them via a3c2db7 vfs_fruit: fix fruit_rmdir() for the fruit:resource!=file case via e59e603 vfs_fruit: fix fruit_chown() for the fruit:resource!=file case via 66c0572 vfs_fruit: fix fruit_chmod() for the fruit:resource!=file case via 0ee7ebd vfs_fruit: refactor fruit_unlink() via 6f43b66 vfs_fruit: fix fruit_rename() for the fruit:resource!=file case via a72ad4f vfs_fruit: correct readdir_attr_meta_finderi_stream() implementation via 5f568b9 vfs_fruit: refactor readdir_attr_meta() via e074745 vfs_fruit: update_btime() is only needed for metadata=netatalk via 8c32b40 vfs_fruit: correct fruit_stat_meta_stream() implementation via 3365eca vfs_fruit: refactor fruit_stat_meta() via b78855d vfs_fruit: correct fruit_open_meta_stream() implementation via ebaecdb vfs_fruit: refactor fruit_open_meta() via 159b2cc vfs_fruit: replace unsafe ad_entry macro with a function via 3629253 vfs_fruit: fix fruit_pwrite() with metadata=stream via 63a5419 vfs_fruit: rename empty_finderinfo() and make it more robust via 1b04a91 vfs_fruit: fix fruit_ftruncate with metadata=stream via 295f1c7 vfs_fruit: fix fruit_pread with metadata=stream via 1b2b24d vfs_catia: add catia_(g|s)et_dos_attributes via b13942e vfs_catia: add catia_readdir_attr via af24b2f vfs_catia: run translation on all handle based VFS functions via 26c4b5e vfs_streams_xattr: use SMB_VFS_NEXT_OPEN and CLOSE via 6ceb756 vfs_streams_xattr: call SMB_VFS_OPEN with smb_fname_base via 4a85fd6 s3/includes: add FinderInfo offset define to MacExtensions.h via 30e2bff selftest: don't run vfs_fruit tests against ad_dc env from 7a29fe4 s3:winbind: work around coverity false positive.
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-6-test - Log ----------------------------------------------------------------- commit 5fe0984ba92a8670ca33474232b213b30d387a65 Author: Volker Lendecke <v...@samba.org> Date: Thu Mar 2 15:14:51 2017 +0100 Re-enable token groups fallback BUG: https://bugzilla.samba.org/show_bug.cgi?id=12612 Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Mar 6 19:18:31 CET 2017 on sn-devel-144 (cherry picked from commit 6296c32668af60118ae7059772d2f70e58e1f0d1) Autobuild-User(v4-6-test): Stefan Metzmacher <me...@samba.org> Autobuild-Date(v4-6-test): Mon Mar 6 23:31:52 CET 2017 on sn-devel-144 commit 501d5d9167b470d60d5e2be20c968ce6dac330ec Author: Stefan Metzmacher <me...@samba.org> Date: Mon Mar 6 10:30:52 2017 +0100 winbindd: find the domain based on the sid within wb_lookupusergroups_send() That simplifies the potential caller. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12612 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> (cherry picked from commit 76d94838049b77555cdf7dad2d15692cb18b4dab) commit d08929edb30024eedd8eb2e545f5c3d2569656e1 Author: Volker Lendecke <v...@samba.org> Date: Thu Mar 2 14:56:09 2017 +0100 Revert "winbind: Remove wb_lookupusergroups" This reverts commit c0570e6ae8f8f0057ece48d764580897ff2b6f62. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12612 Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> (cherry picked from commit 1a12cfbf1fbcb3542d9799236ed1a9290550ccc1) commit 86c025f64b6694f256778453458a681a5d7adca7 Author: Volker Lendecke <v...@samba.org> Date: Thu Mar 2 14:55:15 2017 +0100 Revert "winbind: Remove wbint_LookupUserGroups" This reverts commit 256632ed3cc724bab0fc22132ca6b52faf680ab2. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12612 Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> (cherry picked from commit a34c0a8638556ddcb8fa30cb5a311330e3f0bbc0) commit 0c68d7367d5430ce217e983d6e81c8f80890a346 Author: Volker Lendecke <v...@samba.org> Date: Thu Mar 2 14:54:46 2017 +0100 Revert "winbind: Remove wb_cache_lookup_usergroups" This reverts commit f83863b4d1510a9519d15934c960fd1675235812. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12612 Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> (cherry picked from commit 55321a39bbb481eac82d4439a3874567bfb0b229) commit 06f5398c9a6e9c5990c0ee1c5bc731462f83386e Author: Volker Lendecke <v...@samba.org> Date: Thu Mar 2 14:54:23 2017 +0100 Revert "winbind: Remove wcache_lookup_usergroups" This reverts commit 876dc28b9cf13343a2962b1a1b035fe78c1858a6. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12612 Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> (cherry picked from commit 52105ebaa82a4a4e0a48dd93c9419c5fd91561a4) commit 3e6f1d591ec4a492c823b519196dbacfd6dffc37 Author: Volker Lendecke <v...@samba.org> Date: Thu Mar 2 14:54:09 2017 +0100 Revert "winbind: Remove validate_ug" This reverts commit 3f58a8cabab75a594cff9088d5dd8ea439b36178. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12612 Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> (cherry picked from commit 174b14b5aa8fbff4732a2213494a870aee1c7569) commit f4d5d1628f5752c283dc6afdfd7d937d6fd73736 Author: Volker Lendecke <v...@samba.org> Date: Thu Mar 2 14:53:47 2017 +0100 Revert "winbind: Remove "lookup_usergroups" winbind method" This reverts commit b231814c6b0ad17255139bc8934f269610348b2b. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12612 Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> (cherry picked from commit 3f5fa7c458dbc673b35827bb588e424cd14332c7) commit d7b5e929adea72d8e26eb3c0a2f295f9f0295e9a Author: Volker Lendecke <v...@samba.org> Date: Thu Mar 2 14:52:49 2017 +0100 Revert "winbind: Remove rpc_lookup_usergroups" This reverts commit 91b73b1e93bb8fb38e2f1cea6c1cbd012c952542. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12612 Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> (cherry picked from commit 8fafdada52f76ccc5e56ce1a736d4ca9815b387b) commit 76e643c2f80c4db4ae0eb547e6c4cac81737ad87 Author: Karolin Seeger <ksee...@samba.org> Date: Mon Mar 6 10:03:29 2017 +0100 WHATSNEW: Add release notes for Samba 4.6.0. Signed-off-by: Karolin Seeger <ksee...@samba.org> commit 53b73f18a125fdffb8232c2a7650f3e3cceb6026 Author: Stefan Metzmacher <me...@samba.org> Date: Fri Feb 24 18:30:56 2017 +0100 s4:ldap_server: match windows in the error messages of failing LDAP Bind requests This is important for some applications to detect the NT_STATUS_PASSWORD_MUST_CHANGE condition correctly. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9048 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> (cherry picked from commit 81ccdad9d045a7a6d6a569d1685bb0bf4e64d12a) commit 00e45e92d7c0510c5409f43012cf6a1d9ef02718 Author: Stefan Metzmacher <me...@samba.org> Date: Thu Mar 2 17:19:21 2017 +0100 ldb-samba: remember the error string of a failing bind in ildb_connect() BUG: https://bugzilla.samba.org/show_bug.cgi?id=9048 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> (cherry picked from commit 4738754e7d7216f6acf790827459bb5da6b0a110) commit 632c6b514c099825aac32856bad32b351b765e63 Author: Jeremy Allison <j...@samba.org> Date: Thu Mar 2 09:13:23 2017 -0800 s3: smbd: Restart reading the incoming SMB2 fd when the send queue is drained. When the send queue grows greater than xconn->smb2.credits.max/16, smbd_smb2_request_next_incoming() doesn't allocate a new request in state->req. After smbd_smb2_io_handler() is called, it marks the fd not readable as state->req == NULL, and never marks it readable again. Fix by calling smbd_smb2_request_next_incoming() to restart reads inside smbd_smb2_flush_send_queue() which drains the send queue. Reported by <chen.ye...@h3c.com> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12608 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Fri Mar 3 02:23:20 CET 2017 on sn-devel-144 (cherry picked from commit 1e0c79ddb34be9a2b9fa92d35387c443c4a381ae) commit 525752e06e7e73bfe1e9e7b80ad9f11d45befe5c Author: Stefan Metzmacher <me...@samba.org> Date: Thu Mar 2 08:13:57 2017 +0100 s3:winbindd: fix endless forest trust scan Commit 0392ebcd1d48e9f472f2148b85316a77d9cc953b effectively disabled the enumeration of trusts in other forests. The fixes for https://bugzilla.samba.org/show_bug.cgi?id=11691 changed the way we fill domain->domain_flags for domains in other forests. Commit fffefe72fcc62d9688b45f53a5327667dc0b2fe6 readded the ability to enumerate trusts of other forests again, in order to fix https://bugzilla.samba.org/show_bug.cgi?id=11830 Now we have the problem that multiple domains (even outside of our forest) are considert to be our forest root, as they have the following flags: NETR_TRUST_FLAG_TREEROOT and NETR_TRUST_FLAG_IN_FOREST. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12605 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Thu Mar 2 17:53:14 CET 2017 on sn-devel-144 (cherry picked from commit f9aaddcdd8f9ea648c9c5ea804f56ee3ff6c4c67) commit 605e069604d11524a4d22947f67f0fc03b15de25 Author: Ralph Boehme <s...@samba.org> Date: Tue Feb 28 09:39:37 2017 +0100 vfs_fruit: enabling AAPL extensions must be a global switch Apple's SMB2 AAPL extension is enabled once per SMB2 connection. Unfortunately the (per se correct) fix for bug #12541 results in vfs_fruit checking a per tcon config state variable to determine whether AAPL has been negotiated. This variable will be false for all but the first tcon. We must make it a global variable. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12604 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> Autobuild-User(master): Uri Simchoni <u...@samba.org> Autobuild-Date(master): Thu Mar 2 04:34:10 CET 2017 on sn-devel-144 (cherry picked from commit 41204a4972ea62b7b656ad81e24bd052990f7e87) commit f9755bf200b5565474a55bca800dfff1a07c0d0a Author: Martin Schwenke <mar...@meltin.net> Date: Thu Feb 23 11:31:32 2017 +1100 ctdb-logging: CID 1396883 Dereference null return value (NULL_RETURNS) BUG: https://bugzilla.samba.org/show_bug.cgi?id=12592 The fix in 08e03fa7f5fdc7f988fbbb26929e8c5727f36c2e is incomplete. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Jeremy Allison <j...@samba.org> Reviewed-by: Amitay Isaacs <ami...@gmail.com> (cherry picked from commit 55b75e4ecec17fdb741c12ad5a22846f77f71215) commit 888f433f993e42020f27ed09535c91bced14640b Author: Andreas Schneider <a...@samba.org> Date: Fri Mar 3 17:10:30 2017 +0100 WHATSNEW: Add idmap_hash deprecation warning Signed-off-by: Andreas Schneider <a...@samba.org> commit 824faf6b17c046a93dd6f9f108772dbf5f0c7aab Author: Andreas Schneider <a...@samba.org> Date: Tue Feb 21 14:51:08 2017 +0100 idmap_hash: Add a deprecation message BUG: https://bugzilla.samba.org/show_bug.cgi?id=12582 Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> Autobuild-User(master): Andreas Schneider <a...@cryptomilk.org> Autobuild-Date(master): Fri Mar 3 16:54:34 CET 2017 on sn-devel-144 (cherry picked from commit 1cb99fc6af388843d313e0de48fee17103df806a) commit fdb15224efd1492d4ab2264c512c296a9011fcc4 Author: Andreas Schneider <a...@samba.org> Date: Wed Feb 15 08:55:24 2017 +0100 docs: Improve the idmap_hash manpage BUG: https://bugzilla.samba.org/show_bug.cgi?id=12582 Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit 5ced307a46674f0d484db0d3201d64e70b44787d) commit 145e98c6f0850aa216f74eebba01cf0abbff758d Author: Andreas Schneider <a...@samba.org> Date: Mon Feb 27 17:18:15 2017 +0100 s3:librpc: Handle gss_min in gse_get_client_auth_token() correctly This will make sure we correctly fall back to NTLMSSP. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12557 Pair-Programmed-With: Stefan Metzmacher <me...@samba.org> Signed-off-by: Andreas Schneider <a...@samba.org> Signed-off-by: Stefan Metzmacher <me...@samba.org> Autobuild-User(master): Andreas Schneider <a...@cryptomilk.org> Autobuild-Date(master): Thu Mar 2 12:41:40 CET 2017 on sn-devel-144 (cherry picked from commit ed42d6e81f6c7cf4ed78b2bc9fcdf6c9d970ca55) commit f43ff04d0965408875b1c17e9cdb6187ff81839d Author: Stefan Metzmacher <me...@samba.org> Date: Fri Jan 20 17:15:49 2017 +0100 gensec:spnego: Add debug message for the failed principal BUG: https://bugzilla.samba.org/show_bug.cgi?id=12557 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> (cherry picked from commit 4194a67c7efcb58ef2bb7efa1d1556d5fa0ce2e0) commit 83628b44439fd9ef202beb9f5866e40700f693b0 Author: Ralph Boehme <s...@samba.org> Date: Thu Jan 19 09:30:45 2017 +0100 vfs_fruit: only veto AppleDouble files with fruit:resource=file vfs_fruit only creates AppleDouble files itself when "fruit:resource" is set to "file" (the default). It is only then the these AppleDouble files should be treated as an internal representation and should be inaccessible from clients. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12526> Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 708767da8c366c021d6d15a3ae71d009357c3320) commit f355f683975b69ea292f8ccd2021e2095aa88a1e Author: Ralph Boehme <s...@samba.org> Date: Fri Feb 17 16:35:44 2017 +0100 s4/torture: vfs_fruit: add stream with illegal ntfs characters to copyile test This ensures a stream with illegal NTFS characters mapped to the Unicode private range like :foo\xef\x80\xa2bar:$DATA that is stored as an xattr name user.DosStream.foo:bar:$DATA if "fruit:encoding = native" is set, is copied by the special fruit copy_chunk request. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit c7a79a9b35225f41eeae961ab340882c7d49f0c4) commit 9b9e88b8a848756335ce947ae11738183e800530 Author: Ralph Boehme <s...@samba.org> Date: Tue Feb 7 15:01:53 2017 +0100 vfs_fruit: use stat info from base_fsp This is also supposed to be valid in the VFS stack, so there's no need to re-stat here. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit ffa727f33b06e71403303b53797a068f455b22f8) commit d35e6f6dc89df8dda578cb6a307f514bfd48573f Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 11 19:11:09 2016 +0100 s4/torture: vfs_fruit: test invalid AFPINFO_STREAM_NAME BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 8b7e88f368ce793699fc57272e74d0815219a250) commit 05d0b6dd633af9468fe5276a23281115d24a5ccb Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 11 19:10:05 2016 +0100 vfs_fruit: ignore or delete invalid AFP_AfpInfo streams BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit a2afd61906fbf36f75b2054abfd7384f220a14e3) commit aad3ccc71d0e8c605acaaab7337e1a70b28d16fd Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 11 19:06:46 2016 +0100 selftest: add shares without vfs_fruit for the vfs_fruit tests Not used for now, but the next commit will add a test that makes use of this. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit bac79eac093e042f22a77fa8e468f8c92bb3c113) commit 0631c0e4e0c2d2516c3e9e9ceef3f71dabf09d29 Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 11 19:02:37 2016 +0100 s4/torture: change shares in used torture_suite_add_2ns_smb2_test() torture_suite_add_2ns_smb2_test wan't used, change it to use the default share as share 1 and a second share taken from torture option "torture:share2". BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 08dc5b4673a955f365095824275e67b2ea8fc31e) commit 8478500f8ababeb4c43a50a1a631980ef3110285 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 17:47:36 2016 +0100 docs/vfs_fruit: document known limitations with fruit:encoding=native BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit b302444f5b0675f0cb0f26fa2ad53e298067f7ab) commit 5f1284e7f4cbd0b608c554aa3619f6acfdce7b03 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 15:45:12 2016 +0100 s4/torture: add test for AAPL find with name with illegal NTFS characters BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit c8baf2760ad51a7739084a8e2617c58c287b651e) commit 7f3c13050ad47d3d504a5518d92ca0b1aaed33f5 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 15:44:37 2016 +0100 lib/torture: add torture_assert_mem_equal_goto BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 49723151b2107553559c397adadda90f7c4806f7) commit 72031de672dd20bd9e6e2944986eec6aeeefed78 Author: Ralph Boehme <s...@samba.org> Date: Tue Dec 6 10:25:46 2016 +0100 s4/torture: add a vfs_fruit renaming test with open rsrc fork Verify IO on the resource fork works after a rename of the basefile. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 8ae4539e47bcaa37d5a052eaf443a95287d851e1) commit 81c8fd42747d81618fb750fe1b3631040190906d Author: Ralph Boehme <s...@samba.org> Date: Mon Dec 5 11:21:15 2016 +0100 s4/torture: vfs_fruit: test deleting a file with resource fork All the other tests ignore the return value of smb2_util_unlink(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit f555c2318eb06d1ceef32423dba9cd1a7c76f956) commit 3d5674d5e6793dea1869d693ab19d2b4a78d2a51 Author: Ralph Boehme <s...@samba.org> Date: Tue Nov 29 16:21:08 2016 +0100 s4/torture: vfs_fruit: add test_null_afpinfo test BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 3227b891fcdd912b0c09398fed751fe8b53d01c9) commit 64feccf7c0108f8f91ff24a2baebc0967f4bbe77 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 17:41:14 2016 +0100 selftest: add description to vfs_fruit testsuites BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 9975c7569cf5af74c25ac03985a7c409164ac2ce) commit 82b2bb254b8008f692450ec850efff87b9b96e7b Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 07:42:07 2016 +0100 selftest: also run vfs_fruit tests with streams_depot BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit f7b0982826b58cfcdaf8782e15c2440f31a45ba2) commit d6197d68132597f218a5a2a9617279156697c4ad Author: Ralph Boehme <s...@samba.org> Date: Tue Nov 15 15:25:14 2016 +0100 selftest: run vfs_fruit tests against share with fruit:metadata=stream BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit d9ab40e0834c074ea26460347b035c52eb5eb0d7) commit b98e7ac871282a022c1097a54babb7ecb7c818d5 Author: Ralph Boehme <s...@samba.org> Date: Tue Nov 15 22:31:20 2016 +0100 selftest: move vfs_fruit tests that require "fruit:metadata=netatalk" to vfs.fruit_netatalk BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit cc885223d79a7e8eb2177a351b745dceec0c9f5a) commit 7fb2f57b587b42eb32afdd31e7a77c5ab464cadd Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 20:43:21 2016 +0100 selftest: reenable vfs_fruit tests BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 51189bd4758a140bad6abf3300c931302432a687) commit 31f75623c89952f1c5093bf88d26a9e508c2a24a Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 20:42:54 2016 +0100 vfs_fruit: refactor fruit_ftruncate and use new adouble API Use struct fio to denote a fsp handle is for a stream we care about. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit cc88132854ed47510e056ed451ed376770ee301e) commit 94616d1098090dfb36506c3b2a2b28a78a582333 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 20:41:55 2016 +0100 vfs_fruit: use fio in fruit_fallocate BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit b3c0f785d753b26404f67acf8061be1cafde79a9) commit 3e1a5bb817e289d761e44086b8548a8eb4b0d128 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 20:39:38 2016 +0100 vfs_fruit: refactor fruit_fstat and use new adouble API Use struct fio to denote a fsp handle is for a stream we care about. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit ae6199c5ef9022518a709bb9aff20b8b2d83e456) commit 408d21faca6e9cf78817300caec0ca01124884cf Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 20:38:17 2016 +0100 vfs_fruit: refactor fruit_pread and fruit_pwrite and use new adouble API Use struct fio to denote a fsp handle is for a stream we care about. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit fcb9c840d7d082457c3136a44a23b489c98b0327) commit 96b51a43784760202f55083d3793a2d98352fbbb Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 20:34:55 2016 +0100 vfs_fruit: refactor fruit_open and use new adouble API Use struct fio to denote a fsp handle is for a stream we care about. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 6537c56de5dae8a1d193a949910296aea1cb6a4e) commit a55528b981985d0ee6f336bf2dce0a6c6daf84ff Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 19:12:32 2016 +0100 vfs_fruit: rework struct adouble API o factor out ad_open(), opens an fd to be used with IO on the metadata streams o rename ad_write() to ad_set() as this aligns nicely with the existing ad_get. This is the pathname based version used to solely set metadata on a file, there's also a handle based version: o add ad_fset(), a handle based version that can be used to set metadata and to update the AppleDouble header in a ._ AppleDouble file o remove fruit_fsp_recheck(), looking at it more closely, it is not needed This commit *compiles*, but all callers in the VFS ops must now be updated to use the new semantics, this comes next... BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 1d1203574328570288806fffefabb550ecc4e95d) commit db79f8940fab6dd83ec44f7f237f537af3cdffff Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 22:54:46 2016 +0100 selftest: disable vfs_fruit tests The next commits will completely change handle based VFS ops. This couldn't be done in a piecemeal fashion, I had to wipe the slate clean. Disabling tests in order to not break git bisects. Tests will be reenabled after a few commits that apply the larger change in a somewhat digestible fashion. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 8703b8ef9d54c841d9da3f94b81195f247873dea) commit a6a05835c3dd20e1b234adefb3056b03986eebd3 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 11:08:53 2016 +0100 vfs_fruit: fix fruit_check_access() Applying fcntl read locks requires an fd opened for reading. This means we have to check the open flags of an fd and if the fd is not opened for reading, we can't use it to set shared fctnl locks. Iow we won't be applying interop locks with Netatalk for files openend write-only. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 41a2b2f5cdf751e17bde60e5cfbe395450e67485) commit abf4ab6ebf67dd3592436e60c5b5ee03f2ffa83e Author: Ralph Boehme <s...@samba.org> Date: Tue Dec 6 15:07:20 2016 +0100 vfs_fruit: remove base_fsp name translation This is now nicely done by vfs_catia for us. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit b1223520e3d35f59e0f77648e0afdf049e1c9de3) commit d8d836049c4f9156b5fd34b936e83bcccb81f671 Author: Ralph Boehme <s...@samba.org> Date: Wed Feb 8 19:15:38 2017 +0100 vfs_fruit: use SMB_VFS_NEXT_OPEN in two places Using the SMB_VFS_OPEN leads to a logic recursion that is hard to follow and debug. It may be called twice for the same fsp with two different smb_fname's. Changing this here to use the NEXT function instead should have no change in behaviour otherwise, but it allows adding sane caching to vfs_catia to handle based VFS ops. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 3e2a7f6227204e932a8337fe77cdda22d28f85f6) commit 3c7331af73067ea1891c498407dedceb715f6df0 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 17:00:03 2016 +0100 vfs_fruit: refactor readdir_attr_macmeta() resource fork size Move resource fork size calculation to helper functions. Adds correct handling for the fruit:resource=stream case in readdir_attr_rfork_size_stream(), this wasn't done previously. Otherwise no change in behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit ad8a3b6971945fbceeef8763613a9e5f5a475098) commit 9870810522392de7d64741b20b687dc84b1480b7 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 16:20:46 2016 +0100 vfs_fruit: refactor fruit_ftruncate() and fix stream case The fruit:metadata=stream case wasn't handled previosly, this is now done in fruit_ftruncate_rsrc_stream(). The rest is just refactoring and no change in behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit a5b060fcd2c1d26bd0abfceffcd7b2c43056c78e) commit 744a042622bb36fcb31b59dc7f5b57bbe45c7e83 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 15:57:22 2016 +0100 vfs_fruit: fix fruit_ntimes() for the fruit:metadata!=netatalk case The following code must only be executed for the fruit:metadata=netatalk case. Otherwise no change in behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit b0b785b0d4b64810f6ee58b015929641246479d1) commit 41407c621af9f73e336f3142122bf03ec14d614e Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 15:49:03 2016 +0100 vfs_fruit: refactor fruit_streaminfo() Handle all settings of fruit:metadata and fruit:resource in helper functions. Resource fork streams of 0 bytes must be filtered out, this wasn't done previously for the fruit:resource=stream and xattr case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit ef2c81eb9fe5e12d5694af665be198994e02762d) commit ad59cbc44674e49461ea19c4b537b449c79506e6 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 11:44:53 2016 +0100 vfs_fruit: add fruit_stat_rsrc_xattr() implementation This fixes fruit_stat_rsrc for the fruit:resource=xattr case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 72325d946aacc1beec0eb411f4c7209e06850e91) commit 39c321fd7755f5ef04598358fa9e24e3d50bf75b Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 11:30:06 2016 +0100 vfs_fruit: add fruit_stat_rsrc_stream() implementation This fixes fruit_stat_rsrc for the fruit:resource=stream case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit cbf87b46c2ad7d0795616c517d3e39f24d827ef4) commit 2a76f87e99950185faa9323d8ba0f0a3e030f5d2 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 11:26:22 2016 +0100 vfs_fruit: refactor fruit_stat_rsrc() Use helper functions for the fruit:resource cases. No change in behaveour. The next patch will add the proper helper functions for fruit:resource=xattr and fruit:resource=stream. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 5037816d28df6f1eed46abf910b0cd4c1a40ec77) commit 70842a86c26cd0c0c4e75a596880526745551c75 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 10:46:55 2016 +0100 vfs_fruit: refactor fruit_open_rsrc() This just splits up fruit_open_rsrc() to use helper functions for each config->rsrc setting. No change in behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 22da6c82f08ed82cf7eddb3fdda2b6ab66264683) commit 5a54bed7a49b2e815d04e102b5ffe59bde80cd20 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 9 18:24:40 2016 +0100 vfs_fruit: in fruit_rmdir() check ._ files before deleting them This ensures we only delete valid AppleDouble files whose names begin with "._", not just *any* file that matches "^._*". Also use proper VFS functions instead of direclty calling the C library functions. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit b95d2042e51ad4c2854e3b2465d55a063bc19f95) commit a3c2db7eaf968cf48f99e9d76303171f052a355b Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 9 18:22:49 2016 +0100 vfs_fruit: fix fruit_rmdir() for the fruit:resource!=file case The following code must only be executed for the fruit:resource=file case. Otherwise no change in behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 19854072dbb7a9ba97d48f4012ea3a238721fc58) commit e59e603c0a86f0438d08ede8aa426d6d672626b4 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 09:04:37 2016 +0100 vfs_fruit: fix fruit_chown() for the fruit:resource!=file case The following code must only be executed for the fruit:resource=file case. While at it, remove an unnecessary lstat, use the stat info from smb_fname. Otherwise no change in behaviour for the fruit:resource=file case (the default). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 09c82a1ce192112a7264d19f6d8888bad49f6a82) commit 66c0572e912fdd2d35898ebf2bc55241113738f5 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 09:02:27 2016 +0100 vfs_fruit: fix fruit_chmod() for the fruit:resource!=file case The following code must only be executed for the fruit:resource=file case. While at it, remove an unnecessary lstat, use the stat info from smb_fname. Otherwise no change in behaviour for the fruit:resource=file case (the default). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 22b509f52ed4de0856432327b3bf78fedcde141b) commit 0ee7ebdf624f51d9a018af67079e58f82eda02a7 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 09:00:31 2016 +0100 vfs_fruit: refactor fruit_unlink() Refactor fruit_unlink() addin helper functions for all fruit:metadata and fruit:resource settings. No change in behaviour for fruit:metadata=netatalk and fruit:resource=file (both the default), but fixes behaviour for the other cases. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 6730e1035ba740d0de413256a211937c3bd794e1) commit 6f43b66cbcdfc68e5546e2b79f0a2ba15e6c6b78 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 08:47:36 2016 +0100 vfs_fruit: fix fruit_rename() for the fruit:resource!=file case o fix the config check, we must only run following code for the fruit:resource=file o properly call SMB_VFS_NEXT_RENAME() instead diretly calling rename() o bail out if we get an invalid stat Otherwise, no change in behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 8a9d0c541875d06254dc3a3039b20c8acac328ed) commit a72ad4fa320e3faff6166e30de3f7073a5afc5e2 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 9 17:24:18 2016 +0100 vfs_fruit: correct readdir_attr_meta_finderi_stream() implementation This gets correct behaviour in readdir_attr_meta_finderi for the metadata=stream case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 604bd6bf80285db2e52266708d55215f07503c73) commit 5f568b944d6dbd0462f4dc680561bd35388d91c2 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 1 17:04:35 2016 +0100 vfs_fruit: refactor readdir_attr_meta() Move the FinderInfo stuff to helper functions, no change in behaviour so far. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 5a466560b2811c78d731cc039c99c740ddee5ffc) commit e074745a2343a75a2822adf913434f8d7f59338c Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 17:25:47 2016 +0100 vfs_fruit: update_btime() is only needed for metadata=netatalk BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 79159f8dc95057187601ac167414cc49282bdabf) commit 8c32b407471caca4635c7e1f49ba837f4d2d6c5e Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 11:12:18 2016 +0100 vfs_fruit: correct fruit_stat_meta_stream() implementation BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit cb1121ec3268fecb7fa0f5fbb6d2dbffaea991b3) commit 3365eca825079cc72bedc274a65afecb8ca1e9a4 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 2 11:05:50 2016 +0100 vfs_fruit: refactor fruit_stat_meta() Handle config->meta in helper functions. No change in behaviour. The next step will add the correct implementation of fruit_stat_meta_stream(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit aaf2ae1b2b1a2822bff6140dfd7afde1569c2548) commit b78855d7bc205e5de15ccac9e53c08aa71e0f9ea Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 9 17:01:37 2016 +0100 vfs_fruit: correct fruit_open_meta_stream() implementation This needs to create and write a metadata blob when the stream is created. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit a3be9e69c3d3ff4980b47261dc0d043a0275a8c0) commit ebaecdbf1a85b7ecd78d2aa41b9c09926563ec6e Author: Ralph Boehme <s...@samba.org> Date: Tue Nov 29 16:56:00 2016 +0100 vfs_fruit: refactor fruit_open_meta() Just split out the fruit:metadata=stream case into a helper function, no change in behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 5a072ca91c642e61b36f1670105f6c8d1e64e25c) commit 159b2cc906d58de8b1002a0788d589551abc6013 Author: Ralph Boehme <s...@samba.org> Date: Wed Nov 16 11:01:45 2016 +0100 vfs_fruit: replace unsafe ad_entry macro with a function BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 3d5bf4b85f3ca120206a12b3d102aef2ead33082) commit 3629253ab4e8c7fbeecec62b30e36e82d364723c Author: Ralph Boehme <s...@samba.org> Date: Tue Nov 15 21:32:25 2016 +0100 vfs_fruit: fix fruit_pwrite() with metadata=stream This makes the test "delete AFP_AfpInfo by writing all 0" pass with fruit:metadata=stream. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit b121fff1568b0365ed27655bcd600a8d82cc3489) commit 63a54196b79e60d31fcd67c8a7d4b2b4a427a200 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 9 16:25:38 2016 +0100 vfs_fruit: rename empty_finderinfo() and make it more robust No change in behaviour, but ad_entry(ad, ADEID_FINDERI) can in theory return NULL. The next commit will add the same function for a AfpInfo type, so rename this function that works on struct adouble to ad_empty_finderinfo(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 05d54dd71c9797e607c9fa3c5218c13755c7c652) commit 1b04a916564a48d2d2cbd144d6aad54b84198d09 Author: Ralph Boehme <s...@samba.org> Date: Tue Nov 15 20:32:05 2016 +0100 vfs_fruit: fix fruit_ftruncate with metadata=stream With this the test "setinfo eof AFP_AfpInfo" passed with fruit:metadata=stream. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 04feedb7f6e4519352fdd901356e6e53d97896d5) commit 295f1c74247235e7090512e48802283de9088d7b Author: Ralph Boehme <s...@samba.org> Date: Wed Nov 16 09:34:13 2016 +0100 vfs_fruit: fix fruit_pread with metadata=stream This make the test "fix offset and len handling for AFP_AfpInfo stream" pass with fruit:metadata=stream. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit d0eed8e73ff39acc6dca70a44f00f81d8ca564fd) commit 1b2b24d6b8c3d71ade3c967e72915ceb852eb847 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 17:18:51 2016 +0100 vfs_catia: add catia_(g|s)et_dos_attributes BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 633aa1ac10ba4e9d7a97fa026a407defb919ce1a) commit b13942e21472a93c01a773d8b8f1449269ba4546 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 8 15:44:56 2016 +0100 vfs_catia: add catia_readdir_attr BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit abe3572c59bec0f8da2a79e4ece9de43e8b5e16b) commit af24b2f4f4be15add43c6e33fb085765ed062a04 Author: Ralph Boehme <s...@samba.org> Date: Tue Dec 6 15:00:58 2016 +0100 vfs_catia: run translation on all handle based VFS functions Also run translation of fsp->fsp_name and optionally fsp->base_fsp->fsp_name if set for all handle based VFS functions. This is necessary because some modules might use the path for something in the handle based VFS ops. An existing example is vfs_fruit. A later commit will remove the translation that was done there because catia didn't before this commit. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Pair-Programmed-With: Stefan Metzmacher <me...@samba.org> Signed-off-by: Ralph Boehme <s...@samba.org> Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit af3b4ea4744ab2b67b4221cd6118b6cd2774660f) commit 26c4b5e00ed31472050f0707e40b803e016df527 Author: Ralph Boehme <s...@samba.org> Date: Wed Feb 8 19:16:21 2017 +0100 vfs_streams_xattr: use SMB_VFS_NEXT_OPEN and CLOSE Using the SMB_VFS_OPEN leads to a recursion in the VFS that is hard to follow and debug. It's called twice for the same fsp with two different smb_fname's which makes it at least hard to debug, it may even be an invalid usage. Changing this here to use the NEXT function instead should have no change in behaviour otherwise. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12565 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 4e2c7d0ec45adf5992446e3e05c90dd40c2fd75b) commit 6ceb75666a763940a479dc1c69c57fca1d8437ed Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 1 11:17:48 2016 +0100 vfs_streams_xattr: call SMB_VFS_OPEN with smb_fname_base In case an SMB_VFS_OPEN() on a stream basename fails with EISDIR, we retry the open as O_RDONLY. The retry should be done with the smb_fname_base as well. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 8035754c28c1a469de4fac77247ef7e5a1d8b463) commit 4a85fd6044aa19a99795213fc71b3b90a422e626 Author: Ralph Boehme <s...@samba.org> Date: Wed Nov 16 11:24:59 2016 +0100 s3/includes: add FinderInfo offset define to MacExtensions.h BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 73a0768865a1f5e74d50e601641cbac5340f9e2d) commit 30e2bff32d9e93ae9780cb37ccb7db5101e9b6ee Author: Ralph Boehme <s...@samba.org> Date: Tue Nov 15 13:07:12 2016 +0100 selftest: don't run vfs_fruit tests against ad_dc env This is just redundant and didn't add test coverage. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> (cherry picked from commit 5e612352225e0296e3f91c8db2adcca4f098e514) ----------------------------------------------------------------------- Summary of changes: WHATSNEW.txt | 73 +- auth/gensec/spnego.c | 58 +- ctdb/common/logging.c | 1 + docs-xml/manpages/idmap_hash.8.xml | 24 +- docs-xml/manpages/vfs_fruit.8.xml | 20 +- lib/ldb-samba/ldb_ildap.c | 1 + lib/torture/torture.h | 10 + librpc/idl/winbind.idl | 5 + selftest/target/Samba3.pm | 24 + source3/include/MacExtensions.h | 3 + source3/librpc/crypto/gse.c | 46 +- source3/modules/vfs_catia.c | 1355 ++++++++++- source3/modules/vfs_fruit.c | 3525 ++++++++++++++++++++--------- source3/modules/vfs_streams_xattr.c | 14 +- source3/selftest/tests.py | 7 +- source3/smbd/smb2_server.c | 14 +- source3/winbindd/idmap_hash/idmap_hash.c | 4 + source3/winbindd/wb_gettoken.c | 28 +- source3/winbindd/wb_lookupusergroups.c | 106 + source3/winbindd/winbindd.h | 8 + source3/winbindd/winbindd_ads.c | 385 ++++ source3/winbindd/winbindd_cache.c | 162 ++ source3/winbindd/winbindd_dual_srv.c | 17 + source3/winbindd/winbindd_msrpc.c | 72 + source3/winbindd/winbindd_proto.h | 15 + source3/winbindd/winbindd_reconnect.c | 21 + source3/winbindd/winbindd_reconnect_ads.c | 22 + source3/winbindd/winbindd_rpc.c | 74 + source3/winbindd/winbindd_rpc.h | 9 + source3/winbindd/winbindd_samr.c | 65 + source3/winbindd/winbindd_util.c | 22 + source3/winbindd/wscript_build | 1 + source4/ldap_server/ldap_bind.c | 37 +- source4/torture/vfs/fruit.c | 409 +++- source4/torture/vfs/vfs.c | 37 +- 35 files changed, 5536 insertions(+), 1138 deletions(-) create mode 100644 source3/winbindd/wb_lookupusergroups.c Changeset truncated at 500 lines: diff --git a/WHATSNEW.txt b/WHATSNEW.txt index a2f647a..ecfdecc 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -1,17 +1,27 @@ Release Announcements ===================== -This is the fourth release candidate of Samba 4.6. This is *not* -intended for production environments and is designed for testing -purposes only. Please report any defects via the Samba bug reporting -system at https://bugzilla.samba.org/. - -Samba 4.6 will be the next version of the Samba suite. +This is the first stable release of Samba 4.6. +Please read the release notes carefully before upgrading. UPGRADING ========= +ID Mapping +---------- +We discovered that the majority of users have an invalid or incorrect +ID mapping configuration. We implemented checks in the 'testparm' tool to +validate the ID mapping configuration. You should run it and check if it prints +any warnings or errors after upgrading! If it does you should fix them. See the +'IDENTITY MAPPING CONSIDERATIONS' section in the smb.conf manpage. +There are some ID mapping backends which are not allowed to be used for the +default backend. Winbind will no longer start if an invalid backend is +configured as the default backend. + +To avoid problems in future we advise all users to run 'testparm' after +changing the smb.conf file! + vfs_fruit option "fruit:resource" spelling correction ----------------------------------------------------- @@ -30,20 +40,6 @@ next Samba version 4.7 will not accept the wrong spelling. Users who were using the wrong spelling "ressource" with two "s" can keep the setting, but are advised to switch to the correct spelling. -ID Mapping ----------- -We discovered that the majority of users have an invalid or incorrect -ID mapping configuration. We implemented checks in the 'testparm' tool to -validate the ID mapping configuration. You should run it and check if it prints -any warnings or errors after upgrading! If it does you should fix them. See the -'IDENTITY MAPPING CONSIDERATIONS' section in the smb.conf manpage. -There are some ID mapping backends which are not allowed to be used for the -default backend. Winbind will no longer start if an invalid backend is -configured as the default backend. - -To avoid problems in future we advise all users to run 'testparm' after -changing the smb.conf file! - vfs_fruit Netatalk metadata xattr name on *BSD ---------------------------------------------- @@ -268,6 +264,12 @@ files and directories in a directory tree. -?, --help Show this help message --usage Display brief usage message +idmap_hash +---------- + +The idmap_hash module is marked as deprecated with this release and will be +removed in a future version. See the manpage of the module for details. + smb.conf changes ================ @@ -287,6 +289,37 @@ KNOWN ISSUES https://wiki.samba.org/index.php/Release_Planning_for_Samba_4.6#Release_blocking_bugs +CHANGES SINCE 4.6.0rc4 +====================== + +o Jeremy Allison <j...@samba.org> + * BUG 12592: Fix several issues found by covscan. + * BUG 12608: s3: smbd: Restart reading the incoming SMB2 fd when the send + queue is drained. + +o Ralph Boehme <s...@samba.org> + * BUG 12427: vfs_fruit doesn't work with fruit:metadata=stream. + * BUG 12526: vfs_fruit: Only veto AppleDouble files if "fruit:resource" is + set to "file". + * BUG 12604: vfs_fruit: Enabling AAPL extensions must be a global switch. + +o Stefan Metzmacher <me...@samba.org> + * BUG 9048: Samba4 ldap error codes. + * BUG 12557: gensec:spnego: Add debug message for the failed principal. + * BUG 12605: s3:winbindd: Fix endless forest trust scan. + +o Andreas Schneider <a...@samba.org> + * BUG 12557: s3:librpc: Handle gss_min in gse_get_client_auth_token() + correctly. + * BUG 12582: idmap_hash: Add a deprecation message, improve the idmap_hash + manpage. + * BUG 12592: Fix several issues found by covscan. + +o Martin Schwenke <mar...@meltin.net> + * BUG 12592: ctdb-logging: CID 1396883 Dereference null return value + (NULL_RETURNS). + + CHANGES SINCE 4.6.0rc3 ====================== diff --git a/auth/gensec/spnego.c b/auth/gensec/spnego.c index 4787892..f063f7b 100644 --- a/auth/gensec/spnego.c +++ b/auth/gensec/spnego.c @@ -511,10 +511,34 @@ static NTSTATUS gensec_spnego_parse_negTokenInit(struct gensec_security *gensec_ NT_STATUS_EQUAL(nt_status, NT_STATUS_NO_LOGON_SERVERS) || NT_STATUS_EQUAL(nt_status, NT_STATUS_TIME_DIFFERENCE_AT_DC) || NT_STATUS_EQUAL(nt_status, NT_STATUS_CANT_ACCESS_DOMAIN_INFO)) { - /* Pretend we never started it (lets the first run find some incompatible demand) */ + const char *next = NULL; + const char *principal = NULL; + int dbg_level = DBGLVL_WARNING; + + if (all_sec[i+1].op != NULL) { + next = all_sec[i+1].op->name; + dbg_level = DBGLVL_NOTICE; + } + + if (gensec_security->target.principal != NULL) { + principal = gensec_security->target.principal; + } else if (gensec_security->target.service != NULL && + gensec_security->target.hostname != NULL) + { + principal = talloc_asprintf(spnego_state->sub_sec_security, + "%s/%s", + gensec_security->target.service, + gensec_security->target.hostname); + } else { + principal = gensec_security->target.hostname; + } + + DEBUG(dbg_level, ("SPNEGO(%s) creating NEG_TOKEN_INIT for %s failed (next[%s]): %s\n", + spnego_state->sub_sec_security->ops->name, + principal, + next, nt_errstr(nt_status))); - DEBUG(3, ("SPNEGO(%s) NEG_TOKEN_INIT failed: %s\n", - spnego_state->sub_sec_security->ops->name, nt_errstr(nt_status))); + /* Pretend we never started it (lets the first run find some incompatible demand) */ talloc_free(spnego_state->sub_sec_security); spnego_state->sub_sec_security = NULL; continue; @@ -619,8 +643,32 @@ static NTSTATUS gensec_spnego_create_negTokenInit(struct gensec_security *gensec if (!NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED) && !NT_STATUS_IS_OK(nt_status)) { - DEBUG(1, ("SPNEGO(%s) creating NEG_TOKEN_INIT failed: %s\n", - spnego_state->sub_sec_security->ops->name, nt_errstr(nt_status))); + const char *next = NULL; + const char *principal = NULL; + int dbg_level = DBGLVL_WARNING; + + if (all_sec[i+1].op != NULL) { + next = all_sec[i+1].op->name; + dbg_level = DBGLVL_NOTICE; + } + + if (gensec_security->target.principal != NULL) { + principal = gensec_security->target.principal; + } else if (gensec_security->target.service != NULL && + gensec_security->target.hostname != NULL) + { + principal = talloc_asprintf(spnego_state->sub_sec_security, + "%s/%s", + gensec_security->target.service, + gensec_security->target.hostname); + } else { + principal = gensec_security->target.hostname; + } + + DEBUG(dbg_level, ("SPNEGO(%s) creating NEG_TOKEN_INIT for %s failed (next[%s]): %s\n", + spnego_state->sub_sec_security->ops->name, + principal, + next, nt_errstr(nt_status))); talloc_free(spnego_state->sub_sec_security); spnego_state->sub_sec_security = NULL; /* Pretend we never started it (lets the first run find some incompatible demand) */ diff --git a/ctdb/common/logging.c b/ctdb/common/logging.c index c8ccf26..8e547c9 100644 --- a/ctdb/common/logging.c +++ b/ctdb/common/logging.c @@ -522,6 +522,7 @@ int logging_init(TALLOC_CTX *mem_ctx, const char *logging, name = strtok(str, ":"); if (name == NULL) { + talloc_free(str); return EINVAL; } option = strtok(NULL, ":"); diff --git a/docs-xml/manpages/idmap_hash.8.xml b/docs-xml/manpages/idmap_hash.8.xml index 6e876e6..9a56519 100644 --- a/docs-xml/manpages/idmap_hash.8.xml +++ b/docs-xml/manpages/idmap_hash.8.xml @@ -13,17 +13,35 @@ <refnamediv> <refname>idmap_hash</refname> - <refpurpose>Samba's idmap_hash Backend for Winbind</refpurpose> + <refpurpose>DO NOT USE THIS BACKEND</refpurpose> </refnamediv> <refsynopsisdiv> <title>DESCRIPTION</title> - <para>The idmap_hash plugin implements a hashing algorithm used to map + <para>DO NOT USE THIS PLUGIN + + The idmap_hash plugin implements a hashing algorithm used to map SIDs for domain users and groups to 31-bit uids and gids, respectively. This plugin also implements the nss_info API and can be used to support a local name mapping files if enabled via the "winbind normalize names" and "winbind nss info" parameters in smb.conf. + The module divides the range into subranges for each domain that is being + handled by the idmap config. + + The module needs the complete UID and GID range to be able to map all + SIDs. The lowest value for the range should be the smallest ID + available in the system. This is normally 1000. The highest ID should + be set to 2147483647. + + A smaller range will lead to issues because of the hashing algorithm + used. The overall range to map all SIDs is 0 - 2147483647. Any range + smaller than 0 - 2147483647 will filter some SIDs. As we can normally + only start with 1000, we are not able to map 1000 SIDs. This already + can lead to issues. The smaller the range the less SIDs can be mapped. + + We do not recommend to use this plugin. It will be removed in a future + release of Samba. </para> </refsynopsisdiv> @@ -53,7 +71,7 @@ <programlisting> [global] idmap config * : backend = hash - idmap config * : range = 1000-4000000000 + idmap config * : range = 1000-2147483647 winbind nss info = hash winbind normalize names = yes diff --git a/docs-xml/manpages/vfs_fruit.8.xml b/docs-xml/manpages/vfs_fruit.8.xml index fe0cd3c..fa86b6f 100644 --- a/docs-xml/manpages/vfs_fruit.8.xml +++ b/docs-xml/manpages/vfs_fruit.8.xml @@ -154,9 +154,13 @@ <para>Controls how the set of illegal NTFS ASCII character, commonly used by OS X clients, are stored in - the filesystem:</para> + the filesystem.</para> - <itemizedlist> + <para><emphasis>Important:</emphasis> this is known to not fully + work with <emphasis>fruit:metadata=stream</emphasis> or + <emphasis>fruit:resource=stream</emphasis>.</para> + + <itemizedlist> <listitem><para><command>private (default)</command> - store characters as encoded by the OS X client: mapped @@ -220,10 +224,14 @@ <varlistentry> <term>fruit:veto_appledouble = yes | no</term> <listitem> - <para>Whether ._ AppleDouble files are vetoed which - prevents the client from seing and accessing internal - AppleDouble files created by vfs_fruit itself for the - purpose of storing a Mac resource fork.</para> + <para><emphasis>Note:</emphasis> this option only applies when + <parameter>fruit:resource</parameter> is set to + <parameter>file</parameter> (the default).</para> + + <para>When <parameter>fruit:resource</parameter> is set to + <parameter>file</parameter>, vfs_fruit may create ._ AppleDouble + files. This options controls whether these ._ AppleDouble files + are vetoed which prevents the client from accessing them.</para> <para>Vetoing ._ files may break some applications, eg extracting Mac ZIP archives from Mac clients failes, because they contain ._ files. Setting this option to diff --git a/lib/ldb-samba/ldb_ildap.c b/lib/ldb-samba/ldb_ildap.c index 65f11db..541971f 100644 --- a/lib/ldb-samba/ldb_ildap.c +++ b/lib/ldb-samba/ldb_ildap.c @@ -863,6 +863,7 @@ static int ildb_connect(struct ldb_context *ldb, const char *url, return LDB_SUCCESS; failed: + ldb_set_errstring(ldb, ldap_errstr(ildb->ldap, module, status)); talloc_free(module); if (NT_STATUS_IS_LDAP(status)) { return NT_STATUS_LDAP_CODE(status); diff --git a/lib/torture/torture.h b/lib/torture/torture.h index 45332b2..b6d1301 100644 --- a/lib/torture/torture.h +++ b/lib/torture/torture.h @@ -357,6 +357,16 @@ void torture_result(struct torture_context *test, } \ } while(0) +#define torture_assert_mem_equal_goto(torture_ctx,got,expected,len,ret,label,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); \ + ret = false; \ + goto label; \ + } \ + } while(0) + static inline void torture_dump_data_str_cb(const char *buf, void *private_data) { char **dump = (char **)private_data; diff --git a/librpc/idl/winbind.idl b/librpc/idl/winbind.idl index 6245e13..05db6b9 100644 --- a/librpc/idl/winbind.idl +++ b/librpc/idl/winbind.idl @@ -103,6 +103,11 @@ interface winbind [out] wbint_RidArray *rids ); + NTSTATUS wbint_LookupUserGroups( + [in] dom_sid *sid, + [out] wbint_SidArray *sids + ); + NTSTATUS wbint_QuerySequenceNumber( [out] uint32 *sequence ); diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index f05eb16..013e8d5 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -1661,6 +1661,30 @@ sub provision($$$$$$$$) fruit:locking = netatalk fruit:encoding = native +[vfs_fruit_metadata_stream] + path = $shrdir + vfs objects = fruit streams_xattr acl_xattr + ea support = yes + fruit:resource = file + fruit:metadata = stream + +[vfs_fruit_stream_depot] + path = $shrdir + vfs objects = fruit streams_depot acl_xattr + ea support = yes + fruit:resource = stream + fruit:metadata = stream + +[vfs_wo_fruit] + path = $shrdir + vfs objects = streams_xattr acl_xattr + ea support = yes + +[vfs_wo_fruit_stream_depot] + path = $shrdir + vfs objects = streams_depot acl_xattr + ea support = yes + [badname-tmp] path = $badnames_shrdir guest ok = yes diff --git a/source3/include/MacExtensions.h b/source3/include/MacExtensions.h index 23dcde9..e17d39b 100644 --- a/source3/include/MacExtensions.h +++ b/source3/include/MacExtensions.h @@ -51,6 +51,9 @@ #define AFP_Version 0x00000100 #define AFP_BackupTime 0x80000000 #define AFP_FinderSize 32 + +#define AFP_OFF_FinderInfo 16 + /* ** Orginal AFP_AfpInfo stream used by NT ** We needed a way to store the create date so SAMBA diff --git a/source3/librpc/crypto/gse.c b/source3/librpc/crypto/gse.c index 99971d3..abf20bc 100644 --- a/source3/librpc/crypto/gse.c +++ b/source3/librpc/crypto/gse.c @@ -345,14 +345,48 @@ static NTSTATUS gse_get_client_auth_token(TALLOC_CTX *mem_ctx, /* we will need a third leg */ status = NT_STATUS_MORE_PROCESSING_REQUIRED; break; - default: - if ((gss_maj == GSS_S_FAILURE) && - (gss_min == (OM_uint32)KRB5KRB_AP_ERR_TKT_EXPIRED)) { + case GSS_S_CONTEXT_EXPIRED: + /* Make SPNEGO ignore us, we can't go any further here */ + DBG_NOTICE("Context expired\n"); + status = NT_STATUS_INVALID_PARAMETER; + goto done; + case GSS_S_FAILURE: + switch (gss_min) { + case (OM_uint32)KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN: + DBG_NOTICE("Server principal not found\n"); + /* Make SPNEGO ignore us, we can't go any further here */ + status = NT_STATUS_INVALID_PARAMETER; + goto done; + case (OM_uint32)KRB5KRB_AP_ERR_TKT_EXPIRED: DBG_NOTICE("Ticket expired\n"); - } else { - DBG_ERR("gss_init_sec_context failed with [%s]\n", - gse_errstr(talloc_tos(), gss_maj, gss_min)); + /* Make SPNEGO ignore us, we can't go any further here */ + status = NT_STATUS_INVALID_PARAMETER; + goto done; + case (OM_uint32)KRB5KRB_AP_ERR_TKT_NYV: + DBG_NOTICE("Clockskew\n"); + /* Make SPNEGO ignore us, we can't go any further here */ + status = NT_STATUS_TIME_DIFFERENCE_AT_DC; + goto done; + case (OM_uint32)KRB5_KDC_UNREACH: + DBG_NOTICE("KDC unreachable\n"); + /* Make SPNEGO ignore us, we can't go any further here */ + status = NT_STATUS_NO_LOGON_SERVERS; + goto done; + case (OM_uint32)KRB5KRB_AP_ERR_MSG_TYPE: + /* Garbage input, possibly from the auto-mech detection */ + status = NT_STATUS_INVALID_PARAMETER; + goto done; + default: + DBG_ERR("gss_init_sec_context failed with [%s](%u)\n", + gse_errstr(talloc_tos(), gss_maj, gss_min), + gss_min); + status = NT_STATUS_LOGON_FAILURE; + goto done; } + break; + default: + DBG_ERR("gss_init_sec_context failed with [%s]\n", + gse_errstr(talloc_tos(), gss_maj, gss_min)); status = NT_STATUS_INTERNAL_ERROR; goto done; } diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index f4c77d9..0ee7c36 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -4,13 +4,13 @@ * Implement a fixed mapping of forbidden NT characters in filenames that are * used a lot by the CAD package Catia. * - * Yes, this a BAD BAD UGLY INCOMPLETE hack, but it helps quite some people - * out there. Catia V4 on AIX uses characters like "<*$ a *lot*, all forbidden - * under Windows... + * Catia V4 on AIX uses characters like "<*$ a *lot*, all forbidden under + * Windows... * * Copyright (C) Volker Lendecke, 2005 * Copyright (C) Aravind Srinivasan, 2009 * Copyright (C) Guenter Kukkukk, 2013 + * Copyright (C) Ralph Boehme, 2017 * * 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 @@ -29,6 +29,8 @@ #include "includes.h" #include "smbd/smbd.h" +#include "lib/util/tevent_unix.h" +#include "lib/util/tevent_ntstatus.h" static int vfs_catia_debug_level = DBGC_VFS; @@ -52,6 +54,15 @@ struct share_mapping_entry { struct char_mappings **mappings; }; +struct catia_cache { + bool is_fsp_ext; + const struct catia_cache * const *busy; + char *orig_fname; + char *fname; + char *orig_base_fname; + char *base_fname; +}; + struct share_mapping_entry *srt_head = NULL; static bool build_table(struct char_mappings **cmaps, int value) @@ -353,30 +364,305 @@ static NTSTATUS catia_translate_name(struct vfs_handle_struct *handle, return ret; } +#define CATIA_DEBUG_CC(lvl, cc, fsp) \ + catia_debug_cc((lvl), (cc), (fsp), __location__); + +static void catia_debug_cc(int lvl, -- Samba Shared Repository