diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-01-31 12:14:05 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-02-03 15:35:09 -0800 |
commit | 8885cb367f86ce02bed3bf18192d74a53ac3b81f (patch) | |
tree | 3d85dd85f176606756720914f46c93af53895295 /net/sunrpc/auth_gss/auth_gss.c | |
parent | a3f565b1e530a756472401835107d08fd291f242 (diff) | |
download | linux-stable-8885cb367f86ce02bed3bf18192d74a53ac3b81f.tar.gz linux-stable-8885cb367f86ce02bed3bf18192d74a53ac3b81f.tar.bz2 linux-stable-8885cb367f86ce02bed3bf18192d74a53ac3b81f.zip |
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>
Diffstat (limited to 'net/sunrpc/auth_gss/auth_gss.c')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index e1a104abb782..2fe8e91f5bc1 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c @@ -241,7 +241,7 @@ gss_fill_context(const void *p, const void *end, struct gss_cl_ctx *ctx, struct } return q; err: - dprintk("RPC: gss_fill_context returning %ld\n", -PTR_ERR(p)); + dprintk("RPC: gss_fill_context returning %ld\n", -PTR_ERR(p)); return p; } @@ -276,10 +276,10 @@ __gss_find_upcall(struct gss_auth *gss_auth, uid_t uid) if (pos->uid != uid) continue; atomic_inc(&pos->count); - dprintk("RPC: gss_find_upcall found msg %p\n", pos); + dprintk("RPC: gss_find_upcall found msg %p\n", pos); return pos; } - dprintk("RPC: gss_find_upcall found nothing\n"); + dprintk("RPC: gss_find_upcall found nothing\n"); return NULL; } @@ -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; } @@ -426,7 +427,7 @@ gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred) DEFINE_WAIT(wait); int err = 0; - dprintk("RPC: gss_upcall for uid %u\n", cred->cr_uid); + dprintk("RPC: gss_upcall for uid %u\n", cred->cr_uid); gss_msg = gss_setup_upcall(gss_auth->client, gss_auth, cred); if (IS_ERR(gss_msg)) { err = PTR_ERR(gss_msg); @@ -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; } @@ -546,14 +548,14 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) } gss_put_ctx(ctx); kfree(buf); - dprintk("RPC: gss_pipe_downcall returning length %Zu\n", mlen); + dprintk("RPC: gss_pipe_downcall returning length %Zu\n", mlen); return mlen; err_put_ctx: gss_put_ctx(ctx); err: kfree(buf); out: - dprintk("RPC: gss_pipe_downcall returning %d\n", err); + dprintk("RPC: gss_pipe_downcall returning %d\n", err); return err; } @@ -591,7 +593,7 @@ gss_pipe_destroy_msg(struct rpc_pipe_msg *msg) static unsigned long ratelimit; if (msg->errno < 0) { - dprintk("RPC: gss_pipe_destroy_msg releasing msg %p\n", + dprintk("RPC: gss_pipe_destroy_msg releasing msg %p\n", gss_msg); atomic_inc(&gss_msg->count); gss_unhash_msg(gss_msg); @@ -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); @@ -670,8 +672,8 @@ gss_destroy(struct rpc_auth *auth) { struct gss_auth *gss_auth; - dprintk("RPC: destroying GSS authenticator %p flavor %d\n", - auth, auth->au_flavor); + dprintk("RPC: destroying GSS authenticator %p flavor %d\n", + auth, auth->au_flavor); gss_auth = container_of(auth, struct gss_auth, rpc_auth); rpc_unlink(gss_auth->dentry); @@ -689,7 +691,7 @@ gss_destroy(struct rpc_auth *auth) static void gss_destroy_ctx(struct gss_cl_ctx *ctx) { - dprintk("RPC: gss_destroy_ctx\n"); + dprintk("RPC: gss_destroy_ctx\n"); if (ctx->gc_gss_ctx) gss_delete_sec_context(&ctx->gc_gss_ctx); @@ -703,7 +705,7 @@ gss_destroy_cred(struct rpc_cred *rc) { struct gss_cred *cred = container_of(rc, struct gss_cred, gc_base); - dprintk("RPC: gss_destroy_cred \n"); + dprintk("RPC: gss_destroy_cred \n"); if (cred->gc_ctx) gss_put_ctx(cred->gc_ctx); @@ -726,7 +728,7 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags) struct gss_cred *cred = NULL; int err = -ENOMEM; - dprintk("RPC: gss_create_cred for uid %d, flavor %d\n", + dprintk("RPC: gss_create_cred for uid %d, flavor %d\n", acred->uid, auth->au_flavor); if (!(cred = kzalloc(sizeof(*cred), GFP_KERNEL))) @@ -745,7 +747,7 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags) return &cred->gc_base; out_err: - dprintk("RPC: gss_create_cred failed with error %d\n", err); + dprintk("RPC: gss_create_cred failed with error %d\n", err); 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; } |