[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-2909-gabe1bed

Volker Lendecke vlendec at samba.org
Thu Jun 19 10:04:03 GMT 2008


The branch, v3-3-test has been updated
       via  abe1bed665ad8d1dbf9177dcbb9344b25df9594c (commit)
       via  2eef2c682c18ad37b78214c755b9dd7c8b607cb8 (commit)
       via  4f50cb63e9b565ae0747127baa651a1a1874298b (commit)
      from  8b26afdcddc75d3b9a97309757a97314b406cb59 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit abe1bed665ad8d1dbf9177dcbb9344b25df9594c
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jun 19 12:03:31 2008 +0200

    Remove some code
    
    Did not measure it, but I think a single write is better than a read and a
    conditional branch

commit 2eef2c682c18ad37b78214c755b9dd7c8b607cb8
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jun 19 11:59:55 2008 +0200

    Fix typo

commit 4f50cb63e9b565ae0747127baa651a1a1874298b
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jun 19 09:50:34 2008 +0200

    Fix the build on FreeBSD 4.6.2

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

Summary of changes:
 source/lib/dbwrap_rbt.c              |    9 +++++----
 source/script/tests/test_net_misc.sh |    2 +-
 source/smbd/posix_acls.c             |   16 ++++------------
 3 files changed, 10 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/dbwrap_rbt.c b/source/lib/dbwrap_rbt.c
index 46459c8..b70ce3d 100644
--- a/source/lib/dbwrap_rbt.c
+++ b/source/lib/dbwrap_rbt.c
@@ -20,7 +20,7 @@
 #include "includes.h"
 #include "rbtree.h"
 
-#define ALIGN(_size_) (((_size_)+15)&~15)
+#define DBWRAP_RBT_ALIGN(_size_) (((_size_)+15)&~15)
 
 struct db_rbt_ctx {
 	struct rb_root tree;
@@ -42,7 +42,7 @@ struct db_rbt_node {
 	 * target for offsetof()
 	 */
 
-	char data[];
+	char data[1];
 };
 
 /*
@@ -243,7 +243,8 @@ static struct db_record *db_rbt_fetch_locked(struct db_context *db_ctx,
 	 * off.
 	 */
 
-	size = ALIGN(sizeof(struct db_record)) + sizeof(struct db_rbt_rec);
+	size = DBWRAP_RBT_ALIGN(sizeof(struct db_record))
+		+ sizeof(struct db_rbt_rec);
 
 	if (!found) {
 		/*
@@ -258,7 +259,7 @@ static struct db_record *db_rbt_fetch_locked(struct db_context *db_ctx,
 	}
 
 	rec_priv = (struct db_rbt_rec *)
-		((char *)result + ALIGN(sizeof(struct db_record)));
+		((char *)result + DBWRAP_RBT_ALIGN(sizeof(struct db_record)));
 	rec_priv->db_ctx = ctx;
 
 	result->store = db_rbt_store;
diff --git a/source/script/tests/test_net_misc.sh b/source/script/tests/test_net_misc.sh
index 3ceb087..0a0636a 100755
--- a/source/script/tests/test_net_misc.sh
+++ b/source/script/tests/test_net_misc.sh
@@ -34,7 +34,7 @@ testit "get the system time" \
 	test_time system || \
 	failed=`expr $failed + 1`
 
-testit "get the tize zone" \
+testit "get the time zone" \
 	test_time zone || \
 	failed=`expr $failed + 1`
 
diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c
index 33042fa..b83e3b6 100644
--- a/source/smbd/posix_acls.c
+++ b/source/smbd/posix_acls.c
@@ -2207,9 +2207,7 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
 		posix_id unix_ug;
 		enum ace_owner owner_type;
 
-		/* get_next... */
-		if (entry_id == SMB_ACL_FIRST_ENTRY)
-			entry_id = SMB_ACL_NEXT_ENTRY;
+		entry_id = SMB_ACL_NEXT_ENTRY;
 
 		/* Is this a MASK entry ? */
 		if (SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry, &tagtype) == -1)
@@ -3684,9 +3682,7 @@ int get_acl_group_bits( connection_struct *conn, const char *fname, mode_t *mode
 		SMB_ACL_TAG_T tagtype;
 		SMB_ACL_PERMSET_T permset;
 
-		/* get_next... */
-		if (entry_id == SMB_ACL_FIRST_ENTRY)
-			entry_id = SMB_ACL_NEXT_ENTRY;
+		entry_id = SMB_ACL_NEXT_ENTRY;
 
 		if (SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry, &tagtype) ==-1)
 			break;
@@ -3724,9 +3720,7 @@ static int chmod_acl_internals( connection_struct *conn, SMB_ACL_T posix_acl, mo
 		SMB_ACL_PERMSET_T permset;
 		mode_t perms;
 
-		/* get_next... */
-		if (entry_id == SMB_ACL_FIRST_ENTRY)
-			entry_id = SMB_ACL_NEXT_ENTRY;
+		entry_id = SMB_ACL_NEXT_ENTRY;
 
 		if (SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry, &tagtype) == -1)
 			return -1;
@@ -4146,9 +4140,7 @@ static bool remove_posix_acl(connection_struct *conn, files_struct *fsp, const c
 		SMB_ACL_TAG_T tagtype;
 		SMB_ACL_PERMSET_T permset;
 
-		/* get_next... */
-		if (entry_id == SMB_ACL_FIRST_ENTRY)
-			entry_id = SMB_ACL_NEXT_ENTRY;
+		entry_id = SMB_ACL_NEXT_ENTRY;
 
 		if (SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry, &tagtype) == -1) {
 			DEBUG(5,("remove_posix_acl: failed to get tagtype from ACL on file %s (%s).\n",


-- 
Samba Shared Repository


More information about the samba-cvs mailing list