The branch, v3-3-test has been updated
       via  a47e8e7438133ca3bc1f1b577ccd9d0fde8baea0 (commit)
      from  6f8e7146cd51c81963f9e2830a4ed7e37eefdf1f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit a47e8e7438133ca3bc1f1b577ccd9d0fde8baea0
Author: Stefan Metzmacher <[EMAIL PROTECTED]>
Date:   Mon Dec 1 13:27:08 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 83e14f5..7fd2855 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -332,6 +332,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.
@@ -353,8 +354,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

Reply via email to