+Fri Nov 1 13:15:37 1996 Barry Jaspan <bjaspan@mit.edu>
+
+ * api.2/get-principal-v2.exp, api.2/mod-principal-v2.exp: update
+ for new tl_data semantics [krb5-admin/140]
+
Thu Oct 31 08:42:18 1996 Ezra Peisach <epeisach@mit.edu>
* Makefile.in (check): Only run tests is Perl, tcl, runtest.
fail "$test: key_data $key_data should be {}"
set failed 1
}
- if {$tl_data != {}} {
- fail "$test: tl_data $tl_data should be {}"
+ if {$tl_data != "{}"} {
+ fail "$test: tl_data $tl_data should be empty"
set failed 1
}
if {$failed == 0} {
proc test103 {} {
global test prompt
+ if {! (( [principal_exists "$test/a"]) ||
+ [create_principal "$test/a"])} {
+ error_and_restart "$test: couldn't create principal \"$test/a\""
+ return
+ }
+
if {! [cmd {
kadm5_init admin admin $KADM5_ADMIN_SERVICE null \
$KADM5_STRUCT_VERSION $KADM5_API_VERSION_2 \
error "$test: unexpected failure in init"
return
}
- if {! [cmd {
- kadm5_get_principal $server_handle testuser p \
+
+ if { ! [cmd [format {
+ kadm5_modify_principal $server_handle \
+ "{%s/a} 0 0 0 0 {%s/a} 0 0 0 0 null 0 0 0 0 0 0 1 {} {{999 6 foobar}}" \
+ {KADM5_TL_DATA}
+ } $test $test]]} {
+ fail "$test: cannot set TL_DATA"
+ return
+ }
+
+ if {! [cmd [format {
+ kadm5_get_principal $server_handle {%s/a} p \
{KADM5_PRINCIPAL_NORMAL_MASK KADM5_TL_DATA}
- }]} {
+ } $test]]} {
error "$test: unexpected failure in get_principal"
}
send "lindex \$p 17\n"
if {$num_tl == 0} {
fail "$test: num_tl $num_tl should not be 0"
- } elseif {$tl_data == {}} {
- fail "$test: tl_data $tl_data should not be {}"
- } else {
+ } elseif {$tl_data == "{{999 6 foobar}}"} {
pass "$test"
+ } else {
+ fail "$test: tl_data $tl_data should be {{999 6 foobar}}"
}
if { ! [cmd {kadm5_destroy $server_handle}]} {
api_exit
api_start
-test "modify-principal 100-104"
+test "modify-principal 100-105"
proc test100_104 {} {
global test
global prompt
{KADM5_KEY_DATA}
} "BAD_MASK"
+ # test 105
+ one_line_fail_test [format {
+ kadm5_modify_principal $server_handle \
+ "{%s/a} 0 0 0 0 {%s/a} 0 0 0 0 null 0 0 0 0 0 0 1 {} {{1 1 x}}" \
+ {KADM5_TL_DATA}
+ } $test $test] "BAD_TL_TYPE"
+
# test 100,104
if { ! [cmd [format {
kadm5_modify_principal $server_handle \
- "{%s/a} 0 0 0 0 {%s/a} 0 0 0 0 null 0 88 0 0 0 0 1 {} {{999 6 foobar}}" \
+ "{%s/a} 0 0 0 0 {%s/a} 0 0 0 0 null 0 88 0 0 0 0 1 {} {{990 6 foobar}}" \
{KADM5_MAX_RLIFE KADM5_TL_DATA}
} $test $test]]} {
fail "$test: cannot set MAX_RLIFE or TL_DATA"
return
}
}
- if {($rlife == 88) && ([string match "*{999 6 foobar}*" $tl])} {
+ if {($rlife == 88) && ($tl == "{{990 6 foobar}}")} {
pass "$test"
} else {
- fail "$test: $rlife should be 88, $tl should contain {999 6 foobar}"
+ fail "$test: $rlife should be 88, $tl should be {{990 6 foobar}}"
}
if { ! [cmd {kadm5_destroy $server_handle}]} {