s3: Fix FILE_FLAG_POSIX_SEMANTICS handling underneath SMB_VFS_CREATE_FILE
authorTim Prouty <tprouty@samba.org>
Mon, 1 Dec 2008 22:13:14 +0000 (14:13 -0800)
committerTim Prouty <tprouty@samba.org>
Thu, 4 Dec 2008 01:51:55 +0000 (17:51 -0800)
source3/smbd/open.c

index 55aec168406f190c5e8635ae5e842ee66c9d287b..41a1fb371d5bdfdd78676d5be1043f3cfe8080fd 100644 (file)
@@ -2861,7 +2861,8 @@ static NTSTATUS create_file_unixpath(connection_struct *conn,
                }
 
                /* Can't open a temp directory. IFS kit test. */
-               if (file_attributes & FILE_ATTRIBUTE_TEMPORARY) {
+               if (!(file_attributes & FILE_FLAG_POSIX_SEMANTICS) &&
+                    (file_attributes & FILE_ATTRIBUTE_TEMPORARY)) {
                        status = NT_STATUS_INVALID_PARAMETER;
                        goto fail;
                }
@@ -3260,7 +3261,6 @@ NTSTATUS create_file_default(connection_struct *conn,
 
        if (file_attributes & FILE_FLAG_POSIX_SEMANTICS) {
                case_state = set_posix_case_semantics(talloc_tos(), conn);
-               file_attributes &= ~FILE_FLAG_POSIX_SEMANTICS;
        }
 
        if (create_file_flags & CFF_DOS_PATH) {