[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha6-1113-g997dfbb
Tim Prouty
tprouty at samba.org
Tue Feb 24 07:22:53 GMT 2009
The branch, master has been updated
via 997dfbbf5409a9df3b3c87025fa80fb6bdafcac2 (commit)
via 7bcaaf14fbf22805d88b945256b6bd31121c7c66 (commit)
from 8d63c596a0f512c96f5663c0a9bd49d3c98c6df9 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 997dfbbf5409a9df3b3c87025fa80fb6bdafcac2
Author: Tim Prouty <tprouty at samba.org>
Date: Mon Feb 23 17:43:47 2009 -0800
s3 OneFS: Fix a double free in an error path
commit 7bcaaf14fbf22805d88b945256b6bd31121c7c66
Author: Tim Prouty <tprouty at samba.org>
Date: Sun Feb 22 20:50:30 2009 -0800
s3 OneFS: Add a parameter that unconditionally allows execute access
-----------------------------------------------------------------------
Summary of changes:
source3/modules/onefs.h | 2 ++
source3/modules/onefs_system.c | 24 ++++++++++++++++++++++++
source3/smbd/oplock_onefs.c | 5 ++---
3 files changed, 28 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/onefs.h b/source3/modules/onefs.h
index a70664b..418e13d 100644
--- a/source3/modules/onefs.h
+++ b/source3/modules/onefs.h
@@ -41,6 +41,8 @@ enum onefs_acl_wire_format
#define PARM_ONEFS_TYPE "onefs"
#define PARM_ACL_WIRE_FORMAT "acl wire format"
#define PARM_ACL_WIRE_FORMAT_DEFAULT ACL_FORMAT_WINDOWS_SD
+#define PARM_ALLOW_EXECUTE_ALWAYS "allow execute always"
+#define PARM_ALLOW_EXECUTE_ALWAYS_DEFAULT false
#define PARM_ATIME_NOW "atime now files"
#define PARM_ATIME_NOW_DEFAULT NULL
#define PARM_ATIME_STATIC "atime static files"
diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c
index 1080289..76df006 100644
--- a/source3/modules/onefs_system.c
+++ b/source3/modules/onefs_system.c
@@ -132,6 +132,30 @@ int onefs_sys_create_file(connection_struct *conn,
if (lp_nt_acl_support(SNUM(conn)) && !lp_inherit_perms(SNUM(conn)))
cf_flags = cf_flags_or(cf_flags, CF_FLAGS_DEFAULT_ACL);
+ /*
+ * Some customer workflows require the execute bit to be ignored.
+ */
+ if (lp_parm_bool(SNUM(conn), PARM_ONEFS_TYPE,
+ PARM_ALLOW_EXECUTE_ALWAYS,
+ PARM_ALLOW_EXECUTE_ALWAYS_DEFAULT) &&
+ (open_access_mask & FILE_EXECUTE)) {
+
+ DEBUG(3, ("Stripping execute bit from %s: (0x%x)\n", path,
+ open_access_mask));
+
+ /* Strip execute. */
+ open_access_mask &= ~FILE_EXECUTE;
+
+ /*
+ * Add READ_DATA, so we're not left with desired_access=0. An
+ * execute call should imply the client will read the data.
+ */
+ open_access_mask |= FILE_READ_DATA;
+
+ DEBUGADD(3, ("New stripped access mask: 0x%x\n",
+ open_access_mask));
+ }
+
DEBUG(10,("onefs_sys_create_file: base_fd = %d, "
"open_access_mask = 0x%x, flags = 0x%x, mode = 0%o, "
"desired_oplock = %s, id = 0x%x, secinfo = 0x%x, sd = %p, "
diff --git a/source3/smbd/oplock_onefs.c b/source3/smbd/oplock_onefs.c
index 0908ce4..d4f181f 100644
--- a/source3/smbd/oplock_onefs.c
+++ b/source3/smbd/oplock_onefs.c
@@ -744,13 +744,13 @@ struct kernel_oplocks *onefs_init_kernel_oplocks(TALLOC_CTX *mem_ctx)
po.po_flags_on |= P_NON_BLOCKING_SEMLOCK;
if (setprocoptions(&po) != 0) {
DEBUG(0, ("setprocoptions failed: %s.\n", strerror(errno)));
- goto err_out;
+ return NULL;
}
/* Setup the oplock contexts */
_ctx = talloc_zero(mem_ctx, struct kernel_oplocks);
if (!_ctx) {
- goto err_out;
+ return NULL;
}
ctx = talloc_zero(_ctx, struct onefs_oplocks_context);
@@ -788,7 +788,6 @@ struct kernel_oplocks *onefs_init_kernel_oplocks(TALLOC_CTX *mem_ctx)
err_out:
talloc_free(_ctx);
- talloc_free(ctx);
return NULL;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list