[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Fri Jan 22 04:04:02 UTC 2016


The branch, master has been updated
       via  ef269c9 substitute: Fix talloc_sub_basic for %G in the case of a local user.
       via  2f2b57a passdb: change ABI version to 0.25.0 due to removed symbol.
       via  8ff3257 s3:passdb: move my_sam_name() from passdb to util_name.c
       via  a929913 s4-torture: let smb2.replay.replay5 test deal with scale out shares.
       via  c9218c4 smbd:smb2_close: remove an irritating blank line
       via  718007b docs:smbdotconf: fix tabs/space mixup in logon parameter metadata
      from  6ed3985 vfs_shadow_copy2: check crossmountpoints against snapdirseverywhere

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit ef269c9ddc865a450f4e594ec9133e1f304452a7
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 21 12:42:14 2016 +0100

    substitute: Fix talloc_sub_basic for %G in the case of a local user.
    
    This fixes a regression introduced by the fix for bug 10286.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10286
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Jan 22 05:03:25 CET 2016 on sn-devel-144

commit 2f2b57a648624dee346dbc9481a36d38c5d21ec3
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 21 12:41:43 2016 +0100

    passdb: change ABI version to 0.25.0 due to removed symbol.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 8ff3257c4c129a941f50e78ede4905bae3712f33
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 21 12:40:33 2016 +0100

    s3:passdb: move my_sam_name() from passdb to util_name.c
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit a929913cb1dd3fd94676c0b417a663c064961be9
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jan 15 17:34:43 2016 +0100

    s4-torture: let smb2.replay.replay5 test deal with scale out shares.
    
    Scale out shares don't hand out batch or exclusive oplocks.
    Hence no durable handles either.
    The important point here is that the behaviour tested
    does largely not rely on the fact that we had a durable
    handle but that we were using a durable handle create
    context to specify a CreateGUID.
    
    Pair-Programmed-With: Guenther Deschner <gd at samba.org>
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Signed-off-by: Guenther Deschner <gd at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit c9218c40e6037e4f38a719aa0b47c3040cdf2080
Author: Michael Adam <obnox at samba.org>
Date:   Tue May 19 12:19:22 2015 +0200

    smbd:smb2_close: remove an irritating blank line
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 718007b2236084113163e4c40b33a95d7d247ec3
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 21 10:39:35 2016 +0100

    docs:smbdotconf: fix tabs/space mixup in logon parameter metadata
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 docs-xml/smbdotconf/logon/logondrive.xml               |  2 +-
 docs-xml/smbdotconf/logon/logonhome.xml                |  2 +-
 docs-xml/smbdotconf/logon/logonpath.xml                |  2 +-
 docs-xml/smbdotconf/logon/logonscript.xml              |  2 +-
 source3/include/passdb.h                               |  1 -
 source3/include/proto.h                                |  1 +
 source3/lib/substitute.c                               |  4 +++-
 source3/lib/util_names.c                               | 18 ++++++++++++++++++
 ...mba-passdb-0.24.2.sigs => samba-passdb-0.25.0.sigs} |  1 -
 source3/passdb/passdb.c                                | 18 ------------------
 source3/smbd/smb2_close.c                              |  1 -
 source3/wscript_build                                  |  2 +-
 source4/torture/smb2/replay.c                          | 16 +++++++++++++---
 13 files changed, 40 insertions(+), 30 deletions(-)
 copy source3/passdb/ABI/{samba-passdb-0.24.2.sigs => samba-passdb-0.25.0.sigs} (99%)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/logon/logondrive.xml b/docs-xml/smbdotconf/logon/logondrive.xml
index dc12080..9f61598 100644
--- a/docs-xml/smbdotconf/logon/logondrive.xml
+++ b/docs-xml/smbdotconf/logon/logondrive.xml
@@ -1,6 +1,6 @@
 <samba:parameter name="logon drive"
                  context="G"
-				 type="string"
+                 type="string"
                  constant="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
diff --git a/docs-xml/smbdotconf/logon/logonhome.xml b/docs-xml/smbdotconf/logon/logonhome.xml
index 3e9d150..d211674 100644
--- a/docs-xml/smbdotconf/logon/logonhome.xml
+++ b/docs-xml/smbdotconf/logon/logonhome.xml
@@ -1,6 +1,6 @@
 <samba:parameter name="logon home"
                  context="G"
-				 type="string"
+                 type="string"
                  constant="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
diff --git a/docs-xml/smbdotconf/logon/logonpath.xml b/docs-xml/smbdotconf/logon/logonpath.xml
index d9ffbcb..106bb59 100644
--- a/docs-xml/smbdotconf/logon/logonpath.xml
+++ b/docs-xml/smbdotconf/logon/logonpath.xml
@@ -1,6 +1,6 @@
 <samba:parameter name="logon path"
                  context="G"
-				 type="string"
+                 type="string"
                  constant="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
diff --git a/docs-xml/smbdotconf/logon/logonscript.xml b/docs-xml/smbdotconf/logon/logonscript.xml
index b6d7580..0a8d69d 100644
--- a/docs-xml/smbdotconf/logon/logonscript.xml
+++ b/docs-xml/smbdotconf/logon/logonscript.xml
@@ -1,6 +1,6 @@
 <samba:parameter name="logon script"
                  context="G"
-				 type="string"
+                 type="string"
                  constant="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index d8f7f10..8175829 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -688,7 +688,6 @@ bool login_cache_delentry(const struct samu *sampass);
 
 /* The following definitions come from passdb/passdb.c  */
 
-const char *my_sam_name(void);
 struct samu *samu_new( TALLOC_CTX *ctx );
 NTSTATUS samu_set_unix(struct samu *user, const struct passwd *pwd);
 NTSTATUS samu_alloc_rid_unix(struct pdb_methods *methods,
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 809cb95..ce9e277 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -328,6 +328,7 @@ struct passwd *Get_Pwnam_alloc(TALLOC_CTX *mem_ctx, const char *user);
 
 /* The following definitions come from lib/util_names.c  */
 const char *get_global_sam_name(void);
+const char *my_sam_name(void);
 
 /* The following definitions come from lib/util.c  */
 
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index ce4fbba..4e2ce9b 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -500,7 +500,9 @@ char *talloc_sub_basic(TALLOC_CTX *mem_ctx,
 		case 'G' : {
 			struct passwd *pass;
 
-			if (domain_name != NULL && domain_name[0] != '\0') {
+			if (domain_name != NULL && domain_name[0] != '\0' &&
+			    !strequal(domain_name, my_sam_name()))
+			{
 				r = talloc_asprintf(tmp_ctx,
 						    "%s%c%s",
 						    domain_name,
diff --git a/source3/lib/util_names.c b/source3/lib/util_names.c
index 1392b48..802df5d 100644
--- a/source3/lib/util_names.c
+++ b/source3/lib/util_names.c
@@ -171,3 +171,21 @@ const char *get_global_sam_name(void)
 	return lp_netbios_name();
 }
 
+
+/******************************************************************
+ Get the default domain/netbios name to be used when
+ testing authentication.
+
+ LEGACY: this function provides the legacy domain mapping used with
+	 the lp_map_untrusted_to_domain() parameter
+******************************************************************/
+
+const char *my_sam_name(void)
+{
+       /* Standalone servers can only use the local netbios name */
+       if ( lp_server_role() == ROLE_STANDALONE )
+               return lp_netbios_name();
+
+       /* Default to the DOMAIN name when not specified */
+       return lp_workgroup();
+}
diff --git a/source3/passdb/ABI/samba-passdb-0.24.2.sigs b/source3/passdb/ABI/samba-passdb-0.25.0.sigs
similarity index 99%
copy from source3/passdb/ABI/samba-passdb-0.24.2.sigs
copy to source3/passdb/ABI/samba-passdb-0.25.0.sigs
index 6ab600e..546374c 100644
--- a/source3/passdb/ABI/samba-passdb-0.24.2.sigs
+++ b/source3/passdb/ABI/samba-passdb-0.25.0.sigs
@@ -64,7 +64,6 @@ make_pdb_method: NTSTATUS (struct pdb_methods **)
 make_pdb_method_name: NTSTATUS (struct pdb_methods **, const char *)
 max_algorithmic_gid: gid_t (void)
 max_algorithmic_uid: uid_t (void)
-my_sam_name: const char *(void)
 pdb_add_aliasmem: NTSTATUS (const struct dom_sid *, const struct dom_sid *)
 pdb_add_group_mapping_entry: NTSTATUS (GROUP_MAP *)
 pdb_add_groupmem: NTSTATUS (TALLOC_CTX *, uint32_t, uint32_t)
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index f071027..c99b80c 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -36,24 +36,6 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_PASSDB
 
-/******************************************************************
- Get the default domain/netbios name to be used when
- testing authentication.
-
- LEGACY: this function provides the legacy domain mapping used with
-	 the lp_map_untrusted_to_domain() parameter
-******************************************************************/
-
-const char *my_sam_name(void)
-{
-       /* Standalone servers can only use the local netbios name */
-       if ( lp_server_role() == ROLE_STANDALONE )
-               return lp_netbios_name();
-
-       /* Default to the DOMAIN name when not specified */
-       return lp_workgroup();
-}
-
 /**********************************************************************
 ***********************************************************************/
 
diff --git a/source3/smbd/smb2_close.c b/source3/smbd/smb2_close.c
index 367c9fa..5830228 100644
--- a/source3/smbd/smb2_close.c
+++ b/source3/smbd/smb2_close.c
@@ -322,7 +322,6 @@ static struct tevent_req *smbd_smb2_close_send(TALLOC_CTX *mem_ctx,
 	state->in_flags = in_flags;
 
 	if (in_fsp->num_aio_requests != 0) {
-
 		in_fsp->deferred_close = tevent_wait_send(in_fsp, ev);
 		if (tevent_req_nomem(in_fsp->deferred_close, req)) {
 			return tevent_req_post(req, ev);
diff --git a/source3/wscript_build b/source3/wscript_build
index b8eaeca..fe6aee1 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -133,7 +133,7 @@ bld.SAMBA3_LIBRARY('samba-passdb',
                    passdb/lookup_sid.h''',
                    abi_match=private_pdb_match,
                    abi_directory='passdb/ABI',
-                   vnum='0.24.2')
+                   vnum='0.25.0')
 
 bld.SAMBA3_SUBSYSTEM('pdb',
                    source='''passdb/pdb_get_set.c
diff --git a/source4/torture/smb2/replay.c b/source4/torture/smb2/replay.c
index c7c9bea..57b14f1 100644
--- a/source4/torture/smb2/replay.c
+++ b/source4/torture/smb2/replay.c
@@ -822,9 +822,12 @@ static bool test_replay5(struct torture_context *tctx, struct smb2_tree *tree)
 	bool ret = true;
 	uint32_t share_capabilities;
 	bool share_is_ca;
+	bool share_is_so;
 	const char *fname = BASEDIR "\\replay5.dat";
 	struct smb2_transport *transport = tree->session->transport;
 	struct smbcli_options options = tree->session->transport->options;
+	uint8_t expect_oplock = smb2_util_oplock_level("b");
+	NTSTATUS expect_status = NT_STATUS_DUPLICATE_OBJECTID;
 
 	if (smbXcli_conn_protocol(transport->conn) < PROTOCOL_SMB3_00) {
 		torture_skip(tctx, "SMB 3.X Dialect family required for "
@@ -832,11 +835,18 @@ static bool test_replay5(struct torture_context *tctx, struct smb2_tree *tree)
 	}
 
 	share_capabilities = smb2cli_tcon_capabilities(tree->smbXcli);
+
 	share_is_ca = share_capabilities & SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY;
 	if (!share_is_ca) {
 		torture_skip(tctx, "Persistent File Handles not supported");
 	}
 
+	share_is_so = share_capabilities & SMB2_SHARE_CAP_SCALEOUT;
+	if (share_is_so) {
+		expect_oplock = smb2_util_oplock_level("s");
+		expect_status = NT_STATUS_FILE_NOT_AVAILABLE;
+	}
+
 	ZERO_STRUCT(break_info);
 	break_info.tctx = tctx;
 	transport->oplock.handler = torture_oplock_ack_handler;
@@ -864,7 +874,7 @@ static bool test_replay5(struct torture_context *tctx, struct smb2_tree *tree)
 	_h = io.out.file.handle;
 	h = &_h;
 	CHECK_CREATED(&io, CREATED, FILE_ATTRIBUTE_ARCHIVE);
-	CHECK_VAL(io.out.oplock_level, smb2_util_oplock_level("b"));
+	CHECK_VAL(io.out.oplock_level, expect_oplock);
 	CHECK_VAL(io.out.durable_open, false);
 	CHECK_VAL(io.out.durable_open_v2, true);
 	CHECK_VAL(io.out.persistent_open, true);
@@ -882,7 +892,7 @@ static bool test_replay5(struct torture_context *tctx, struct smb2_tree *tree)
 
 	/* a re-open of a persistent handle causes an error */
 	status = smb2_create(tree, mem_ctx, &io);
-	CHECK_STATUS(status, NT_STATUS_DUPLICATE_OBJECTID);
+	CHECK_STATUS(status, expect_status);
 
 	/* SMB2_FLAGS_REPLAY_OPERATION must be set to open the Persistent Handle */
 	smb2cli_session_start_replay(tree->session->smbXcli);
@@ -892,7 +902,7 @@ static bool test_replay5(struct torture_context *tctx, struct smb2_tree *tree)
 	CHECK_CREATED(&io, CREATED, FILE_ATTRIBUTE_ARCHIVE);
 	CHECK_VAL(io.out.durable_open, false);
 	CHECK_VAL(io.out.persistent_open, true);
-	CHECK_VAL(io.out.oplock_level, smb2_util_oplock_level("b"));
+	CHECK_VAL(io.out.oplock_level, expect_oplock);
 	_h = io.out.file.handle;
 	h = &_h;
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list