summaryrefslogtreecommitdiffstats
path: root/server/confdb/confdb.c
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-03-02 09:35:06 -0500
committerSimo Sorce <ssorce@redhat.com>2009-03-02 09:47:54 -0500
commit5e3966c99180abdcd1e21774a882f1c14c47aae8 (patch)
tree1a882b9d49f2c7ac25d70f0bbb644b5cefed6439 /server/confdb/confdb.c
parent6f5b1ad8c234d58041e45aef4558d50f44d7f021 (diff)
downloadsssd-5e3966c99180abdcd1e21774a882f1c14c47aae8.tar.gz
sssd-5e3966c99180abdcd1e21774a882f1c14c47aae8.tar.xz
sssd-5e3966c99180abdcd1e21774a882f1c14c47aae8.zip
Implement GetUserAttributes in the InfoPipe
This patch adds support for requesting user data in the sysdb via the InfoPipe. It currently has support for reading defined entries of integral, floating-point or string types. Tasks remaining: 1) Implement call to the provider when cache is out of date 2) Support byte arrays for userpic and similar I modified sysdb_search_ctx in sysdb_search.c to accept an array of attributes to pass into the LDB search. I also made one additional related fix: the btreemap now sorts in the correct order. Previously I had accidentally transposed the two values for sorting, so the map would always have been in exact reverse order.
Diffstat (limited to 'server/confdb/confdb.c')
-rw-r--r--server/confdb/confdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/confdb/confdb.c b/server/confdb/confdb.c
index e93a4f45a..4c895d5f1 100644
--- a/server/confdb/confdb.c
+++ b/server/confdb/confdb.c
@@ -612,8 +612,8 @@ static int _domain_comparator(const void *key1, const void *key2)
ret = strcasecmp((const char *)key1, (const char *)key2);
if (ret) {
/* special case LOCAL to be always the first domain */
- if (strcmp(key1, "LOCAL") == 0) return 1;
- if (strcmp(key2, "LOCAL") == 0) return -1;
+ if (strcmp(key1, "LOCAL") == 0) return -1;
+ if (strcmp(key2, "LOCAL") == 0) return 1;
}
return ret;
}