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
da05dfd1
Commit
da05dfd1
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: Store security package name in rpc_server_registered_auth_info.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b3d12a16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
rpc_server.c
dlls/rpcrt4/rpc_server.c
+13
-10
No files found.
dlls/rpcrt4/rpc_server.c
View file @
da05dfd1
...
...
@@ -1312,9 +1312,10 @@ struct rpc_server_registered_auth_info
TimeStamp
exp
;
BOOL
cred_acquired
;
CredHandle
cred
;
ULONG
max_token
;
USHORT
auth_type
;
WCHAR
*
package_name
;
WCHAR
*
principal
;
ULONG
max_token
;
};
static
RPC_STATUS
find_security_package
(
ULONG
auth_type
,
SecPkgInfoW
**
packages_buf
,
SecPkgInfoW
**
ret
)
...
...
@@ -1361,17 +1362,11 @@ RPC_STATUS RPCRT4_ServerGetRegisteredAuthInfo(
{
if
(
!
auth_info
->
cred_acquired
)
{
SecPkgInfoW
*
packages
,
*
package
;
SECURITY_STATUS
sec_status
;
status
=
find_security_package
(
auth_info
->
auth_type
,
&
packages
,
&
package
);
if
(
status
!=
RPC_S_OK
)
break
;
sec_status
=
AcquireCredentialsHandleW
((
SEC_WCHAR
*
)
auth_info
->
principal
,
package
->
Name
,
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
);
FreeContextBuffer
(
packages
);
if
(
sec_status
!=
SEC_E_OK
)
{
status
=
RPC_S_SEC_PKG_ERROR
;
...
...
@@ -1437,6 +1432,7 @@ RPC_STATUS WINAPI RpcServerRegisterAuthInfoW( RPC_WSTR ServerPrincName, ULONG Au
{
struct
rpc_server_registered_auth_info
*
auth_info
;
SecPkgInfoW
*
packages
,
*
package
;
WCHAR
*
package_name
;
ULONG
max_token
;
RPC_STATUS
status
;
...
...
@@ -1446,20 +1442,27 @@ RPC_STATUS WINAPI RpcServerRegisterAuthInfoW( RPC_WSTR ServerPrincName, ULONG Au
if
(
status
!=
RPC_S_OK
)
return
status
;
package_name
=
RPCRT4_strdupW
(
package
->
Name
);
max_token
=
package
->
cbMaxToken
;
FreeContextBuffer
(
packages
);
if
(
!
package_name
)
return
RPC_S_OUT_OF_RESOURCES
;
auth_info
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
auth_info
));
if
(
!
auth_info
)
if
(
!
auth_info
)
{
HeapFree
(
GetProcessHeap
(),
0
,
package_name
);
return
RPC_S_OUT_OF_RESOURCES
;
}
if
(
ServerPrincName
&&
!
(
auth_info
->
principal
=
RPCRT4_strdupW
(
ServerPrincName
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
package_name
);
HeapFree
(
GetProcessHeap
(),
0
,
auth_info
);
return
RPC_S_OUT_OF_RESOURCES
;
}
auth_info
->
max_token
=
max_token
;
auth_info
->
auth_type
=
AuthnSvc
;
auth_info
->
package_name
=
package_name
;
auth_info
->
max_token
=
max_token
;
EnterCriticalSection
(
&
server_auth_info_cs
);
list_add_tail
(
&
server_registered_auth_info
,
&
auth_info
->
entry
);
...
...
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