summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-12-17 22:14:55 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-12-18 19:04:06 +0100
commit4ee7f390af4193656c1e6ba45c9c3c14dd64a8a9 (patch)
treebd3daa9eba6044f227e75497896bd6fc69b739bf
parentf2999e1d624d45e0142f39317461a6a1c996efb2 (diff)
downloadsssd-4ee7f390af4193656c1e6ba45c9c3c14dd64a8a9.tar.gz
sssd-4ee7f390af4193656c1e6ba45c9c3c14dd64a8a9.tar.bz2
sssd-4ee7f390af4193656c1e6ba45c9c3c14dd64a8a9.zip
select_principal_from_keytab() do wildcard lookups after specific ones
Currently the wildcard lookup '*$' is done before the one for host/our.hostname@REALM. This means we would ignore a more specific match in favour of an unspecific match with a principal which is only used in a AD environment. I think this is wrong an wildcards should only be used is all specific lookups fail.
-rw-r--r--src/util/sss_krb5.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c
index 0eb032a7..1b8dc79b 100644
--- a/src/util/sss_krb5.c
+++ b/src/util/sss_krb5.c
@@ -51,15 +51,15 @@ errno_t select_principal_from_keytab(TALLOC_CTX *mem_ctx,
* Priority of lookup:
* - our.hostname@REALM or host/our.hostname@REALM depending on the input
* - our.hostname$@REALM (AD domain)
- * - foobar$@REALM (AD domain)
* - host/our.hostname@REALM
+ * - foobar$@REALM (AD domain)
* - host/foobar@REALM
* - host/foo@BAR
* - pick the first principal in the keytab
*/
- const char *primary_patterns[] = {"%s", "%s$", "*$", "host/%s", "host/*",
+ const char *primary_patterns[] = {"%s", "%s$", "host/%s", "*$", "host/*",
"host/*", NULL};
- const char *realm_patterns[] = {"%s", "%s", "%s", "%s", "%s",
+ const char *realm_patterns[] = {"%s", "%s", "%s", "%s", "%s",
NULL, NULL};
DEBUG(5, ("trying to select the most appropriate principal from keytab\n"));