Skip to content

Commit

Permalink
[NET] SUNRPC: Fix whitespace errors.
Browse files Browse the repository at this point in the history
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
yoshfuji authored and David S. Miller committed Feb 11, 2007
1 parent d808ad9 commit cca5172
Show file tree
Hide file tree
Showing 20 changed files with 150 additions and 150 deletions.
2 changes: 1 addition & 1 deletion net/sunrpc/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, struct auth_cred * acred,
rpcauth_gc_credcache(auth, &free);
hlist_for_each_safe(pos, next, &cache->hashtable[nr]) {
struct rpc_cred *entry;
entry = hlist_entry(pos, struct rpc_cred, cr_hash);
entry = hlist_entry(pos, struct rpc_cred, cr_hash);
if (entry->cr_ops->crmatch(acred, entry, flags)) {
hlist_del(&entry->cr_hash);
cred = entry;
Expand Down
20 changes: 10 additions & 10 deletions net/sunrpc/auth_gss/auth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* linux/net/sunrpc/auth_gss/auth_gss.c
*
* RPCSEC_GSS client authentication.
*
*
* Copyright (c) 2000 The Regents of the University of Michigan.
* All rights reserved.
*
Expand Down Expand Up @@ -74,7 +74,7 @@ static struct rpc_credops gss_credops;
* as it is passed to gssd to signal the use of
* machine creds should be part of the shared rpc interface */

#define CA_RUN_AS_MACHINE 0x00000200
#define CA_RUN_AS_MACHINE 0x00000200

/* dump the buffer in `emacs-hexl' style */
#define isprint(c) ((c > 0x1f) && (c < 0x7f))
Expand Down Expand Up @@ -607,8 +607,8 @@ gss_pipe_destroy_msg(struct rpc_pipe_msg *msg)
}
}

/*
* NOTE: we have the opportunity to use different
/*
* NOTE: we have the opportunity to use different
* parameters based on the input flavor (which must be a pseudoflavor)
*/
static struct rpc_auth *
Expand Down Expand Up @@ -869,7 +869,7 @@ gss_validate(struct rpc_task *task, __be32 *p)

flav = ntohl(*p++);
if ((len = ntohl(*p++)) > RPC_MAX_AUTH_SIZE)
goto out_bad;
goto out_bad;
if (flav != RPC_AUTH_GSS)
goto out_bad;
seq = htonl(task->tk_rqstp->rq_seqno);
Expand Down Expand Up @@ -925,7 +925,7 @@ gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
*integ_len = htonl(integ_buf.len);

/* guess whether we're in the head or the tail: */
if (snd_buf->page_len || snd_buf->tail[0].iov_len)
if (snd_buf->page_len || snd_buf->tail[0].iov_len)
iov = snd_buf->tail;
else
iov = snd_buf->head;
Expand Down Expand Up @@ -1030,7 +1030,7 @@ gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
maj_stat = gss_wrap(ctx->gc_gss_ctx, offset, snd_buf, inpages);
/* RPC_SLACK_SPACE should prevent this ever happening: */
BUG_ON(snd_buf->len > snd_buf->buflen);
status = -EIO;
status = -EIO;
/* We're assuming that when GSS_S_CONTEXT_EXPIRED, the encryption was
* done anyway, so it's safe to put the request on the wire: */
if (maj_stat == GSS_S_CONTEXT_EXPIRED)
Expand Down Expand Up @@ -1079,7 +1079,7 @@ gss_wrap_req(struct rpc_task *task,
status = gss_wrap_req_integ(cred, ctx, encode,
rqstp, p, obj);
break;
case RPC_GSS_SVC_PRIVACY:
case RPC_GSS_SVC_PRIVACY:
status = gss_wrap_req_priv(cred, ctx, encode,
rqstp, p, obj);
break;
Expand Down Expand Up @@ -1179,7 +1179,7 @@ gss_unwrap_resp(struct rpc_task *task,
if (status)
goto out;
break;
case RPC_GSS_SVC_PRIVACY:
case RPC_GSS_SVC_PRIVACY:
status = gss_unwrap_resp_priv(cred, ctx, rqstp, &p);
if (status)
goto out;
Expand All @@ -1196,7 +1196,7 @@ gss_unwrap_resp(struct rpc_task *task,
status);
return status;
}

static struct rpc_authops authgss_ops = {
.owner = THIS_MODULE,
.au_flavor = RPC_AUTH_GSS,
Expand Down
10 changes: 5 additions & 5 deletions net/sunrpc/auth_gss/gss_generic_token.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/*
* Copyright 1993 by OpenVision Technologies, Inc.
*
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
Expand All @@ -21,7 +21,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
Expand Down Expand Up @@ -201,7 +201,7 @@ g_verify_token_header(struct xdr_netobj *mech, int *body_size,
return(G_BAD_TOK_HEADER);
if (*buf++ != 0x06)
return(G_BAD_TOK_HEADER);

if ((toksize-=1) < 0)
return(G_BAD_TOK_HEADER);
toid.len = *buf++;
Expand All @@ -211,9 +211,9 @@ g_verify_token_header(struct xdr_netobj *mech, int *body_size,
toid.data = buf;
buf+=toid.len;

if (! g_OID_equal(&toid, mech))
if (! g_OID_equal(&toid, mech))
ret = G_WRONG_MECH;

/* G_WRONG_MECH is not returned immediately because it's more important
to return G_BAD_TOK_HEADER if the token header is in fact bad */

Expand Down
4 changes: 2 additions & 2 deletions net/sunrpc/auth_gss/gss_krb5_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ krb5_encrypt(
int length)
{
u32 ret = -EINVAL;
struct scatterlist sg[1];
struct scatterlist sg[1];
u8 local_iv[16] = {0};
struct blkcipher_desc desc = { .tfm = tfm, .info = local_iv };

Expand All @@ -67,7 +67,7 @@ krb5_encrypt(

if (crypto_blkcipher_ivsize(tfm) > 16) {
dprintk("RPC: gss_k5encrypt: tfm iv size to large %d\n",
crypto_blkcipher_ivsize(tfm));
crypto_blkcipher_ivsize(tfm));
goto out;
}

Expand Down
4 changes: 2 additions & 2 deletions net/sunrpc/auth_gss/gss_krb5_seqnum.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/*
* Copyright 1993 by OpenVision Technologies, Inc.
*
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
Expand All @@ -21,7 +21,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
Expand Down
4 changes: 2 additions & 2 deletions net/sunrpc/auth_gss/gss_mech_switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
*
* J. Bruce Fields <bfields@umich.edu>
*
* Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its
* contributors may be used to endorse or promote products derived
Expand Down
48 changes: 24 additions & 24 deletions net/sunrpc/auth_gss/gss_spkm3_token.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ asn1_bitstring_len(struct xdr_netobj *in, int *enclen, int *zerobits)

/* count trailing 0's */
for(i = in->len; i > 0; i--) {
if (*ptr == 0) {
if (*ptr == 0) {
ptr--;
elen--;
} else
Expand All @@ -82,7 +82,7 @@ asn1_bitstring_len(struct xdr_netobj *in, int *enclen, int *zerobits)

/*
* decode_asn1_bitstring()
*
*
* decode a bitstring into a buffer of the expected length.
* enclen = bit string length
* explen = expected length (define in rfc)
Expand All @@ -97,31 +97,31 @@ decode_asn1_bitstring(struct xdr_netobj *out, char *in, int enclen, int explen)
return 1;
}

/*
/*
* SPKMInnerContextToken choice SPKM_MIC asn1 token layout
*
*
* contextid is always 16 bytes plain data. max asn1 bitstring len = 17.
*
* tokenlen = pos[0] to end of token (max pos[45] with MD5 cksum)
*
* pos value
* ----------
* [0] a4 SPKM-MIC tag
* [1] ?? innertoken length (max 44)
*
*
* tok_hdr piece of checksum data starts here
* [1] ?? innertoken length (max 44)
*
*
* tok_hdr piece of checksum data starts here
*
* the maximum mic-header len = 9 + 17 = 26
* the maximum mic-header len = 9 + 17 = 26
* mic-header
* ----------
* [2] 30 SEQUENCE tag
* [3] ?? mic-header length: (max 23) = TokenID + ContextID
* [2] 30 SEQUENCE tag
* [3] ?? mic-header length: (max 23) = TokenID + ContextID
*
* TokenID - all fields constant and can be hardcoded
* -------
* [4] 02 Type 2
* [5] 02 Length 2
* [5] 02 Length 2
* [6][7] 01 01 TokenID (SPKM_MIC_TOK)
*
* ContextID - encoded length not constant, calculated
Expand All @@ -131,17 +131,17 @@ decode_asn1_bitstring(struct xdr_netobj *out, char *in, int enclen, int explen)
* [10] ?? ctxzbit
* [11] contextid
*
* mic_header piece of checksum data ends here.
* mic_header piece of checksum data ends here.
*
* int-cksum - encoded length not constant, calculated
* ---------
* [??] 03 Type 3
* [??] ?? encoded length
* [??] ?? md5zbit
* [??] ?? encoded length
* [??] ?? md5zbit
* [??] int-cksum (NID_md5 = 16)
*
* maximum SPKM-MIC innercontext token length =
* 10 + encoded contextid_size(17 max) + 2 + encoded
* maximum SPKM-MIC innercontext token length =
* 10 + encoded contextid_size(17 max) + 2 + encoded
* cksum_size (17 maxfor NID_md5) = 46
*/

Expand Down Expand Up @@ -178,8 +178,8 @@ spkm3_mic_header(unsigned char **hdrbuf, unsigned int *hdrlen, unsigned char *ct
/*
* spkm3_mic_innercontext_token()
*
* *tokp points to the beginning of the SPKM_MIC token described
* in rfc 2025, section 3.2.1:
* *tokp points to the beginning of the SPKM_MIC token described
* in rfc 2025, section 3.2.1:
*
* toklen is the inner token length
*/
Expand Down Expand Up @@ -209,7 +209,7 @@ spkm3_verify_mic_token(unsigned char **tokp, int *mic_hdrlen, unsigned char **ck

/* 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;
}

Expand Down Expand Up @@ -245,17 +245,17 @@ spkm3_verify_mic_token(unsigned char **tokp, int *mic_hdrlen, unsigned char **ck
goto out;

/*
* in the current implementation: the optional int-alg is not present
* so the default int-alg (md5) is used the optional snd-seq field is
* also not present
* in the current implementation: the optional int-alg is not present
* so the default int-alg (md5) is used the optional snd-seq field is
* also not present
*/

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);
goto out;
}
/* checksum */
*cksum = (&ptr[10] + ctxelen); /* ctxelen includes ptr[10] */
*cksum = (&ptr[10] + ctxelen); /* ctxelen includes ptr[10] */

ret = GSS_S_COMPLETE;
out:
Expand Down
2 changes: 1 addition & 1 deletion net/sunrpc/auth_gss/gss_spkm3_unseal.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

/*
* spkm3_read_token()
*
*
* only SPKM_MIC_TOK with md5 intg-alg is supported
*/
u32
Expand Down
6 changes: 3 additions & 3 deletions net/sunrpc/auth_gss/svcauth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ static struct cache_head *rsi_alloc(void)
}

static void rsi_request(struct cache_detail *cd,
struct cache_head *h,
char **bpp, int *blen)
struct cache_head *h,
char **bpp, int *blen)
{
struct rsi *rsii = container_of(h, struct rsi, h);

Expand All @@ -184,7 +184,7 @@ static void rsi_request(struct cache_detail *cd,


static int rsi_parse(struct cache_detail *cd,
char *mesg, int mlen)
char *mesg, int mlen)
{
/* context token expiry major minor context token */
char *buf = mesg;
Expand Down
Loading

0 comments on commit cca5172

Please sign in to comment.