11163 mech_krb5: NULL pointer errors

Review Request #1948 - Created June 1, 2019 and submitted

Information
Toomas Soome
illumos-gate
11163
ac56760...
Reviewers
general
../krb5/krb/vfy_increds.c: In function 'krb5_cc_copy_creds_except':
../krb5/krb/vfy_increds.c:22:57: error: comparison between pointer and integer [-Werror]
    if ((code = krb5_cc_set_flags(context, incc, flags)) != NULL)
                                                         ^~
../krb5/krb/vfy_increds.c:25:58: error: comparison between pointer and integer [-Werror]
    if ((code = krb5_cc_set_flags(context, outcc, flags)) != NULL)
                                                          ^~
../krb5/krb/vfy_increds.c:29:60: error: comparison between pointer and integer [-Werror]
    if ((code = krb5_cc_start_seq_get(context, incc, &cur)) != NULL)
                                                            ^~
../krb5/krb/vfy_increds.c:33:67: error: comparison between pointer and integer [-Werror]
    while ((code = krb5_cc_next_cred(context, incc, &cur, &creds)) == NULL) {
                                                                   ^~
../krb5/krb/vfy_increds.c: In function 'krb5_verify_init_creds':
../krb5/krb/vfy_increds.c:168:70: error: comparison between pointer and integer [-Werror]
       if ((ret = krb5_cc_initialize(context, ccache, creds->client)) != NULL)
                                                                      ^~
../krb5/krb/vfy_increds.c:172:62: error: comparison between pointer and integer [-Werror]
       if ((ret = krb5_cc_store_cred(context, ccache, creds)) != NULL)
                                                              ^~
../krb5/krb/vfy_increds.c:215:69: error: comparison between pointer and integer [-Werror]
     if (((ret = krb5_cc_resolve(context, "MEMORY:rd_req2", &retcc)) != NULL) ||
                                                                     ^~
../krb5/krb/vfy_increds.c:216:68: error: comparison between pointer and integer [-Werror]
         ((ret = krb5_cc_initialize(context, retcc, creds->client)) != NULL) ||
                                                                    ^~
../krb5/krb/vfy_increds.c:218:23: error: comparison between pointer and integer [-Werror]
       creds->server)) != NULL)) {
                       ^~

../krb5/krb/gic_keytab.c: In function 'krb5_get_as_key_keytab':
../krb5/krb/gic_keytab.c:75:23: error: comparison between pointer and integer [-Werror]
      etype, &kt_ent)) != NULL)
                       ^~

../krb5/keytab/kt_solaris.c: In function 'krb5_kt_add_ad_entries':
../krb5/keytab/kt_solaris.c:216:29: error: comparison between pointer and integer [-Werror]
  if (code != 0 || *enctypes == NULL)
                             ^~
../krb5/keytab/kt_solaris.c: In function 'krb5_kt_ad_validate':
../krb5/keytab/kt_solaris.c:444:29: error: comparison between pointer and integer [-Werror]
  if (code != 0 || *enctypes == NULL)
                             ^~

/code/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/mech/acquire_cred_with_pw.c: In function 'acquire_init_cred_with_pw':
/code/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/mech/acquire_cred_with_pw.c:127:43: error: comparison between pointer and integer [-Werror]
  if (password == NULL || password->length == NULL ||
                                           ^~
../crypto/des/afsstring2key.c: In function 'mit_afs_crypt':
../crypto/des/afsstring2key.c:385:21: error: comparison between pointer and integer [-Werror]
  for(i=0; ((c= *pw) != NULL) && i<64; pw++){
                     ^~

../profile/prof_solaris.c: In function '__profile_validate':
../profile/prof_solaris.c:815:22: error: comparison between pointer and integer [-Werror]
   while ((c = *tr++) != NULL) {
                      ^~
../profile/prof_solaris.c:835:23: error: comparison between pointer and integer [-Werror]
    while ((c = *tr++) != NULL) {
                       ^~

/code/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/mech/init_sec_context.c:1684:59: error: comparison between pointer and integer [-Werror]
  if (((major = kg_get_defcred(minor_status, cred_handle)) != NULL) &&
                                                           ^~
cc1: all warnings being treated as errors
*** Error code 1

  
John Levon
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...