[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Sun Mar 6 18:35:03 UTC 2016


The branch, master has been updated
       via  8e0e4f5 g_lock: Remove some unneeded includes
       via  1a724a8 lib: Avoid "includes.h" in dbwrap.c
       via  ae41ea1 lib: Introduce SERVER_ID_BUF_LENGTH
      from  937d60f smbd: Clean up the logic inside vfs_chown_fsp() to prevent future security issues.

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


- Log -----------------------------------------------------------------
commit 8e0e4f599440236480d1b48d98470ee0aa5aa595
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Feb 22 21:32:08 2016 +0100

    g_lock: Remove some unneeded includes
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ira Cooper <ira at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Sun Mar  6 19:34:42 CET 2016 on sn-devel-144

commit 1a724a8f6776491620a0d3c2dfc5302ec8b1c73f
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Feb 22 20:39:20 2016 +0100

    lib: Avoid "includes.h" in dbwrap.c
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ira Cooper <ira at samba.org>

commit ae41ea144ab73d2c4b1be590dd5af440b4831e39
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Feb 28 17:56:23 2016 +0100

    lib: Introduce SERVER_ID_BUF_LENGTH
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ira Cooper <ira at samba.org>

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

Summary of changes:
 lib/dbwrap/dbwrap.c         | 5 ++++-
 lib/util/samba_util.h       | 7 +++++--
 lib/util/server_id.c        | 6 ++++--
 source3/lib/g_lock.c        | 3 ---
 source3/lib/messages_util.c | 8 ++++----
 5 files changed, 17 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/dbwrap/dbwrap.c b/lib/dbwrap/dbwrap.c
index a1b98c3..f7dcb8a 100644
--- a/lib/dbwrap/dbwrap.c
+++ b/lib/dbwrap/dbwrap.c
@@ -19,7 +19,10 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include "includes.h"
+#include "replace.h"
+#include "lib/util/debug.h"
+#include "lib/util/fault.h"
+#include "lib/util/talloc_stack.h"
 #include "dbwrap/dbwrap.h"
 #include "dbwrap/dbwrap_private.h"
 #include "lib/util/util_tdb.h"
diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h
index 56cde7b..9d6f0d8 100644
--- a/lib/util/samba_util.h
+++ b/lib/util/samba_util.h
@@ -722,8 +722,11 @@ void server_id_set_disconnected(struct server_id *id);
  */
 bool server_id_is_disconnected(const struct server_id *id);
 
-void server_id_put(uint8_t buf[24], const struct server_id id);
-void server_id_get(struct server_id *id, const uint8_t buf[24]);
+#define SERVER_ID_BUF_LENGTH 24
+void server_id_put(uint8_t buf[SERVER_ID_BUF_LENGTH],
+		   const struct server_id id);
+void server_id_get(struct server_id *id,
+		   const uint8_t buf[SERVER_ID_BUF_LENGTH]);
 
 /*
  * Samba code should use samba_tevent_context_init() instead of
diff --git a/lib/util/server_id.c b/lib/util/server_id.c
index 83a262d..77c5ee1 100644
--- a/lib/util/server_id.c
+++ b/lib/util/server_id.c
@@ -202,7 +202,8 @@ bool server_id_is_disconnected(const struct server_id *id)
 	return server_id_equal(id, &dis);
 }
 
-void server_id_put(uint8_t buf[24], const struct server_id id)
+void server_id_put(uint8_t buf[SERVER_ID_BUF_LENGTH],
+		   const struct server_id id)
 {
 	SBVAL(buf, 0,  id.pid);
 	SIVAL(buf, 8,  id.task_id);
@@ -210,7 +211,8 @@ void server_id_put(uint8_t buf[24], const struct server_id id)
 	SBVAL(buf, 16, id.unique_id);
 }
 
-void server_id_get(struct server_id *id, const uint8_t buf[24])
+void server_id_get(struct server_id *id,
+		   const uint8_t buf[SERVER_ID_BUF_LENGTH])
 {
 	id->pid       = BVAL(buf, 0);
 	id->task_id   = IVAL(buf, 8);
diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c
index 346c1ed..1928f5e 100644
--- a/source3/lib/g_lock.c
+++ b/source3/lib/g_lock.c
@@ -24,10 +24,7 @@
 #include "dbwrap/dbwrap_watch.h"
 #include "g_lock.h"
 #include "util_tdb.h"
-#include "ctdbd_conn.h"
-#include "../lib/util/select.h"
 #include "../lib/util/tevent_ntstatus.h"
-#include "system/select.h"
 #include "messages.h"
 #include "serverid.h"
 
diff --git a/source3/lib/messages_util.c b/source3/lib/messages_util.c
index 24c364c..7c11ecf 100644
--- a/source3/lib/messages_util.c
+++ b/source3/lib/messages_util.c
@@ -27,8 +27,8 @@ void message_hdr_put(uint8_t buf[MESSAGE_HDR_LENGTH], uint32_t msg_type,
 		     struct server_id src, struct server_id dst)
 {
 	server_id_put(buf, dst);
-	server_id_put(buf + 24, src);
-	SIVAL(buf, 48, msg_type);
+	server_id_put(buf + SERVER_ID_BUF_LENGTH, src);
+	SIVAL(buf, 2 * SERVER_ID_BUF_LENGTH, msg_type);
 }
 
 void message_hdr_get(uint32_t *msg_type, struct server_id *src,
@@ -36,6 +36,6 @@ void message_hdr_get(uint32_t *msg_type, struct server_id *src,
 		     const uint8_t buf[MESSAGE_HDR_LENGTH])
 {
 	server_id_get(dst, buf);
-	server_id_get(src, buf + 24);
-	*msg_type = IVAL(buf, 48);
+	server_id_get(src, buf + SERVER_ID_BUF_LENGTH);
+	*msg_type = IVAL(buf, 2 * SERVER_ID_BUF_LENGTH);
 }


-- 
Samba Shared Repository



More information about the samba-cvs mailing list