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
9db9c9ef
Commit
9db9c9ef
authored
Jun 22, 2016
by
André Hentschel
Committed by
Alexandre Julliard
Jun 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Allow MACHINE\Software to be owned by local system.
Signed-off-by:
André Hentschel
<
nerv@dawncrow.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fdd953c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
security.c
dlls/advapi32/tests/security.c
+10
-2
No files found.
dlls/advapi32/tests/security.c
View file @
9db9c9ef
...
...
@@ -3652,8 +3652,9 @@ static void test_GetNamedSecurityInfoA(void)
char
admin_ptr
[
sizeof
(
SID
)
+
sizeof
(
ULONG
)
*
SID_MAX_SUB_AUTHORITIES
],
*
user
;
char
system_ptr
[
sizeof
(
SID
)
+
sizeof
(
ULONG
)
*
SID_MAX_SUB_AUTHORITIES
];
char
users_ptr
[
sizeof
(
SID
)
+
sizeof
(
ULONG
)
*
SID_MAX_SUB_AUTHORITIES
];
SID_IDENTIFIER_AUTHORITY
SIDAuthNT
=
{
SECURITY_NT_AUTHORITY
};
PSID
admin_sid
=
(
PSID
)
admin_ptr
,
users_sid
=
(
PSID
)
users_ptr
;
PSID
system_sid
=
(
PSID
)
system_ptr
,
user_sid
;
PSID
system_sid
=
(
PSID
)
system_ptr
,
user_sid
,
localsys_sid
;
DWORD
sid_size
=
sizeof
(
admin_ptr
),
user_size
;
char
invalid_path
[]
=
"/an invalid file path"
;
int
users_ace_id
=
-
1
,
admins_ace_id
=
-
1
,
i
;
...
...
@@ -3958,10 +3959,15 @@ static void test_GetNamedSecurityInfoA(void)
NULL
,
NULL
,
NULL
,
NULL
,
&
pSD
);
ok
(
!
error
,
"GetNamedSecurityInfo failed with error %d
\n
"
,
error
);
bret
=
AllocateAndInitializeSid
(
&
SIDAuthNT
,
1
,
SECURITY_LOCAL_SYSTEM_RID
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
&
localsys_sid
);
ok
(
bret
,
"AllocateAndInitializeSid failed with error %d
\n
"
,
GetLastError
());
bret
=
GetSecurityDescriptorOwner
(
pSD
,
&
owner
,
&
owner_defaulted
);
ok
(
bret
,
"GetSecurityDescriptorOwner failed with error %d
\n
"
,
GetLastError
());
ok
(
owner
!=
NULL
,
"owner should not be NULL
\n
"
);
ok
(
EqualSid
(
owner
,
admin_sid
),
"MACHINE
\\
Software owner SID (%s) != Administrators SID (%s).
\n
"
,
debugstr_sid
(
owner
),
debugstr_sid
(
admin_sid
));
ok
(
EqualSid
(
owner
,
admin_sid
)
||
EqualSid
(
owner
,
localsys_sid
),
"MACHINE
\\
Software owner SID (%s) != Administrators SID (%s) or Local System Sid (%s).
\n
"
,
debugstr_sid
(
owner
),
debugstr_sid
(
admin_sid
),
debugstr_sid
(
localsys_sid
));
bret
=
GetSecurityDescriptorGroup
(
pSD
,
&
group
,
&
group_defaulted
);
ok
(
bret
,
"GetSecurityDescriptorGroup failed with error %d
\n
"
,
GetLastError
());
...
...
@@ -4022,6 +4028,8 @@ static void test_GetNamedSecurityInfoA(void)
ok
(
ace
->
Mask
==
KEY_ALL_ACCESS
||
broken
(
ace
->
Mask
==
GENERIC_ALL
)
/* w2k8 */
,
"Builtin Admins ACE has unexpected mask (0x%x != 0x%x)
\n
"
,
ace
->
Mask
,
KEY_ALL_ACCESS
);
}
FreeSid
(
localsys_sid
);
LocalFree
(
pSD
);
}
...
...
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