netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
ldapconfig.h
Go to the documentation of this file.
1#ifdef HAVE_LDAP
2
3#ifndef LDAPCONFIG_H
4#define LDAPCONFIG_H
5
6#ifdef HAVE_INIPARSER_INIPARSER_H
7#include <iniparser/iniparser.h>
8#else
9#include <iniparser.h>
10#endif
11
12/* One function does the whole job */
13extern int acl_ldap_readconfig(dictionary *iniconfig);
14extern void acl_ldap_freeconfig(void);
15
16/* These are the prefvalues */
17extern char *ldap_server;
18extern int ldap_auth_method;
19extern char *ldap_auth_dn;
20extern char *ldap_auth_pw;
21extern char *ldap_userbase;
22extern char *ldap_groupbase;
23extern char *ldap_uuid_attr;
24extern char *ldap_uuid_string;
25extern char *ldap_name_attr;
26extern char *ldap_group_attr;
27extern char *ldap_uid_attr;
28extern char *ldap_userfilter;
29extern char *ldap_groupfilter;
30extern int ldap_uuid_encoding;
31
32typedef enum {
33 /* Plain ASCII string */
34 LDAP_UUID_ENCODING_STRING = 0,
35 /* Raw byte array, from Active Directory objectGUID */
36 LDAP_UUID_ENCODING_MSGUID = 1
37} ldap_uuid_encoding_type;
38
39struct ldap_pref {
40 const void *pref;
41 char *name;
42 /* string to just store in char * or convert to int ? */
43 int strorint;
44 /* convert to int, but use string to int mapping array pref_array[] */
45 int intfromarray;
46 /* set to -1 if mandatory, 0 if omittable/valid */
47 int valid;
48 /* copy of 'valid', used when resettting config */
49 int valid_save;
50};
51
52struct pref_array {
53 /* name of pref from ldap_prefs[] to which this value corresponds */
54 const char *pref;
55 /* config string */
56 char *valuestring;
57 /* corresponding value */
58 int value;
59};
60
61
62
63/* For parsing */
64extern struct ldap_pref ldap_prefs[];
65extern struct pref_array prefs_array[];
66extern int ldap_config_valid;
67
68#endif /* LDAPCONFIG_H */
69
70#endif /* HAVE_LDAP */