Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18953
b: refs/heads/master
c: 91a4762
h: refs/heads/master
i:
  18951: feb633b
v: v3
  • Loading branch information
Kevin Coffman authored and Linus Torvalds committed Jan 19, 2006
1 parent b2f46b7 commit 24646a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 822f1005ae1f3a4a8b136f38a6933d3f719f4c4a
refs/heads/master: 91a4762e0ab0880fa00e8f0b7a052e4929d867a6
29 changes: 17 additions & 12 deletions trunk/net/sunrpc/auth_gss/svcauth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,21 @@ svcauth_gss_set_client(struct svc_rqst *rqstp)
return SVC_OK;
}

static inline int
gss_write_init_verf(struct svc_rqst *rqstp, struct rsi *rsip)
{
struct rsc *rsci;

if (rsip->major_status != GSS_S_COMPLETE)
return gss_write_null_verf(rqstp);
rsci = gss_svc_searchbyctx(&rsip->out_handle);
if (rsci == NULL) {
rsip->major_status = GSS_S_NO_CONTEXT;
return gss_write_null_verf(rqstp);
}
return gss_write_verf(rqstp, rsci->mechctx, GSS_SEQ_WIN);
}

/*
* Accept an rpcsec packet.
* If context establishment, punt to user space
Expand Down Expand Up @@ -890,18 +905,8 @@ svcauth_gss_accept(struct svc_rqst *rqstp, u32 *authp)
case -ENOENT:
goto drop;
case 0:
if (rsip->major_status == GSS_S_COMPLETE) {
rsci = gss_svc_searchbyctx(&rsip->out_handle);
if (!rsci) {
goto drop;
}
if (gss_write_verf(rqstp, rsci->mechctx,
GSS_SEQ_WIN))
goto drop;
} else {
if (gss_write_null_verf(rqstp))
goto drop;
}
if (gss_write_init_verf(rqstp, rsip))
goto drop;
if (resv->iov_len + 4 > PAGE_SIZE)
goto drop;
svc_putu32(resv, rpc_success);
Expand Down

0 comments on commit 24646a0

Please sign in to comment.