Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c32cd111
Commit
c32cd111
authored
Nov 30, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 30, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Acquire new credential handle for each connection.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
da05dfd1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
20 deletions
+11
-20
rpc_message.c
dlls/rpcrt4/rpc_message.c
+3
-0
rpc_server.c
dlls/rpcrt4/rpc_server.c
+8
-20
No files found.
dlls/rpcrt4/rpc_message.c
View file @
c32cd111
...
...
@@ -1063,7 +1063,10 @@ RPC_STATUS RPCRT4_ServerConnectionAuth(RpcConnection* conn,
auth_data_in
->
auth_type
,
cred
,
exp
,
max_token
,
NULL
,
&
conn
->
AuthInfo
);
if
(
status
!=
RPC_S_OK
)
{
FreeCredentialsHandle
(
&
cred
);
return
status
;
}
/* FIXME: should auth_data_in->auth_context_id be checked in the !start case? */
conn
->
auth_context_id
=
auth_data_in
->
auth_context_id
;
...
...
dlls/rpcrt4/rpc_server.c
View file @
c32cd111
...
...
@@ -1309,9 +1309,6 @@ RPC_STATUS WINAPI RpcObjectSetType( UUID* ObjUuid, UUID* TypeUuid )
struct
rpc_server_registered_auth_info
{
struct
list
entry
;
TimeStamp
exp
;
BOOL
cred_acquired
;
CredHandle
cred
;
USHORT
auth_type
;
WCHAR
*
package_name
;
WCHAR
*
principal
;
...
...
@@ -1354,30 +1351,22 @@ RPC_STATUS RPCRT4_ServerGetRegisteredAuthInfo(
{
RPC_STATUS
status
=
RPC_S_UNKNOWN_AUTHN_SERVICE
;
struct
rpc_server_registered_auth_info
*
auth_info
;
SECURITY_STATUS
sec_status
;
EnterCriticalSection
(
&
server_auth_info_cs
);
LIST_FOR_EACH_ENTRY
(
auth_info
,
&
server_registered_auth_info
,
struct
rpc_server_registered_auth_info
,
entry
)
{
if
(
auth_info
->
auth_type
==
auth_type
)
{
if
(
!
auth_info
->
cred_acquired
)
sec_status
=
AcquireCredentialsHandleW
((
SEC_WCHAR
*
)
auth_info
->
principal
,
auth_info
->
package_name
,
SECPKG_CRED_INBOUND
,
NULL
,
NULL
,
NULL
,
NULL
,
cred
,
exp
);
if
(
sec_status
!=
SEC_E_OK
)
{
SECURITY_STATUS
sec_status
;
sec_status
=
AcquireCredentialsHandleW
((
SEC_WCHAR
*
)
auth_info
->
principal
,
auth_info
->
package_name
,
SECPKG_CRED_INBOUND
,
NULL
,
NULL
,
NULL
,
NULL
,
&
auth_info
->
cred
,
&
auth_info
->
exp
);
if
(
sec_status
!=
SEC_E_OK
)
{
status
=
RPC_S_SEC_PKG_ERROR
;
break
;
}
auth_info
->
cred_acquired
=
TRUE
;
status
=
RPC_S_SEC_PKG_ERROR
;
break
;
}
*
cred
=
auth_info
->
cred
;
*
exp
=
auth_info
->
exp
;
*
max_token
=
auth_info
->
max_token
;
status
=
RPC_S_OK
;
break
;
...
...
@@ -1395,8 +1384,7 @@ void RPCRT4_ServerFreeAllRegisteredAuthInfo(void)
EnterCriticalSection
(
&
server_auth_info_cs
);
LIST_FOR_EACH_ENTRY_SAFE
(
auth_info
,
cursor2
,
&
server_registered_auth_info
,
struct
rpc_server_registered_auth_info
,
entry
)
{
if
(
auth_info
->
cred_acquired
)
FreeCredentialsHandle
(
&
auth_info
->
cred
);
HeapFree
(
GetProcessHeap
(),
0
,
auth_info
->
package_name
);
HeapFree
(
GetProcessHeap
(),
0
,
auth_info
->
principal
);
HeapFree
(
GetProcessHeap
(),
0
,
auth_info
);
}
...
...
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