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
481de9d8
Commit
481de9d8
authored
Apr 21, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Thunk GetFileSecurityW to NtQuerySecurityObject.
parent
d0c83654
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
55 deletions
+9
-55
security.c
dlls/advapi32/security.c
+9
-55
No files found.
dlls/advapi32/security.c
View file @
481de9d8
...
...
@@ -1746,64 +1746,18 @@ GetFileSecurityW( LPCWSTR lpFileName,
PSECURITY_DESCRIPTOR
pSecurityDescriptor
,
DWORD
nLength
,
LPDWORD
lpnLengthNeeded
)
{
DWORD
nNeeded
;
LPBYTE
pBuffer
;
DWORD
iLocNow
;
SECURITY_DESCRIPTOR_RELATIVE
*
pSDRelative
;
HANDLE
hfile
;
NTSTATUS
status
;
if
(
INVALID_FILE_ATTRIBUTES
==
GetFileAttributesW
(
lpFileName
))
hfile
=
CreateFileW
(
lpFileName
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
if
(
hfile
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
FIXME
(
"(%s) : returns fake SECURITY_DESCRIPTOR
\n
"
,
debugstr_w
(
lpFileName
)
);
nNeeded
=
sizeof
(
SECURITY_DESCRIPTOR_RELATIVE
);
if
(
RequestedInformation
&
OWNER_SECURITY_INFORMATION
)
nNeeded
+=
sizeof
(
sidWorld
);
if
(
RequestedInformation
&
GROUP_SECURITY_INFORMATION
)
nNeeded
+=
sizeof
(
sidWorld
);
if
(
RequestedInformation
&
DACL_SECURITY_INFORMATION
)
nNeeded
+=
WINE_SIZE_OF_WORLD_ACCESS_ACL
;
if
(
RequestedInformation
&
SACL_SECURITY_INFORMATION
)
nNeeded
+=
WINE_SIZE_OF_WORLD_ACCESS_ACL
;
*
lpnLengthNeeded
=
nNeeded
;
if
(
nNeeded
>
nLength
)
return
TRUE
;
if
(
!
InitializeSecurityDescriptor
(
pSecurityDescriptor
,
SECURITY_DESCRIPTOR_REVISION
))
return
FALSE
;
pSDRelative
=
(
PISECURITY_DESCRIPTOR_RELATIVE
)
pSecurityDescriptor
;
pSDRelative
->
Control
|=
SE_SELF_RELATIVE
;
pBuffer
=
(
LPBYTE
)
pSDRelative
;
iLocNow
=
sizeof
(
SECURITY_DESCRIPTOR_RELATIVE
);
if
(
RequestedInformation
&
OWNER_SECURITY_INFORMATION
)
{
memcpy
(
pBuffer
+
iLocNow
,
&
sidWorld
,
sizeof
(
sidWorld
));
pSDRelative
->
Owner
=
iLocNow
;
iLocNow
+=
sizeof
(
sidWorld
);
}
if
(
RequestedInformation
&
GROUP_SECURITY_INFORMATION
)
{
memcpy
(
pBuffer
+
iLocNow
,
&
sidWorld
,
sizeof
(
sidWorld
));
pSDRelative
->
Group
=
iLocNow
;
iLocNow
+=
sizeof
(
sidWorld
);
}
if
(
RequestedInformation
&
DACL_SECURITY_INFORMATION
)
{
GetWorldAccessACL
((
PACL
)
(
pBuffer
+
iLocNow
));
pSDRelative
->
Dacl
=
iLocNow
;
iLocNow
+=
WINE_SIZE_OF_WORLD_ACCESS_ACL
;
}
if
(
RequestedInformation
&
SACL_SECURITY_INFORMATION
)
{
GetWorldAccessACL
((
PACL
)
(
pBuffer
+
iLocNow
));
pSDRelative
->
Sacl
=
iLocNow
;
/* iLocNow += WINE_SIZE_OF_WORLD_ACCESS_ACL; */
}
return
TRUE
;
status
=
NtQuerySecurityObject
(
hfile
,
RequestedInformation
,
pSecurityDescriptor
,
nLength
,
lpnLengthNeeded
);
CloseHandle
(
hfile
);
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