summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-01-31 17:26:34 +0100
committerVolker Lendecke <vlendec@samba.org>2012-01-31 20:15:36 +0100
commit2b1d7ac0603ce8fe5a76efa45c3f17f1680e5e66 (patch)
treee9880506ac4cbf7cd2e202beca467bca7e636cac /source3/smbd
parent549a31963e993a15b6155a046dd4ecea9b05eed7 (diff)
downloadsamba-2b1d7ac0603ce8fe5a76efa45c3f17f1680e5e66.tar.gz
samba-2b1d7ac0603ce8fe5a76efa45c3f17f1680e5e66.tar.bz2
samba-2b1d7ac0603ce8fe5a76efa45c3f17f1680e5e66.zip
s3: Unify stream testing in open_directory
The second if-statement could never have kicked in, assuming the SMB_ASSERT above was right. Jeremy, please check! Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Jan 31 20:15:36 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 1c15ca4061..3374fdb272 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2675,7 +2675,11 @@ static NTSTATUS open_directory(connection_struct *conn,
struct timespec mtimespec;
int info = 0;
- SMB_ASSERT(!is_ntfs_stream_smb_fname(smb_dname));
+ if (is_ntfs_stream_smb_fname(smb_dname)) {
+ DEBUG(2, ("open_directory: %s is a stream name!\n",
+ smb_fname_str_dbg(smb_dname)));
+ return NT_STATUS_NOT_A_DIRECTORY;
+ }
/* Ensure we have a directory attribute. */
file_attributes |= FILE_ATTRIBUTE_DIRECTORY;
@@ -2690,14 +2694,6 @@ static NTSTATUS open_directory(connection_struct *conn,
(unsigned int)create_disposition,
(unsigned int)file_attributes));
- if (!(file_attributes & FILE_FLAG_POSIX_SEMANTICS) &&
- (conn->fs_capabilities & FILE_NAMED_STREAMS) &&
- is_ntfs_stream_smb_fname(smb_dname)) {
- DEBUG(2, ("open_directory: %s is a stream name!\n",
- smb_fname_str_dbg(smb_dname)));
- return NT_STATUS_NOT_A_DIRECTORY;
- }
-
status = smbd_calculate_access_mask(conn, smb_dname,
access_mask, &access_mask);
if (!NT_STATUS_IS_OK(status)) {