From: Paul Park Date: Tue, 16 May 1995 17:20:43 +0000 (+0000) Subject: Fix Ultrix problems for tests X-Git-Tag: krb5-1.0-beta6~1975 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cc8af2def9828faeed6a903912a162a7284971d3;p=krb5.git Fix Ultrix problems for tests git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5822 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kadm/ChangeLog b/src/lib/kadm/ChangeLog index 42a552ca8..76323c3a8 100644 --- a/src/lib/kadm/ChangeLog +++ b/src/lib/kadm/ChangeLog @@ -1,4 +1,12 @@ +Tue May 16 13:19:04 EDT 1995 Paul Park (pjpark@mit.edu) + * t_dbentry.c - Change isset to is_a_set to keep Ultrix happy. Also + correctly calculate the length of the standard pwd. + so that we don't overwrite the end of the malloc()ed + string. + * t_ktentry.c - Remove isset logic, no differentiation for keytabs. + + Tue May 16 10:35:54 EDT 1995 Paul Park (pjpark@mit.edu) * t_dbentry.c, t_ktentry.c - new test modules for encode/decode functions. These convert to and from krb5_db_entry and diff --git a/src/lib/kadm/t_dbentry.c b/src/lib/kadm/t_dbentry.c index e42577da8..ecdc1b870 100644 --- a/src/lib/kadm/t_dbentry.c +++ b/src/lib/kadm/t_dbentry.c @@ -106,7 +106,7 @@ gen_dbent(kcontext, dbentp, isrand, validp, pwdp, expectp) } else { if (is_set) { - *pwdp = (char *) malloc(strlen(defpass)); + *pwdp = (char *) malloc(strlen(defpass)+1); strcpy(*pwdp, defpass); *validp |= KRB5_ADM_M_PASSWORD; } @@ -533,11 +533,11 @@ print_dbent(kcontext, ivalid, ientp, ipwd) * using krb5_adm_proto_to_dbent. Then verify the match. */ static krb5_int32 -do_test(pname, verbose, isrand, isset, title, passno) +do_test(pname, verbose, isrand, is_a_set, title, passno) char *pname; krb5_boolean verbose; krb5_boolean isrand; - krb5_boolean isset; + krb5_boolean is_a_set; char *title; krb5_int32 passno; { @@ -575,7 +575,7 @@ do_test(pname, verbose, isrand, isset, title, passno) complist = (krb5_data *) NULL; should_fail = 0; if (!isrand) { - if (isset) + if (is_a_set) in_validmask = KRB5_ADM_M_SET; else in_validmask = KRB5_ADM_M_GET; diff --git a/src/lib/kadm/t_ktentry.c b/src/lib/kadm/t_ktentry.c index ed2592b27..1e1a52c9c 100644 --- a/src/lib/kadm/t_ktentry.c +++ b/src/lib/kadm/t_ktentry.c @@ -194,11 +194,10 @@ print_ktent(kcontext, ientp) * using krb5_adm_proto_to_ktent. Then verify the match. */ static krb5_int32 -do_test(pname, verbose, isrand, isset, title, passno) +do_test(pname, verbose, isrand, title, passno) char *pname; krb5_boolean verbose; krb5_boolean isrand; - krb5_boolean isset; char *title; krb5_int32 passno; { @@ -362,8 +361,7 @@ main(argc, argv) if (error) return(error); - error += do_test(programname, verbose, 0, 1, "Standard set test", 0); - error += do_test(programname, verbose, 0, 0, "Standard get test", 0); + error += do_test(programname, verbose, 0, "Standard test", 0); for (i=0; i