summaryrefslogtreecommitdiff
path: root/nslcd/util.h
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2007-01-17 16:03:11 +0000
committerArthur de Jong <arthur@arthurdejong.org>2007-01-17 16:03:11 +0000
commitd2296ccd7c8bfdfffe4dc99c4c4db32eaae4c60b (patch)
treee35d6b53cc0b53c7425f8bf8f3923c28fc34562d /nslcd/util.h
parentc026629eedf04f9d3579180980bb6bfa6759d15b (diff)
move most config code into cfg.c, clean up dictornary stuff in util.c and do some more smaller restructuring
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@223 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/util.h')
-rw-r--r--nslcd/util.h43
1 files changed, 21 insertions, 22 deletions
diff --git a/nslcd/util.h b/nslcd/util.h
index 44698d9..eacc7da 100644
--- a/nslcd/util.h
+++ b/nslcd/util.h
@@ -44,22 +44,14 @@ enum nss_status _nss_ldap_dn2uid (const char *dn,
int *pIsNestedGroup, LDAPMessage ** pRes);
-#define NSS_LDAP_CONFIG_BUFSIZ 4096
-
-/*
- * Flags that are exposed via _nss_ldap_test_config_flag()
- */
-#define NSS_LDAP_FLAGS_INITGROUPS_BACKLINK 0x0001
-#define NSS_LDAP_FLAGS_PAGED_RESULTS 0x0002
-#define NSS_LDAP_FLAGS_RFC2307BIS 0x0004
-#define NSS_LDAP_FLAGS_CONNECT_POLICY_ONESHOT 0x0008
-
/*
* Escape '*' in a string for use as a filter
*/
int _nss_ldap_escape_string(const char *str,char *buf,size_t buflen);
+/* Dictionary functions. */
+
struct ldap_datum
{
void *data;
@@ -73,17 +65,24 @@ struct ldap_datum
#define NSS_LDAP_DB_NORMALIZE_CASE 0x1
-enum nss_status _nss_ldap_db_put (void *db,
- unsigned flags,
- const struct ldap_datum * key,
- const struct ldap_datum * value);
-enum nss_status _nss_ldap_db_get (void *db,
- unsigned flags,
- const struct ldap_datum * key,
- struct ldap_datum * value);
-
-enum nss_status
-_nss_ldap_add_uri (struct ldap_config *result, const char *uri,
- char **buffer, size_t *buflen);
+struct ldap_dictionary
+{
+ struct ldap_datum key;
+ struct ldap_datum value;
+ struct ldap_dictionary *next;
+};
+
+struct ldap_dictionary *dict_new(void);
+enum nss_status dict_put(struct ldap_dictionary *db,
+ unsigned flags,
+ const struct ldap_datum *key,
+ const struct ldap_datum *value);
+enum nss_status dict_get(struct ldap_dictionary *db,
+ unsigned flags,
+ const struct ldap_datum *key,
+ struct ldap_datum *value);
+
+
+
#endif /* _LDAP_NSS_LDAP_UTIL_H */