[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-4578-g6972c77
Jeremy Allison
jra at samba.org
Mon Dec 1 22:21:01 GMT 2008
The branch, v3-3-test has been updated
via 6972c77fd5b4a103e850e72312f9183b8e73189b (commit)
from 1cc55ef88321927e87d5ce0c6b1edd98d2e6f936 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit 6972c77fd5b4a103e850e72312f9183b8e73189b
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Dec 1 14:20:36 2008 -0800
s3:streams_depot: add an option to disable the xattr checks
streams_depot:check_valid=no is useful when the filesystem
has no xattr support and files are only published via samba.
metze
-----------------------------------------------------------------------
Summary of changes:
source/modules/vfs_streams_depot.c | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/modules/vfs_streams_depot.c b/source/modules/vfs_streams_depot.c
index 2096df4..d543ea3 100644
--- a/source/modules/vfs_streams_depot.c
+++ b/source/modules/vfs_streams_depot.c
@@ -67,10 +67,15 @@ static uint32_t hash_fn(DATA_BLOB key)
#define SAMBA_XATTR_MARKER "user.SAMBA_STREAMS"
-static bool file_is_valid(vfs_handle_struct *handle, const char *path)
+static bool file_is_valid(vfs_handle_struct *handle, const char *path,
+ bool check_valid)
{
char buf;
+ if (!check_valid) {
+ return true;
+ }
+
DEBUG(10, ("file_is_valid (%s) called\n", path));
if (SMB_VFS_NEXT_GETXATTR(handle, path, SAMBA_XATTR_MARKER,
@@ -87,11 +92,16 @@ static bool file_is_valid(vfs_handle_struct *handle, const char *path)
return true;
}
-static bool mark_file_valid(vfs_handle_struct *handle, const char *path)
+static bool mark_file_valid(vfs_handle_struct *handle, const char *path,
+ bool check_valid)
{
char buf = '1';
int ret;
+ if (!check_valid) {
+ return true;
+ }
+
DEBUG(10, ("marking file %s as valid\n", path));
ret = SMB_VFS_NEXT_SETXATTR(handle, path, SAMBA_XATTR_MARKER,
@@ -116,6 +126,11 @@ static char *stream_dir(vfs_handle_struct *handle, const char *base_path,
char *id_hex;
struct file_id id;
uint8 id_buf[16];
+ bool check_valid;
+ const char *rootdir;
+
+ check_valid = lp_parm_bool(SNUM(handle->conn),
+ "streams_depot", "check_valid", true);
tmp = talloc_asprintf(talloc_tos(), "%s/.streams", handle->conn->connectpath);
@@ -124,7 +139,7 @@ static char *stream_dir(vfs_handle_struct *handle, const char *base_path,
goto fail;
}
- const char *rootdir = lp_parm_const_string(
+ rootdir = lp_parm_const_string(
SNUM(handle->conn), "streams_depot", "directory",
tmp);
@@ -173,7 +188,7 @@ static char *stream_dir(vfs_handle_struct *handle, const char *base_path,
goto fail;
}
- if (file_is_valid(handle, base_path)) {
+ if (file_is_valid(handle, base_path, check_valid)) {
return result;
}
@@ -243,7 +258,7 @@ static char *stream_dir(vfs_handle_struct *handle, const char *base_path,
goto fail;
}
- if (!mark_file_valid(handle, base_path)) {
+ if (!mark_file_valid(handle, base_path, check_valid)) {
goto fail;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list