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
e00a0ea3
Commit
e00a0ea3
authored
Aug 09, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 09, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a test for ConvertSidToStringSidW.
parent
be303074
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
1 deletion
+64
-1
.cvsignore
dlls/advapi32/tests/.cvsignore
+1
-0
Makefile.in
dlls/advapi32/tests/Makefile.in
+2
-1
security.c
dlls/advapi32/tests/security.c
+61
-0
No files found.
dlls/advapi32/tests/.cvsignore
View file @
e00a0ea3
Makefile
crypt.ok
registry.ok
security.ok
testlist.c
dlls/advapi32/tests/Makefile.in
View file @
e00a0ea3
...
...
@@ -7,7 +7,8 @@ IMPORTS = advapi32 kernel32
CTESTS
=
\
crypt.c
\
registry.c
registry.c
\
security.c
@MAKE_TEST_RULES@
...
...
dlls/advapi32/tests/security.c
0 → 100644
View file @
e00a0ea3
/*
* Unit tests for security functions
*
* Copyright (c) 2004 Mike McCormack
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include "wine/test.h"
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
typedef
BOOL
(
WINAPI
*
fnConvertSidToStringSidA
)(
PSID
pSid
,
LPSTR
*
str
);
typedef
BOOL
(
WINAPI
*
fnConvertSidToStringSidW
)(
PSID
pSid
,
LPWSTR
*
str
);
fnConvertSidToStringSidW
pConvertSidToStringSidW
;
fnConvertSidToStringSidA
pConvertSidToStringSidA
;
void
test_sid
()
{
PSID
psid
;
LPWSTR
str
=
NULL
;
BOOL
r
;
SID_IDENTIFIER_AUTHORITY
auth
=
{
{
6
,
7
,
0x1a
,
0x15
,
0x0e
,
0x1f
}
};
WCHAR
refstr
[]
=
{
'S'
,
'-'
,
'1'
,
'-'
,
'1'
,
'A'
,
'1'
,
'5'
,
'6'
,
'E'
,
'7'
,
'F'
,
'-'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'-'
,
'0'
,
'-'
,
'4'
,
'2'
,
'9'
,
'4'
,
'9'
,
'6'
,
'7'
,
'2'
,
'9'
,
'5'
,
0
};
HMODULE
hmod
=
GetModuleHandle
(
"advapi32.dll"
);
pConvertSidToStringSidW
=
(
fnConvertSidToStringSidW
)
GetProcAddress
(
hmod
,
"ConvertSidToStringSidW"
);
if
(
!
pConvertSidToStringSidW
)
return
;
r
=
AllocateAndInitializeSid
(
&
auth
,
3
,
12345
,
0
,
-
1
,
0
,
0
,
0
,
0
,
0
,
&
psid
);
ok
(
r
,
"failed to allocate sid
\n
"
);
r
=
pConvertSidToStringSidW
(
psid
,
&
str
);
ok
(
r
,
"failed to convert sid
\n
"
);
ok
(
!
lstrcmpW
(
str
,
refstr
),
"incorrect sid
\n
"
);
LocalFree
(
str
);
}
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