Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
4d8618eb
Commit
4d8618eb
authored
Jun 03, 2015
by
Sebastian Lackner
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: FILE_WRITE_ATTRIBUTES should succeed for readonly files.
parent
efec1010
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
file.c
dlls/ntdll/tests/file.c
+1
-1
fd.c
server/fd.c
+1
-1
No files found.
dlls/ntdll/tests/file.c
View file @
4d8618eb
...
...
@@ -4303,7 +4303,7 @@ static void test_readonly(void)
status
=
pNtOpenFile
(
&
handle
,
FILE_WRITE_ATTRIBUTES
,
&
attr
,
&
io
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
|
FILE_SHARE_DELETE
,
FILE_OPEN_FOR_BACKUP_INTENT
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"got %#x
\n
"
,
status
);
ok
(
status
==
STATUS_SUCCESS
,
"got %#x
\n
"
,
status
);
CloseHandle
(
handle
);
status
=
pNtOpenFile
(
&
handle
,
DELETE
,
&
attr
,
&
io
,
...
...
server/fd.c
View file @
4d8618eb
...
...
@@ -2125,7 +2125,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
else
if
(
errno
==
EACCES
)
{
/* try to change permissions temporarily to open a file descriptor */
if
(
!
(
access
&
(
FILE_UNIX_WRITE_ACCESS
|
FILE_UNIX_READ_ACCESS
|
DELETE
))
&&
if
(
!
(
access
&
(
(
FILE_UNIX_WRITE_ACCESS
|
FILE_UNIX_READ_ACCESS
|
DELETE
)
&
~
FILE_WRITE_ATTRIBUTES
))
&&
!
stat
(
name
,
&
st
)
&&
st
.
st_uid
==
getuid
()
&&
!
chmod
(
name
,
st
.
st_mode
|
S_IRUSR
))
{
...
...
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