diff options
Diffstat (limited to 'net/sunrpc/auth_gss/auth_gss.c')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 2fe8e91f5bc..4e4ccc5b6fe 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * linux/net/sunrpc/auth_gss/auth_gss.c | 2 | * linux/net/sunrpc/auth_gss/auth_gss.c |
3 | * | 3 | * |
4 | * RPCSEC_GSS client authentication. | 4 | * RPCSEC_GSS client authentication. |
5 | * | 5 | * |
6 | * Copyright (c) 2000 The Regents of the University of Michigan. | 6 | * Copyright (c) 2000 The Regents of the University of Michigan. |
7 | * All rights reserved. | 7 | * All rights reserved. |
8 | * | 8 | * |
@@ -74,7 +74,7 @@ static struct rpc_credops gss_credops; | |||
74 | * as it is passed to gssd to signal the use of | 74 | * as it is passed to gssd to signal the use of |
75 | * machine creds should be part of the shared rpc interface */ | 75 | * machine creds should be part of the shared rpc interface */ |
76 | 76 | ||
77 | #define CA_RUN_AS_MACHINE 0x00000200 | 77 | #define CA_RUN_AS_MACHINE 0x00000200 |
78 | 78 | ||
79 | /* dump the buffer in `emacs-hexl' style */ | 79 | /* dump the buffer in `emacs-hexl' style */ |
80 | #define isprint(c) ((c > 0x1f) && (c < 0x7f)) | 80 | #define isprint(c) ((c > 0x1f) && (c < 0x7f)) |
@@ -609,8 +609,8 @@ gss_pipe_destroy_msg(struct rpc_pipe_msg *msg) | |||
609 | } | 609 | } |
610 | } | 610 | } |
611 | 611 | ||
612 | /* | 612 | /* |
613 | * NOTE: we have the opportunity to use different | 613 | * NOTE: we have the opportunity to use different |
614 | * parameters based on the input flavor (which must be a pseudoflavor) | 614 | * parameters based on the input flavor (which must be a pseudoflavor) |
615 | */ | 615 | */ |
616 | static struct rpc_auth * | 616 | static struct rpc_auth * |
@@ -871,7 +871,7 @@ gss_validate(struct rpc_task *task, __be32 *p) | |||
871 | 871 | ||
872 | flav = ntohl(*p++); | 872 | flav = ntohl(*p++); |
873 | if ((len = ntohl(*p++)) > RPC_MAX_AUTH_SIZE) | 873 | if ((len = ntohl(*p++)) > RPC_MAX_AUTH_SIZE) |
874 | goto out_bad; | 874 | goto out_bad; |
875 | if (flav != RPC_AUTH_GSS) | 875 | if (flav != RPC_AUTH_GSS) |
876 | goto out_bad; | 876 | goto out_bad; |
877 | seq = htonl(task->tk_rqstp->rq_seqno); | 877 | seq = htonl(task->tk_rqstp->rq_seqno); |
@@ -927,7 +927,7 @@ gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx, | |||
927 | *integ_len = htonl(integ_buf.len); | 927 | *integ_len = htonl(integ_buf.len); |
928 | 928 | ||
929 | /* guess whether we're in the head or the tail: */ | 929 | /* guess whether we're in the head or the tail: */ |
930 | if (snd_buf->page_len || snd_buf->tail[0].iov_len) | 930 | if (snd_buf->page_len || snd_buf->tail[0].iov_len) |
931 | iov = snd_buf->tail; | 931 | iov = snd_buf->tail; |
932 | else | 932 | else |
933 | iov = snd_buf->head; | 933 | iov = snd_buf->head; |
@@ -1032,7 +1032,7 @@ gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx, | |||
1032 | maj_stat = gss_wrap(ctx->gc_gss_ctx, offset, snd_buf, inpages); | 1032 | maj_stat = gss_wrap(ctx->gc_gss_ctx, offset, snd_buf, inpages); |
1033 | /* RPC_SLACK_SPACE should prevent this ever happening: */ | 1033 | /* RPC_SLACK_SPACE should prevent this ever happening: */ |
1034 | BUG_ON(snd_buf->len > snd_buf->buflen); | 1034 | BUG_ON(snd_buf->len > snd_buf->buflen); |
1035 | status = -EIO; | 1035 | status = -EIO; |
1036 | /* We're assuming that when GSS_S_CONTEXT_EXPIRED, the encryption was | 1036 | /* We're assuming that when GSS_S_CONTEXT_EXPIRED, the encryption was |
1037 | * done anyway, so it's safe to put the request on the wire: */ | 1037 | * done anyway, so it's safe to put the request on the wire: */ |
1038 | if (maj_stat == GSS_S_CONTEXT_EXPIRED) | 1038 | if (maj_stat == GSS_S_CONTEXT_EXPIRED) |
@@ -1081,7 +1081,7 @@ gss_wrap_req(struct rpc_task *task, | |||
1081 | status = gss_wrap_req_integ(cred, ctx, encode, | 1081 | status = gss_wrap_req_integ(cred, ctx, encode, |
1082 | rqstp, p, obj); | 1082 | rqstp, p, obj); |
1083 | break; | 1083 | break; |
1084 | case RPC_GSS_SVC_PRIVACY: | 1084 | case RPC_GSS_SVC_PRIVACY: |
1085 | status = gss_wrap_req_priv(cred, ctx, encode, | 1085 | status = gss_wrap_req_priv(cred, ctx, encode, |
1086 | rqstp, p, obj); | 1086 | rqstp, p, obj); |
1087 | break; | 1087 | break; |
@@ -1181,7 +1181,7 @@ gss_unwrap_resp(struct rpc_task *task, | |||
1181 | if (status) | 1181 | if (status) |
1182 | goto out; | 1182 | goto out; |
1183 | break; | 1183 | break; |
1184 | case RPC_GSS_SVC_PRIVACY: | 1184 | case RPC_GSS_SVC_PRIVACY: |
1185 | status = gss_unwrap_resp_priv(cred, ctx, rqstp, &p); | 1185 | status = gss_unwrap_resp_priv(cred, ctx, rqstp, &p); |
1186 | if (status) | 1186 | if (status) |
1187 | goto out; | 1187 | goto out; |
@@ -1198,7 +1198,7 @@ out: | |||
1198 | status); | 1198 | status); |
1199 | return status; | 1199 | return status; |
1200 | } | 1200 | } |
1201 | 1201 | ||
1202 | static struct rpc_authops authgss_ops = { | 1202 | static struct rpc_authops authgss_ops = { |
1203 | .owner = THIS_MODULE, | 1203 | .owner = THIS_MODULE, |
1204 | .au_flavor = RPC_AUTH_GSS, | 1204 | .au_flavor = RPC_AUTH_GSS, |