]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/bind.c
Partial revert of f30269f5d2e4bb5ee7486fe6542078d1b59dba6d
[openldap] / servers / slapd / bind.c
index 6bab9a72a3232040b0e7d36c54d381bb52cd05e9..daa473859c9a602927ef1ce64ae288915cd32934 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2009 The OpenLDAP Foundation.
+ * Copyright 1998-2012 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -418,7 +418,8 @@ fe_op_bind_success( Operation *op, SlapReply *rs )
 
        ber_dupbv( &op->o_conn->c_ndn, &op->o_req_ndn );
 
-       if( !BER_BVISEMPTY( &op->o_conn->c_dn ) ) {
+       /* op->o_conn->c_sb may be 0 for internal operations */
+       if( !BER_BVISEMPTY( &op->o_conn->c_dn ) && op->o_conn->c_sb != 0 ) {
                ber_len_t max = sockbuf_max_incoming_auth;
                ber_sockbuf_ctrl( op->o_conn->c_sb,
                        LBER_SB_OPT_SET_MAX_INCOMING, &max );