94 for (
i = 0;
i < addrs->count;
i++) {
127 eprintf(
"create_rpc_auth_client: unknown rpcsec flavor %d\n",
133 eprintf(
"nfs41_rpc_clnt_create: failed to create %s\n",
137 dprintf(1,
"nfs41_rpc_clnt_create: successfully created %s\n",
176 goto out_free_rpc_clnt;
182 goto out_free_rpc_cond;
186 eprintf(
"nfs41_rpc_clnt_create: send_null failed\n");
193 if (
gethostname(machname,
sizeof(machname)) == -1) {
194 eprintf(
"nfs41_rpc_clnt_create: gethostname failed\n");
197 machname[
sizeof(machname) - 1] =
'\0';
200 eprintf(
"nfs41_rpc_clnt_create: failed to create rpc authsys\n");
207 eprintf(
"nfs41_rpc_clnt_create: failed to establish security "
212 dprintf(1,
"nfs41_rpc_clnt_create: successfully created %s\n",
257 dprintf(1,
"nfs41_rpc_renew_in_progress: setting value %d\n", *
value);
263 dprintf(1,
"nfs41_rpc_renew_in_progress: returning value %d\n",
status);
294 client->cl_auth = rpc->rpc->cl_auth;
299 eprintf(
"Failed to reestablish security context\n");
305 eprintf(
"rpc_reconnect: send_null failed\n");
312 rpc->addr_index = addr_index;
314 dprintf(1,
"nfs41_send_compound: reestablished RPC connection\n");
322 rpc->client && rpc->client->session) {
326 eprintf(
"nfs41_bind_conn_to_session() failed with %s\n",
357 eprintf(
"clnt_call returned rpc_status = %s\n",
364 if (++
count > 3 || !rpc->is_valid_session) {
373 dprintf(1,
"rpc_renew_in_progress: WaitForSingleObject failed\n");
386 rpc->server_name, rpc->rpc);
389 eprintf(
"Failed to reestablish security context\n");
395 eprintf(
"rpc_reconnect: Failed to reconnect!\n");
399 eprintf(
"UNHANDLED RPC_ERROR: %d\n", rpc_status);
AUTH * authsspi_create_default(CLIENT *clnt, char *service, int svc)
@ RPCSEC_SSPI_SVC_INTEGRITY
@ RPCSEC_SSPI_SVC_PRIVACY
int nfs41_handle_callback(void *rpc_clnt, void *cb, struct cb_compound_res **reply)
bool_t proc_cb_compound_res(XDR *xdr, struct cb_compound_res *res)
#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs)
CLIENT * clnt_tli_create(const SOCKET fd_in, const struct netconfig *nconf, struct netbuf *svcaddr, const rpcprog_t prog, const rpcvers_t vers, const uint sendsz, const uint recvsz, int(*callback_xdr)(void *, void *), int(*callback_function)(void *, void *, void **), void *callback_args)
void clnt_pcreateerror(char *s) const
const char * secflavorop2name(DWORD sec_flavor)
void eprintf(LPCSTR format,...)
const char * nfs_error_string(int status)
const char * rpc_error_string(int status)
void print_condwait_status(int level, int status)
#define auth_destroy(auth)
#define authsys_create(c, i1, i2, i3, ip)
static const WCHAR version[]
VOID WINAPI ReleaseSRWLockShared(PSRWLOCK Lock)
VOID WINAPI AcquireSRWLockExclusive(PSRWLOCK Lock)
VOID WINAPI AcquireSRWLockShared(PSRWLOCK Lock)
VOID WINAPI ReleaseSRWLockExclusive(PSRWLOCK Lock)
VOID WINAPI InitializeSRWLock(PSRWLOCK Lock)
void freenetconfigent(struct netconfig *netconfigp)
struct netconfig * getnetconfigent(char *netid) const
INT WSAAPI gethostname(OUT char FAR *name, IN INT namelen)
GLuint GLuint GLsizei count
GLenum const GLvoid * addr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
#define NFS41_RPC_PROGRAM
#define NFS41_RPC_VERSION
enum nfsstat4 nfs41_bind_conn_to_session(IN nfs41_rpc_clnt *rpc, IN const unsigned char *sessionid, IN enum channel_dir_from_client4 dir)
static bool_t rpc_renew_in_progress(nfs41_rpc_clnt *rpc, int *value)
int nfs41_send_compound(IN nfs41_rpc_clnt *rpc, IN char *inbuf, OUT char *outbuf)
int nfs41_rpc_clnt_create(IN const multi_addr4 *addrs, IN uint32_t wsize, IN uint32_t rsize, IN uint32_t uid, IN uint32_t gid, IN uint32_t sec_flavor, OUT nfs41_rpc_clnt **rpc_out)
static int get_client_for_netaddr(IN const netaddr4 *netaddr, IN uint32_t wsize, IN uint32_t rsize, IN nfs41_rpc_clnt *rpc, OUT OPTIONAL char *server_name, OUT CLIENT **client_out)
static int rpc_reconnect(IN nfs41_rpc_clnt *rpc)
static int get_client_for_multi_addr(IN const multi_addr4 *addrs, IN uint32_t wsize, IN uint32_t rsize, IN nfs41_rpc_clnt *rpc, OUT OPTIONAL char *server_name, OUT CLIENT **client_out, OUT uint32_t *addr_index)
static enum clnt_stat send_null(CLIENT *client)
static bool_t rpc_should_retry(nfs41_rpc_clnt *rpc, uint32_t version)
int create_rpcsec_auth_client(IN uint32_t sec_flavor, IN char *server_name, CLIENT *client)
void nfs41_rpc_clnt_free(IN nfs41_rpc_clnt *rpc)
bool_t nfs_encode_compound(XDR *xdr, caddr_t *pargs)
bool_t nfs_decode_compound(XDR *xdr, caddr_t *pres)
void freenetbuf(struct netbuf *nbuf)
struct netbuf * uaddr2taddr(const struct netconfig *nconf, const char *uaddr)
PULONG MinorVersion OPTIONAL
struct __rpc_client * rpc
char server_name[NI_MAXHOST]
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
DWORD WINAPI GetLastError(void)
#define ERROR_NETWORK_UNREACHABLE
#define ERROR_LOCK_VIOLATION
bool_t(* xdrproc_t)(XDR *,...)