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
45de351f
Commit
45de351f
authored
Jan 20, 2005
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Jan 20, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACL fixes and cleanups.
parent
89a43ff7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
20 deletions
+21
-20
sec.c
dlls/ntdll/sec.c
+21
-20
No files found.
dlls/ntdll/sec.c
View file @
45de351f
...
...
@@ -408,10 +408,12 @@ ULONG WINAPI RtlLengthSecurityDescriptor(
if
(
lpsd
->
Group
!=
NULL
)
Size
+=
RtlLengthSid
((
PSID
)((
LPBYTE
)
lpsd
->
Group
+
offset
));
if
(
lpsd
->
Sacl
!=
NULL
)
if
(
(
lpsd
->
Control
&
SE_SACL_PRESENT
)
&&
lpsd
->
Sacl
!=
NULL
)
Size
+=
((
PACL
)((
LPBYTE
)
lpsd
->
Sacl
+
offset
))
->
AclSize
;
if
(
lpsd
->
Dacl
!=
NULL
)
if
(
(
lpsd
->
Control
&
SE_DACL_PRESENT
)
&&
lpsd
->
Dacl
!=
NULL
)
Size
+=
((
PACL
)((
LPBYTE
)
lpsd
->
Dacl
+
offset
))
->
AclSize
;
return
Size
;
...
...
@@ -430,7 +432,7 @@ NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(
SECURITY_DESCRIPTOR
*
lpsd
=
pSecurityDescriptor
;
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
pSecurityDescriptor
,
lpbDaclPresent
,
*
pDacl
,
lpbDaclDefaulted
);
pSecurityDescriptor
,
lpbDaclPresent
,
pDacl
,
lpbDaclDefaulted
);
if
(
lpsd
->
Revision
!=
SECURITY_DESCRIPTOR_REVISION
)
return
STATUS_UNKNOWN_REVISION
;
...
...
@@ -438,14 +440,12 @@ NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(
if
(
(
*
lpbDaclPresent
=
(
SE_DACL_PRESENT
&
lpsd
->
Control
)
?
1
:
0
)
)
{
if
(
SE_SELF_RELATIVE
&
lpsd
->
Control
)
{
*
pDacl
=
(
PACL
)
((
LPBYTE
)
lpsd
+
(
DWORD
)
lpsd
->
Dacl
);
}
*
pDacl
=
(
PACL
)
((
LPBYTE
)
lpsd
+
(
DWORD
)
lpsd
->
Dacl
);
else
{
*
pDacl
=
lpsd
->
Dacl
;
}
}
*
pDacl
=
lpsd
->
Dacl
;
*
lpbDaclDefaulted
=
((
SE_DACL_DEFAULTED
&
lpsd
->
Control
)
?
1
:
0
);
*
lpbDaclDefaulted
=
((
SE_DACL_DEFAULTED
&
lpsd
->
Control
)
?
1
:
0
);
}
return
STATUS_SUCCESS
;
}
...
...
@@ -498,19 +498,17 @@ NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(
pSecurityDescriptor
,
lpbSaclPresent
,
*
pSacl
,
lpbSaclDefaulted
);
if
(
lpsd
->
Revision
!=
SECURITY_DESCRIPTOR_REVISION
)
return
STATUS_UNKNOWN_REVISION
;
return
STATUS_UNKNOWN_REVISION
;
if
(
(
*
lpbSaclPresent
=
(
SE_SACL_PRESENT
&
lpsd
->
Control
)
?
1
:
0
)
)
{
if
(
SE_SELF_RELATIVE
&
lpsd
->
Control
)
{
*
pSacl
=
(
PACL
)
((
LPBYTE
)
lpsd
+
(
DWORD
)
lpsd
->
Sacl
);
}
if
(
SE_SELF_RELATIVE
&
lpsd
->
Control
)
*
pSacl
=
(
PACL
)
((
LPBYTE
)
lpsd
+
(
DWORD
)
lpsd
->
Sacl
);
else
{
*
pSacl
=
lpsd
->
Sacl
;
}
}
*
pSacl
=
lpsd
->
Sacl
;
*
lpbSaclDefaulted
=
((
SE_SACL_DEFAULTED
&
lpsd
->
Control
)
?
1
:
0
);
*
lpbSaclDefaulted
=
((
SE_SACL_DEFAULTED
&
lpsd
->
Control
)
?
1
:
0
);
}
return
STATUS_SUCCESS
;
}
...
...
@@ -620,6 +618,7 @@ NTSTATUS WINAPI RtlSetGroupSecurityDescriptor (
lpsd
->
Control
&=
~
SE_GROUP_DEFAULTED
;
return
STATUS_SUCCESS
;
}
/**************************************************************************
* RtlGetGroupSecurityDescriptor [NTDLL.@]
*/
...
...
@@ -730,8 +729,8 @@ NTSTATUS WINAPI RtlMakeSelfRelativeSD(
/**************************************************************************
+
* RtlSelfRelativeToAbsoluteSD [NTDLL.@]
+
*/
* RtlSelfRelativeToAbsoluteSD [NTDLL.@]
*/
NTSTATUS
WINAPI
RtlSelfRelativeToAbsoluteSD
(
IN
PSECURITY_DESCRIPTOR
pSelfRelativeSecurityDescriptor
,
OUT
PSECURITY_DESCRIPTOR
pAbsoluteSecurityDescriptor
,
...
...
@@ -940,6 +939,8 @@ NTSTATUS WINAPI RtlDeleteAce(PACL pAcl, DWORD dwAceIndex)
pAcl
->
AceCount
--
;
}
TRACE
(
"pAcl=%p dwAceIndex=%ld status=0x%08lx
\n
"
,
pAcl
,
dwAceIndex
,
status
);
return
status
;
}
...
...
@@ -1265,7 +1266,7 @@ NTSTATUS WINAPI RtlQueryInformationAcl(
if
(
pAcl
->
AclSize
<
paclsize
->
AclBytesInUse
)
{
WARN
(
"Acl has %ld bytes free
\n
"
,
p
Acl
->
AclSize
-
paclsize
->
AclBytesInUs
e
);
WARN
(
"Acl has %ld bytes free
\n
"
,
p
aclsize
->
AclBytesFre
e
);
paclsize
->
AclBytesFree
=
0
;
paclsize
->
AclBytesInUse
=
pAcl
->
AclSize
;
}
...
...
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