as s_addr member of in_addr may be a bitfield.
}
if ( dosyslog && !interactive ) {
- hp = gethostbyaddr( (char *) &peername.sin_addr.s_addr,
- sizeof(peername.sin_addr.s_addr), AF_INET );
+ hp = gethostbyaddr( (char *) &peername.sin_addr,
+ sizeof(peername.sin_addr), AF_INET );
syslog( LOG_INFO, "connection from %s (%s)",
(hp == NULL) ? "unknown" : hp->h_name,
inet_ntoa( peername.sin_addr ) );
fromlen = sizeof(from);
if ( getpeername( 0, (struct sockaddr *) &from, &fromlen )
== 0 ) {
- hp = gethostbyaddr( (char *) &(from.sin_addr.s_addr),
- sizeof(from.sin_addr.s_addr), AF_INET );
+ hp = gethostbyaddr( (char *) &(from.sin_addr),
+ sizeof(from.sin_addr), AF_INET );
Debug( LDAP_DEBUG_ARGS, "connection from %s (%s)\n",
(hp == NULL) ? "unknown" : hp->h_name,
inet_ntoa( from.sin_addr ), 0 );
exit( EXIT_FAILURE );
}
- hp = gethostbyaddr( (char *) &(from.sin_addr.s_addr),
- sizeof(from.sin_addr.s_addr), AF_INET );
+ hp = gethostbyaddr( (char *) &(from.sin_addr),
+ sizeof(from.sin_addr), AF_INET );
if ( dosyslog ) {
syslog( LOG_INFO, "TCP connection from %s (%s)",
fromlen = sizeof(from);
if ( getpeername( 0, (struct sockaddr *) &from, &fromlen )
== 0 ) {
- hp = gethostbyaddr( (char *) &(from.sin_addr.s_addr),
- sizeof(from.sin_addr.s_addr), AF_INET );
+ hp = gethostbyaddr( (char *) &(from.sin_addr),
+ sizeof(from.sin_addr), AF_INET );
Debug( LDAP_DEBUG_ARGS, "connection from %s (%s)\n",
(hp == NULL) ? "unknown" : hp->h_name,
inet_ntoa( from.sin_addr ), 0 );
exit( EXIT_FAILURE );
}
- hp = gethostbyaddr( (char *) &(from.sin_addr.s_addr),
- sizeof(from.sin_addr.s_addr), AF_INET );
+ hp = gethostbyaddr( (char *) &(from.sin_addr),
+ sizeof(from.sin_addr), AF_INET );
if ( dosyslog ) {
syslog( LOG_INFO, "TCP connection from %s (%s)",
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
+/* Experimental Controls */
+#define LDAP_CONTROL_X_PASSWD_MOD_REQ "1.3.6.1.4.1.4203.666.5.1"
+#define LDAP_CONTROL_X_PASSWD_MOD_RES "1.3.6.1.4.1.4203.666.5.1"
+
+
/* LDAP Unsolicited Notifications */
#define LDAP_NOTICE_OF_DISCONNECTION "1.3.6.1.4.1.1466.20036"
#define LDAP_NOTICE_DISCONNECT LDAP_NOTICE_OF_DISCONNECTION
+
/* LDAP Extended Operations */
}
for ( i = 0; hp->h_addr_list[ i ] != 0; ++i ) {
- SAFEMEMCPY( (char *)&sock.sin_addr.s_addr,
+ SAFEMEMCPY( (char *)&sock.sin_addr,
(char *)hp->h_addr_list[ i ],
- sizeof(sock.sin_addr.s_addr));
+ sizeof(sock.sin_addr));
if ( add_addr( ld, (struct sockaddr *)&sock ) < 0 ) {
ldap_ld_free( ld, 1, NULL, NULL );
LDAP_FREE( host_dup );
(void)memset((char *)&sin, 0, sizeof(struct sockaddr_in));
sin.sin_family = AF_INET;
sin.sin_port = port;
- p = (char *)&sin.sin_addr.s_addr;
+ p = (char *)&sin.sin_addr;
q = use_hp ? (char *)hp->h_addr_list[i] : (char *)&address;
- SAFEMEMCPY(p, q, sizeof(p) );
+ SAFEMEMCPY(p, q, sizeof(sin.sin_addr) );
osip_debug(ld, "ldap_connect_to_host: Trying %s:%d\n",
inet_ntoa(sin.sin_addr),ntohs(sin.sin_port),0);
len = sizeof(from);
if ( getpeername( ns, (struct sockaddr *) &from, &len )
== 0 ) {
- hp = gethostbyaddr( (char *) &(from.sin_addr.s_addr),
- sizeof(from.sin_addr.s_addr), AF_INET );
+ hp = gethostbyaddr( (char *) &(from.sin_addr),
+ sizeof(from.sin_addr), AF_INET );
Debug( LDAP_DEBUG_ARGS, "connection from %s (%s)\n",
(hp == NULL) ? "unknown" : hp->h_name,
inet_ntoa( from.sin_addr ), 0 );
continue;
}
- hp = gethostbyaddr( (char *) &(from.sin_addr.s_addr),
- sizeof(from.sin_addr.s_addr), AF_INET );
+ hp = gethostbyaddr( (char *) &(from.sin_addr),
+ sizeof(from.sin_addr), AF_INET );
#ifdef HAVE_TCPD
if ( !hosts_ctl("ldapd", (hp == NULL) ? "unknown" : hp->h_name,
tmp->m_msgtype == msgtype &&
((struct sockaddr_in *)&tmp->m_clientaddr)->sin_port ==
((struct sockaddr_in *)fromaddr)->sin_port &&
- ((struct sockaddr_in *)&tmp->m_clientaddr)->sin_addr.s_addr
- == ((struct sockaddr_in *)fromaddr)->sin_addr.s_addr ) {
+ ((struct sockaddr_in *)&tmp->m_clientaddr)->sin_addr
+ == ((struct sockaddr_in *)fromaddr)->sin_addr ) {
break;
}
}
#if defined(SLAPD_RLOOKUPS) || defined(HAVE_TCPD)
hp = gethostbyaddr( (char *)
- &(from.sin_addr.s_addr),
- sizeof(from.sin_addr.s_addr), AF_INET );
+ &(from.sin_addr),
+ sizeof(from.sin_addr), AF_INET );
if(hp) {
dnsname = ldap_pvt_str2lower( hp->h_name );