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
ffe01b33
Commit
ffe01b33
authored
Aug 29, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 30, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4/tests: Don't load GetUserNameEx dynamically.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d3cb5c24
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
31 deletions
+11
-31
Makefile.in
dlls/rpcrt4/tests/Makefile.in
+1
-1
rpc.c
dlls/rpcrt4/tests/rpc.c
+2
-9
server.c
dlls/rpcrt4/tests/server.c
+8
-21
No files found.
dlls/rpcrt4/tests/Makefile.in
View file @
ffe01b33
TESTDLL
=
rpcrt4.dll
IMPORTS
=
ole32 rpcrt4 advapi32
IMPORTS
=
ole32 rpcrt4
secur32
advapi32
EXTRAIDLFLAGS
=
--prefix-server
=
s_
C_SRCS
=
\
...
...
dlls/rpcrt4/tests/rpc.c
View file @
ffe01b33
...
...
@@ -862,19 +862,12 @@ static void test_RpcServerInqDefaultPrincName(void)
{
RPC_STATUS
ret
;
RPC_CSTR
principal
,
saved_principal
;
BOOLEAN
(
WINAPI
*
pGetUserNameExA
)(
EXTENDED_NAME_FORMAT
,
LPSTR
,
PULONG
);
char
*
username
;
ULONG
len
=
0
;
pGetUserNameExA
=
(
void
*
)
GetProcAddress
(
LoadLibraryA
(
"secur32.dll"
),
"GetUserNameExA"
);
if
(
!
pGetUserNameExA
)
{
win_skip
(
"GetUserNameExA not exported
\n
"
);
return
;
}
pGetUserNameExA
(
NameSamCompatible
,
NULL
,
&
len
);
GetUserNameExA
(
NameSamCompatible
,
NULL
,
&
len
);
username
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
p
GetUserNameExA
(
NameSamCompatible
,
username
,
&
len
);
GetUserNameExA
(
NameSamCompatible
,
username
,
&
len
);
ret
=
RpcServerInqDefaultPrincNameA
(
0
,
NULL
);
ok
(
ret
==
RPC_S_UNKNOWN_AUTHN_SERVICE
,
"got %u
\n
"
,
ret
);
...
...
dlls/rpcrt4/tests/server.c
View file @
ffe01b33
...
...
@@ -44,7 +44,6 @@ static void (WINAPI *pNDRSContextMarshall2)(RPC_BINDING_HANDLE, NDR_SCONTEXT, vo
static
NDR_SCONTEXT
(
WINAPI
*
pNDRSContextUnmarshall2
)(
RPC_BINDING_HANDLE
,
void
*
,
ULONG
,
void
*
,
ULONG
);
static
RPC_STATUS
(
WINAPI
*
pRpcServerRegisterIfEx
)(
RPC_IF_HANDLE
,
UUID
*
,
RPC_MGR_EPV
*
,
unsigned
int
,
unsigned
int
,
RPC_IF_CALLBACK_FN
*
);
static
BOOLEAN
(
WINAPI
*
pGetUserNameExA
)(
EXTENDED_NAME_FORMAT
,
LPSTR
,
PULONG
);
static
RPC_STATUS
(
WINAPI
*
pRpcBindingSetAuthInfoExA
)(
RPC_BINDING_HANDLE
,
RPC_CSTR
,
ULONG
,
ULONG
,
RPC_AUTH_IDENTITY_HANDLE
,
ULONG
,
RPC_SECURITY_QOS
*
);
static
RPC_STATUS
(
WINAPI
*
pRpcServerRegisterAuthInfoA
)(
RPC_CSTR
,
ULONG
,
RPC_AUTH_KEY_RETRIEVAL_FN
,
LPVOID
);
...
...
@@ -60,14 +59,12 @@ static const WCHAR worldW[] = { 'W','o','r','l','d','!',0 };
static
void
InitFunctionPointers
(
void
)
{
HMODULE
hrpcrt4
=
GetModuleHandleA
(
"rpcrt4.dll"
);
HMODULE
hsecur32
=
LoadLibraryA
(
"secur32.dll"
);
pNDRSContextMarshall2
=
(
void
*
)
GetProcAddress
(
hrpcrt4
,
"NDRSContextMarshall2"
);
pNDRSContextUnmarshall2
=
(
void
*
)
GetProcAddress
(
hrpcrt4
,
"NDRSContextUnmarshall2"
);
pRpcServerRegisterIfEx
=
(
void
*
)
GetProcAddress
(
hrpcrt4
,
"RpcServerRegisterIfEx"
);
pRpcBindingSetAuthInfoExA
=
(
void
*
)
GetProcAddress
(
hrpcrt4
,
"RpcBindingSetAuthInfoExA"
);
pRpcServerRegisterAuthInfoA
=
(
void
*
)
GetProcAddress
(
hrpcrt4
,
"RpcServerRegisterAuthInfoA"
);
pGetUserNameExA
=
(
void
*
)
GetProcAddress
(
hsecur32
,
"GetUserNameExA"
);
if
(
!
pNDRSContextMarshall2
)
old_windows_version
=
TRUE
;
}
...
...
@@ -1500,7 +1497,7 @@ void __cdecl s_authinfo_test(unsigned int protseq, int secure)
todo_wine
ok
(
principal
!=
NULL
,
"NULL principal
\n
"
);
}
if
(
protseq
==
RPC_PROTSEQ_LRPC
&&
principal
&&
pGetUserNameExA
)
if
(
protseq
==
RPC_PROTSEQ_LRPC
&&
principal
)
{
int
len
;
char
*
spn
;
...
...
@@ -1548,9 +1545,6 @@ set_auth_info(RPC_BINDING_HANDLE handle)
RPC_STATUS
status
;
RPC_SECURITY_QOS
qos
;
if
(
!
pGetUserNameExA
)
return
;
qos
.
Version
=
1
;
qos
.
Capabilities
=
RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH
;
qos
.
IdentityTracking
=
RPC_C_QOS_IDENTITY_STATIC
;
...
...
@@ -1709,11 +1703,9 @@ server(void)
if
(
ncalrpc_status
==
RPC_S_OK
)
{
run_client
(
"ncalrpc_basic"
);
if
(
pGetUserNameExA
)
{
/* we don't need to register RPC_C_AUTHN_WINNT for ncalrpc */
run_client
(
"ncalrpc_secure"
);
}
/* we don't need to register RPC_C_AUTHN_WINNT for ncalrpc */
run_client
(
"ncalrpc_secure"
);
}
else
skip
(
"lrpc tests skipped due to earlier failure
\n
"
);
...
...
@@ -1742,20 +1734,15 @@ server(void)
START_TEST
(
server
)
{
ULONG
size
=
0
;
int
argc
;
char
**
argv
;
InitFunctionPointers
();
if
(
pGetUserNameExA
)
{
ULONG
size
=
0
;
ok
(
!
pGetUserNameExA
(
NameSamCompatible
,
NULL
,
&
size
),
"GetUserNameExA
\n
"
);
domain_and_user
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
ok
(
pGetUserNameExA
(
NameSamCompatible
,
domain_and_user
,
&
size
),
"GetUserNameExA
\n
"
);
}
else
win_skip
(
"GetUserNameExA is needed for some authentication tests
\n
"
);
ok
(
!
GetUserNameExA
(
NameSamCompatible
,
NULL
,
&
size
),
"GetUserNameExA
\n
"
);
domain_and_user
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
ok
(
GetUserNameExA
(
NameSamCompatible
,
domain_and_user
,
&
size
),
"GetUserNameExA
\n
"
);
argc
=
winetest_get_mainargs
(
&
argv
);
progname
=
argv
[
0
];
...
...
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