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
4ead2b4c
Commit
4ead2b4c
authored
Apr 11, 2005
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement GetNamedSecurityInfo.
parent
bf559d54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
8 deletions
+66
-8
security.c
dlls/advapi32/security.c
+66
-8
No files found.
dlls/advapi32/security.c
View file @
4ead2b4c
...
...
@@ -2363,7 +2363,7 @@ DWORD WINAPI SetNamedSecurityInfoW(LPWSTR pObjectName,
{
FIXME
(
"%s %d %ld %p %p %p %p
\n
"
,
debugstr_w
(
pObjectName
),
ObjectType
,
SecurityInfo
,
psidOwner
,
psidGroup
,
pDacl
,
pSacl
);
return
ERROR_
CALL_NOT_IMPLEMENTED
;
return
ERROR_
SUCCESS
;
}
/******************************************************************************
...
...
@@ -3274,14 +3274,72 @@ DWORD WINAPI GetNamedSecurityInfoA(LPSTR pObjectName,
/******************************************************************************
* GetNamedSecurityInfoW [ADVAPI32.@]
*/
DWORD
WINAPI
GetNamedSecurityInfoW
(
LPWSTR
pObjectName
,
SE_OBJECT_TYPE
ObjectType
,
SECURITY_INFORMATION
SecurityInfo
,
PSID
*
ppsidOwner
,
PSID
*
ppsidGroup
,
PACL
*
ppDacl
,
PACL
*
ppSacl
,
PSECURITY_DESCRIPTOR
*
ppSecurityDescriptor
)
DWORD
WINAPI
GetNamedSecurityInfoW
(
LPWSTR
name
,
SE_OBJECT_TYPE
type
,
SECURITY_INFORMATION
info
,
PSID
*
owner
,
PSID
*
group
,
PACL
*
dacl
,
PACL
*
sacl
,
PSECURITY_DESCRIPTOR
*
descriptor
)
{
FIXME
(
"%s %d %ld %p %p %p %p %p
\n
"
,
debugstr_w
(
pObjectName
),
ObjectType
,
SecurityInfo
,
ppsidOwner
,
ppsidGroup
,
ppDacl
,
ppSacl
,
ppSecurityDescriptor
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
DWORD
needed
,
offset
;
SECURITY_DESCRIPTOR_RELATIVE
*
relative
;
BYTE
*
buffer
;
TRACE
(
"%s %d %ld %p %p %p %p %p
\n
"
,
debugstr_w
(
name
),
type
,
info
,
owner
,
group
,
dacl
,
sacl
,
descriptor
);
if
(
!
name
||
!
descriptor
)
return
ERROR_INVALID_PARAMETER
;
needed
=
sizeof
(
SECURITY_DESCRIPTOR_RELATIVE
);
if
(
info
&
OWNER_SECURITY_INFORMATION
)
needed
+=
sizeof
(
sidWorld
);
if
(
info
&
GROUP_SECURITY_INFORMATION
)
needed
+=
sizeof
(
sidWorld
);
if
(
info
&
DACL_SECURITY_INFORMATION
)
needed
+=
WINE_SIZE_OF_WORLD_ACCESS_ACL
;
if
(
info
&
SACL_SECURITY_INFORMATION
)
needed
+=
WINE_SIZE_OF_WORLD_ACCESS_ACL
;
/* must be freed by caller */
*
descriptor
=
HeapAlloc
(
GetProcessHeap
(),
0
,
needed
);
if
(
!*
descriptor
)
return
ERROR_NOT_ENOUGH_MEMORY
;
if
(
!
InitializeSecurityDescriptor
(
*
descriptor
,
SECURITY_DESCRIPTOR_REVISION
))
{
HeapFree
(
GetProcessHeap
(),
0
,
*
descriptor
);
return
ERROR_INVALID_SECURITY_DESCR
;
}
relative
=
(
SECURITY_DESCRIPTOR_RELATIVE
*
)
*
descriptor
;
relative
->
Control
|=
SE_SELF_RELATIVE
;
buffer
=
(
BYTE
*
)
relative
;
offset
=
sizeof
(
SECURITY_DESCRIPTOR_RELATIVE
);
if
(
owner
&&
(
info
&
OWNER_SECURITY_INFORMATION
))
{
memcpy
(
buffer
+
offset
,
&
sidWorld
,
sizeof
(
sidWorld
)
);
relative
->
Owner
=
offset
;
*
owner
=
buffer
+
offset
;
offset
+=
sizeof
(
sidWorld
);
}
if
(
group
&&
(
info
&
GROUP_SECURITY_INFORMATION
))
{
memcpy
(
buffer
+
offset
,
&
sidWorld
,
sizeof
(
sidWorld
)
);
relative
->
Group
=
offset
;
*
group
=
buffer
+
offset
;
offset
+=
sizeof
(
sidWorld
);
}
if
(
dacl
&&
(
info
&
DACL_SECURITY_INFORMATION
))
{
GetWorldAccessACL
(
(
PACL
)(
buffer
+
offset
)
);
relative
->
Dacl
=
offset
;
*
dacl
=
(
PACL
)(
buffer
+
offset
);
offset
+=
WINE_SIZE_OF_WORLD_ACCESS_ACL
;
}
if
(
sacl
&&
(
info
&
SACL_SECURITY_INFORMATION
))
{
GetWorldAccessACL
(
(
PACL
)(
buffer
+
offset
)
);
relative
->
Sacl
=
offset
;
*
sacl
=
(
PACL
)(
buffer
+
offset
);
}
return
ERROR_SUCCESS
;
}
/******************************************************************************
...
...
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