diff options
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 094747a1227c..c464181b5994 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -53,9 +53,6 @@ | |||
53 | #define NFSPROC4_CB_NULL 0 | 53 | #define NFSPROC4_CB_NULL 0 |
54 | #define NFSPROC4_CB_COMPOUND 1 | 54 | #define NFSPROC4_CB_COMPOUND 1 |
55 | 55 | ||
56 | /* declarations */ | ||
57 | static const struct rpc_call_ops nfs4_cb_null_ops; | ||
58 | |||
59 | /* Index of predefined Linux callback client operations */ | 56 | /* Index of predefined Linux callback client operations */ |
60 | 57 | ||
61 | enum { | 58 | enum { |
@@ -358,6 +355,7 @@ static struct rpc_program cb_program = { | |||
358 | .nrvers = ARRAY_SIZE(nfs_cb_version), | 355 | .nrvers = ARRAY_SIZE(nfs_cb_version), |
359 | .version = nfs_cb_version, | 356 | .version = nfs_cb_version, |
360 | .stats = &cb_stats, | 357 | .stats = &cb_stats, |
358 | .pipe_dir_name = "/nfsd4_cb", | ||
361 | }; | 359 | }; |
362 | 360 | ||
363 | /* Reference counting, callback cleanup, etc., all look racy as heck. | 361 | /* Reference counting, callback cleanup, etc., all look racy as heck. |
@@ -382,8 +380,9 @@ static int do_probe_callback(void *data) | |||
382 | .program = &cb_program, | 380 | .program = &cb_program, |
383 | .prognumber = cb->cb_prog, | 381 | .prognumber = cb->cb_prog, |
384 | .version = nfs_cb_version[1]->number, | 382 | .version = nfs_cb_version[1]->number, |
385 | .authflavor = RPC_AUTH_UNIX, /* XXX: need AUTH_GSS... */ | 383 | .authflavor = clp->cl_flavor, |
386 | .flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET), | 384 | .flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET), |
385 | .client_name = clp->cl_principal, | ||
387 | }; | 386 | }; |
388 | struct rpc_message msg = { | 387 | struct rpc_message msg = { |
389 | .rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL], | 388 | .rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL], |
@@ -392,6 +391,11 @@ static int do_probe_callback(void *data) | |||
392 | struct rpc_clnt *client; | 391 | struct rpc_clnt *client; |
393 | int status; | 392 | int status; |
394 | 393 | ||
394 | if (!clp->cl_principal && (clp->cl_flavor >= RPC_AUTH_GSS_KRB5)) { | ||
395 | status = nfserr_cb_path_down; | ||
396 | goto out_err; | ||
397 | } | ||
398 | |||
395 | /* Initialize address */ | 399 | /* Initialize address */ |
396 | memset(&addr, 0, sizeof(addr)); | 400 | memset(&addr, 0, sizeof(addr)); |
397 | addr.sin_family = AF_INET; | 401 | addr.sin_family = AF_INET; |