RPCSEC_GSS: krb5 cleanup
Remove some senseless wrappers. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
00fd6e1425
commit
a0857d03b2
@ -118,15 +118,11 @@ s32
|
|||||||
make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body,
|
make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body,
|
||||||
int body_offset, struct xdr_netobj *cksum);
|
int body_offset, struct xdr_netobj *cksum);
|
||||||
|
|
||||||
u32
|
u32 gss_get_mic_kerberos(struct gss_ctx *, struct xdr_buf *,
|
||||||
krb5_make_token(struct krb5_ctx *context_handle,
|
struct xdr_netobj *);
|
||||||
struct xdr_buf *input_message_buffer,
|
|
||||||
struct xdr_netobj *output_message_buffer);
|
|
||||||
|
|
||||||
u32
|
u32 gss_verify_mic_kerberos(struct gss_ctx *, struct xdr_buf *,
|
||||||
krb5_read_token(struct krb5_ctx *context_handle,
|
struct xdr_netobj *);
|
||||||
struct xdr_netobj *input_token_buffer,
|
|
||||||
struct xdr_buf *message_buffer);
|
|
||||||
|
|
||||||
u32
|
u32
|
||||||
gss_wrap_kerberos(struct gss_ctx *ctx_id, int offset,
|
gss_wrap_kerberos(struct gss_ctx *ctx_id, int offset,
|
||||||
|
@ -190,34 +190,6 @@ gss_delete_sec_context_kerberos(void *internal_ctx) {
|
|||||||
kfree(kctx);
|
kfree(kctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32
|
|
||||||
gss_verify_mic_kerberos(struct gss_ctx *ctx,
|
|
||||||
struct xdr_buf *message,
|
|
||||||
struct xdr_netobj *mic_token)
|
|
||||||
{
|
|
||||||
u32 maj_stat = 0;
|
|
||||||
struct krb5_ctx *kctx = ctx->internal_ctx_id;
|
|
||||||
|
|
||||||
maj_stat = krb5_read_token(kctx, mic_token, message);
|
|
||||||
|
|
||||||
dprintk("RPC: gss_verify_mic_kerberos returning %d\n", maj_stat);
|
|
||||||
return maj_stat;
|
|
||||||
}
|
|
||||||
|
|
||||||
static u32
|
|
||||||
gss_get_mic_kerberos(struct gss_ctx *ctx,
|
|
||||||
struct xdr_buf *message,
|
|
||||||
struct xdr_netobj *mic_token) {
|
|
||||||
u32 err = 0;
|
|
||||||
struct krb5_ctx *kctx = ctx->internal_ctx_id;
|
|
||||||
|
|
||||||
err = krb5_make_token(kctx, message, mic_token);
|
|
||||||
|
|
||||||
dprintk("RPC: gss_get_mic_kerberos returning %d\n",err);
|
|
||||||
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct gss_api_ops gss_kerberos_ops = {
|
static struct gss_api_ops gss_kerberos_ops = {
|
||||||
.gss_import_sec_context = gss_import_sec_context_kerberos,
|
.gss_import_sec_context = gss_import_sec_context_kerberos,
|
||||||
.gss_get_mic = gss_get_mic_kerberos,
|
.gss_get_mic = gss_get_mic_kerberos,
|
||||||
|
@ -71,9 +71,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
u32
|
u32
|
||||||
krb5_make_token(struct krb5_ctx *ctx,
|
gss_get_mic_kerberos(struct gss_ctx *gss_ctx, struct xdr_buf *text,
|
||||||
struct xdr_buf *text, struct xdr_netobj *token)
|
struct xdr_netobj *token)
|
||||||
{
|
{
|
||||||
|
struct krb5_ctx *ctx = gss_ctx->internal_ctx_id;
|
||||||
s32 checksum_type;
|
s32 checksum_type;
|
||||||
struct xdr_netobj md5cksum = {.len = 0, .data = NULL};
|
struct xdr_netobj md5cksum = {.len = 0, .data = NULL};
|
||||||
unsigned char *ptr, *krb5_hdr, *msg_start;
|
unsigned char *ptr, *krb5_hdr, *msg_start;
|
||||||
|
@ -72,10 +72,10 @@
|
|||||||
* supposedly taken over. */
|
* supposedly taken over. */
|
||||||
|
|
||||||
u32
|
u32
|
||||||
krb5_read_token(struct krb5_ctx *ctx,
|
gss_verify_mic_kerberos(struct gss_ctx *gss_ctx,
|
||||||
struct xdr_netobj *read_token,
|
struct xdr_buf *message_buffer, struct xdr_netobj *read_token)
|
||||||
struct xdr_buf *message_buffer)
|
|
||||||
{
|
{
|
||||||
|
struct krb5_ctx *ctx = gss_ctx->internal_ctx_id;
|
||||||
int signalg;
|
int signalg;
|
||||||
int sealalg;
|
int sealalg;
|
||||||
s32 checksum_type;
|
s32 checksum_type;
|
||||||
|
Loading…
Reference in New Issue
Block a user