Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
1262d7db
Commit
1262d7db
authored
Oct 02, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Oct 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Implement SetFileSecurityW on top of NtSetSecurityObject.
parent
45b6706a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
security.c
dlls/advapi32/security.c
+23
-2
No files found.
dlls/advapi32/security.c
View file @
1262d7db
...
...
@@ -2096,8 +2096,29 @@ SetFileSecurityW( LPCWSTR lpFileName,
SECURITY_INFORMATION
RequestedInformation
,
PSECURITY_DESCRIPTOR
pSecurityDescriptor
)
{
FIXME
(
"(%s) : stub
\n
"
,
debugstr_w
(
lpFileName
)
);
return
TRUE
;
HANDLE
file
;
DWORD
access
=
0
;
NTSTATUS
status
;
TRACE
(
"(%s, 0x%x, %p)
\n
"
,
debugstr_w
(
lpFileName
),
RequestedInformation
,
pSecurityDescriptor
);
if
(
RequestedInformation
&
OWNER_SECURITY_INFORMATION
||
RequestedInformation
&
GROUP_SECURITY_INFORMATION
)
access
|=
WRITE_OWNER
;
if
(
RequestedInformation
&
SACL_SECURITY_INFORMATION
)
access
|=
ACCESS_SYSTEM_SECURITY
;
if
(
RequestedInformation
&
DACL_SECURITY_INFORMATION
)
access
|=
WRITE_DAC
;
file
=
CreateFileW
(
lpFileName
,
access
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
|
FILE_SHARE_DELETE
,
NULL
,
OPEN_EXISTING
,
FILE_FLAG_BACKUP_SEMANTICS
,
NULL
);
if
(
file
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
status
=
NtSetSecurityObject
(
file
,
RequestedInformation
,
pSecurityDescriptor
);
CloseHandle
(
file
);
return
set_ntstatus
(
status
);
}
/******************************************************************************
...
...
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