diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-12-01 13:59:21 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-12-01 13:59:21 -0800 |
commit | ce310f666d4896ab2cc13514fc5eb55157028cd0 (patch) | |
tree | eb8910169f3f90fb004feea949f0cb126fa25422 /source3/modules | |
parent | 9ae1a17c95185aab928d3e362c37caf5d752c411 (diff) | |
download | samba-ce310f666d4896ab2cc13514fc5eb55157028cd0.tar.gz samba-ce310f666d4896ab2cc13514fc5eb55157028cd0.tar.bz2 samba-ce310f666d4896ab2cc13514fc5eb55157028cd0.zip |
s3:streams_depot: map 'file::$DATA' to just 'file'
metze
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_streams_depot.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index 0d6e0e02c1..80c693190c 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -271,6 +271,11 @@ static char *stream_name(vfs_handle_struct *handle, const char *fname, goto fail; } + /* if it's the ::$DATA stream just return the base file name */ + if (!sname) { + return base; + } + dirname = stream_dir(handle, base, NULL, create_dir); if (dirname == NULL) { @@ -410,6 +415,7 @@ static int streams_depot_open(vfs_handle_struct *handle, const char *fname, { TALLOC_CTX *frame; char *base = NULL; + char *sname = NULL; SMB_STRUCT_STAT base_sbuf; char *stream_fname; int ret = -1; @@ -421,11 +427,16 @@ static int streams_depot_open(vfs_handle_struct *handle, const char *fname, frame = talloc_stackframe(); if (!NT_STATUS_IS_OK(split_ntfs_stream_name(talloc_tos(), fname, - &base, NULL))) { + &base, &sname))) { errno = ENOMEM; goto done; } + if (!sname) { + ret = SMB_VFS_NEXT_OPEN(handle, base, fsp, flags, mode); + goto done; + } + ret = SMB_VFS_NEXT_STAT(handle, base, &base_sbuf); if (ret == -1) { |