4 #include <ldap_cdefs.h>
10 int access_allowed LDAP_P(( Backend *be, Connection *conn,
11 Operation *op, Entry *e,
12 char *attr, struct berval *val, int access ));
14 struct acl * acl_get_applicable LDAP_P(( Backend *be,
15 Operation *op, Entry *e,
16 char *attr, int nmatches, regmatch_t *matches ));
18 int acl_access_allowed LDAP_P(( struct acl *a, Backend *be, Connection *conn, Entry *e,
19 struct berval *val, Operation *op, int access, char *edn,
20 regmatch_t *matches ));
22 int acl_check_modlist LDAP_P(( Backend *be,
32 void parse_acl LDAP_P(( Backend *be, char *fname, int lineno, int argc, char **argv ));
33 char * access2str LDAP_P(( int access ));
34 int str2access LDAP_P(( char *str ));
40 void attr_free LDAP_P(( Attribute *a ));
41 char * attr_normalize LDAP_P(( char *s ));
42 int attr_merge_fast LDAP_P(( Entry *e, char *type, struct berval **vals, int nvals,
43 int naddvals, int *maxvals, Attribute ***a ));
44 int attr_merge LDAP_P(( Entry *e, char *type, struct berval **vals ));
45 Attribute * attr_find LDAP_P(( Attribute *a, char *type ));
46 int attr_delete LDAP_P(( Attribute **attrs, char *type ));
47 int attr_syntax LDAP_P(( char *type ));
48 void attr_syntax_config LDAP_P(( char *fname, int lineno, int argc, char **argv ));
54 int get_ava LDAP_P(( BerElement *ber, Ava *ava ));
55 void ava_free LDAP_P(( Ava *ava, int freeit ));
61 int backend_init LDAP_P((void));
62 int backend_startup LDAP_P((int dbnum));
63 int backend_shutdown LDAP_P((int dbnum));
64 int backend_destroy LDAP_P((void));
66 BackendInfo * backend_info LDAP_P(( char *type ));
67 BackendDB * backend_db_init LDAP_P(( char *type ));
69 BackendDB * select_backend LDAP_P(( char * dn ));
71 int be_issuffix LDAP_P(( Backend *be, char *suffix ));
72 int be_isroot LDAP_P(( Backend *be, char *ndn ));
73 int be_isroot_pw LDAP_P(( Backend *be, char *ndn, struct berval *cred ));
74 char* be_root_dn LDAP_P(( Backend *be ));
76 extern int backend_unbind LDAP_P((Connection *conn, Operation *op));
78 extern int backend_group LDAP_P((Backend *be,
80 char *gr_ndn, char *op_ndn,
81 char *objectclassValue, char *groupattrName));
87 void * ch_malloc LDAP_P(( unsigned long size ));
88 void * ch_realloc LDAP_P(( void *block, unsigned long size ));
89 void * ch_calloc LDAP_P(( unsigned long nelem, unsigned long size ));
90 char * ch_strdup LDAP_P(( const char *string ));
96 void charray_add LDAP_P(( char ***a, char *s ));
97 void charray_merge LDAP_P(( char ***a, char **s ));
98 void charray_free LDAP_P(( char **array ));
99 int charray_inlist LDAP_P(( char **a, char *s ));
100 char ** charray_dup LDAP_P(( char **a ));
101 char ** str2charray LDAP_P(( char *str, char *brkstr ));
107 int read_config LDAP_P(( char *fname ));
112 int connections_init LDAP_P((void));
114 long connection_init LDAP_P((
116 const char* name, const char* addr));
118 int connection_write LDAP_P((int s));
119 int connection_read LDAP_P((int s));
121 long connections_nextid(void);
123 Connection* connection_first LDAP_P((void));
124 Connection* connection_next LDAP_P((Connection *));
125 void connection_done LDAP_P((Connection *));
131 char * dn_normalize LDAP_P(( char *dn ));
132 char * dn_normalize_case LDAP_P(( char *dn ));
133 char * dn_parent LDAP_P(( Backend *be, char *dn ));
134 char * dn_rdn LDAP_P(( Backend *be, char *dn ));
135 int dn_issuffix LDAP_P(( char *dn, char *suffix ));
136 int dn_type LDAP_P(( char *dn ));
137 char * dn_upcase LDAP_P(( char *dn ));
138 char * rdn_attr_value LDAP_P(( char * rdn ));
139 char * rdn_attr_type LDAP_P(( char * rdn ));
145 Entry * str2entry LDAP_P(( char *s ));
146 char * entry2str LDAP_P(( Entry *e, int *len, int printid ));
147 void entry_free LDAP_P(( Entry *e ));
149 int entry_cmp LDAP_P(( Entry *a, Entry *b ));
150 int entry_dn_cmp LDAP_P(( Entry *a, Entry *b ));
151 int entry_id_cmp LDAP_P(( Entry *a, Entry *b ));
157 int get_filter LDAP_P(( Connection *conn, BerElement *ber, Filter **filt, char **fstr ));
158 void filter_free LDAP_P(( Filter *f ));
159 void filter_print LDAP_P(( Filter *f ));
165 int test_filter LDAP_P(( Backend *be, Connection *conn, Operation *op, Entry *e,
172 FILE * lock_fopen LDAP_P(( char *fname, char *type, FILE **lfp ));
173 int lock_fclose LDAP_P(( FILE *fp, FILE *lfp ));
179 void monitor_info LDAP_P(( Connection *conn, Operation *op ));
185 void slap_op_free LDAP_P(( Operation *op ));
186 Operation * slap_op_alloc LDAP_P((
187 BerElement *ber, unsigned long msgid,
188 unsigned long tag, long id ));
190 int slap_op_add LDAP_P(( Operation **olist, Operation *op ));
191 int slap_op_remove LDAP_P(( Operation **olist, Operation *op ));
192 Operation * slap_op_pop LDAP_P(( Operation **olist ));
198 char * first_word LDAP_P(( char *s ));
199 char * next_word LDAP_P(( char *s ));
200 char * word_dup LDAP_P(( char *w ));
201 char * phonetic LDAP_P(( char *s ));
207 void replog LDAP_P(( Backend *be, int optype, char *dn, void *change, int flag ));
213 void send_ldap_result LDAP_P(( Connection *conn, Operation *op, int err, char *matched,
215 void send_ldap_search_result LDAP_P(( Connection *conn, Operation *op, int err,
216 char *matched, char *text, int nentries ));
218 void do_close( Connection *conn, long opid );
224 int oc_schema_check LDAP_P(( Entry *e ));
230 void parse_oc LDAP_P(( Backend *be, char *fname, int lineno, int argc, char **argv ));
236 Filter * str2filter LDAP_P(( char *str ));
242 int value_add_fast LDAP_P(( struct berval ***vals, struct berval **addvals, int nvals,
243 int naddvals, int *maxvals ));
244 int value_add LDAP_P(( struct berval ***vals, struct berval **addvals ));
245 void value_normalize LDAP_P(( char *s, int syntax ));
246 int value_cmp LDAP_P(( struct berval *v1, struct berval *v2, int syntax,
248 int value_find LDAP_P(( struct berval **vals, struct berval *v, int syntax,
254 char *suffixAlias LDAP_P(( char *dn, Operation *op, Backend *be ));
260 extern char *default_referral;
261 extern char *replogfile;
262 extern char Versionstr[];
263 extern int active_threads;
267 extern int global_default_access;
268 extern int global_lastmod;
269 extern int global_schemacheck;
270 extern int lber_debug;
271 extern int ldap_syslog;
274 extern ldap_pvt_thread_mutex_t num_sent_mutex;
275 extern long num_bytes_sent;
277 extern long num_entries_sent;
279 extern ldap_pvt_thread_mutex_t ops_mutex;
280 extern long ops_completed;
281 extern long ops_initiated;
284 extern char *slapd_pid_file;
285 extern char *slapd_args_file;
286 extern char **g_argv;
287 extern time_t starttime;
289 time_t slap_get_time LDAP_P((void));
291 extern ldap_pvt_thread_mutex_t active_threads_mutex;
292 extern ldap_pvt_thread_cond_t active_threads_cond;
294 extern ldap_pvt_thread_mutex_t entry2str_mutex;
295 extern ldap_pvt_thread_mutex_t replog_mutex;
298 extern ldap_pvt_thread_mutex_t crypt_mutex;
300 extern ldap_pvt_thread_mutex_t gmtime_mutex;
302 extern struct acl *global_acl;
303 extern struct objclass *global_oc;
305 extern int slap_init LDAP_P((int mode, char* name));
306 extern int slap_startup LDAP_P((int dbnum));
307 extern int slap_shutdown LDAP_P((int dbnum));
308 extern int slap_destroy LDAP_P((void));
311 extern int slapd_daemon LDAP_P((struct sockaddr_in *addr));
313 extern void slap_set_shutdown LDAP_P((int sig));
314 extern void slap_do_nothing LDAP_P((int sig));
316 extern void config_info LDAP_P((Connection *conn, Operation *op));
317 extern void do_abandon LDAP_P((Connection *conn, Operation *op));
318 extern void do_add LDAP_P((Connection *conn, Operation *op));
319 extern void do_bind LDAP_P((Connection *conn, Operation *op));
320 extern void do_compare LDAP_P((Connection *conn, Operation *op));
321 extern void do_delete LDAP_P((Connection *conn, Operation *op));
322 extern void do_modify LDAP_P((Connection *conn, Operation *op));
323 extern void do_modrdn LDAP_P((Connection *conn, Operation *op));
324 extern void do_search LDAP_P((Connection *conn, Operation *op));
325 extern void do_unbind LDAP_P((Connection *conn, Operation *op));
327 extern int send_search_entry LDAP_P((Backend *be, Connection *conn, Operation *op, Entry *e, char **attrs, int attrsonly));
328 extern int str2result LDAP_P(( char *s, int *code, char **matched, char **info ));
332 #endif /* _proto_slap */