summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-05-13 10:54:15 -0700
committerJeremy Allison <jra@samba.org>2010-05-13 10:54:15 -0700
commited6fa379ef6e1f5d7ca3d5c42e4e97a2c7604683 (patch)
tree34525c56de08cbb104b0adab5b8b301668a15d37 /source3/modules
parent6427484f84e3437bdabb90a2672ec7c037cedf0d (diff)
downloadsamba-ed6fa379ef6e1f5d7ca3d5c42e4e97a2c7604683.tar.gz
samba-ed6fa379ef6e1f5d7ca3d5c42e4e97a2c7604683.tar.bz2
samba-ed6fa379ef6e1f5d7ca3d5c42e4e97a2c7604683.zip
Treat an open of stream ::$DATA as an open of the base file.
This fixes a class of SMB_ASSERT failures when doing stream tests. Jeremy.
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/onefs_open.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c
index dd4c24555f..f7d6e0700f 100644
--- a/source3/modules/onefs_open.c
+++ b/source3/modules/onefs_open.c
@@ -2106,6 +2106,33 @@ NTSTATUS onefs_create_file(vfs_handle_struct *handle,
goto fail;
}
+ if (is_ntfs_stream_smb_fname(smb_fname)) {
+ if (!(conn->fs_capabilities & FILE_NAMED_STREAMS)) {
+ status = NT_STATUS_OBJECT_NAME_NOT_FOUND;
+ goto fail;
+ }
+
+ if (is_ntfs_default_stream_smb_fname(smb_fname)) {
+ int ret;
+ smb_fname->stream_name = NULL;
+ /* We have to handle this error here. */
+ if (create_options & FILE_DIRECTORY_FILE) {
+ status = NT_STATUS_NOT_A_DIRECTORY;
+ goto fail;
+ }
+ if (lp_posix_pathnames()) {
+ ret = SMB_VFS_LSTAT(conn, smb_fname);
+ } else {
+ ret = SMB_VFS_STAT(conn, smb_fname);
+ }
+
+ if (ret == 0 && VALID_STAT_OF_DIR(smb_fname->st)) {
+ status = NT_STATUS_FILE_IS_A_DIRECTORY;
+ goto fail;
+ }
+ }
+ }
+
status = onefs_create_file_unixpath(
conn, /* conn */
req, /* req */