}
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;
}
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;
}
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);
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;
}
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);
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;
}
}
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;
}
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);
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);
{
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);
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);
{
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);
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)))
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);
}
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++;
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)
* 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;
}
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.
}
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;
}
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;
}
goto out;
if (crypto_blkcipher_ivsize(tfm) > 16) {
- dprintk("RPC: gss_k5encrypt: tfm iv size to large %d\n",
+ dprintk("RPC: gss_k5encrypt: tfm iv size to large %d\n",
crypto_blkcipher_ivsize(tfm));
goto out;
}
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;
}
goto out;
if (crypto_blkcipher_ivsize(tfm) > 16) {
- dprintk("RPC: gss_k5decrypt: tfm iv size to large %d\n",
+ dprintk("RPC: gss_k5decrypt: tfm iv size to large %d\n",
crypto_blkcipher_ivsize(tfm));
goto out;
}
ret = crypto_blkcipher_decrypt_iv(&desc, sg, sg, length);
out:
- dprintk("RPC: gss_k5decrypt returns %d\n",ret);
+ dprintk("RPC: gss_k5decrypt returns %d\n",ret);
return ret;
}
}
ctx_id->internal_ctx_id = ctx;
- dprintk("RPC: Successfully imported new context.\n");
+
+ dprintk("RPC: Successfully imported new context.\n");
return 0;
out_err_free_key2:
s32 now;
u32 seq_send;
- dprintk("RPC: gss_krb5_seal\n");
+ dprintk("RPC: gss_krb5_seal\n");
now = get_seconds();
s32 code;
unsigned char plain[8];
- dprintk("RPC: krb5_get_seq_num:\n");
+ dprintk("RPC: krb5_get_seq_num:\n");
if ((code = krb5_decrypt(key, cksum, buf, plain, 8)))
return code;
unsigned char *ptr = (unsigned char *)read_token->data;
int bodysize;
- dprintk("RPC: krb5_read_token\n");
+ dprintk("RPC: krb5_read_token\n");
if (g_verify_token_header(&ctx->mech_used, &bodysize, &ptr,
read_token->len))
struct page **tmp_pages;
u32 seq_send;
- dprintk("RPC: gss_wrap_kerberos\n");
+ dprintk("RPC: gss_wrap_kerberos\n");
now = get_seconds();
int data_len;
int blocksize;
- dprintk("RPC: gss_unwrap_kerberos\n");
+ dprintk("RPC: gss_unwrap_kerberos\n");
ptr = (u8 *)buf->head[0].iov_base + offset;
if (g_verify_token_header(&kctx->mech_used, &bodysize, &ptr,
spin_lock(®istered_mechs_lock);
list_add(&gm->gm_list, ®istered_mechs);
spin_unlock(®istered_mechs_lock);
- dprintk("RPC: registered gss mechanism %s\n", gm->gm_name);
+ dprintk("RPC: registered gss mechanism %s\n", gm->gm_name);
return 0;
}
spin_lock(®istered_mechs_lock);
list_del(&gm->gm_list);
spin_unlock(®istered_mechs_lock);
- dprintk("RPC: unregistered gss mechanism %s\n", gm->gm_name);
+ dprintk("RPC: unregistered gss mechanism %s\n", gm->gm_name);
gss_mech_free(gm);
}
u32
gss_delete_sec_context(struct gss_ctx **context_handle)
{
- dprintk("RPC: gss_delete_sec_context deleting %p\n",
+ dprintk("RPC: gss_delete_sec_context deleting %p\n",
*context_handle);
if (!*context_handle)
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;
}
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:
maj_stat = spkm3_read_token(sctx, checksum, signbuf, SPKM_MIC_TOK);
- dprintk("RPC: gss_verify_mic_spkm3 returning %d\n", maj_stat);
+ dprintk("RPC: gss_verify_mic_spkm3 returning %d\n", maj_stat);
return maj_stat;
}
err = spkm3_make_token(sctx, message_buffer,
message_token, SPKM_MIC_TOK);
- dprintk("RPC: gss_get_mic_spkm3 returning %d\n", err);
+ dprintk("RPC: gss_get_mic_spkm3 returning %d\n", err);
return err;
}
now = jiffies;
if (ctx->ctx_id.len != 16) {
- dprintk("RPC: spkm3_make_token BAD ctx_id.len %d\n",
+ dprintk("RPC: spkm3_make_token BAD ctx_id.len %d\n",
ctx->ctx_id.len);
goto out_err;
}
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;
}
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;
}
cksumname = "md5";
break;
default:
- dprintk("RPC: spkm3_make_checksum:"
+ dprintk("RPC: spkm3_make_checksum:"
" unsupported checksum %d", cksumtype);
return GSS_S_FAILURE;
}
/* spkm3 innercontext token preamble */
if ((ptr[0] != 0xa4) || (ptr[2] != 0x30)) {
- dprintk("RPC: BAD SPKM ictoken preamble\n");
+ dprintk("RPC: BAD SPKM ictoken preamble\n");
goto out;
}
/* token type */
if ((ptr[4] != 0x02) || (ptr[5] != 0x02)) {
- dprintk("RPC: BAD asn1 SPKM3 token type\n");
+ dprintk("RPC: BAD asn1 SPKM3 token type\n");
goto out;
}
/* only support SPKM_MIC_TOK */
if((ptr[6] != 0x01) || (ptr[7] != 0x01)) {
- dprintk("RPC: ERROR unsupported SPKM3 token \n");
+ dprintk("RPC: ERROR unsupported SPKM3 token \n");
goto out;
}
/* contextid */
if (ptr[8] != 0x03) {
- dprintk("RPC: BAD SPKM3 asn1 context-id type\n");
+ dprintk("RPC: BAD SPKM3 asn1 context-id type\n");
goto out;
}
ctxelen = ptr[9];
if (ctxelen > 17) { /* length includes asn1 zbit octet */
- dprintk("RPC: BAD SPKM3 contextid len %d\n", ctxelen);
+ dprintk("RPC: BAD SPKM3 contextid len %d\n", ctxelen);
goto out;
}
*/
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 */
/* decode the token */
if (toktype != SPKM_MIC_TOK) {
- dprintk("RPC: BAD SPKM3 token type: %d\n", toktype);
+ dprintk("RPC: BAD SPKM3 token type: %d\n", toktype);
goto out;
}
goto out;
if (*cksum++ != 0x03) {
- dprintk("RPC: spkm3_read_token BAD checksum type\n");
+ dprintk("RPC: spkm3_read_token BAD checksum type\n");
goto out;
}
md5elen = *cksum++;
*/
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;
}
ret = GSS_S_BAD_SIG;
code = memcmp(md5cksum.data, wire_cksum.data, wire_cksum.len);
if (code) {
- dprintk("RPC: bad MIC checksum\n");
+ dprintk("RPC: bad MIC checksum\n");
goto out;
}
}
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;
__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)