Skip to content

Commit

Permalink
gss:spkm3 miss returning error to caller when import security context
Browse files Browse the repository at this point in the history
spkm3 miss returning error to up layer when import security context,
it may be return ok though it has failed to import security context.

Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Bian Naimeng authored and Trond Myklebust committed Sep 12, 2010
1 parent ce8477e commit 651b293
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/sunrpc/auth_gss/gss_spkm3_mech.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ gss_import_sec_context_spkm3(const void *p, size_t len,
if (version != 1) {
dprintk("RPC: unknown spkm3 token format: "
"obsolete nfs-utils?\n");
p = ERR_PTR(-EINVAL);
goto out_err_free_ctx;
}

Expand Down Expand Up @@ -135,8 +136,10 @@ gss_import_sec_context_spkm3(const void *p, size_t len,
if (IS_ERR(p))
goto out_err_free_intg_alg;

if (p != end)
if (p != end) {
p = ERR_PTR(-EFAULT);
goto out_err_free_intg_key;
}

ctx_id->internal_ctx_id = ctx;

Expand Down

0 comments on commit 651b293

Please sign in to comment.