turning callback off for krb5p
sspi requires strict ordering of messages. we can't have more than 1 outstanding rpc thus, hold the lock over send and receive and turn off callbacks.
This commit is contained in:
parent
67ae1eddaf
commit
47b0ccda9c
5 changed files with 26 additions and 10 deletions
|
|
@ -119,7 +119,7 @@
|
|||
<AdditionalOptions>/Wall /wd4100 /wd4127 /wd4255 /wd4574 /wd4619 /wd4668 /wd4710 /wd4711 /wd4820 %(AdditionalOptions)</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\sys;..\xdr;..\dll;..\libtirpc\tirpc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;STANDALONE_NFSD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;STANDALONE_NFSD;NO_CB_4_KRB5P;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@
|
|||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\libtirpc\tirpc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>INET6;FD_SETSIZE=128;PORTMAP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>INET6;FD_SETSIZE=128;PORTMAP;NO_CB_4_KRB5P;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
|
|
|||
|
|
@ -129,6 +129,10 @@ int nfs41_rpc_clnt_create(
|
|||
status = GetLastError();
|
||||
goto out;
|
||||
}
|
||||
#ifdef NO_CB_4_KRB5P
|
||||
if (sec_flavor == RPCSEC_AUTHGSS_KRB5P)
|
||||
needcb = 0;
|
||||
#endif
|
||||
rpc->needcb = needcb;
|
||||
rpc->cond = CreateEvent(NULL, TRUE, FALSE, "rpc_recovery_cond");
|
||||
if (rpc->cond == NULL) {
|
||||
|
|
|
|||
|
|
@ -279,8 +279,13 @@ int nfs41_session_create(
|
|||
}
|
||||
|
||||
AcquireSRWLockShared(&client->exid_lock);
|
||||
#ifdef NO_CB_4_KRB5P
|
||||
if ((client->roles & (EXCHGID4_FLAG_USE_PNFS_MDS |
|
||||
EXCHGID4_FLAG_USE_NON_PNFS)) && client->rpc->needcb)
|
||||
#else
|
||||
if (client->roles & (EXCHGID4_FLAG_USE_PNFS_MDS |
|
||||
EXCHGID4_FLAG_USE_NON_PNFS))
|
||||
#endif
|
||||
session->flags |= CREATE_SESSION4_FLAG_CONN_BACK_CHAN;
|
||||
ReleaseSRWLockShared(&client->exid_lock);
|
||||
|
||||
|
|
|
|||
|
|
@ -549,19 +549,26 @@ call_again:
|
|||
return(ct->ct_error.re_status);
|
||||
}
|
||||
|
||||
release_fd_lock(ct->ct_fd, mask);
|
||||
#ifdef NO_CB_4_KRB5P
|
||||
if (cl->cb_thread != INVALID_HANDLE_VALUE)
|
||||
release_fd_lock(ct->ct_fd, mask);
|
||||
#endif
|
||||
/*
|
||||
* Keep receiving until we get a valid transaction id
|
||||
*/
|
||||
|
||||
while (TRUE) {
|
||||
mutex_lock(&clnt_fd_lock);
|
||||
while ((vc_fd_locks[WINSOCK_HANDLE_HASH(ct->ct_fd)] &&
|
||||
vc_fd_locks[WINSOCK_HANDLE_HASH(ct->ct_fd)] != GetCurrentThreadId()) ||
|
||||
(ct->reply_msg.rm_xid && ct->reply_msg.rm_xid != x_id))
|
||||
cond_wait(&vc_cv[WINSOCK_HANDLE_HASH(ct->ct_fd)], &clnt_fd_lock);
|
||||
vc_fd_locks[WINSOCK_HANDLE_HASH(ct->ct_fd)] = GetCurrentThreadId();
|
||||
mutex_unlock(&clnt_fd_lock);
|
||||
#ifdef NO_CB_4_KRB5P
|
||||
if (cl->cb_thread != INVALID_HANDLE_VALUE) {
|
||||
mutex_lock(&clnt_fd_lock);
|
||||
while ((vc_fd_locks[WINSOCK_HANDLE_HASH(ct->ct_fd)] &&
|
||||
vc_fd_locks[WINSOCK_HANDLE_HASH(ct->ct_fd)] != GetCurrentThreadId()) ||
|
||||
(ct->reply_msg.rm_xid && ct->reply_msg.rm_xid != x_id))
|
||||
cond_wait(&vc_cv[WINSOCK_HANDLE_HASH(ct->ct_fd)], &clnt_fd_lock);
|
||||
vc_fd_locks[WINSOCK_HANDLE_HASH(ct->ct_fd)] = GetCurrentThreadId();
|
||||
mutex_unlock(&clnt_fd_lock);
|
||||
}
|
||||
#endif
|
||||
|
||||
xdrs->x_op = XDR_DECODE;
|
||||
ct->reply_msg.acpted_rply.ar_verf = _null_auth;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue