diff options
| author | Toomas Soome <tsoome@me.com> | 2019-01-20 14:48:52 +0200 |
|---|---|---|
| committer | Toomas Soome <tsoome@me.com> | 2019-04-24 09:23:05 +0300 |
| commit | 9c80534542e4b5924bcdb8adee652d01656e4889 (patch) | |
| tree | ad885687389f620018cd6b24741fec14b38f81c2 | |
| parent | ee4417888cf835db6efb1e9b8039c90f0674e1cd (diff) | |
| download | illumos-gate-9c80534542e4b5924bcdb8adee652d01656e4889.tar.gz | |
10768 kgssapi: NULL pointer errors
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Dan McDonald <danmcd@joyent.com>
| -rw-r--r-- | usr/src/uts/common/gssapi/gssd_clnt_stubs.c | 24 | ||||
| -rw-r--r-- | usr/src/uts/common/gssapi/include/mechglueP.h | 12 |
2 files changed, 18 insertions, 18 deletions
diff --git a/usr/src/uts/common/gssapi/gssd_clnt_stubs.c b/usr/src/uts/common/gssapi/gssd_clnt_stubs.c index c934752798..3793e47b0d 100644 --- a/usr/src/uts/common/gssapi/gssd_clnt_stubs.c +++ b/usr/src/uts/common/gssapi/gssd_clnt_stubs.c @@ -108,7 +108,7 @@ kgss_acquire_cred_wrapped(minor_status, { CLIENT *clnt; - OM_uint32 minor_status_temp; + OM_uint32 minor_status_temp; gss_buffer_desc external_name; gss_OID name_type; enum clnt_stat client_stat; @@ -200,7 +200,7 @@ kgss_acquire_cred_wrapped(minor_status, if (minor_status != NULL) *minor_status = DEFAULT_MINOR_STAT; if (output_cred_handle != NULL) - *output_cred_handle = NULL; + *output_cred_handle = 0; if (actual_mechs != NULL) *actual_mechs = NULL; if (time_rec != NULL) @@ -325,7 +325,7 @@ kgss_add_cred_wrapped(minor_status, { CLIENT *clnt; - OM_uint32 minor_status_temp; + OM_uint32 minor_status_temp; gss_buffer_desc external_name; gss_OID name_type; int i; @@ -555,7 +555,7 @@ kgss_release_cred_wrapped(minor_status, if (minor_status != NULL) *minor_status = DEFAULT_MINOR_STAT; if (cred_handle != NULL) - *cred_handle = NULL; + *cred_handle = 0; killgssd_handle(clnt); GSSLOG0(1, "kgss_release_cred: RPC call times out\n"); @@ -565,7 +565,7 @@ kgss_release_cred_wrapped(minor_status, /* if the release succeeded, null out the cred_handle */ if (res.status == GSS_S_COMPLETE && cred_handle != NULL) - *cred_handle = NULL; + *cred_handle = 0; /* copy the rpc results into the return arguments */ @@ -626,7 +626,7 @@ kgss_init_sec_context_wrapped( { CLIENT *clnt; - OM_uint32 minor_status_temp; + OM_uint32 minor_status_temp; gss_buffer_desc external_name; gss_OID name_type; @@ -1297,7 +1297,7 @@ kgss_delete_sec_context_wrapped(void *private, if (minor_status != NULL) *minor_status = DEFAULT_MINOR_STAT; if (context_handle != NULL) - *context_handle = NULL; + *context_handle = 0; if (output_token != NULL) output_token->length = 0; @@ -1312,7 +1312,7 @@ kgss_delete_sec_context_wrapped(void *private, *minor_status = res.minor_status; if (res.context_handle.GSS_CTX_ID_T_len == 0) - *context_handle = NULL; + *context_handle = 0; else *context_handle = *((gssd_ctx_id_t *)res.context_handle.GSS_CTX_ID_T_val); @@ -1421,7 +1421,7 @@ kgss_export_sec_context_wrapped(minor_status, if (minor_status != NULL) *minor_status = DEFAULT_MINOR_STAT; if (context_handle != NULL) - *context_handle = NULL; + *context_handle = 0; if (output_token != NULL) output_token->length = 0; killgssd_handle(clnt); @@ -1436,7 +1436,7 @@ kgss_export_sec_context_wrapped(minor_status, *minor_status = res.minor_status; if (res.context_handle.GSS_CTX_ID_T_len == 0) - *context_handle = NULL; + *context_handle = 0; else *context_handle = *((gssd_ctx_id_t *)res.context_handle.GSS_CTX_ID_T_val); @@ -1515,7 +1515,7 @@ kgss_import_sec_context(minor_status, OM_uint32 * minor_status; const gss_buffer_t interprocess_token; -gss_ctx_id_t context_handle; +gss_ctx_id_t context_handle; { OM_uint32 status; @@ -2187,7 +2187,7 @@ kgss_inquire_cred_wrapped(minor_status, { CLIENT *clnt; - OM_uint32 minor_status_temp; + OM_uint32 minor_status_temp; gss_buffer_desc external_name; gss_OID_desc name_type; int i; diff --git a/usr/src/uts/common/gssapi/include/mechglueP.h b/usr/src/uts/common/gssapi/include/mechglueP.h index f79b660c85..8a3e5f6125 100644 --- a/usr/src/uts/common/gssapi/include/mechglueP.h +++ b/usr/src/uts/common/gssapi/include/mechglueP.h @@ -46,7 +46,7 @@ #ifdef _KERNEL #include <rpc/rpc.h> -#endif +#endif #ifndef g_OID_copy /* SUNW15resync */ #define g_OID_copy(o1, o2) \ @@ -154,9 +154,9 @@ typedef OM_uint32 (*gss_acquire_cred_with_password_sfct)( * * This contants all of the functions defined in gssapi.h except for * gss_release_buffer() and gss_release_oid_set(), which I am - * assuming, for now, to be equal across mechanisms. + * assuming, for now, to be equal across mechanisms. */ - + typedef struct gss_config { #if 0 /* Solaris Kerberos */ OM_uint32 priority; @@ -495,7 +495,7 @@ typedef struct gss_config { } *gss_mechanism; - + #ifndef _KERNEL /* This structure MUST NOT be used by any code outside libgss */ typedef struct gss_config_ext { @@ -536,7 +536,7 @@ gss_mechanism_ext __gss_get_mechanism_ext(const gss_OID); char *__gss_get_kmodName(const gss_OID); char *__gss_get_modOptions(const gss_OID); OM_uint32 __gss_import_internal_name(OM_uint32 *, const gss_OID, - gss_union_name_t, gss_name_t *); + gss_union_name_t, gss_name_t *); OM_uint32 __gss_export_internal_name(OM_uint32 *, const gss_OID, const gss_name_t, gss_buffer_t); OM_uint32 __gss_display_internal_name(OM_uint32 *, const gss_OID, @@ -721,7 +721,7 @@ struct kgss_ctx { (((ctx) == GSS_C_NO_CONTEXT) ? (gssd_ctx_id_t)(uintptr_t)(ctx) : \ KCTX_TO_GSSD_CTX(ctx)) #define KGSS_CTX_TO_GSSD_CTXV(ctx) \ - (((ctx) == GSS_C_NO_CONTEXT) ? (NULL) : KCTX_TO_CTXV(ctx)) + (((ctx) == GSS_C_NO_CONTEXT) ? (0) : KCTX_TO_CTXV(ctx)) #ifdef _KERNEL #define KCTX_TO_I_CTX(ctx) (KCTX_TO_KGSS_CTX(ctx)->gssd_i_ctx) |
