summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-08-05 12:05:18 +0200
committerPavel Březina <pbrezina@redhat.com>2013-08-08 13:08:02 +0200
commit99e2d39ce89ffd67566c32933eefbaf1667ee949 (patch)
tree8ec8f675e4e2b13da2782d7b4d885941374a85bd
parentb41f69f10acfeb2ec4179b519e663cd4b7c960a7 (diff)
downloadsssd_unused-slinklist.zip
sssd_unused-slinklist.tar.gz
sssd_unused-slinklist.tar.xz
-rw-r--r--src/providers/ad/ad_srv.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/providers/ad/ad_srv.c b/src/providers/ad/ad_srv.c
index 01660c4..88770f1 100644
--- a/src/providers/ad/ad_srv.c
+++ b/src/providers/ad/ad_srv.c
@@ -570,8 +570,18 @@ static errno_t ad_sort_servers(struct ares_srv_reply **list, void *pvt)
goto done;
}
+ size_t num_servers;
+ struct ares_srv_reply *record;
+ num_servers = 0;
+ for (record = *list; record != NULL; record = record->next) {
+ DEBUG(0, ("%s %d %d\n", record->host, record->priority, record->weight));
+ num_servers++;
+ }
+ DEBUG(0, ("Pre sort: Got %lu servers\n", num_servers));
+
state = talloc_get_type(pvt, struct ad_srv_plugin_state);
domain = state->discovery_domain;
+ domain = "sub.ad.pb";
/* first sort by rfc2782 */
ret = resolv_sort_srv_reply(list);
@@ -581,6 +591,13 @@ static errno_t ad_sort_servers(struct ares_srv_reply **list, void *pvt)
goto done;
}
+ num_servers = 0;
+ for (record = *list; record != NULL; record = record->next) {
+ DEBUG(0, ("%s %d %d\n", record->host, record->priority, record->weight));
+ num_servers++;
+ }
+ DEBUG(0, ("After sort: Got %lu servers\n", num_servers));
+
/* when several servers share priority, prefer the one that is located
* in the same domain as client (e.g. child domain instead of forest
* root) but obey their weight */