]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/ldapconfig.h
Active Directory LDAP queries for ACL support
[netatalk.git] / include / atalk / ldapconfig.h
index 70f9f628c7c61c0c0fe7018b91bfceb884865f43..f01e0a064cce17e3216358a1bd2ad05e2eca4134 100644 (file)
@@ -1,10 +1,13 @@
-#ifdef HAVE_ACLS
+#ifdef HAVE_LDAP
 
 #ifndef LDAPCONFIG_H
 #define LDAPCONFIG_H
 
+#include <atalk/iniparser.h>
+
 /* One function does the whole job */
-extern int acl_ldap_readconfig(char *name);
+extern int acl_ldap_readconfig(dictionary *iniconfig);
+extern void acl_ldap_freeconfig(void);
 
 /* These are the prefvalues */
 extern char *ldap_server;
@@ -14,24 +17,36 @@ extern char *ldap_auth_pw;
 extern char *ldap_userbase;
 extern char *ldap_groupbase;
 extern char *ldap_uuid_attr;
+extern char *ldap_uuid_string;
 extern char *ldap_name_attr;
 extern char *ldap_group_attr;
 extern char *ldap_uid_attr;
+extern char *ldap_userfilter;
+extern char *ldap_groupfilter;
+extern int  ldap_uuid_encoding;
+
+typedef enum {
+       LDAP_UUID_ENCODING_STRING = 0, /* Plain ASCII string */
+       LDAP_UUID_ENCODING_MSGUID = 1  /* Raw byte array, from Active Directory objectGUID */
+} ldap_uuid_encoding_type;
 
 struct ldap_pref {
-    void *pref;
+    const void *pref;
     char *name;
     int strorint;     /* string to just store in char * or convert to int ? */
     int intfromarray; /* convert to int, but use string to int mapping array pref_array[] */
     int valid;        /* -1 = mandatory, 0 = omittable/valid */
+    int valid_save;   /* copy of 'valid', used when resettting config */
 };
 
 struct pref_array {
-    char *pref;         /* name of pref from ldap_prefs[] to which this value corresponds */
+    const char *pref;         /* name of pref from ldap_prefs[] to which this value corresponds */
     char *valuestring;  /* config string */
     int  value;         /* corresponding value */
 };
 
+
+
 /* For parsing */
 extern struct ldap_pref ldap_prefs[];
 extern struct pref_array prefs_array[];
@@ -39,4 +54,4 @@ extern int ldap_config_valid;
 
 #endif /* LDAPCONFIG_H */
 
-#endif /* HAVE_ACLS */
+#endif /* HAVE_LDAP */