mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 18:18:06 -05:00
Added some OpenLDAP extensions for determining ldapi:// sock/peername
and whether connection is UDP
This commit is contained in:
parent
214b79e740
commit
265261bf60
3 changed files with 21 additions and 1 deletions
|
|
@ -111,9 +111,12 @@ LDAP_BEGIN_DECL
|
|||
#define SLAPI_REQUESTOR_ISUPDATEDN 142
|
||||
#define SLAPI_IS_REPLICATED_OPERATION SLAPI_REQUESTOR_ISUPDATEDN
|
||||
#define SLAPI_CONN_DN 143
|
||||
#define SLAPI_CONN_AUTHTYPE 144
|
||||
#define SLAPI_CONN_CLIENTIP 145
|
||||
#define SLAPI_CONN_SERVERIP 146
|
||||
#define SLAPI_CONN_AUTHTYPE 144
|
||||
#define SLAPI_X_CONN_CLIENTPATH 1300
|
||||
#define SLAPI_X_CONN_SERVERPATH 1301
|
||||
#define SLAPI_X_CONN_IS_UDP 1302
|
||||
|
||||
#define SLAPD_AUTH_NONE "none"
|
||||
#define SLAPD_AUTH_SIMPLE "simple"
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ isOkNetscapeParam( int param )
|
|||
case SLAPI_CONN_AUTHTYPE:
|
||||
case SLAPI_CONN_AUTHMETHOD:
|
||||
case SLAPI_CONN_CERT:
|
||||
case SLAPI_X_CONN_IS_UDP:
|
||||
case SLAPI_X_CONN_CLIENTPATH:
|
||||
case SLAPI_X_CONN_SERVERPATH:
|
||||
case SLAPI_IBM_CONN_DN_ALT:
|
||||
case SLAPI_IBM_CONN_DN_ORIG:
|
||||
case SLAPI_IBM_GSSAPI_CONTEXT:
|
||||
|
|
|
|||
|
|
@ -1499,14 +1499,28 @@ int slapi_x_connection_set_pb( Slapi_PBlock *pb, Connection *conn )
|
|||
rc = slapi_pblock_set( pb, SLAPI_CONN_CLIENTIP, (void *)&conn->c_peer_name.bv_val[3] );
|
||||
if ( rc != LDAP_SUCCESS )
|
||||
return rc;
|
||||
} else if ( strncmp( conn->c_peer_name.bv_val, "PATH=", 5 ) == 0 ) {
|
||||
rc = slapi_pblock_set( pb, SLAPI_X_CONN_CLIENTPATH, (void *)&conn->c_peer_name.bv_val[5] );
|
||||
if ( rc != LDAP_SUCCESS )
|
||||
return rc;
|
||||
}
|
||||
|
||||
if ( strncmp( conn->c_sock_name.bv_val, "IP=", 3 ) == 0 ) {
|
||||
rc = slapi_pblock_set( pb, SLAPI_CONN_SERVERIP, (void *)&conn->c_sock_name.bv_val[3] );
|
||||
if ( rc != LDAP_SUCCESS )
|
||||
return rc;
|
||||
} else if ( strncmp( conn->c_sock_name.bv_val, "PATH=", 5 ) == 0 ) {
|
||||
rc = slapi_pblock_set( pb, SLAPI_X_CONN_SERVERPATH, (void *)&conn->c_sock_name.bv_val[5] );
|
||||
if ( rc != LDAP_SUCCESS )
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef LDAP_CONNECTIONLESS
|
||||
rc = slapi_pblock_set( pb, SLAPI_X_CONN_IS_UDP, (void *)conn->c_is_udp );
|
||||
if ( rc != LDAP_SUCCESS )
|
||||
return rc;
|
||||
#endif
|
||||
|
||||
rc = slapi_pblock_set( pb, SLAPI_CONN_ID, (void *)conn->c_connid );
|
||||
if ( rc != LDAP_SUCCESS )
|
||||
return rc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue