[SCM] Samba Shared Repository - branch master updated

[email protected] (Ralph B??hme)
Newsgroups gmane.network.samba.cvs
Message-ID <[email protected]>
The branch, master has been updated
       via  c98bdf2 smbd/service_stream: connection processing flag is not really bool
       via  28eb49c lib/registry/regf: better initialise nk_block
       via  f5154a8 ldb: Fix an unused variable warning
       via  b38c8da ldb: Fix typos
      from  78a77d4 tdb: version 1.3.12

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


- Log -----------------------------------------------------------------
commit c98bdf24941ad95250d79eeed26c57d600cedc7b
Author: Douglas Bagnall <[email protected]>
Date:   Wed Nov 30 14:56:16 2016 +1300

    smbd/service_stream: connection processing flag is not really bool
    
    The warning is:
    
    ../source4/smbd/service_stream.c: In function ‘stream_io_handler’:
    ../source4/smbd/service_stream.c:94:18: warning: increment of a boolean expression [-Wbool-operation]
      conn->processing++;
                        ^~
    ../source4/smbd/service_stream.c:100:18: warning: decrement of a boolean expression [-Wbool-operation]
      conn->processing--;
                        ^~
    
    while the code in question looks like:
    
    	conn->processing++;
    	if (flags & TEVENT_FD_WRITE) {
    		conn->ops->send_handler(conn, flags);
    	} else if (flags & TEVENT_FD_READ) {
    		conn->ops->recv_handler(conn, flags);
    	}
    	conn->processing--;
    
    If this is never going to be nested, processing can be bool and the ++
    and -- can be true/false assignments. But it seems possible that these
    might be nested so it is better to go the other way.
    
    Signed-off-by: Douglas Bagnall <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>
    
    Autobuild-User(master): Ralph Böhme <[email protected]>
    Autobuild-Date(master): Thu Dec  1 00:28:05 CET 2016 on sn-devel-144

commit 28eb49c7ede1c530f4c27fb4c136e88fd6ba7f93
Author: Douglas Bagnall <[email protected]>
Date:   Wed Nov 30 14:19:39 2016 +1300

    lib/registry/regf: better initialise nk_block
    
    We were initialising a uint32_t[5] block with memset(..., 5) when we
    surely meant memset(..., 5 * sizeof(uint32_t)) or some equivalent.
    
    Thanks go to gcc-7 and -Wmemset-elt-size. The warning looks like this:
    
    ../source4/lib/registry/regf.c: In function ‘reg_create_regf_file’:
    ../source4/lib/registry/regf.c:2095:2: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
      memset(nk.unk3, 0, 5);
        ^~~~~~
    
    Signed-off-by: Douglas Bagnall <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit f5154a86fab60b572f0b77017508a940c55d49e4
Author: Volker Lendecke <[email protected]>
Date:   Mon Nov 21 21:41:51 2016 +0100

    ldb: Fix an unused variable warning
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit b38c8da937e8129ee8096bd3059fcc1bb8f48633
Author: Volker Lendecke <[email protected]>
Date:   Mon Nov 21 21:40:21 2016 +0100

    ldb: Fix typos
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

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

Summary of changes:
 lib/ldb/common/ldb_modules.c  | 7 +++++--
 source4/lib/registry/regf.c   | 2 +-
 source4/smbd/service_stream.h | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/common/ldb_modules.c b/lib/ldb/common/ldb_modules.c
index 2105966..62f20af 100644
--- a/lib/ldb/common/ldb_modules.c
+++ b/lib/ldb/common/ldb_modules.c
@@ -901,7 +901,10 @@ static int ldb_modules_load_path(const char *path, const char *version)
 	} *loaded;
 	struct loaded *le;
 	int dlopen_flags;
+
+#ifdef RTLD_DEEPBIND
 	bool deepbind_enabled = (getenv("LDB_MODULES_DISABLE_DEEPBIND") == NULL);
+#endif
 
 	ret = stat(path, &st);
 	if (ret != 0) {
@@ -937,13 +940,13 @@ static int ldb_modules_load_path(const char *path, const char *version)
 #ifdef RTLD_DEEPBIND
 	/*
 	 * use deepbind if possible, to avoid issues with different
-	 * system library varients, for example ldb modules may be linked
+	 * system library variants, for example ldb modules may be linked
 	 * against Heimdal while the application may use MIT kerberos.
 	 *
 	 * See the dlopen manpage for details.
 	 *
 	 * One typical user is the bind_dlz module of Samba,
-	 * but symbol versioniong might be enough...
+	 * but symbol versioning might be enough...
 	 *
 	 * We need a way to disable this in order to allow the
 	 * ldb_*ldap modules to work with a preloaded socket wrapper.
diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c
index 887b335..763b0ce 100644
--- a/source4/lib/registry/regf.c
+++ b/source4/lib/registry/regf.c
@@ -2092,7 +2092,7 @@ WERROR reg_create_regf_file(TALLOC_CTX *parent_ctx,
 	nk.unknown_offset = -1;
 	nk.num_values = 0;
 	nk.values_offset = -1;
-	memset(nk.unk3, 0, 5);
+	memset(nk.unk3, 0, 5 * sizeof(uint32_t));
 	nk.clsname_offset = -1;
 	nk.clsname_length = 0;
 	nk.sk_offset = 0x80;
diff --git a/source4/smbd/service_stream.h b/source4/smbd/service_stream.h
index e098a69..a7d3def 100644
--- a/source4/smbd/service_stream.h
+++ b/source4/smbd/service_stream.h
@@ -60,7 +60,7 @@ struct stream_connection {
 	 */
 	struct auth_session_info *session_info;
 
-	bool processing;
+	uint processing;
 	const char *terminate;
 };
 


-- 
Samba Shared Repository
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.