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 void connection_closing LDAP_P(( Connection *c ));
120 int connection_write LDAP_P((int s));
121 int connection_read LDAP_P((int s));
123 long connections_nextid(void);
125 Connection* connection_first LDAP_P((void));
126 Connection* connection_next LDAP_P((Connection *));
127 void connection_done LDAP_P((Connection *));
133 char * dn_normalize LDAP_P(( char *dn ));
134 char * dn_normalize_case LDAP_P(( char *dn ));
135 char * dn_parent LDAP_P(( Backend *be, char *dn ));
136 char * dn_rdn LDAP_P(( Backend *be, char *dn ));
137 int dn_issuffix LDAP_P(( char *dn, char *suffix ));
138 int dn_type LDAP_P(( char *dn ));
139 char * dn_upcase LDAP_P(( char *dn ));
140 char * rdn_attr_value LDAP_P(( char * rdn ));
141 char * rdn_attr_type LDAP_P(( char * rdn ));
147 Entry * str2entry LDAP_P(( char *s ));
148 char * entry2str LDAP_P(( Entry *e, int *len, int printid ));
149 void entry_free LDAP_P(( Entry *e ));
151 int entry_cmp LDAP_P(( Entry *a, Entry *b ));
152 int entry_dn_cmp LDAP_P(( Entry *a, Entry *b ));
153 int entry_id_cmp LDAP_P(( Entry *a, Entry *b ));
159 int get_filter LDAP_P(( Connection *conn, BerElement *ber, Filter **filt, char **fstr ));
160 void filter_free LDAP_P(( Filter *f ));
161 void filter_print LDAP_P(( Filter *f ));
167 int test_filter LDAP_P(( Backend *be, Connection *conn, Operation *op, Entry *e,
174 FILE * lock_fopen LDAP_P(( char *fname, char *type, FILE **lfp ));
175 int lock_fclose LDAP_P(( FILE *fp, FILE *lfp ));
181 void monitor_info LDAP_P(( Connection *conn, Operation *op ));
187 void slap_op_free LDAP_P(( Operation *op ));
188 Operation * slap_op_alloc LDAP_P((
189 BerElement *ber, unsigned long msgid,
190 unsigned long tag, long id ));
192 int slap_op_add LDAP_P(( Operation **olist, Operation *op ));
193 int slap_op_remove LDAP_P(( Operation **olist, Operation *op ));
194 Operation * slap_op_pop LDAP_P(( Operation **olist ));
200 char * first_word LDAP_P(( char *s ));
201 char * next_word LDAP_P(( char *s ));
202 char * word_dup LDAP_P(( char *w ));
203 char * phonetic LDAP_P(( char *s ));
209 void replog LDAP_P(( Backend *be, int optype, char *dn, void *change, int flag ));
215 void send_ldap_result LDAP_P(( Connection *conn, Operation *op, int err, char *matched,
217 void send_ldap_search_result LDAP_P(( Connection *conn, Operation *op, int err,
218 char *matched, char *text, int nentries ));
220 void do_close( Connection *conn, long opid );
226 int oc_schema_check LDAP_P(( Entry *e ));
232 void parse_oc LDAP_P(( Backend *be, char *fname, int lineno, int argc, char **argv ));
238 Filter * str2filter LDAP_P(( char *str ));
244 int value_add_fast LDAP_P(( struct berval ***vals, struct berval **addvals, int nvals,
245 int naddvals, int *maxvals ));
246 int value_add LDAP_P(( struct berval ***vals, struct berval **addvals ));
247 void value_normalize LDAP_P(( char *s, int syntax ));
248 int value_cmp LDAP_P(( struct berval *v1, struct berval *v2, int syntax,
250 int value_find LDAP_P(( struct berval **vals, struct berval *v, int syntax,
256 char *suffixAlias LDAP_P(( char *dn, Operation *op, Backend *be ));
262 extern char *default_referral;
263 extern char *replogfile;
264 extern char Versionstr[];
265 extern int active_threads;
269 extern int global_default_access;
270 extern int global_lastmod;
271 extern int global_schemacheck;
272 extern int lber_debug;
273 extern int ldap_syslog;
276 extern ldap_pvt_thread_mutex_t num_sent_mutex;
277 extern long num_bytes_sent;
279 extern long num_entries_sent;
281 extern ldap_pvt_thread_mutex_t ops_mutex;
282 extern long ops_completed;
283 extern long ops_initiated;
286 extern char *slapd_pid_file;
287 extern char *slapd_args_file;
288 extern char **g_argv;
289 extern time_t starttime;
291 time_t slap_get_time LDAP_P((void));
293 extern ldap_pvt_thread_mutex_t active_threads_mutex;
294 extern ldap_pvt_thread_cond_t active_threads_cond;
296 extern ldap_pvt_thread_mutex_t entry2str_mutex;
297 extern ldap_pvt_thread_mutex_t replog_mutex;
300 extern ldap_pvt_thread_mutex_t crypt_mutex;
302 extern ldap_pvt_thread_mutex_t gmtime_mutex;
304 extern struct acl *global_acl;
305 extern struct objclass *global_oc;
307 extern int slap_init LDAP_P((int mode, char* name));
308 extern int slap_startup LDAP_P((int dbnum));
309 extern int slap_shutdown LDAP_P((int dbnum));
310 extern int slap_destroy LDAP_P((void));
313 extern int slapd_daemon LDAP_P((struct sockaddr_in *addr));
315 extern void slapd_set_write LDAP_P((int s, int wake));
316 extern void slapd_clr_write LDAP_P((int s, int wake));
317 extern void slapd_set_read LDAP_P((int s, int wake));
318 extern void slapd_clr_read LDAP_P((int s, int wake));
320 extern void slap_set_shutdown LDAP_P((int sig));
321 extern void slap_do_nothing LDAP_P((int sig));
323 extern void config_info LDAP_P((Connection *conn, Operation *op));
324 extern void do_abandon LDAP_P((Connection *conn, Operation *op));
325 extern void do_add LDAP_P((Connection *conn, Operation *op));
326 extern void do_bind LDAP_P((Connection *conn, Operation *op));
327 extern void do_compare LDAP_P((Connection *conn, Operation *op));
328 extern void do_delete LDAP_P((Connection *conn, Operation *op));
329 extern void do_modify LDAP_P((Connection *conn, Operation *op));
330 extern void do_modrdn LDAP_P((Connection *conn, Operation *op));
331 extern void do_search LDAP_P((Connection *conn, Operation *op));
332 extern void do_unbind LDAP_P((Connection *conn, Operation *op));
334 extern int send_search_entry LDAP_P((Backend *be, Connection *conn, Operation *op, Entry *e, char **attrs, int attrsonly));
335 extern int str2result LDAP_P(( char *s, int *code, char **matched, char **info ));
339 #endif /* _proto_slap */