The branch, master has been updated
       via  2539d678f54d09577d5c86fae1d6d43175bfca96 (commit)
       via  a04bb5f9a267c6945db6ff25e16d15f7f813aaaf (commit)
       via  5300dc62888dfd36479353f4a6ea5cb52728c754 (commit)
      from  87a4c09b9bd37a967abcf874888a5d5161e7434f (commit)

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


- Log -----------------------------------------------------------------
commit 2539d678f54d09577d5c86fae1d6d43175bfca96
Author: Zack Kirsch <[email protected]>
Date:   Fri Feb 20 15:29:29 2009 -0800

    s4 torture: Add comment to clarify test

commit a04bb5f9a267c6945db6ff25e16d15f7f813aaaf
Author: Zack Kirsch <[email protected]>
Date:   Fri Feb 20 15:22:15 2009 -0800

    s3 BRL: Add more clarifying comments and add implied logic to make 
conditional more clear

commit 5300dc62888dfd36479353f4a6ea5cb52728c754
Author: Zack Kirsch <[email protected]>
Date:   Fri Feb 20 15:20:39 2009 -0800

    s3 OneFS: Add debugging for createfile_flags

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

Summary of changes:
 source3/locking/brlock.c         |    8 ++++++--
 source3/modules/onefs_system.c   |   27 +++++++++++++++------------
 source4/torture/raw/samba3misc.c |    3 +++
 3 files changed, 24 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index d12c4af..aa522ac 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -74,6 +74,7 @@ bool brl_same_context(const struct lock_context *ctx1,
 static bool brl_overlap(const struct lock_struct *lck1,
                         const struct lock_struct *lck2)
 {
+       /* XXX Remove for Win7 compatibility. */
        /* this extra check is not redundent - it copes with locks
           that go beyond the end of 64 bit file space */
        if (lck1->size != 0 &&
@@ -105,8 +106,11 @@ static bool brl_conflict(const struct lock_struct *lck1,
                return False;
        }
 
-       if (brl_same_context(&lck1->context, &lck2->context) &&
-           lck2->lock_type == READ_LOCK && lck1->fnum == lck2->fnum) {
+       /* A READ lock can stack on top of a WRITE lock if they have the same
+        * context & fnum. */
+       if (lck1->lock_type == WRITE_LOCK && lck2->lock_type == READ_LOCK &&
+           brl_same_context(&lck1->context, &lck2->context) &&
+           lck1->fnum == lck2->fnum) {
                return False;
        }
 
diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c
index 6f93d9f..3a86b4b 100644
--- a/source3/modules/onefs_system.c
+++ b/source3/modules/onefs_system.c
@@ -123,17 +123,29 @@ int onefs_sys_create_file(connection_struct *conn,
        /* Convert samba dos flags to UF_DOS_* attributes. */
        onefs_dos_attributes = dos_attributes_to_stat_dos_flags(dos_flags);
 
+       /**
+        * Deal with kernel creating Default ACLs. (Isilon bug 47447.)
+        *
+        * 1) "nt acl support = no", default_acl = no
+        * 2) "inherit permissions = yes", default_acl = no
+        */
+       if (lp_nt_acl_support(SNUM(conn)) && !lp_inherit_perms(SNUM(conn)))
+               cf_flags = cf_flags_or(cf_flags, CF_FLAGS_DEFAULT_ACL);
+
        DEBUG(10,("onefs_sys_create_file: base_fd = %d, "
-                 "open_access_mask = 0x%x, flags = 0x%x, mode = 0x%x, "
+                 "open_access_mask = 0x%x, flags = 0x%x, mode = 0%o, "
                  "desired_oplock = %s, id = 0x%x, secinfo = 0x%x, sd = %p, "
-                 "dos_attributes = 0x%x, path = %s\n", base_fd,
+                 "dos_attributes = 0x%x, path = %s, "
+                 "default_acl=%s\n", base_fd,
                  (unsigned int)open_access_mask,
                  (unsigned int)flags,
                  (unsigned int)mode,
                  onefs_oplock_str(onefs_oplock),
                  (unsigned int)id,
                  (unsigned int)secinfo, sd,
-                 (unsigned int)onefs_dos_attributes, path));
+                 (unsigned int)onefs_dos_attributes, path,
+                 cf_flags_and_bool(cf_flags, CF_FLAGS_DEFAULT_ACL) ?
+                     "true" : "false"));
 
        /* Initialize smlock struct for files/dirs but not internal opens */
        if (!(oplock_request & INTERNAL_OPEN_ONLY)) {
@@ -144,15 +156,6 @@ int onefs_sys_create_file(connection_struct *conn,
 
        smlock_dump(10, psml);
 
-       /**
-        * Deal with kernel creating Default ACLs. (Isilon bug 47447.)
-        *
-        * 1) "nt acl support = no", default_acl = no
-        * 2) "inherit permissions = yes", default_acl = no
-        */
-       if (lp_nt_acl_support(SNUM(conn)) && !lp_inherit_perms(SNUM(conn)))
-               cf_flags = cf_flags_or(cf_flags, CF_FLAGS_DEFAULT_ACL);
-
        ret_fd = ifs_createfile(base_fd, path,
            (enum ifs_ace_rights)open_access_mask, flags & ~O_ACCMODE, mode,
            onefs_oplock, id, psml, secinfo, pifs_sd, onefs_dos_attributes,
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index 8cdccb3..c4c790c 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -672,6 +672,9 @@ bool torture_samba3_caseinsensitive(struct torture_context 
*torture)
 /*
  * Check that Samba3 correctly deals with conflicting posix byte range locks
  * on an underlying file
+ *
+ * Note: This test depends on "posix locking = yes".
+ * Note: To run this test, use "--option=torture:localdir=<LOCALDIR>"
  */
 
 bool torture_samba3_posixtimedlock(struct torture_context *tctx)


-- 
Samba Shared Repository

Reply via email to