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
b503bcf6
Commit
b503bcf6
authored
Jan 22, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Jan 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Implement LookupAccountNameW for well-known groups.
parent
28cabdfe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
security.c
dlls/advapi32/security.c
+13
-0
security.c
dlls/advapi32/tests/security.c
+4
-9
No files found.
dlls/advapi32/security.c
View file @
b503bcf6
...
@@ -2478,10 +2478,23 @@ BOOL WINAPI LookupAccountNameW( LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSI
...
@@ -2478,10 +2478,23 @@ BOOL WINAPI LookupAccountNameW( LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSI
BOOL
ret
;
BOOL
ret
;
PSID
pSid
;
PSID
pSid
;
static
const
WCHAR
dm
[]
=
{
'D'
,
'O'
,
'M'
,
'A'
,
'I'
,
'N'
,
0
};
static
const
WCHAR
dm
[]
=
{
'D'
,
'O'
,
'M'
,
'A'
,
'I'
,
'N'
,
0
};
unsigned
int
i
;
FIXME
(
"%s %s %p %p %p %p %p - stub
\n
"
,
debugstr_w
(
lpSystemName
),
debugstr_w
(
lpAccountName
),
FIXME
(
"%s %s %p %p %p %p %p - stub
\n
"
,
debugstr_w
(
lpSystemName
),
debugstr_w
(
lpAccountName
),
Sid
,
cbSid
,
ReferencedDomainName
,
cchReferencedDomainName
,
peUse
);
Sid
,
cbSid
,
ReferencedDomainName
,
cchReferencedDomainName
,
peUse
);
for
(
i
=
0
;
i
<
(
sizeof
(
ACCOUNT_SIDS
)
/
sizeof
(
ACCOUNT_SIDS
[
0
]));
i
++
)
{
if
(
!
strcmpW
(
lpAccountName
,
ACCOUNT_SIDS
[
i
].
account
))
{
if
(
*
cchReferencedDomainName
)
*
ReferencedDomainName
=
'\0'
;
*
cchReferencedDomainName
=
0
;
*
peUse
=
SidTypeWellKnownGroup
;
return
CreateWellKnownSid
(
ACCOUNT_SIDS
[
i
].
type
,
NULL
,
Sid
,
cbSid
);
}
}
ret
=
AllocateAndInitializeSid
(
&
identifierAuthority
,
ret
=
AllocateAndInitializeSid
(
&
identifierAuthority
,
2
,
2
,
SECURITY_BUILTIN_DOMAIN_RID
,
SECURITY_BUILTIN_DOMAIN_RID
,
...
...
dlls/advapi32/tests/security.c
View file @
b503bcf6
...
@@ -1547,14 +1547,13 @@ static void test_LookupAccountName(void)
...
@@ -1547,14 +1547,13 @@ static void test_LookupAccountName(void)
get_sid_info
(
psid
,
&
account
,
&
sid_dom
);
get_sid_info
(
psid
,
&
account
,
&
sid_dom
);
ok
(
ret
,
"Failed to lookup account name
\n
"
);
ok
(
ret
,
"Failed to lookup account name
\n
"
);
ok
(
sid_size
!=
0
,
"sid_size was zero
\n
"
);
ok
(
sid_size
!=
0
,
"sid_size was zero
\n
"
);
ok
(
!
lstrcmp
(
account
,
"Everyone"
),
"Expected Everyone, got %s
\n
"
,
account
);
todo_wine
todo_wine
{
ok
(
!
lstrcmp
(
account
,
"Everyone"
),
"Expected %s, got %s
\n
"
,
user_name
,
account
);
ok
(
!
lstrcmp
(
domain
,
sid_dom
),
"Expected %s, got %s
\n
"
,
sid_dom
,
domain
);
ok
(
!
lstrcmp
(
domain
,
sid_dom
),
"Expected %s, got %s
\n
"
,
sid_dom
,
domain
);
ok
(
domain_size
==
0
,
"Expected %d, got %d
\n
"
,
domain_save
-
1
,
domain_size
);
ok
(
domain_size
==
0
,
"Expected 0, got %d
\n
"
,
domain_size
);
ok
(
lstrlen
(
domain
)
==
domain_size
,
"Expected %d
\n
"
,
lstrlen
(
domain
));
todo_wine
ok
(
lstrlen
(
domain
)
==
domain_size
,
"Expected %d, got %d
\n
"
,
lstrlen
(
domain
),
domain_size
);
ok
(
sid_use
==
SidTypeWellKnownGroup
,
"Expected SidTypeUser, got %d
\n
"
,
sid_use
);
ok
(
sid_use
==
SidTypeWellKnownGroup
,
"Expected SidTypeUser, got %d
\n
"
,
sid_use
);
}
domain_size
=
domain_save
;
domain_size
=
domain_save
;
/* NULL Sid with zero sid size */
/* NULL Sid with zero sid size */
...
@@ -2048,9 +2047,7 @@ static void test_SetEntriesInAcl(void)
...
@@ -2048,9 +2047,7 @@ static void test_SetEntriesInAcl(void)
ExplicitAccess
.
Trustee
.
TrusteeForm
=
TRUSTEE_IS_USER
;
ExplicitAccess
.
Trustee
.
TrusteeForm
=
TRUSTEE_IS_USER
;
ExplicitAccess
.
Trustee
.
ptstrName
=
(
LPWSTR
)
wszEveryone
;
ExplicitAccess
.
Trustee
.
ptstrName
=
(
LPWSTR
)
wszEveryone
;
res
=
pSetEntriesInAclW
(
1
,
&
ExplicitAccess
,
OldAcl
,
&
NewAcl
);
res
=
pSetEntriesInAclW
(
1
,
&
ExplicitAccess
,
OldAcl
,
&
NewAcl
);
todo_wine
ok
(
res
==
ERROR_SUCCESS
,
"SetEntriesInAclW failed: %u
\n
"
,
res
);
ok
(
res
==
ERROR_SUCCESS
,
"SetEntriesInAclW failed: %u
\n
"
,
res
);
todo_wine
ok
(
NewAcl
!=
NULL
,
"returned acl was NULL
\n
"
);
ok
(
NewAcl
!=
NULL
,
"returned acl was NULL
\n
"
);
LocalFree
(
NewAcl
);
LocalFree
(
NewAcl
);
...
@@ -2070,9 +2067,7 @@ static void test_SetEntriesInAcl(void)
...
@@ -2070,9 +2067,7 @@ static void test_SetEntriesInAcl(void)
ExplicitAccess
.
Trustee
.
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
ExplicitAccess
.
Trustee
.
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
ExplicitAccess
.
grfAccessMode
=
SET_ACCESS
;
ExplicitAccess
.
grfAccessMode
=
SET_ACCESS
;
res
=
pSetEntriesInAclW
(
1
,
&
ExplicitAccess
,
OldAcl
,
&
NewAcl
);
res
=
pSetEntriesInAclW
(
1
,
&
ExplicitAccess
,
OldAcl
,
&
NewAcl
);
todo_wine
ok
(
res
==
ERROR_SUCCESS
,
"SetEntriesInAclW failed: %u
\n
"
,
res
);
ok
(
res
==
ERROR_SUCCESS
,
"SetEntriesInAclW failed: %u
\n
"
,
res
);
todo_wine
ok
(
NewAcl
!=
NULL
,
"returned acl was NULL
\n
"
);
ok
(
NewAcl
!=
NULL
,
"returned acl was NULL
\n
"
);
LocalFree
(
NewAcl
);
LocalFree
(
NewAcl
);
...
...
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