aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4callback.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r--fs/nfsd/nfs4callback.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 094747a1227c..6d7d8c02c197 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -358,6 +358,7 @@ static struct rpc_program cb_program = {
358 .nrvers = ARRAY_SIZE(nfs_cb_version), 358 .nrvers = ARRAY_SIZE(nfs_cb_version),
359 .version = nfs_cb_version, 359 .version = nfs_cb_version,
360 .stats = &cb_stats, 360 .stats = &cb_stats,
361 .pipe_dir_name = "/nfsd4_cb",
361}; 362};
362 363
363/* Reference counting, callback cleanup, etc., all look racy as heck. 364/* Reference counting, callback cleanup, etc., all look racy as heck.
@@ -382,8 +383,9 @@ static int do_probe_callback(void *data)
382 .program = &cb_program, 383 .program = &cb_program,
383 .prognumber = cb->cb_prog, 384 .prognumber = cb->cb_prog,
384 .version = nfs_cb_version[1]->number, 385 .version = nfs_cb_version[1]->number,
385 .authflavor = RPC_AUTH_UNIX, /* XXX: need AUTH_GSS... */ 386 .authflavor = clp->cl_flavor,
386 .flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET), 387 .flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET),
388 .client_name = clp->cl_principal,
387 }; 389 };
388 struct rpc_message msg = { 390 struct rpc_message msg = {
389 .rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL], 391 .rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL],
@@ -392,6 +394,11 @@ static int do_probe_callback(void *data)
392 struct rpc_clnt *client; 394 struct rpc_clnt *client;
393 int status; 395 int status;
394 396
397 if (!clp->cl_principal && (clp->cl_flavor >= RPC_AUTH_GSS_KRB5)) {
398 status = nfserr_cb_path_down;
399 goto out_err;
400 }
401
395 /* Initialize address */ 402 /* Initialize address */
396 memset(&addr, 0, sizeof(addr)); 403 memset(&addr, 0, sizeof(addr));
397 addr.sin_family = AF_INET; 404 addr.sin_family = AF_INET;