Finally applied patch from Nalin Dahyabhai at Red Hat to fix 0/NULL bugs in
authorKen Raeburn <raeburn@mit.edu>
Fri, 27 Aug 2004 23:01:56 +0000 (23:01 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 27 Aug 2004 23:01:56 +0000 (23:01 +0000)
variadic argument lists to krb5_build_principal{,_ext}.  Skipped the stylistic
patches that removed casts of NULL.

tag: 1850

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16693 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/gssftp/ftpd/ChangeLog
src/appl/gssftp/ftpd/ftpd.c
src/kadmin/dbutil/ChangeLog
src/kadmin/dbutil/loadv4.c
src/lib/krb5/ccache/ChangeLog
src/lib/krb5/ccache/t_cc.c
src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/conv_princ.c

index 1112b3fd0a4b20bb354dc8388246c156231caa03..8038333cb4ef080bef134804315bae7541bef6ea 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-27  Ken Raeburn  <raeburn@mit.edu>
+
+       * ftpd.c (ftpd_gss_convert_creds): Terminate argument list to
+       krb5_build_principal_ext with 0, not NULL.  Patch from Nalin
+       Dahyabhai.
+
 2004-08-27  Sam Hartman  <hartmans@mit.edu>
 
        * ftpd.c (passwd;): Patch from Garry Zacheiss to use
index eabc74fbb83ee7f78e6496064794a2f9f7415595..6048278d77cc8066873b33576da68bff7e7b0d21 100644 (file)
@@ -2954,7 +2954,7 @@ ftpd_gss_convert_creds(name, creds)
                                     6, "krbtgt",
                                     krb5_princ_realm(kcontext, me)->length,
                                     krb5_princ_realm(kcontext, me)->data,
-                                    NULL))
+                                    0))
                goto cleanup;
 
        memset((char *) &increds, 0, sizeof(increds));
index 6dee878659ef6241229522822ecbc920144fbe2d..374052d4feebf65669c838784cf1cf2f88b1bffd 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-27  Ken Raeburn  <raeburn@mit.edu>
+
+       * loadv4.c (enter_in_v5_db): Terminate argument list of
+       krb5_build_principal with NULL, not 0.  Patch from Nalin
+       Dahyabhai.
+
 2004-06-15  Tom Yu  <tlyu@mit.edu>
 
        * kadm5_create.c (add_admin_princs): Create kadmin/fqdn
index 07bc27645e7a2681de9b3c5ea554350dac5534f2..672db584bbe72a1d4c0ffa26bfd4ce27d2957f47 100644 (file)
@@ -540,8 +540,8 @@ Principal *princ;
     retval = krb5_build_principal(context, &mod_princ,
                                  strlen(realm), realm, princ->mod_name,
                                  princ->mod_instance[0] ? 
-                                   princ->mod_instance : 0,
-                                 0);
+                                 princ->mod_instance : NULL,
+                                 NULL);
     if (retval) {
        krb5_free_principal(context, entry.princ);
        return retval;
@@ -607,7 +607,7 @@ Principal *princ;
            retval = krb5_build_principal(context, &entry.princ,
                                          strlen(princ->instance),
                                          princ->instance,
-                                         "krbtgt", realm, 0);
+                                         "krbtgt", realm, NULL);
            if (retval)
                    return retval;
            retval = krb5_db_put_principal(context, &entry, &nentries);
index 59a1952596262e173c398f5a797260c4aa738647..dbf0a8b5b700efb3736f303b25ef17a9a4221ba7 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-27  Ken Raeburn  <raeburn@mit.edu>
+
+       * t_cc.c (init_test_cred): Terminate argument list to
+       krb5_build_principal with NULL, not 0.  Patch from Nalin
+       Dahyabhai.
+
 2004-08-15  Ken Raeburn  <raeburn@mit.edu>
 
        * cc_file.c (struct _krb5_fcc_data): Add new mutex
index 0e7ae84d69baa2fd75d9fa1c227c651d3a08ea6d..6559fb2bdcf20b92b04ff7b290cc1db66e92fd42 100644 (file)
@@ -84,10 +84,10 @@ static void init_test_cred(krb5_context context)
 {
 #define REALM "REALM"
   krb5_build_principal(context, &test_creds.client, sizeof(REALM), REALM,
-                      "client-comp1", "client-comp2", 0);
+                      "client-comp1", "client-comp2", NULL);
 
   krb5_build_principal(context, &test_creds.server, sizeof(REALM), REALM,
-                      "server-comp1", "server-comp2", 0);
+                      "server-comp1", "server-comp2", NULL);
 }
 
 static void free_test_cred(krb5_context context)
index 1e284cce0d48a4ddf14a20a08b468346a3630a0f..84092f11eeb1491476bb36b65a169abc8acfadb6 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-27  Ken Raeburn  <raeburn@mit.edu>
+
+       * conv_princ.c (krb5_425_conv_principal): Terminate argument list
+       to krb5_build_principal with NULL, not 0.  Patch from Nalin
+       Dahyabhai.
+
 2004-08-12  Alexandra Ellwood  <lxs@mit.edu>
 
         * get_in_tkt.c (get_init_creds):
index 6134baa0a22498ae229ff3e131826a5fadab5aae..885dc995adc0a26e805a6fc3c0b60bdf82977f33 100644 (file)
@@ -342,7 +342,7 @@ krb5_425_conv_principal(krb5_context context, const char *name, const char *inst
      
 not_service:   
      retval = krb5_build_principal(context, princ, strlen(realm), realm, name,
-                                  instance, 0);
+                                  instance, NULL);
      if (iterator) profile_iterator_free (&iterator);
      if (full_name) profile_free_list(full_name);
      if (v4realms) profile_free_list(v4realms);