summaryrefslogtreecommitdiff
path: root/src/providers/krb5
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-12-19 18:37:32 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-12-20 19:41:11 +0100
commit10c50d237d6e3137499fcfaa5a804e6712e002ee (patch)
tree064fef0624e322ae68a6d166847c3cf5bac28ff5 /src/providers/krb5
parent3831f866292da4118e87e204ac8c02244825bf43 (diff)
downloadsssd-10c50d237d6e3137499fcfaa5a804e6712e002ee.tar.gz
sssd-10c50d237d6e3137499fcfaa5a804e6712e002ee.tar.bz2
sssd-10c50d237d6e3137499fcfaa5a804e6712e002ee.zip
krb5 tgt renewal: fix usage of ldb_dn_get_component_val()
For some reason I was under the impression that the DN components are counted backwards in libldb. This patch corrects this.
Diffstat (limited to 'src/providers/krb5')
-rw-r--r--src/providers/krb5/krb5_renew_tgt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/providers/krb5/krb5_renew_tgt.c b/src/providers/krb5/krb5_renew_tgt.c
index ccb7e6af..b5eee697 100644
--- a/src/providers/krb5/krb5_renew_tgt.c
+++ b/src/providers/krb5/krb5_renew_tgt.c
@@ -423,11 +423,11 @@ static errno_t check_ccache_files(struct renew_tgt_ctx *renew_tgt_ctx)
continue;
}
- /* The DNs of users in sysdb ends with ...,cn=domain.name,cn=sysdb, so
- * the value of the component before the last (index 1) is the domain
- * name. */
+ /* The DNs of users in sysdb looks like
+ * name=username,cn=users,cn=domain.name,cn=sysdb
+ * the value of the third component (index 2) is the domain name. */
- user_dom_val = ldb_dn_get_component_val(msgs[c]->dn, 1);
+ user_dom_val = ldb_dn_get_component_val(msgs[c]->dn, 2);
if (user_dom_val == NULL) {
DEBUG(SSSDBG_OP_FAILURE, ("Invalid user DN [%s].\n",
ldb_dn_get_linearized(msgs[c]->dn)));