]> git.sur5r.net Git - openldap/blob - servers/slapd/unbind.c
import fix to ITS#3474 from HEAD
[openldap] / servers / slapd / unbind.c
1 /* unbind.c - decode an ldap unbind operation and pass it to a backend db */
2 /* $OpenLDAP$ */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4  *
5  * Copyright 1998-2004 The OpenLDAP Foundation.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted only as authorized by the OpenLDAP
10  * Public License.
11  *
12  * A copy of this license is available in the file LICENSE in the
13  * top-level directory of the distribution or, alternatively, at
14  * <http://www.OpenLDAP.org/license.html>.
15  */
16 /* Portions Copyright (c) 1995 Regents of the University of Michigan.
17  * All rights reserved.
18  *
19  * Redistribution and use in source and binary forms are permitted
20  * provided that this notice is preserved and that due credit is given
21  * to the University of Michigan at Ann Arbor. The name of the University
22  * may not be used to endorse or promote products derived from this
23  * software without specific prior written permission. This software
24  * is provided ``as is'' without express or implied warranty.
25  *
26  */
27
28 #include "portable.h"
29
30 #include <stdio.h>
31
32 #include <ac/socket.h>
33
34 #include "slap.h"
35
36 int
37 do_unbind( Operation *op, SlapReply *rs )
38 {
39 #ifdef NEW_LOGGING
40         LDAP_LOG( OPERATION, ENTRY, 
41                 "do_unbind: conn %d\n", op->o_connid ? op->o_connid : -1, 0, 0 );
42 #else
43         Debug( LDAP_DEBUG_TRACE, "do_unbind\n", 0, 0, 0 );
44 #endif
45
46         /*
47          * Parse the unbind request.  It looks like this:
48          *
49          *      UnBindRequest ::= NULL
50          */
51
52         Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu UNBIND\n", op->o_connid,
53             op->o_opid, 0, 0, 0 );
54
55         /* pass the unbind to all backends */
56         backend_unbind( op, rs );
57
58         return 0;
59 }