#include "ldap.h"
#include "common.h"
+int
do_abandon(
struct conn *dsaconn,
BerElement *ber,
conns = new;
}
-static psap_cmp( struct PSAPaddr *a, struct PSAPaddr *b )
+static int
+psap_cmp( struct PSAPaddr *a, struct PSAPaddr *b )
{
return( bcmp( (char *) a, (char *) b, sizeof(struct PSAPaddr) ) );
}
#include "../../libraries/liblber/lber-int.h" /* get struct sockbuf */
#include "ldap.h"
#include "common.h"
+#include "lutil.h" /* Get lutil_detach() */
#ifdef HAVE_TCPD
#include <tcpd.h>
#endif /* TCP_WRAPPERS */
void log_and_exit();
-static set_socket();
-static do_queries();
+static int set_socket();
+static void do_queries();
static RETSIGTYPE wait4child();
#ifdef LDAP_CONNECTIONLESS
-static udp_init();
+static int udp_init();
#endif
#ifdef LDAP_DEBUG
extern char Versionstr[];
-static usage( name )
-char *name;
+static void
+usage( char *name )
{
fprintf( stderr, "usage: %s [-d debuglvl] [-p port] [-l] [-c dsa] [-r referraltimeout]", name );
#ifdef LDAP_CONNECTIONLESS
fprintf( stderr, "\n" );
}
+int
main (argc, argv)
int argc;
char **argv;
(void) get_syntaxes();
if (RunFromInetd) {
len = sizeof( socktype );
- getsockopt( ns, SOL_SOCKET, SO_TYPE, &socktype, &len );
+ getsockopt( ns, SOL_SOCKET, SO_TYPE, (char *)&socktype, &len );
if ( socktype == SOCK_DGRAM ) {
#ifdef LDAP_CONNECTIONLESS
Debug( LDAP_DEBUG_ARGS,
/* NOT REACHED */
}
-static
+static void
do_queries(
int clientsock,
int udp /* is this a UDP (CLDAP) request? */
)
{
fd_set readfds;
- int rc, i;
+ int rc;
struct timeval timeout;
Sockbuf sb;
#ifdef LDAP_CONNECTIONLESS
#ifdef LDAP_DEBUG
if ( ldap_debug & LDAP_DEBUG_CONNS ) {
+ int i;
Debug( LDAP_DEBUG_CONNS, "FDLIST:", 0, 0, 0 );
for ( i = 0; i < dtblsize; i++ ) {
if ( FD_ISSET( i, &readfds ) ) {
/* NOT REACHED */
}
-static set_socket(
+static int
+set_socket(
int port,
int udp /* UDP port? */
)
}
if ( cur == NULL ) {
- Debug( LDAP_DEBUG_ANY, "delmsg: cannot find msg %x\n", m,
- 0, 0 );
+ Debug( LDAP_DEBUG_ANY, "delmsg: cannot find msg %lx\n",
+ (unsigned long) m, 0, 0 );
return( -1 );
}
extern short ldap_rtl_syntax;
extern short ldap_octetstring_syntax;
+static int replace_mod( struct entrymod *, Attr_Sequence, Attr_Sequence );
#ifdef LDAP_COMPAT20
extern int ldap_compat;
* that are not in the new set and by only adding what isn't in old set
*/
-int
+static int
replace_mod(
struct entrymod *rem,
Attr_Sequence oas,
ttag = ber_skip_tag( &tber, &tlen );
ttag = ber_peek_tag( &tber, &tlen );
- Debug( LDAP_DEBUG_ANY, "checking for 3.0 tag 0x%x\n",
- ttag, 0, 0 );
+ Debug( LDAP_DEBUG_ANY, "checking for 3.0 tag 0x%lx\n",
+ ttag, 0, 0 );
if ( ttag == LBER_SEQUENCE ) {
Debug( LDAP_DEBUG_ANY, "version 3.0 detected\n",
0, 0, 0 );
#include "ldap.h"
#include "common.h"
-static get_filter();
-static get_filter_list();
-static get_substring_filter();
+static int get_filter();
+static int get_filter_list();
+static int get_substring_filter();
#ifdef LDAP_COMPAT
extern int version;
return( 1 );
}
-static get_filter( BerElement *ber, Filter *filt )
+static int
+get_filter( BerElement *ber, Filter *filt )
{
unsigned long tag, len;
int err;
break;
default:
- Debug( LDAP_DEBUG_ANY, "unknown filter type %d\n", tag, 0, 0 );
+ Debug( LDAP_DEBUG_ANY, "unknown filter type %lu\n", tag, 0, 0 );
free( f );
return( LDAP_PROTOCOL_ERROR );
break;
return( err );
}
-static get_filter_list( BerElement *ber, Filter f )
+static int
+get_filter_list( BerElement *ber, Filter f )
{
Filter new, tail;
int err;
return( 0 );
}
-static get_substring_filter( BerElement *ber, Filter f )
+static int
+get_substring_filter( BerElement *ber, Filter f )
{
unsigned long tag, len;
char typestr[64];
static void de_t61( char *s, int t61mark );
static int syntax_is_string( short syntax );
-static get_one_syntax( char *attrib, int required )
+static int
+get_one_syntax( char *attrib, int required )
{
oid_table_attr *p, *name2attr();
return( rc );
}
-static put_jpeg_value( BerElement *ber, AttributeValue av )
+static int
+put_jpeg_value( BerElement *ber, AttributeValue av )
{
PE pe;
int len;
return( 0 );
}
-static put_audio_value( BerElement *ber, AttributeValue av )
+static int
+put_audio_value( BerElement *ber, AttributeValue av )
{
struct qbuf *qb, *p;
int rc, len;
return( rc );
}
-static put_photo_value( BerElement *ber, AttributeValue av )
+static int
+put_photo_value( BerElement *ber, AttributeValue av )
{
PE pe;
PS ps;
return( 0 );
}
-static put_values(
+static int
+put_values(
BerElement *ber,
PS ps,
short syntax,