]> git.sur5r.net Git - openldap/blob - servers/slapd/unbind.c
500006c34f0a76218346a570a99fb6d992198863
[openldap] / servers / slapd / unbind.c
1 /* unbind.c - decode an ldap unbind operation and pass it to a backend db */
2
3 /*
4  * Copyright (c) 1995 Regents of the University of Michigan.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms are permitted
8  * provided that this notice is preserved and that due credit is given
9  * to the University of Michigan at Ann Arbor. The name of the University
10  * may not be used to endorse or promote products derived from this
11  * software without specific prior written permission. This software
12  * is provided ``as is'' without express or implied warranty.
13  *
14  */
15
16 #include <stdio.h>
17 #include <sys/types.h>
18 #include <sys/socket.h>
19 #include "slap.h"
20
21 extern Backend  *select_backend();
22 extern void      be_unbind();
23
24 extern char             *default_referral;
25 extern pthread_mutex_t  new_conn_mutex;
26
27 void
28 do_unbind(
29     Connection  *conn,
30     Operation   *op
31 )
32 {
33         Debug( LDAP_DEBUG_TRACE, "do_unbind\n", 0, 0, 0 );
34
35         /*
36          * Parse the unbind request.  It looks like this:
37          *
38          *      UnBindRequest ::= NULL
39          */
40
41         Statslog( LDAP_DEBUG_STATS, "conn=%d op=%d UNBIND\n", conn->c_connid,
42             op->o_opid, 0, 0, 0 );
43
44         /* pass the unbind to all backends */
45         be_unbind( conn, op );
46         
47         /* close the connection to the client */
48         close_connection( conn, op->o_connid, op->o_opid );
49 }