summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-11-14 16:29:14 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-11-19 22:42:46 +0100
commitba098f8670c680c805531dd2714f32bd2c108860 (patch)
tree98e00ab4d3c4e92dcd0a7c5581dd75ef844b52f0 /src/tests
parent6ef6612dd9e52c879e536a8b06bfeb4408d337b1 (diff)
downloadsssd-ba098f8670c680c805531dd2714f32bd2c108860.tar.gz
sssd-ba098f8670c680c805531dd2714f32bd2c108860.tar.xz
sssd-ba098f8670c680c805531dd2714f32bd2c108860.zip
Fix compare_principal_realm() check
In case of a short UPN compare_principal_realm() erroneously returns an error.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/krb5_utils-tests.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/krb5_utils-tests.c b/src/tests/krb5_utils-tests.c
index 77dc27ca..bc1890f0 100644
--- a/src/tests/krb5_utils-tests.c
+++ b/src/tests/krb5_utils-tests.c
@@ -711,6 +711,12 @@ START_TEST(test_compare_principal_realm)
fail_unless(ret == EOK, "Failure with different realm");
fail_unless(different_realm == true, "Different realm but " \
"different_realm is not true.");
+
+ ret = compare_principal_realm("user@ABC", "REALMNAMELONGERTHANUPN",
+ &different_realm);
+ fail_unless(ret == EOK, "Failure with long realm name.");
+ fail_unless(different_realm == true, "Realm name longer than UPN but "
+ "different_realm is not true.");
}
END_TEST