summaryrefslogtreecommitdiff
path: root/usr/src/cmd/gss
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-24 15:53:10 +0200
committerToomas Soome <tsoome@me.com>2019-07-12 08:54:08 +0300
commit0ab8aa7074d0531c1e2453adcf08e519888b024d (patch)
tree56d3b26ae548d7ae9aa7b6c2ca0a3bbd258b51d2 /usr/src/cmd/gss
parent869657d0e7833bf270a27c5cff9895b431d6b0a5 (diff)
downloadillumos-gate-0ab8aa7074d0531c1e2453adcf08e519888b024d.tar.gz
11342 gss: NULL pointer errors
Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/cmd/gss')
-rw-r--r--usr/src/cmd/gss/gssd/gssd_clnt_stubs.c16
-rw-r--r--usr/src/cmd/gss/gssd/gssdtest.c4
2 files changed, 10 insertions, 10 deletions
diff --git a/usr/src/cmd/gss/gssd/gssd_clnt_stubs.c b/usr/src/cmd/gss/gssd/gssd_clnt_stubs.c
index 9eba27a66c..4744257959 100644
--- a/usr/src/cmd/gss/gssd/gssd_clnt_stubs.c
+++ b/usr/src/cmd/gss/gssd/gssd_clnt_stubs.c
@@ -162,7 +162,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)
@@ -294,7 +294,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;
@@ -509,14 +509,14 @@ OM_uint32 gssd_cred_verifier;
if (minor_status != NULL)
*minor_status = DEFAULT_MINOR_STAT;
if (cred_handle != NULL)
- *cred_handle = NULL;
+ *cred_handle = 0;
return (GSS_S_FAILURE);
}
/* 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 */
if (minor_status != NULL)
@@ -1180,7 +1180,7 @@ kgss_delete_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;
@@ -1193,7 +1193,7 @@ kgss_delete_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
/*LINTED*/
*context_handle = *((gssd_ctx_id_t *)
@@ -2320,7 +2320,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;
@@ -2333,7 +2333,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);
diff --git a/usr/src/cmd/gss/gssd/gssdtest.c b/usr/src/cmd/gss/gssd/gssdtest.c
index ea8e3735d0..079c720f55 100644
--- a/usr/src/cmd/gss/gssd/gssdtest.c
+++ b/usr/src/cmd/gss/gssd/gssdtest.c
@@ -211,7 +211,7 @@ do_gssdtest(char *buf)
printf(gettext("Loop Count is %d \n"), i);
/*
* if (i > 53)
- * printf ("Loop counter is greater than 55\n");
+ * printf ("Loop counter is greater than 55\n");
*/
_gss_acquire_cred(argc, argv);
_gss_init_sec_context(argc, argv);
@@ -1930,7 +1930,7 @@ char **argv;
else
mechType = gss_str2oid((char *)GSS_KRB5_MECH_OID);
- if (mechType == NULL || mechType->length == NULL) {
+ if (mechType == NULL || mechType->length == 0) {
FREE(nameType->elements, nameType->length);
FREE(nameType, sizeof (gss_OID_desc));
printf(gettext("improperly formated mech OID\n"));