[SCM] Samba Shared Repository - branch v4-6-test updated

Karolin Seeger kseeger at samba.org
Tue Mar 28 14:15:03 UTC 2017


The branch, v4-6-test has been updated
       via  07437b0 selftest: tests for vfs_fruite file-id behavior
       via  6b3cc69 torture: add torture_assert_mem_not_equal_goto()
       via  cdf3f57 vfs_fruit: document added zero_file_id parameter
       via  9e7cfc4 vfs_fruit: enable zero file id
       via  2732b0c smbd: add zero_file_id flag
       via  2e9450a nsswtich: Add negative tests for authentication with wbinfo
       via  4a6c2da s3:libads: Remove obsolete smb_krb5_get_ntstatus_from_init_creds()
      from  705149d s3: locking: Update oplock optimization for the leases era !

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-6-test


- Log -----------------------------------------------------------------
commit 07437b080d292af086e6db7e739ff8f65f1a9be6
Author: Uri Simchoni <uri at samba.org>
Date:   Thu Mar 23 21:32:04 2017 +0200

    selftest: tests for vfs_fruite file-id behavior
    
    The test is in its own suite because it validates
    our hackish workaround rather than some reference
    implementation behavior.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12715
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Sun Mar 26 23:31:08 CEST 2017 on sn-devel-144
    
    (cherry picked from commit b6baf35ebde68db75515910ede26e74bb8313284)
    
    Autobuild-User(v4-6-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-6-test): Tue Mar 28 16:14:58 CEST 2017 on sn-devel-144

commit 6b3cc693907731591b8a9e2492efbaa483522558
Author: Uri Simchoni <uri at samba.org>
Date:   Thu Mar 23 21:30:50 2017 +0200

    torture: add torture_assert_mem_not_equal_goto()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12715
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    (cherry picked from commit f31fd41ca728d664ded940a7309ef1e32383bb66)

commit cdf3f5717605e7b3ef9cccd53fad08390b6a2c84
Author: Uri Simchoni <uri at samba.org>
Date:   Thu Mar 23 14:51:32 2017 +0200

    vfs_fruit: document added zero_file_id parameter
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12715
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    (cherry picked from commit e11d4eb4d5c6cfc6daa3dbdcc301a4fa83298f0e)

commit 9e7cfc4384620b4f1587895613b73c19c0025670
Author: Uri Simchoni <uri at samba.org>
Date:   Thu Mar 23 14:08:45 2017 +0200

    vfs_fruit: enable zero file id
    
    Enable zero_file_id if both conditions are met:
    - AAPL negotiated
    - fruit:zero_file_id is set
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12715
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    (cherry picked from commit 245a325532c9a46ec3e459ceca38e903b203f691)

commit 2732b0cb29a9182abc6473748c71d7eb6a044b49
Author: Uri Simchoni <uri at samba.org>
Date:   Thu Mar 23 14:08:26 2017 +0200

    smbd: add zero_file_id flag
    
    This flag instructs the SMB layer to report a zero on-disk
    file identifier.
    
    According to [MS-SMB2] 3.3.5.9.9, the reported on-disk file ID
    SHOULD be unique. However, macOS clients seem to expect it to be
    unique over time as well, like the HFS+ CNID. Reporting a file ID
    of 0 seems to instruct the Mac client not to trust the server-reported
    file ID.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12715
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    (cherry picked from commit 6711522e1e57980e50e245f43167d0daf5a705ad)

commit 2e9450af90b48ab1f9b5db079a47ce49b43dd811
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Mar 20 12:22:44 2017 +0100

    nsswtich: Add negative tests for authentication with wbinfo
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12708
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>
    
    Autobuild-User(master): Uri Simchoni <uri at samba.org>
    Autobuild-Date(master): Wed Mar 22 10:58:58 CET 2017 on sn-devel-144
    
    (cherry picked from commit e7d1d8c49322a131e7ca1993f9956f0bddcaff3c)

commit 4a6c2da1228173dd2e3a8e13f7ce283d6ea9143b
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Mar 21 09:57:30 2017 +0100

    s3:libads: Remove obsolete smb_krb5_get_ntstatus_from_init_creds()
    
    There is no way we can get a better error code out of this. The original
    function called was krb5_get_init_creds_opt_get_error() which has been
    deprecated in 2008.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12708
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>
    (cherry picked from commit e2028837b958618a66449a77ee628e4e176e521e)

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/manpages/vfs_fruit.8.xml |  17 ++++
 lib/torture/torture.h             |  10 +++
 nsswitch/tests/test_wbinfo.sh     |   4 +
 source3/libads/kerberos.c         | 169 --------------------------------------
 source3/modules/vfs_fruit.c       |   7 ++
 source3/selftest/tests.py         |   4 +-
 source3/smbd/globals.h            |   1 +
 source3/smbd/proto.h              |   1 +
 source3/smbd/trans2.c             |  14 ++++
 source4/torture/vfs/fruit.c       |  72 ++++++++++++++++
 source4/torture/vfs/vfs.c         |   1 +
 11 files changed, 130 insertions(+), 170 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_fruit.8.xml b/docs-xml/manpages/vfs_fruit.8.xml
index 9f999da..cbeb12c 100644
--- a/docs-xml/manpages/vfs_fruit.8.xml
+++ b/docs-xml/manpages/vfs_fruit.8.xml
@@ -145,6 +145,23 @@
 	    </listitem>
 	  </varlistentry>
 
+	  <varlistentry>
+	    <term>fruit:zero_file_id = yes | no</term>
+	    <listitem>
+	      <para>A <emphasis>global</emphasis> option whether to return
+	      zero to queries of on-disk file identifier, if the client
+	      has negotiated AAPL.</para>
+	      <para>Mac applications and / or the Mac SMB
+	      client code expect the on-disk file identifier to have the
+	      semantics of HFS+ Catalog Node Identifier (CNID). Samba
+	      doesn't provide those semantics, and that occasionally cause
+	      usability issues or even data loss. Returning a file identifier
+	      of zero causes the Mac client to stop using and trusting the
+	      file id returned from the server.</para>
+	      <para>The default is <emphasis>yes</emphasis>.</para>
+	    </listitem>
+	  </varlistentry>
+
 	</variablelist>
 </refsect1>
 
diff --git a/lib/torture/torture.h b/lib/torture/torture.h
index b6d1301..668458a 100644
--- a/lib/torture/torture.h
+++ b/lib/torture/torture.h
@@ -367,6 +367,16 @@ void torture_result(struct torture_context *test,
 	} \
 	} while(0)
 
+#define torture_assert_mem_not_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 unexpectedly matches "#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/nsswitch/tests/test_wbinfo.sh b/nsswitch/tests/test_wbinfo.sh
index 69cc437..cfe582d 100755
--- a/nsswitch/tests/test_wbinfo.sh
+++ b/nsswitch/tests/test_wbinfo.sh
@@ -254,6 +254,10 @@ testit "wbinfo -K against $TARGET with domain creds" $wbinfo --krb5ccname=$KRB5C
 
 testit "wbinfo --separator against $TARGET" $wbinfo --separator || failed=`expr $failed + 1`
 
+testit_expect_failure "wbinfo -a against $TARGET with invalid password" $wbinfo -a "$DOMAIN/$USERNAME%InvalidPassword" && failed=`expr $failed + 1`
+
+testit_expect_failure "wbinfo -K against $TARGET with invalid password" $wbinfo -K "$DOMAIN/$USERNAME%InvalidPassword" && failed=`expr $failed + 1`
+
 rm -f $KRB5CCNAME_PATH
 
 exit $failed
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index dcb268e..13c48ca 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -99,156 +99,6 @@ kerb_prompter(krb5_context ctx, void *data,
 	return 0;
 }
 
-static bool unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx,
-				  DATA_BLOB *edata,
-				  DATA_BLOB *edata_out)
-{
-	DATA_BLOB edata_contents;
-	ASN1_DATA *data;
-	int edata_type;
-
-	if (!edata->length) {
-		return false;
-	}
-
-	data = asn1_init(mem_ctx);
-	if (data == NULL) {
-		return false;
-	}
-
-	if (!asn1_load(data, *edata)) goto err;
-	if (!asn1_start_tag(data, ASN1_SEQUENCE(0))) goto err;
-	if (!asn1_start_tag(data, ASN1_CONTEXT(1))) goto err;
-	if (!asn1_read_Integer(data, &edata_type)) goto err;
-
-	if (edata_type != KRB5_PADATA_PW_SALT) {
-		DEBUG(0,("edata is not of required type %d but of type %d\n",
-			KRB5_PADATA_PW_SALT, edata_type));
-		goto err;
-	}
-
-	if (!asn1_start_tag(data, ASN1_CONTEXT(2))) goto err;
-	if (!asn1_read_OctetString(data, talloc_tos(), &edata_contents)) goto err;
-	if (!asn1_end_tag(data)) goto err;
-	if (!asn1_end_tag(data)) goto err;
-	if (!asn1_end_tag(data)) goto err;
-	asn1_free(data);
-
-	*edata_out = data_blob_talloc(mem_ctx, edata_contents.data, edata_contents.length);
-
-	data_blob_free(&edata_contents);
-
-	return true;
-
-  err:
-
-	asn1_free(data);
-	return false;
-}
-
- static bool smb_krb5_get_ntstatus_from_krb5_error(krb5_error *error,
-						   NTSTATUS *nt_status)
-{
-	DATA_BLOB edata;
-	DATA_BLOB unwrapped_edata;
-	TALLOC_CTX *mem_ctx;
-	struct KRB5_EDATA_NTSTATUS parsed_edata;
-	enum ndr_err_code ndr_err;
-
-#ifdef HAVE_E_DATA_POINTER_IN_KRB5_ERROR
-	edata = data_blob(error->e_data->data, error->e_data->length);
-#else
-	edata = data_blob(error->e_data.data, error->e_data.length);
-#endif /* HAVE_E_DATA_POINTER_IN_KRB5_ERROR */
-
-#ifdef DEVELOPER
-	dump_data(10, edata.data, edata.length);
-#endif /* DEVELOPER */
-
-	mem_ctx = talloc_init("smb_krb5_get_ntstatus_from_krb5_error");
-	if (mem_ctx == NULL) {
-		data_blob_free(&edata);
-		return False;
-	}
-
-	if (!unwrap_edata_ntstatus(mem_ctx, &edata, &unwrapped_edata)) {
-		data_blob_free(&edata);
-		TALLOC_FREE(mem_ctx);
-		return False;
-	}
-
-	data_blob_free(&edata);
-
-	ndr_err = ndr_pull_struct_blob_all(&unwrapped_edata, mem_ctx, 
-		&parsed_edata, (ndr_pull_flags_fn_t)ndr_pull_KRB5_EDATA_NTSTATUS);
-	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
-		data_blob_free(&unwrapped_edata);
-		TALLOC_FREE(mem_ctx);
-		return False;
-	}
-
-	data_blob_free(&unwrapped_edata);
-
-	if (nt_status) {
-		*nt_status = parsed_edata.ntstatus;
-	}
-
-	TALLOC_FREE(mem_ctx);
-
-	return True;
-}
-
-static bool smb_krb5_get_ntstatus_from_init_creds(krb5_context ctx,
-						  krb5_principal client,
-						  krb5_get_init_creds_opt *opt,
-						  NTSTATUS *nt_status)
-{
-	krb5_init_creds_context icc;
-	krb5_error_code code;
-#ifdef HAVE_E_DATA_POINTER_IN_KRB5_ERROR
-	/* HEIMDAL */
-	krb5_error error;
-#else
-	krb5_error *error = NULL;
-#endif
-	bool ok;
-
-	code = krb5_init_creds_init(ctx,
-				    client,
-				    NULL,
-				    NULL,
-				    0,
-				    opt,
-				    &icc);
-	if (code != 0) {
-		DBG_WARNING("krb5_init_creds_init failed with: %s\n",
-			    error_message(code));
-		return false;
-	}
-
-	code = krb5_init_creds_get_error(ctx,
-					 icc,
-					 &error);
-	if (code != 0) {
-		DBG_WARNING("krb5_init_creds_get_error failed with: %s\n",
-			    error_message(code));
-		return false;
-	}
-	krb5_init_creds_free(ctx, icc);
-
-#ifdef HAVE_E_DATA_POINTER_IN_KRB5_ERROR
-	ok = smb_krb5_get_ntstatus_from_krb5_error(&error, nt_status);
-
-	krb5_free_error_contents(ctx, &error);
-#else
-	ok = smb_krb5_get_ntstatus_from_krb5_error(error, nt_status);
-
-	krb5_free_error(ctx, error);
-#endif
-
-	return ok;
-}
-
 /*
   simulate a kinit, putting the tgt in the given cache location. If cache_name == NULL
   place in default cache location.
@@ -356,31 +206,12 @@ int kerberos_kinit_password_ext(const char *principal,
 	}
  out:
 	if (ntstatus) {
-
-		NTSTATUS status;
-
 		/* fast path */
 		if (code == 0) {
 			*ntstatus = NT_STATUS_OK;
 			goto cleanup;
 		}
 
-		/* try to get ntstatus code out of krb5_error when we have it
-		 * inside the krb5_get_init_creds_opt - gd */
-
-		if (opt != NULL) {
-			bool ok;
-
-			ok = smb_krb5_get_ntstatus_from_init_creds(ctx,
-								   me,
-								   opt,
-								   &status);
-			if (ok) {
-				*ntstatus = status;
-				goto cleanup;
-			}
-		}
-
 		/* fall back to self-made-mapping */
 		*ntstatus = krb5_to_nt_status(code);
 	}
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index b296d74..c3d7535 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -135,6 +135,7 @@ struct fruit_config_data {
 	bool copyfile_enabled;
 	bool veto_appledouble;
 	bool posix_rename;
+	bool aapl_zero_file_id;
 
 	/*
 	 * Additional options, all enabled by default,
@@ -1591,6 +1592,9 @@ static int init_fruit_config(vfs_handle_struct *handle)
 	config->posix_rename = lp_parm_bool(
 		SNUM(handle->conn), FRUIT_PARAM_TYPE_NAME, "posix_rename", true);
 
+	config->aapl_zero_file_id =
+	    lp_parm_bool(-1, FRUIT_PARAM_TYPE_NAME, "zero_file_id", true);
+
 	config->readdir_attr_rsize = lp_parm_bool(
 		SNUM(handle->conn), "readdir_attr", "aapl_rsize", true);
 
@@ -2236,6 +2240,9 @@ static NTSTATUS check_aapl(vfs_handle_struct *handle,
 				      blob);
 	if (NT_STATUS_IS_OK(status)) {
 		global_fruit_config.nego_aapl = true;
+		if (config->aapl_zero_file_id) {
+			aapl_force_zero_file_id(handle->conn->sconn);
+		}
 	}
 
 	return status;
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 9fd3d0a..4f1a667 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -335,7 +335,7 @@ nbt = ["nbt.dgram" ]
 
 libsmbclient = ["libsmbclient"]
 
-vfs = ["vfs.fruit", "vfs.acl_xattr", "vfs.fruit_netatalk"]
+vfs = ["vfs.fruit", "vfs.acl_xattr", "vfs.fruit_netatalk", "vfs.fruit_file_id"]
 
 tests= base + raw + smb2 + rpc + unix + local + rap + nbt + libsmbclient + idmap + vfs
 
@@ -423,6 +423,8 @@ for t in tests:
         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_stream_depot --option=torture:share2=vfs_wo_fruit_stream_depot -U$USERNAME%$PASSWORD', 'streams_depot')
     elif t == "vfs.fruit_netatalk":
         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
+    elif t == "vfs.fruit_file_id":
+        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit -U$USERNAME%$PASSWORD')
     elif t == "rpc.schannel_anon_setpw":
         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$%', description="anonymous password set")
         plansmbtorture4testsuite(t, "nt4_dc_schannel", '//$SERVER_IP/tmp -U$%', description="anonymous password set (schannel enforced server-side)")
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 76ce0bb..67d3a89 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -864,6 +864,7 @@ struct smbd_server_connection {
 	struct messaging_context *msg_ctx;
 	struct notify_context *notify_ctx;
 	bool using_smb2;
+	bool aapl_zero_file_id; /* Apple-specific */
 	int trans_num;
 
 	size_t num_users;
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 277dc6e..7d57844 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -1132,6 +1132,7 @@ NTSTATUS check_access(connection_struct *conn,
 				uint32_t access_mask);
 uint64_t smb_roundup(connection_struct *conn, uint64_t val);
 uint64_t get_FileIndex(connection_struct *conn, const SMB_STRUCT_STAT *psbuf);
+void aapl_force_zero_file_id(struct smbd_server_connection *sconn);
 bool samba_private_attr_name(const char *unix_ea_name);
 NTSTATUS get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn,
 		      files_struct *fsp, const char *fname,
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 6999b2d..f0d8e7d 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -143,6 +143,9 @@ uint64_t smb_roundup(connection_struct *conn, uint64_t val)
 uint64_t get_FileIndex(connection_struct *conn, const SMB_STRUCT_STAT *psbuf)
 {
 	uint64_t file_index;
+	if (conn->sconn->aapl_zero_file_id) {
+		return 0;
+	}
 	if (conn->base_share_dev == psbuf->st_ex_dev) {
 		return (uint64_t)psbuf->st_ex_ino;
 	}
@@ -151,6 +154,17 @@ uint64_t get_FileIndex(connection_struct *conn, const SMB_STRUCT_STAT *psbuf)
 	return file_index;
 }
 
+
+/********************************************************************
+ Globally (for this connection / multi-channel) disable file-ID
+ calculation. This is required to be global because it serves
+ Macs in AAPL mode, which is globally set.
+********************************************************************/
+void aapl_force_zero_file_id(struct smbd_server_connection *sconn)
+{
+	sconn->aapl_zero_file_id = true;
+}
+
 /****************************************************************************
  Utility functions for dealing with extended attributes.
 ****************************************************************************/
diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c
index d74a153..857e738 100644
--- a/source4/torture/vfs/fruit.c
+++ b/source4/torture/vfs/fruit.c
@@ -3914,6 +3914,63 @@ done:
 	return ret;
 }
 
+static bool test_zero_file_id(struct torture_context *tctx,
+			      struct smb2_tree *tree)
+{
+	const char *fname = "filtest_file_id";
+	struct smb2_create create = {0};
+	NTSTATUS status;
+	bool ret = true;
+	uint8_t zero_file_id[8] = {0};
+
+	torture_comment(tctx, "Testing zero file id\n");
+
+	ret = torture_setup_file(tctx, tree, fname, false);
+	torture_assert_goto(tctx, ret == true, ret, done, "torture_setup_file");
+
+	ZERO_STRUCT(create);
+	create.in.desired_access = SEC_FILE_READ_ATTRIBUTE;
+	create.in.share_access = NTCREATEX_SHARE_ACCESS_MASK;
+	create.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
+	create.in.create_disposition = NTCREATEX_DISP_OPEN;
+	create.in.fname = fname;
+	create.in.query_on_disk_id = true;
+
+	status = smb2_create(tree, tctx, &create);
+	torture_assert_ntstatus_equal_goto(tctx, status, NT_STATUS_OK, ret,
+					   done,
+					   "test file could not be opened");
+	torture_assert_mem_not_equal_goto(tctx, create.out.on_disk_id,
+					  zero_file_id, 8, ret, done,
+					  "unexpected zero file id");
+
+	smb2_util_close(tree, create.out.file.handle);
+
+	ret = enable_aapl(tctx, tree);
+	torture_assert(tctx, ret == true, "enable_aapl failed");
+
+	ZERO_STRUCT(create);
+	create.in.desired_access = SEC_FILE_READ_ATTRIBUTE;
+	create.in.share_access = NTCREATEX_SHARE_ACCESS_MASK;
+	create.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
+	create.in.create_disposition = NTCREATEX_DISP_OPEN;
+	create.in.fname = fname;
+	create.in.query_on_disk_id = true;
+
+	status = smb2_create(tree, tctx, &create);
+	torture_assert_ntstatus_equal_goto(
+	    tctx, status, NT_STATUS_OK, ret, done,
+	    "test file could not be opened with AAPL");
+	torture_assert_mem_equal_goto(tctx, create.out.on_disk_id, zero_file_id,
+				      8, ret, done, "non-zero file id");
+
+	smb2_util_close(tree, create.out.file.handle);
+
+done:
+	smb2_util_unlink(tree, fname);
+	return ret;
+}
+
 /*
  * Note: This test depends on "vfs objects = catia fruit streams_xattr".  For
  * some tests torture must be run on the host it tests and takes an additional
@@ -3968,3 +4025,18 @@ struct torture_suite *torture_vfs_fruit_netatalk(void)
 
 	return suite;
 }
+
+struct torture_suite *torture_vfs_fruit_file_id(void)
+{
+	struct torture_suite *suite =
+	    torture_suite_create(talloc_autofree_context(), "fruit_file_id");
+
+	suite->description =
+	    talloc_strdup(suite, "vfs_fruit tests for on-disk file ID that "
+				 "require fruit:zero_file_id=yes");
+
+	torture_suite_add_1smb2_test(suite, "zero file id if AAPL negotiated",
+				     test_zero_file_id);
+
+	return suite;
+}
diff --git a/source4/torture/vfs/vfs.c b/source4/torture/vfs/vfs.c
index a4f8125..710e93b 100644
--- a/source4/torture/vfs/vfs.c
+++ b/source4/torture/vfs/vfs.c
@@ -111,6 +111,7 @@ NTSTATUS torture_vfs_init(void)
 	torture_suite_add_suite(suite, torture_vfs_fruit());
 	torture_suite_add_suite(suite, torture_vfs_fruit_netatalk());
 	torture_suite_add_suite(suite, torture_acl_xattr());
+	torture_suite_add_suite(suite, torture_vfs_fruit_file_id());
 
 	torture_register_suite(suite);
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list