Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ef338bee3f4f509e82066e100f76fecbbbbc4cca
Commit:     ef338bee3f4f509e82066e100f76fecbbbbc4cca
Parent:     ffc40f569272b6be60c66441aeae79a686ff54d9
Author:     Kevin Coffman <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 9 18:42:09 2007 -0500
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Sat Nov 17 13:08:46 2007 -0500

    sunrpc: return error if unsupported enctype or cksumtype is encountered
    
    Return an error from gss_import_sec_context_kerberos if the
    negotiated context contains encryption or checksum types not
    supported by the kernel code.
    
    This fixes an Oops because success was assumed and later code found
    no internal_ctx_id.
    
    Signed-off-by: Kevin Coffman <[EMAIL PROTECTED]>
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 net/sunrpc/auth_gss/gss_krb5_mech.c |    8 ++++++--
 net/sunrpc/auth_gss/gss_krb5_seal.c |    1 +
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c 
b/net/sunrpc/auth_gss/gss_krb5_mech.c
index 9843eac..60c3dba 100644
--- a/net/sunrpc/auth_gss/gss_krb5_mech.c
+++ b/net/sunrpc/auth_gss/gss_krb5_mech.c
@@ -147,13 +147,17 @@ gss_import_sec_context_kerberos(const void *p,
        p = simple_get_bytes(p, end, &tmp, sizeof(tmp));
        if (IS_ERR(p))
                goto out_err_free_ctx;
-       if (tmp != SGN_ALG_DES_MAC_MD5)
+       if (tmp != SGN_ALG_DES_MAC_MD5) {
+               p = ERR_PTR(-ENOSYS);
                goto out_err_free_ctx;
+       }
        p = simple_get_bytes(p, end, &tmp, sizeof(tmp));
        if (IS_ERR(p))
                goto out_err_free_ctx;
-       if (tmp != SEAL_ALG_DES)
+       if (tmp != SEAL_ALG_DES) {
+               p = ERR_PTR(-ENOSYS);
                goto out_err_free_ctx;
+       }
        p = simple_get_bytes(p, end, &ctx->endtime, sizeof(ctx->endtime));
        if (IS_ERR(p))
                goto out_err_free_ctx;
diff --git a/net/sunrpc/auth_gss/gss_krb5_seal.c 
b/net/sunrpc/auth_gss/gss_krb5_seal.c
index 1c6eda5..dedcbd6 100644
--- a/net/sunrpc/auth_gss/gss_krb5_seal.c
+++ b/net/sunrpc/auth_gss/gss_krb5_seal.c
@@ -83,6 +83,7 @@ gss_get_mic_kerberos(struct gss_ctx *gss_ctx, struct xdr_buf 
*text,
        u32                     seq_send;
 
        dprintk("RPC:       gss_krb5_seal\n");
+       BUG_ON(ctx == NULL);
 
        now = get_seconds();
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to