Print this page
5218 posix definition of NULL
correct unistd.h and iso/stddef_iso.h
update gate source affected

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/vfy_increds.c
          +++ new/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/vfy_increds.c
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12  static krb5_error_code
  13   13  krb5_cc_copy_creds_except(krb5_context context, krb5_ccache incc, krb5_ccache outcc, krb5_principal princ)
  14   14  {
  15   15     krb5_error_code code;
  16   16     krb5_flags flags;
  17   17     krb5_cc_cursor cur;
  18   18     krb5_creds creds;
  19   19  
  20   20     flags = 0;                           /* turns off OPENCLOSE mode */
  21   21     /* Solaris Kerberos */
  22      -   if ((code = krb5_cc_set_flags(context, incc, flags)) != NULL)
       22 +   if ((code = krb5_cc_set_flags(context, incc, flags)) != 0)
  23   23        return(code);
  24   24     /* Solaris Kerberos */
  25      -   if ((code = krb5_cc_set_flags(context, outcc, flags)) != NULL)
       25 +   if ((code = krb5_cc_set_flags(context, outcc, flags)) != 0)
  26   26        return(code);
  27   27  
  28   28     /* Solaris Kerberos */
  29      -   if ((code = krb5_cc_start_seq_get(context, incc, &cur)) != NULL)
       29 +   if ((code = krb5_cc_start_seq_get(context, incc, &cur)) != 0)
  30   30        goto cleanup;
  31   31  
  32   32     /* Solaris Kerberos */
  33      -   while ((code = krb5_cc_next_cred(context, incc, &cur, &creds)) == NULL) {
       33 +   while ((code = krb5_cc_next_cred(context, incc, &cur, &creds)) == 0) {
  34   34        if (krb5_principal_compare(context, princ, creds.server))
  35   35           continue;
  36   36  
  37   37        code = krb5_cc_store_cred(context, outcc, &creds);
  38   38        krb5_free_cred_contents(context, &creds);
  39   39        if (code)
  40   40           goto cleanup;
  41   41     }
  42   42  
  43   43     if (code != KRB5_CC_END)
↓ open down ↓ 114 lines elided ↑ open up ↑
 158  158           in a memory ccache, then call the library.  Later, we'll copy
 159  159           everything except the initial cred into the ccache we return to
 160  160           the user.  A clean implementation would involve library
 161  161           internals with a coherent idea of "in" and "out". */
 162  162  
 163  163        /* insert the initial cred into the ccache */
 164  164  
 165  165        if ((ret = krb5_cc_resolve(context, "MEMORY:rd_req", &ccache)))
 166  166           goto cleanup;
 167  167        /* Solaris Kerberos */
 168      -      if ((ret = krb5_cc_initialize(context, ccache, creds->client)) != NULL)
      168 +      if ((ret = krb5_cc_initialize(context, ccache, creds->client)) != 0)
 169  169           goto cleanup;
 170  170  
 171  171        /* Solaris Kerberos */
 172      -      if ((ret = krb5_cc_store_cred(context, ccache, creds)) != NULL)
      172 +      if ((ret = krb5_cc_store_cred(context, ccache, creds)) != 0)
 173  173           goto cleanup;
 174  174  
 175  175        /* set up for get_creds */
 176  176        memset(&in_creds, 0, sizeof(in_creds));
 177  177        in_creds.client = creds->client;
 178  178        in_creds.server = server;
 179  179        if ((ret = krb5_timeofday(context, &in_creds.times.endtime)))
 180  180           goto cleanup;
 181  181        in_creds.times.endtime += 5*60;
 182  182  
↓ open down ↓ 22 lines elided ↑ open up ↑
 205  205     /* if we get this far, then the verification succeeded.  We can
 206  206        still fail if the library stuff here fails, but that's it */
 207  207  
 208  208     if (ccache_arg && ccache) {
 209  209         if (*ccache_arg == NULL) {
 210  210             krb5_ccache retcc;
 211  211  
 212  212             retcc = NULL;
 213  213  
 214  214             /* Solaris Kerberos */
 215      -           if (((ret = krb5_cc_resolve(context, "MEMORY:rd_req2", &retcc)) != NULL) ||
 216      -               ((ret = krb5_cc_initialize(context, retcc, creds->client)) != NULL) ||
      215 +           if (((ret = krb5_cc_resolve(context, "MEMORY:rd_req2", &retcc)) != 0) ||
      216 +               ((ret = krb5_cc_initialize(context, retcc, creds->client)) != 0) ||
 217  217                 ((ret = krb5_cc_copy_creds_except(context, ccache, retcc,
 218      -                                                creds->server)) != NULL)) {
      218 +                                                creds->server)) != 0)) {
 219  219                 /* Solaris Kerberos */
 220  220                 if (retcc)
 221  221                     (void) krb5_cc_destroy(context, retcc);
 222  222             } else {
 223  223                 *ccache_arg = retcc;
 224  224             }
 225  225         } else {
 226  226             ret = krb5_cc_copy_creds_except(context, ccache, *ccache_arg,
 227  227                                             server);
 228  228         }
↓ open down ↓ 23 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX