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
e27ae38f
Commit
e27ae38f
authored
Aug 19, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix BuildTrusteeWithSid, implement and test BuildTrusteeWithName.
parent
cc3af243
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
7 deletions
+45
-7
advapi32.spec
dlls/advapi32/advapi32.spec
+2
-2
security.c
dlls/advapi32/security.c
+30
-4
security.c
dlls/advapi32/tests/security.c
+13
-1
No files found.
dlls/advapi32/advapi32.spec
View file @
e27ae38f
...
...
@@ -20,8 +20,8 @@
@ stdcall BackupEventLogW (long wstr)
@ stub BuildExplicitAccessWithNameA
@ stub BuildExplicitAccessWithNameW
@ st
ub BuildTrusteeWithNameA #
(ptr str)
@ st
ub BuildTrusteeWithNameW #
(ptr wstr)
@ st
dcall BuildTrusteeWithNameA
(ptr str)
@ st
dcall BuildTrusteeWithNameW
(ptr wstr)
@ stub BuildTrusteeWithObjectsAndNameA # (ptr ptr long str str str)
@ stub BuildTrusteeWithObjectsAndNameW # (ptr ptr long wstr wstr wstr)
@ stub BuildTrusteeWithObjectsAndSidA # (ptr ptr ptr ptr ptr)
...
...
dlls/advapi32/security.c
View file @
e27ae38f
...
...
@@ -1519,8 +1519,7 @@ VOID WINAPI BuildTrusteeWithSidA(PTRUSTEEA pTrustee, PSID pSid)
pTrustee
->
pMultipleTrustee
=
NULL
;
pTrustee
->
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
TrusteeForm
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
TrusteeForm
=
TRUSTEE_IS_SID
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
ptstrName
=
(
LPSTR
)
pSid
;
}
...
...
@@ -1534,13 +1533,40 @@ VOID WINAPI BuildTrusteeWithSidW(PTRUSTEEW pTrustee, PSID pSid)
pTrustee
->
pMultipleTrustee
=
NULL
;
pTrustee
->
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
TrusteeForm
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
TrusteeForm
=
TRUSTEE_IS_SID
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
ptstrName
=
(
LPWSTR
)
pSid
;
}
/******************************************************************************
* BuildTrusteeWithNameA [ADVAPI32.@]
*/
VOID
WINAPI
BuildTrusteeWithNameA
(
PTRUSTEEA
pTrustee
,
LPSTR
name
)
{
TRACE
(
"%p %s
\n
"
,
pTrustee
,
debugstr_a
(
name
)
);
pTrustee
->
pMultipleTrustee
=
NULL
;
pTrustee
->
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
TrusteeForm
=
TRUSTEE_IS_NAME
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
ptstrName
=
name
;
}
/******************************************************************************
* BuildTrusteeWithNameW [ADVAPI32.@]
*/
VOID
WINAPI
BuildTrusteeWithNameW
(
PTRUSTEEW
pTrustee
,
LPWSTR
name
)
{
TRACE
(
"%p %s
\n
"
,
pTrustee
,
debugstr_w
(
name
)
);
pTrustee
->
pMultipleTrustee
=
NULL
;
pTrustee
->
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
TrusteeForm
=
TRUSTEE_IS_NAME
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
ptstrName
=
name
;
}
/******************************************************************************
* SetEntriesInAclA [ADVAPI32.@]
*/
DWORD
WINAPI
SetEntriesInAclA
(
ULONG
count
,
PEXPLICIT_ACCESSA
pEntries
,
...
...
dlls/advapi32/tests/security.c
View file @
e27ae38f
...
...
@@ -62,6 +62,7 @@ void test_trustee()
TRUSTEE
trustee
;
PSID
psid
;
DWORD
r
;
LPSTR
str
=
"2jjj"
;
SID_IDENTIFIER_AUTHORITY
auth
=
{
{
0x11
,
0x22
,
0
,
0
,
0
,
0
}
};
...
...
@@ -78,8 +79,19 @@ void test_trustee()
ok
(
trustee
.
TrusteeType
==
TRUSTEE_IS_UNKNOWN
,
"TrusteeType wrong
\n
"
);
ok
(
trustee
.
ptstrName
==
(
LPSTR
)
psid
,
"ptstrName wrong
\n
"
);
FreeSid
(
psid
);
}
/* test BuildTrusteeWithNameA */
memset
(
&
trustee
,
0xff
,
sizeof
trustee
);
BuildTrusteeWithNameA
(
&
trustee
,
str
);
ok
(
trustee
.
pMultipleTrustee
==
NULL
,
"pMultipleTrustee wrong
\n
"
);
ok
(
trustee
.
MultipleTrusteeOperation
==
NO_MULTIPLE_TRUSTEE
,
"MultipleTrusteeOperation wrong
\n
"
);
ok
(
trustee
.
TrusteeForm
==
TRUSTEE_IS_NAME
,
"TrusteeForm wrong
\n
"
);
ok
(
trustee
.
TrusteeType
==
TRUSTEE_IS_UNKNOWN
,
"TrusteeType wrong
\n
"
);
ok
(
trustee
.
ptstrName
==
str
,
"ptstrName wrong
\n
"
);
}
START_TEST
(
security
)
{
test_sid
();
...
...
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