[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-3205-g1ad249d
Jeremy Allison
jra at samba.org
Mon Dec 1 21:27:49 GMT 2008
The branch, v3-2-test has been updated
via 1ad249d10bc4a9ed61c1f712e6ccc35e6ec7ba06 (commit)
from 3a5d85ca7ca54f7ab5e742c6026b528fcc94bae5 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 1ad249d10bc4a9ed61c1f712e6ccc35e6ec7ba06
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Dec 1 13:27:30 2008 -0800
s3:smbd: wildcard characters are allowed in stream names
We only check the filename of the basefile now.
metze
-----------------------------------------------------------------------
Summary of changes:
source/smbd/open.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/smbd/open.c b/source/smbd/open.c
index 5c9fcf8..b20927c 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -284,6 +284,7 @@ static NTSTATUS open_file(files_struct *fsp,
if ((open_access_mask & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) ||
(!file_existed && (local_flags & O_CREAT)) ||
((local_flags & O_TRUNC) == O_TRUNC) ) {
+ const char *wild;
/*
* We can't actually truncate here as the file may be locked.
@@ -305,8 +306,17 @@ static NTSTATUS open_file(files_struct *fsp,
#endif
/* Don't create files with Microsoft wildcard characters. */
+ if (fsp->base_fsp) {
+ /*
+ * wildcard characters are allowed in stream names
+ * only test the basefilename
+ */
+ wild = fsp->base_fsp->fsp_name;
+ } else {
+ wild = path;
+ }
if ((local_flags & O_CREAT) && !file_existed &&
- ms_has_wild(path)) {
+ ms_has_wild(wild)) {
return NT_STATUS_OBJECT_NAME_INVALID;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list