s3: Fix FILE_FLAG_POSIX_SEMANTICS handling underneath SMB_VFS_CREATE_FILE
[kai/samba.git] / 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) {