Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f834d231
Commit
f834d231
authored
Mar 30, 2011
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: FILE_OVERWRITE and FILE_OVERWRITE_IF need the FILE_WRITE_ATTRIBUTES permission.
parent
0cc619cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
15 deletions
+3
-15
file.c
dlls/ntdll/tests/file.c
+0
-14
file.c
server/file.c
+3
-1
No files found.
dlls/ntdll/tests/file.c
View file @
f834d231
...
...
@@ -1609,20 +1609,6 @@ static void test_NtCreateFile(void)
td
[
i
].
attrib_in
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
td
[
i
].
disposition
,
0
,
NULL
,
0
);
/* FIXME: completely remove once Wine is fixed */
if
(
td
[
i
].
status
==
STATUS_ACCESS_DENIED
)
{
todo_wine
ok
(
status
==
td
[
i
].
status
,
"%d: expected %#x got %#x
\n
"
,
i
,
td
[
i
].
status
,
status
);
CloseHandle
(
handle
);
SetFileAttributesW
(
path
,
FILE_ATTRIBUTE_ARCHIVE
);
if
(
td
[
i
].
needs_cleanup
)
DeleteFileW
(
path
);
continue
;
}
ok
(
status
==
td
[
i
].
status
,
"%d: expected %#x got %#x
\n
"
,
i
,
td
[
i
].
status
,
status
);
if
(
!
status
)
...
...
server/file.c
View file @
f834d231
...
...
@@ -179,10 +179,12 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
{
case
FILE_CREATE
:
flags
=
O_CREAT
|
O_EXCL
;
break
;
case
FILE_OVERWRITE_IF
:
/* FIXME: the difference is whether we trash existing attr or not */
access
|=
FILE_WRITE_ATTRIBUTES
;
case
FILE_SUPERSEDE
:
flags
=
O_CREAT
|
O_TRUNC
;
break
;
case
FILE_OPEN
:
flags
=
0
;
break
;
case
FILE_OPEN_IF
:
flags
=
O_CREAT
;
break
;
case
FILE_OVERWRITE
:
flags
=
O_TRUNC
;
break
;
case
FILE_OVERWRITE
:
flags
=
O_TRUNC
;
access
|=
FILE_WRITE_ATTRIBUTES
;
break
;
default:
set_error
(
STATUS_INVALID_PARAMETER
);
goto
done
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment