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 ));
49 AttributeType * at_find LDAP_P(( char *name ));
50 int at_find_in_list LDAP_P(( AttributeType *sat, AttributeType **list ));
51 int at_append_to_list LDAP_P(( AttributeType *sat, AttributeType ***listp ));
52 int at_delete_from_list LDAP_P(( int pos, AttributeType ***listp ));
53 int at_fake_if_needed LDAP_P(( char *name ));
54 int at_schema_info LDAP_P(( Entry *e ));
55 int at_add LDAP_P(( LDAP_ATTRIBUTE_TYPE *at, char **err ));
61 int get_ava LDAP_P(( BerElement *ber, Ava *ava ));
62 void ava_free LDAP_P(( Ava *ava, int freeit ));
68 int backend_init LDAP_P((void));
69 int backend_startup LDAP_P((int dbnum));
70 int backend_shutdown LDAP_P((int dbnum));
71 int backend_destroy LDAP_P((void));
73 BackendInfo * backend_info LDAP_P(( char *type ));
74 BackendDB * backend_db_init LDAP_P(( char *type ));
76 BackendDB * select_backend LDAP_P(( char * dn ));
78 int be_issuffix LDAP_P(( Backend *be, char *suffix ));
79 int be_isroot LDAP_P(( Backend *be, char *ndn ));
80 int be_isroot_pw LDAP_P(( Backend *be, char *ndn, struct berval *cred ));
81 char* be_root_dn LDAP_P(( Backend *be ));
82 int be_entry_release_rw LDAP_P(( Backend *be, Entry *e, int rw ));
83 #define be_entry_release_r( be, e ) be_entry_release_rw( be, e, 0 )
84 #define be_entry_release_w( be, e ) be_entry_release_rw( be, e, 1 )
87 extern int backend_unbind LDAP_P((Connection *conn, Operation *op));
89 extern int backend_group LDAP_P((Backend *be,
91 char *gr_ndn, char *op_ndn,
92 char *objectclassValue, char *groupattrName));
98 void * ch_malloc LDAP_P(( unsigned long size ));
99 void * ch_realloc LDAP_P(( void *block, unsigned long size ));
100 void * ch_calloc LDAP_P(( unsigned long nelem, unsigned long size ));
101 char * ch_strdup LDAP_P(( const char *string ));
107 void charray_add LDAP_P(( char ***a, char *s ));
108 void charray_merge LDAP_P(( char ***a, char **s ));
109 void charray_free LDAP_P(( char **array ));
110 int charray_inlist LDAP_P(( char **a, char *s ));
111 char ** charray_dup LDAP_P(( char **a ));
112 char ** str2charray LDAP_P(( char *str, char *brkstr ));
118 int read_config LDAP_P(( char *fname ));
123 int connections_init LDAP_P((void));
124 int connections_shutdown LDAP_P((void));
125 int connections_destroy LDAP_P((void));
127 long connection_init LDAP_P((
129 const char* name, const char* addr));
131 void connection_closing LDAP_P(( Connection *c ));
132 int connection_state_closing LDAP_P(( Connection *c ));
134 int connection_write LDAP_P((int s));
135 int connection_read LDAP_P((int s));
137 long connections_nextid(void);
139 Connection* connection_first LDAP_P((int *));
140 Connection* connection_next LDAP_P((Connection *, int *));
141 void connection_done LDAP_P((Connection *));
147 char * dn_normalize LDAP_P(( char *dn ));
148 char * dn_normalize_case LDAP_P(( char *dn ));
149 char * dn_parent LDAP_P(( Backend *be, char *dn ));
150 char * dn_rdn LDAP_P(( Backend *be, char *dn ));
151 int dn_issuffix LDAP_P(( char *dn, char *suffix ));
152 int dn_type LDAP_P(( char *dn ));
153 char * dn_upcase LDAP_P(( char *dn ));
154 char * rdn_attr_value LDAP_P(( char * rdn ));
155 char * rdn_attr_type LDAP_P(( char * rdn ));
156 void build_new_dn LDAP_P(( char ** new_dn, char *e_dn, char * p_dn,
162 Entry * str2entry LDAP_P(( char *s ));
163 char * entry2str LDAP_P(( Entry *e, int *len, int printid ));
164 void entry_free LDAP_P(( Entry *e ));
166 int entry_cmp LDAP_P(( Entry *a, Entry *b ));
167 int entry_dn_cmp LDAP_P(( Entry *a, Entry *b ));
168 int entry_id_cmp LDAP_P(( Entry *a, Entry *b ));
174 int get_filter LDAP_P(( Connection *conn, BerElement *ber, Filter **filt, char **fstr ));
175 void filter_free LDAP_P(( Filter *f ));
176 void filter_print LDAP_P(( Filter *f ));
182 int test_filter LDAP_P(( Backend *be, Connection *conn, Operation *op, Entry *e,
189 FILE * lock_fopen LDAP_P(( char *fname, char *type, FILE **lfp ));
190 int lock_fclose LDAP_P(( FILE *fp, FILE *lfp ));
196 void monitor_info LDAP_P(( Connection *conn, Operation *op ));
202 void slap_op_free LDAP_P(( Operation *op ));
203 Operation * slap_op_alloc LDAP_P((
204 BerElement *ber, unsigned long msgid,
205 unsigned long tag, long id ));
207 int slap_op_add LDAP_P(( Operation **olist, Operation *op ));
208 int slap_op_remove LDAP_P(( Operation **olist, Operation *op ));
209 Operation * slap_op_pop LDAP_P(( Operation **olist ));
215 char * first_word LDAP_P(( char *s ));
216 char * next_word LDAP_P(( char *s ));
217 char * word_dup LDAP_P(( char *w ));
218 char * phonetic LDAP_P(( char *s ));
224 void replog LDAP_P(( Backend *be, int optype, char *dn, void *change, int flag ));
230 void send_ldap_result LDAP_P(( Connection *conn, Operation *op, int err, char *matched,
232 void send_ldap_search_result LDAP_P(( Connection *conn, Operation *op, int err,
233 char *matched, char *text, int nentries ));
239 int oc_schema_check LDAP_P(( Entry *e ));
240 ObjectClass *oc_find LDAP_P((char *ocname));
241 int oc_add LDAP_P((LDAP_OBJECT_CLASS *oc, char **err));
242 void schema_info LDAP_P((Connection *conn, Operation *op, char **attrs, int attrsonly));
249 void parse_oc_old LDAP_P(( Backend *be, char *fname, int lineno, int argc, char **argv ));
250 void parse_oc LDAP_P(( char *fname, int lineno, char * line ));
251 void parse_at LDAP_P(( char *fname, int lineno, char *line ));
252 char *scherr2str LDAP_P((int code));
257 Filter * str2filter LDAP_P(( char *str ));
263 int value_add_fast LDAP_P(( struct berval ***vals, struct berval **addvals, int nvals,
264 int naddvals, int *maxvals ));
265 int value_add LDAP_P(( struct berval ***vals, struct berval **addvals ));
266 void value_normalize LDAP_P(( char *s, int syntax ));
267 int value_cmp LDAP_P(( struct berval *v1, struct berval *v2, int syntax,
269 int value_find LDAP_P(( struct berval **vals, struct berval *v, int syntax,
275 char *suffixAlias LDAP_P(( char *dn, Operation *op, Backend *be ));
280 #if defined(HAVE_PWD_H) && defined(HAVE_GRP_H)
281 void slap_init_user LDAP_P(( char *username, char *groupname ));
288 extern char *default_referral;
289 extern char *replogfile;
290 extern const char Versionstr[];
291 extern int active_threads;
295 extern int global_default_access;
296 extern int global_lastmod;
297 extern int global_schemacheck;
298 extern int lber_debug;
299 extern int ldap_syslog;
301 extern ldap_pvt_thread_mutex_t num_sent_mutex;
302 extern long num_bytes_sent;
303 extern long num_entries_sent;
305 extern ldap_pvt_thread_mutex_t num_ops_mutex;
306 extern long num_ops_completed;
307 extern long num_ops_initiated;
309 extern char *slapd_pid_file;
310 extern char *slapd_args_file;
311 extern char **g_argv;
312 extern time_t starttime;
314 time_t slap_get_time LDAP_P((void));
316 extern ldap_pvt_thread_mutex_t active_threads_mutex;
317 extern ldap_pvt_thread_cond_t active_threads_cond;
319 extern ldap_pvt_thread_mutex_t entry2str_mutex;
320 extern ldap_pvt_thread_mutex_t replog_mutex;
323 extern ldap_pvt_thread_mutex_t crypt_mutex;
325 extern ldap_pvt_thread_mutex_t gmtime_mutex;
327 extern struct acl *global_acl;
329 extern int slap_init LDAP_P((int mode, char* name));
330 extern int slap_startup LDAP_P((int dbnum));
331 extern int slap_shutdown LDAP_P((int dbnum));
332 extern int slap_destroy LDAP_P((void));
335 extern int set_socket LDAP_P((struct sockaddr_in *addr));
336 extern int slapd_daemon LDAP_P((int inetd, int tcps));
338 extern void slapd_set_write LDAP_P((int s, int wake));
339 extern void slapd_clr_write LDAP_P((int s, int wake));
340 extern void slapd_set_read LDAP_P((int s, int wake));
341 extern void slapd_clr_read LDAP_P((int s, int wake));
343 extern void slap_set_shutdown LDAP_P((int sig));
344 extern void slap_do_nothing LDAP_P((int sig));
346 extern void config_info LDAP_P((Connection *conn, Operation *op));
347 extern void root_dse_info LDAP_P((Connection *conn, Operation *op, char **attrs, int attrsonly));
348 extern void do_abandon LDAP_P((Connection *conn, Operation *op));
349 extern void do_add LDAP_P((Connection *conn, Operation *op));
350 extern void do_bind LDAP_P((Connection *conn, Operation *op));
351 extern void do_compare LDAP_P((Connection *conn, Operation *op));
352 extern void do_delete LDAP_P((Connection *conn, Operation *op));
353 extern void do_modify LDAP_P((Connection *conn, Operation *op));
354 extern void do_modrdn LDAP_P((Connection *conn, Operation *op));
355 extern void do_search LDAP_P((Connection *conn, Operation *op));
356 extern void do_unbind LDAP_P((Connection *conn, Operation *op));
358 extern int send_search_entry LDAP_P((Backend *be, Connection *conn, Operation *op, Entry *e, char **attrs, int attrsonly));
359 extern int str2result LDAP_P(( char *s, int *code, char **matched, char **info ));
363 #endif /* _proto_slap */