Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
985646f0
Commit
985646f0
authored
20 years ago
by
Michael McCormack
Committed by
Alexandre Julliard
20 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Declaration, implemention and test for BuildTrusteeWithSid.
parent
7deab426
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/advapi32/security.c
+16
-2
16 additions, 2 deletions
dlls/advapi32/security.c
dlls/advapi32/tests/security.c
+26
-0
26 additions, 0 deletions
dlls/advapi32/tests/security.c
include/aclapi.h
+4
-0
4 additions, 0 deletions
include/aclapi.h
with
46 additions
and
2 deletions
dlls/advapi32/security.c
+
16
−
2
View file @
985646f0
...
...
@@ -1486,7 +1486,14 @@ DWORD WINAPI GetSecurityInfoExW(
*/
VOID
WINAPI
BuildTrusteeWithSidA
(
PTRUSTEEA
pTrustee
,
PSID
pSid
)
{
FIXME
(
"%p %p
\n
"
,
pTrustee
,
pSid
);
TRACE
(
"%p %p
\n
"
,
pTrustee
,
pSid
);
pTrustee
->
pMultipleTrustee
=
NULL
;
pTrustee
->
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
TrusteeForm
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
ptstrName
=
(
LPSTR
)
pSid
;
}
/******************************************************************************
...
...
@@ -1494,7 +1501,14 @@ VOID WINAPI BuildTrusteeWithSidA(PTRUSTEEA pTrustee, PSID pSid)
*/
VOID
WINAPI
BuildTrusteeWithSidW
(
PTRUSTEEW
pTrustee
,
PSID
pSid
)
{
FIXME
(
"%p %p
\n
"
,
pTrustee
,
pSid
);
TRACE
(
"%p %p
\n
"
,
pTrustee
,
pSid
);
pTrustee
->
pMultipleTrustee
=
NULL
;
pTrustee
->
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
TrusteeForm
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
ptstrName
=
(
LPWSTR
)
pSid
;
}
/******************************************************************************
...
...
This diff is collapsed.
Click to expand it.
dlls/advapi32/tests/security.c
+
26
−
0
View file @
985646f0
...
...
@@ -24,6 +24,7 @@
#include
"windef.h"
#include
"winbase.h"
#include
"winerror.h"
#include
"aclapi.h"
typedef
BOOL
(
WINAPI
*
fnConvertSidToStringSidA
)(
PSID
pSid
,
LPSTR
*
str
);
typedef
BOOL
(
WINAPI
*
fnConvertSidToStringSidW
)(
PSID
pSid
,
LPWSTR
*
str
);
...
...
@@ -53,9 +54,34 @@ void test_sid()
ok
(
r
,
"failed to convert sid
\n
"
);
ok
(
!
lstrcmpW
(
str
,
refstr
),
"incorrect sid
\n
"
);
LocalFree
(
str
);
FreeSid
(
psid
);
}
void
test_trustee
()
{
TRUSTEE
trustee
;
PSID
psid
;
DWORD
r
;
SID_IDENTIFIER_AUTHORITY
auth
=
{
{
0x11
,
0x22
,
0
,
0
,
0
,
0
}
};
r
=
AllocateAndInitializeSid
(
&
auth
,
1
,
42
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
&
psid
);
ok
(
r
,
"failed to init SID
\n
"
);
memset
(
&
trustee
,
0xff
,
sizeof
trustee
);
BuildTrusteeWithSidA
(
&
trustee
,
psid
);
ok
(
trustee
.
pMultipleTrustee
==
NULL
,
"pMultipleTrustee wrong
\n
"
);
ok
(
trustee
.
MultipleTrusteeOperation
==
NO_MULTIPLE_TRUSTEE
,
"MultipleTrusteeOperation wrong
\n
"
);
ok
(
trustee
.
TrusteeForm
==
TRUSTEE_IS_SID
,
"TrusteeForm wrong
\n
"
);
ok
(
trustee
.
TrusteeType
==
TRUSTEE_IS_UNKNOWN
,
"TrusteeType wrong
\n
"
);
ok
(
trustee
.
ptstrName
==
(
LPSTR
)
psid
,
"ptstrName wrong
\n
"
);
FreeSid
(
psid
);
}
START_TEST
(
security
)
{
test_sid
();
test_trustee
();
}
This diff is collapsed.
Click to expand it.
include/aclapi.h
+
4
−
0
View file @
985646f0
...
...
@@ -72,6 +72,10 @@ void BuildTrusteeWithObjectsAndSidW( PTRUSTEEW,
POBJECTS_AND_SID
,
GUID
*
,
GUID
*
,
PSID
);
#define BuildTrusteeWithObjectsAndSid WINELIB_NAME_AW(BuildTrusteeWithObjectsAndSid)
VOID
WINAPI
BuildTrusteeWithSidA
(
PTRUSTEEA
pTrustee
,
PSID
pSid
);
VOID
WINAPI
BuildTrusteeWithSidW
(
PTRUSTEEW
pTrustee
,
PSID
pSid
);
#define BuildTrusteeWithSid WINELIB_NAME_AW(BuildTrusteeWithSid)
#ifdef __cplusplus
}
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment