diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c index b29ab1363c1..333de3d14cf 100644 --- a/dlls/rpcrt4/rpc_binding.c +++ b/dlls/rpcrt4/rpc_binding.c @@ -1404,7 +1404,8 @@ RpcBindingSetAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName, return RPC_S_UNKNOWN_AUTHN_LEVEL; } - if (AuthzSvr) + /* RPC_C_AUTHN_WINNT ignores the AuthzSvr parameter */ + if (AuthzSvr && AuthnSvc != RPC_C_AUTHN_WINNT) { FIXME("unsupported AuthzSvr %u\n", AuthzSvr); return RPC_S_UNKNOWN_AUTHZ_SERVICE; @@ -1533,7 +1534,8 @@ RpcBindingSetAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName, return RPC_S_UNKNOWN_AUTHN_LEVEL; } - if (AuthzSvr) + /* RPC_C_AUTHN_WINNT ignores the AuthzSvr parameter */ + if (AuthzSvr && AuthnSvc != RPC_C_AUTHN_WINNT) { FIXME("unsupported AuthzSvr %u\n", AuthzSvr); return RPC_S_UNKNOWN_AUTHZ_SERVICE; diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c index 035cde7bd89..4b34d121c40 100644 --- a/dlls/rpcrt4/tests/rpc.c +++ b/dlls/rpcrt4/tests/rpc.c @@ -260,6 +260,10 @@ todo_wine { ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", status); + status = RpcBindingSetAuthInfo(IFoo_IfHandle, NULL, RPC_C_AUTHN_LEVEL_NONE, + RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME); + ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%lu)\n", status); + status = RpcMgmtStopServerListening(NULL); ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%lu)\n", status); diff --git a/include/rpcdce.h b/include/rpcdce.h index 0212c4c3735..6bc656121d0 100644 --- a/include/rpcdce.h +++ b/include/rpcdce.h @@ -139,6 +139,11 @@ typedef I_RPC_HANDLE *RPC_EP_INQ_HANDLE; #define RPC_C_AUTHN_MQ 100 #define RPC_C_AUTHN_DEFAULT 0xffffffff +#define RPC_C_AUTHZ_NONE 0 +#define RPC_C_AUTHZ_NAME 1 +#define RPC_C_AUTHZ_DCE 2 +#define RPC_C_AUTHZ_DEFAULT 0xffffffff + /* values for RPC_SECURITY_QOS*::ImpersonationType */ #define RPC_C_IMP_LEVEL_DEFAULT 0 #define RPC_C_IMP_LEVEL_ANONYMOUS 1