git.samba.org
/
abartlet
/
samba.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b00204a
)
s3 OneFS: Add parameter to ignore streams
author
Tim Prouty
<tprouty@samba.org>
Sat, 28 Feb 2009 00:25:31 +0000
(16:25 -0800)
committer
Tim Prouty
<tprouty@samba.org>
Tue, 3 Mar 2009 21:06:16 +0000
(13:06 -0800)
source3/modules/onefs_config.h
patch
|
blob
|
history
source3/modules/onefs_open.c
patch
|
blob
|
history
source3/modules/onefs_streams.c
patch
|
blob
|
history
source3/modules/vfs_onefs.c
patch
|
blob
|
history
diff --git
a/source3/modules/onefs_config.h
b/source3/modules/onefs_config.h
index 27cbb0ad74acb7473601de965dcf93829903a85c..f0f48e63794efcf959b20544ad701ed9bf07ec2c 100644
(file)
--- a/
source3/modules/onefs_config.h
+++ b/
source3/modules/onefs_config.h
@@
-64,6
+64,8
@@
enum onefs_acl_wire_format
#define PARM_DOT_SNAP_TILDE_DEFAULT true
#define PARM_IGNORE_SACLS "ignore sacls"
#define PARM_IGNORE_SACLS_DEFAULT false
#define PARM_DOT_SNAP_TILDE_DEFAULT true
#define PARM_IGNORE_SACLS "ignore sacls"
#define PARM_IGNORE_SACLS_DEFAULT false
+#define PARM_IGNORE_STREAMS "ignore streams"
+#define PARM_IGNORE_STREAMS_DEFAULT false
#define PARM_MTIME_NOW "mtime now files"
#define PARM_MTIME_NOW_DEFAULT NULL
#define PARM_MTIME_STATIC "mtime static files"
#define PARM_MTIME_NOW "mtime now files"
#define PARM_MTIME_NOW_DEFAULT NULL
#define PARM_MTIME_STATIC "mtime static files"
diff --git
a/source3/modules/onefs_open.c
b/source3/modules/onefs_open.c
index 9043be8e19bf64993e18c6ad0170ebb38f0ef5b6..d3ba0ac979b2faac40d4d209e015ef288e72d954 100644
(file)
--- a/
source3/modules/onefs_open.c
+++ b/
source3/modules/onefs_open.c
@@
-196,7
+196,7
@@
static NTSTATUS onefs_open_file(files_struct *fsp,
&base, &stream);
}
/* It's a stream, so pass in the base_fd */
&base, &stream);
}
/* It's a stream, so pass in the base_fd */
- if (stream != NULL) {
+ if (
(conn->fs_capabilities & FILE_NAMED_STREAMS) &&
stream != NULL) {
SMB_ASSERT(fsp->base_fsp);
/*
SMB_ASSERT(fsp->base_fsp);
/*
diff --git
a/source3/modules/onefs_streams.c
b/source3/modules/onefs_streams.c
index 9f5d5e22843a6289905bd46d0e430684c4e696b2..05b36d7d3c5366fd1215f28bdf47a129b01c603a 100644
(file)
--- a/
source3/modules/onefs_streams.c
+++ b/
source3/modules/onefs_streams.c
@@
-671,6
+671,11
@@
NTSTATUS onefs_streaminfo(vfs_handle_struct *handle,
state.streams = NULL;
state.num_streams = 0;
state.streams = NULL;
state.num_streams = 0;
+ if (lp_parm_bool(SNUM(handle->conn), PARM_ONEFS_TYPE,
+ PARM_IGNORE_STREAMS, PARM_IGNORE_STREAMS_DEFAULT)) {
+ goto out;
+ }
+
/* Add the default stream. */
if (S_ISREG(sbuf.st_mode)) {
if (!add_one_stream(mem_ctx,
/* Add the default stream. */
if (S_ISREG(sbuf.st_mode)) {
if (!add_one_stream(mem_ctx,
@@
-702,7
+707,7
@@
NTSTATUS onefs_streaminfo(vfs_handle_struct *handle,
return state.status;
}
}
return state.status;
}
}
-
+ out:
*num_streams = state.num_streams;
*streams = state.streams;
return NT_STATUS_OK;
*num_streams = state.num_streams;
*streams = state.streams;
return NT_STATUS_OK;
diff --git
a/source3/modules/vfs_onefs.c
b/source3/modules/vfs_onefs.c
index f277245bdc040feaaebd5352a09a8e3353e19794..2ec6e069c3a523c4843704ee55a7e2bedebfcca2 100644
(file)
--- a/
source3/modules/vfs_onefs.c
+++ b/
source3/modules/vfs_onefs.c
@@
-222,7
+222,14
@@
static int onefs_ntimes(vfs_handle_struct *handle, const char *fname,
static uint32_t onefs_fs_capabilities(struct vfs_handle_struct *handle)
{
static uint32_t onefs_fs_capabilities(struct vfs_handle_struct *handle)
{
- return SMB_VFS_NEXT_FS_CAPABILITIES(handle) | FILE_NAMED_STREAMS;
+ uint32_t result = 0;
+
+ if (!lp_parm_bool(SNUM(handle->conn), PARM_ONEFS_TYPE,
+ PARM_IGNORE_STREAMS, PARM_IGNORE_STREAMS_DEFAULT)) {
+ result |= FILE_NAMED_STREAMS;
+ }
+
+ return result | SMB_VFS_NEXT_FS_CAPABILITIES(handle);
}
static vfs_op_tuple onefs_ops[] = {
}
static vfs_op_tuple onefs_ops[] = {