Print this page
1575 untangle libmlrpc ... pre2:
Get rid of ndr_rpc_server_{info,os}
*** 189,198 ****
--- 189,202 ----
ndr_rpc_release(netr_handle);
return (0);
}
+ uint32_t netr_server_auth2_flags =
+ NETR_NEGOTIATE_BASE_FLAGS |
+ NETR_NEGOTIATE_STRONGKEY_FLAG;
+
/*
* netr_server_authenticate2
*/
static int
netr_server_authenticate2(mlsvc_handle_t *netr_handle, netr_info_t *netr_info)
*** 214,227 ****
arg.servername = (unsigned char *)netr_info->server;
arg.account_name = (unsigned char *)account_name;
arg.account_type = NETR_WKSTA_TRUST_ACCOUNT_TYPE;
arg.hostname = (unsigned char *)netr_info->hostname;
! arg.negotiate_flags = NETR_NEGOTIATE_BASE_FLAGS;
! if (ndr_rpc_server_os(netr_handle) == NATIVE_OS_WIN2000) {
! arg.negotiate_flags |= NETR_NEGOTIATE_STRONGKEY_FLAG;
if (netr_gen_skey128(netr_info) != SMBAUTH_SUCCESS)
return (-1);
} else {
if (netr_gen_skey64(netr_info) != SMBAUTH_SUCCESS)
return (-1);
--- 218,230 ----
arg.servername = (unsigned char *)netr_info->server;
arg.account_name = (unsigned char *)account_name;
arg.account_type = NETR_WKSTA_TRUST_ACCOUNT_TYPE;
arg.hostname = (unsigned char *)netr_info->hostname;
! arg.negotiate_flags = netr_server_auth2_flags;
! if (arg.negotiate_flags & NETR_NEGOTIATE_STRONGKEY_FLAG) {
if (netr_gen_skey128(netr_info) != SMBAUTH_SUCCESS)
return (-1);
} else {
if (netr_gen_skey64(netr_info) != SMBAUTH_SUCCESS)
return (-1);