mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-12-01 16:40:39 +00:00
SUNRPC: fix print format for tk_pid in auth_gss support
The tk_pid field is an unsigned short. The proper print format specifier for that type is %5u, not %4d. Also clean up some miscellaneous print formatting nits. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
a3f565b1e5
commit
8885cb367f
@ -393,7 +393,8 @@ gss_refresh_upcall(struct rpc_task *task)
|
||||
struct gss_upcall_msg *gss_msg;
|
||||
int err = 0;
|
||||
|
||||
dprintk("RPC: %4u gss_refresh_upcall for uid %u\n", task->tk_pid, cred->cr_uid);
|
||||
dprintk("RPC: %5u gss_refresh_upcall for uid %u\n", task->tk_pid,
|
||||
cred->cr_uid);
|
||||
gss_msg = gss_setup_upcall(task->tk_client, gss_auth, cred);
|
||||
if (IS_ERR(gss_msg)) {
|
||||
err = PTR_ERR(gss_msg);
|
||||
@ -413,8 +414,8 @@ gss_refresh_upcall(struct rpc_task *task)
|
||||
spin_unlock(&gss_auth->lock);
|
||||
gss_release_msg(gss_msg);
|
||||
out:
|
||||
dprintk("RPC: %4u gss_refresh_upcall for uid %u result %d\n", task->tk_pid,
|
||||
cred->cr_uid, err);
|
||||
dprintk("RPC: %5u gss_refresh_upcall for uid %u result %d\n",
|
||||
task->tk_pid, cred->cr_uid, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -454,7 +455,8 @@ out_intr:
|
||||
finish_wait(&gss_msg->waitqueue, &wait);
|
||||
gss_release_msg(gss_msg);
|
||||
out:
|
||||
dprintk("RPC: gss_create_upcall for uid %u result %d\n", cred->cr_uid, err);
|
||||
dprintk("RPC: gss_create_upcall for uid %u result %d\n",
|
||||
cred->cr_uid, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -618,7 +620,7 @@ gss_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor)
|
||||
struct rpc_auth * auth;
|
||||
int err = -ENOMEM; /* XXX? */
|
||||
|
||||
dprintk("RPC: creating GSS authenticator for client %p\n",clnt);
|
||||
dprintk("RPC: creating GSS authenticator for client %p\n", clnt);
|
||||
|
||||
if (!try_module_get(THIS_MODULE))
|
||||
return ERR_PTR(err);
|
||||
@ -799,7 +801,7 @@ gss_marshal(struct rpc_task *task, __be32 *p)
|
||||
struct kvec iov;
|
||||
struct xdr_buf verf_buf;
|
||||
|
||||
dprintk("RPC: %4u gss_marshal\n", task->tk_pid);
|
||||
dprintk("RPC: %5u gss_marshal\n", task->tk_pid);
|
||||
|
||||
*p++ = htonl(RPC_AUTH_GSS);
|
||||
cred_len = p++;
|
||||
@ -865,7 +867,7 @@ gss_validate(struct rpc_task *task, __be32 *p)
|
||||
u32 flav,len;
|
||||
u32 maj_stat;
|
||||
|
||||
dprintk("RPC: %4u gss_validate\n", task->tk_pid);
|
||||
dprintk("RPC: %5u gss_validate\n", task->tk_pid);
|
||||
|
||||
flav = ntohl(*p++);
|
||||
if ((len = ntohl(*p++)) > RPC_MAX_AUTH_SIZE)
|
||||
@ -888,12 +890,12 @@ gss_validate(struct rpc_task *task, __be32 *p)
|
||||
* calculate the length of the verifier: */
|
||||
task->tk_auth->au_verfsize = XDR_QUADLEN(len) + 2;
|
||||
gss_put_ctx(ctx);
|
||||
dprintk("RPC: %4u GSS gss_validate: gss_verify_mic succeeded.\n",
|
||||
dprintk("RPC: %5u gss_validate: gss_verify_mic succeeded.\n",
|
||||
task->tk_pid);
|
||||
return p + XDR_QUADLEN(len);
|
||||
out_bad:
|
||||
gss_put_ctx(ctx);
|
||||
dprintk("RPC: %4u gss_validate failed.\n", task->tk_pid);
|
||||
dprintk("RPC: %5u gss_validate failed.\n", task->tk_pid);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1063,7 +1065,7 @@ gss_wrap_req(struct rpc_task *task,
|
||||
struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred);
|
||||
int status = -EIO;
|
||||
|
||||
dprintk("RPC: %4u gss_wrap_req\n", task->tk_pid);
|
||||
dprintk("RPC: %5u gss_wrap_req\n", task->tk_pid);
|
||||
if (ctx->gc_proc != RPC_GSS_PROC_DATA) {
|
||||
/* The spec seems a little ambiguous here, but I think that not
|
||||
* wrapping context destruction requests makes the most sense.
|
||||
@ -1086,7 +1088,7 @@ gss_wrap_req(struct rpc_task *task,
|
||||
}
|
||||
out:
|
||||
gss_put_ctx(ctx);
|
||||
dprintk("RPC: %4u gss_wrap_req returning %d\n", task->tk_pid, status);
|
||||
dprintk("RPC: %5u gss_wrap_req returning %d\n", task->tk_pid, status);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -1192,7 +1194,7 @@ out_decode:
|
||||
status = decode(rqstp, p, obj);
|
||||
out:
|
||||
gss_put_ctx(ctx);
|
||||
dprintk("RPC: %4u gss_unwrap_resp returning %d\n", task->tk_pid,
|
||||
dprintk("RPC: %5u gss_unwrap_resp returning %d\n", task->tk_pid,
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ krb5_encrypt(
|
||||
|
||||
ret = crypto_blkcipher_encrypt_iv(&desc, sg, sg, length);
|
||||
out:
|
||||
dprintk("RPC: krb5_encrypt returns %d\n",ret);
|
||||
dprintk("RPC: krb5_encrypt returns %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -175,6 +175,7 @@ gss_import_sec_context_kerberos(const void *p,
|
||||
}
|
||||
|
||||
ctx_id->internal_ctx_id = ctx;
|
||||
|
||||
dprintk("RPC: Successfully imported new context.\n");
|
||||
return 0;
|
||||
|
||||
|
@ -97,7 +97,8 @@ gss_import_sec_context_spkm3(const void *p, size_t len,
|
||||
if (IS_ERR(p))
|
||||
goto out_err_free_ctx;
|
||||
if (version != 1) {
|
||||
dprintk("RPC: unknown spkm3 token format: obsolete nfs-utils?\n");
|
||||
dprintk("RPC: unknown spkm3 token format: "
|
||||
"obsolete nfs-utils?\n");
|
||||
goto out_err_free_ctx;
|
||||
}
|
||||
|
||||
@ -138,7 +139,7 @@ gss_import_sec_context_spkm3(const void *p, size_t len,
|
||||
|
||||
ctx_id->internal_ctx_id = ctx;
|
||||
|
||||
dprintk("Successfully imported new spkm context.\n");
|
||||
dprintk("RPC: Successfully imported new spkm context.\n");
|
||||
return 0;
|
||||
|
||||
out_err_free_intg_key:
|
||||
|
@ -81,14 +81,15 @@ spkm3_make_token(struct spkm3_ctx *ctx,
|
||||
}
|
||||
|
||||
if (!g_OID_equal(&ctx->intg_alg, &hmac_md5_oid)) {
|
||||
dprintk("RPC: gss_spkm3_seal: unsupported I-ALG algorithm."
|
||||
"only support hmac-md5 I-ALG.\n");
|
||||
dprintk("RPC: gss_spkm3_seal: unsupported I-ALG "
|
||||
"algorithm. only support hmac-md5 I-ALG.\n");
|
||||
goto out_err;
|
||||
} else
|
||||
checksum_type = CKSUMTYPE_HMAC_MD5;
|
||||
|
||||
if (!g_OID_equal(&ctx->conf_alg, &cast5_cbc_oid)) {
|
||||
dprintk("RPC: gss_spkm3_seal: unsupported C-ALG algorithm\n");
|
||||
dprintk("RPC: gss_spkm3_seal: unsupported C-ALG "
|
||||
"algorithm\n");
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
@ -113,7 +114,8 @@ spkm3_make_token(struct spkm3_ctx *ctx,
|
||||
|
||||
spkm3_make_mic_token(&ptr, tokenlen, &mic_hdr, &md5cksum, md5elen, md5zbit);
|
||||
} else if (toktype == SPKM_WRAP_TOK) { /* Not Supported */
|
||||
dprintk("RPC: gss_spkm3_seal: SPKM_WRAP_TOK not supported\n");
|
||||
dprintk("RPC: gss_spkm3_seal: SPKM_WRAP_TOK "
|
||||
"not supported\n");
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,9 @@ spkm3_verify_mic_token(unsigned char **tokp, int *mic_hdrlen, unsigned char **ck
|
||||
*/
|
||||
|
||||
if (*mic_hdrlen != 6 + ctxelen) {
|
||||
dprintk("RPC: BAD SPKM_ MIC_TOK header len %d: we only support default int-alg (should be absent) and do not support snd-seq\n", *mic_hdrlen);
|
||||
dprintk("RPC: BAD SPKM_ MIC_TOK header len %d: we only "
|
||||
"support default int-alg (should be absent) "
|
||||
"and do not support snd-seq\n", *mic_hdrlen);
|
||||
goto out;
|
||||
}
|
||||
/* checksum */
|
||||
|
@ -97,7 +97,8 @@ spkm3_read_token(struct spkm3_ctx *ctx,
|
||||
*/
|
||||
ret = GSS_S_DEFECTIVE_TOKEN;
|
||||
if (!g_OID_equal(&ctx->intg_alg, &hmac_md5_oid)) {
|
||||
dprintk("RPC: gss_spkm3_seal: unsupported I-ALG algorithm\n");
|
||||
dprintk("RPC: gss_spkm3_seal: unsupported I-ALG "
|
||||
"algorithm\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -669,14 +669,14 @@ gss_verify_header(struct svc_rqst *rqstp, struct rsc *rsci,
|
||||
}
|
||||
|
||||
if (gc->gc_seq > MAXSEQ) {
|
||||
dprintk("RPC: svcauth_gss: discarding request with large sequence number %d\n",
|
||||
gc->gc_seq);
|
||||
dprintk("RPC: svcauth_gss: discarding request with "
|
||||
"large sequence number %d\n", gc->gc_seq);
|
||||
*authp = rpcsec_gsserr_ctxproblem;
|
||||
return SVC_DENIED;
|
||||
}
|
||||
if (!gss_check_seq_num(rsci, gc->gc_seq)) {
|
||||
dprintk("RPC: svcauth_gss: discarding request with old sequence number %d\n",
|
||||
gc->gc_seq);
|
||||
dprintk("RPC: svcauth_gss: discarding request with "
|
||||
"old sequence number %d\n", gc->gc_seq);
|
||||
return SVC_DROP;
|
||||
}
|
||||
return SVC_OK;
|
||||
@ -958,7 +958,8 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp)
|
||||
__be32 *reject_stat = resv->iov_base + resv->iov_len;
|
||||
int ret;
|
||||
|
||||
dprintk("RPC: svcauth_gss: argv->iov_len = %zd\n",argv->iov_len);
|
||||
dprintk("RPC: svcauth_gss: argv->iov_len = %zd\n",
|
||||
argv->iov_len);
|
||||
|
||||
*authp = rpc_autherr_badcred;
|
||||
if (!svcdata)
|
||||
|
Loading…
Reference in New Issue
Block a user