merge from krb5-1-2-beta4
authorKen Raeburn <raeburn@mit.edu>
Fri, 23 Jun 2000 22:53:06 +0000 (22:53 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 23 Jun 2000 22:53:06 +0000 (22:53 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12427 dc483132-0cff-0310-8789-dd5450dbe970

src/tests/create/ChangeLog
src/tests/create/kdb5_mkdums.c
src/tests/dejagnu/config/ChangeLog
src/tests/dejagnu/config/default.exp
src/tests/hammer/ChangeLog
src/tests/hammer/kdc5_hammer.c
src/tests/verify/ChangeLog
src/tests/verify/kdb5_verify.c

index 100db876a82335a2bfefc032890f75348030d56e..1d080084ce856a0817e7eb47456a90d5c0d03785 100644 (file)
@@ -1,3 +1,13 @@
+2000-05-11  Nalin Dahyabhai  <nalin@redhat.com>
+
+       * kdb5_mkdums.c (main): Make sure buffer 'principal' is terminated.
+
+2000-05-08  Ken Raeburn  <raeburn@mit.edu>
+           Nalin Dahyabhai  <nalin@redhat.com>
+
+       * kdb5_mkdums.c (main): Make sure buffer "tmp" is
+       null-terminated.  Don't overflow buffer "tmp" or "tmp2".
+
 1999-10-26  Wilfredo Sanchez  <tritan@mit.edu>
 
        * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES,
index 3cacc19df18572a24eec9367f51a300d4648a048..aa1854c8f460c82a75eee35c0c733b6b6e835957 100644 (file)
@@ -130,7 +130,8 @@ char *argv[];
            mkey_password = optarg;
            break;
        case 'p':                       /* prefix name to create */
-           strcpy(principal_string, optarg);
+           strncpy(principal_string, optarg, sizeof(principal_string) - 1);
+           principal_string[sizeof(principal_string) - 1] = '\0';
            suffix = principal_string + strlen(principal_string);
            break;
        case 'n':                        /* how many to create */
@@ -195,13 +196,14 @@ char *argv[];
         again given a prefix and count to test the db lib and kdb */
       (void) sprintf(suffix, "%d", n);
       (void) sprintf(tmp, "%s-DEPTH-1", principal_string);
+      tmp[sizeof(tmp) - 1] = '\0';
       str_newprinc = tmp;
       add_princ(test_context, str_newprinc);
 
       for (i = 2; i <= depth; i++) {
-       tmp2[0] = '\0';
        (void) sprintf(tmp2, "/%s-DEPTH-%d", principal_string, i);
-       strcat(tmp, tmp2);
+       tmp2[sizeof(tmp2) - 1] = '\0';
+       strncat(tmp, tmp2, sizeof(tmp) - 1 - strlen(tmp));
        str_newprinc = tmp;
        add_princ(test_context, str_newprinc);
       }
index 54d0e4b826802a55816e81a8472a9f9ca76be01b..f3767a9f5cc0655e414b131fc44e7d4defc7b395 100644 (file)
@@ -1,3 +1,8 @@
+2000-05-31  Ken Raeburn  <raeburn@mit.edu>
+
+       * default.exp (setup_kerberos_files): Include des3 in supported
+       enctypes.
+
 2000-02-07  Tom Yu  <tlyu@mit.edu>
 
        * default.exp: Remove default_tgs_enctypes for now as it was
index 44ffab7a96fbb71f2162329daec25e6cb489aff7..e3993544e498fdf7a1a3922fa053ed3dbc194438 100644 (file)
@@ -352,8 +352,7 @@ proc setup_kerberos_files { } {
        puts $conffile "                max_renewable_life = 3:00:00"
        puts $conffile "                master_key_type = des-cbc-md5"
        puts $conffile "                master_key_name = master/key"
-# des3-cbc-sha1:normal
-       puts $conffile "                supported_enctypes =  des-cbc-crc:normal des-cbc-md5:normal des-cbc-crc:v4 des-cbc-md5:norealm"
+       puts $conffile "                supported_enctypes = des3-cbc-sha1:normal des-cbc-crc:normal des-cbc-md5:normal des-cbc-crc:v4 des-cbc-md5:norealm"
        puts $conffile "                kdc_supported_enctypes = des3-cbc-sha1:normal des-cbc-crc:normal des-cbc-md5:normal des-cbc-crc:v4 des-cbc-md5:norealm"
        puts $conffile "                kdc_ports = 3088"
        puts $conffile "                default_principal_expiration = 2037.12.31.23.59.59"
index 84d1eb64a3e6c8c70265b32074413df996644871..aed2f63df2c4f36a69820c2ebad4d0944e1b99fb 100644 (file)
@@ -1,3 +1,12 @@
+2000-05-11  Nalin Dahyabhai  <nalin@redhat.com>
+
+       * kdc5_hammer.c (main): Make sure buffer 'prefix' is null-terminated.
+
+2000-05-08  Ken Raeburn  <raeburn@mit.edu>
+           Nalin Dahyabhai  <nalin@redhat.com>
+
+       * kdc5_hammer.c (main): Don't overflow buffers "ctmp" or "stmp".
+
 1999-10-26  Wilfredo Sanchez  <tritan@mit.edu>
 
        * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES,
index 780f92d83ec89f6cd1e01ca3887107a5a87afe70..6429a38edad816a0f88b5e94502be494299d2b0c 100644 (file)
@@ -169,7 +169,8 @@ main(argc, argv)
            depth = atoi(optarg);       /* how deep to go */
            break;
        case 'p':                       /* prefix name to check */
-           strcpy(prefix, optarg);
+           strncpy(prefix, optarg, sizeof(prefix) - 1);
+           prefix[sizeof(prefix) - 1] = '\0';
            break;
        case 'n':                        /* how many to check */
            num_to_check = atoi(optarg);
@@ -240,10 +241,11 @@ main(argc, argv)
           again given a prefix and count to test the db lib and kdb */
        ctmp[0] = '\0';
        for (i = 1; i <= depth; i++) {
-         ctmp2[0] = '\0';
          (void) sprintf(ctmp2, "%s%s%d-DEPTH-%d", (i != 1) ? "/" : "",
                         prefix, n, i);
-         strcat(ctmp, ctmp2);
+         ctmp2[sizeof(ctmp2) - 1] = '\0';
+         strncat(ctmp, ctmp2, sizeof(ctmp) - 1 - strlen(ctmp));
+         ctmp[sizeof(ctmp) - 1] = '\0';
          sprintf(client, "%s@%s", ctmp, cur_realm);
 
          if (get_tgt (test_context, client, &client_princ, ccache)) {
@@ -255,10 +257,11 @@ main(argc, argv)
 
          stmp[0] = '\0';
          for (j = 1; j <= depth; j++) {
-           stmp2[0] = '\0';
            (void) sprintf(stmp2, "%s%s%d-DEPTH-%d", (j != 1) ? "/" : "",
                           prefix, n, j);
-           strcat(stmp, stmp2);
+           stmp2[sizeof (stmp2) - 1] = '\0';
+           strncat(stmp, stmp2, sizeof(stmp) - 1 - strlen(stmp));
+           stmp[sizeof(stmp) - 1] = '\0';
            sprintf(server, "%s@%s", stmp, cur_realm);
            if (verify_cs_pair(test_context, client, client_princ, 
                               stmp, cur_realm, n, i, j, ccache))
index 2f63d09fe4ce1eac8f2870640b757b5fd3458664..a97ea811a481023b9eb2c1089166a660ba508cfc 100644 (file)
@@ -1,3 +1,12 @@
+2000-05-11  Nalin Dahyabhai  <nalin@redhat.com>
+
+       * kdb5_verify.c (main): Make sure buffer "principal_string" is
+       properly terminated.
+
+2000-05-08  Nalin Dahyabhai  <nalin@redhat.com>
+
+       * kdb5_verify.c (main): Don't overflow buffer "tmp".
+
 1999-10-26  Wilfredo Sanchez  <tritan@mit.edu>
 
        * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES,
index bfb0661369a300ca8046aa83cde0908b1d908437..e4277b18c64184af8f8e6d8a23d4cf8248235135 100644 (file)
@@ -131,7 +131,8 @@ char *argv[];
            mkey_password = optarg;
            break;
        case 'p':                       /* prefix name to check */
-           strcpy(principal_string, optarg);
+           strncpy(principal_string, optarg, sizeof(principal_string) - 1);
+           principal_string[sizeof(principal_string) - 1] = '\0';
            suffix = principal_string + strlen(principal_string);
            break;
        case 'n':                        /* how many to check */
@@ -199,9 +200,9 @@ char *argv[];
       if (check_princ(context, str_princ)) errors++;
 
       for (i = 2; i <= depth; i++) {
-       tmp2[0] = '\0';
        (void) sprintf(tmp2, "/%s-DEPTH-%d", principal_string, i);
-       strcat(tmp, tmp2);
+       tmp2[sizeof(tmp2) - 1] = '\0';
+       strncat(tmp, tmp2, sizeof(tmp) - 1 - strlen(tmp));
        str_princ = tmp;
        if (check_princ(context, str_princ)) errors++;
       }