I've
red this manpage quite a lot. Also trying to find somewhere
documentations about overlay interfaces, but without any success
I've also red the code. I don't understand how to say doit..
Here is my perl code, doing nothing..
#!/usr/bin/perl
use IO::Socket::UNIX;
my $socket_path = '/tmp/mysocket';
unlink $socket_path if -e $socket_path;
my $socket = IO::Socket::UNIX->new(
Local => $socket_path,
Type => SOCK_STREAM,
# Type => SOCK_DGRAM,
Listen => SOMAXCONN,
);
die "Can't create socket: $!" unless $socket;
while (1) {
next unless my $connection = $socket->accept;
if (fork() == 0) { $connection->autoflush(1); while (<$connection>) {
#chomp($line);
print ;
next if /^ADD$/;
next if /^msgid:/;
next if /^suffix:/;
print $connection $_;
last if /^$/;
}
print $connection "CONTINUE\n";
exit;
}
}
And here is a BUG, in back-sock/result.c
It goes here only once at the end of the ldif, but never after..
/* line marked the end of an entry or result */
if ( *line == '\n' ) {
Debug( LDAP_DEBUG_ANY, "TRACE1 \n", 0, 0, 0 );
if ( strncasecmp( buf, "RESULT", 6 ) == 0 ) {
break;
}
Debug( LDAP_DEBUG_ANY, "TRACE2 buf=%s\n",buf, 0, 0 );
if ( strncasecmp( buf, "CONTINUE", 8 ) == 0 ) {
Debug( LDAP_DEBUG_ANY, "TRACE3\n", 0, 0, 0 );
struct sockinfo *si = (struct sockinfo *) op->o_bd->be_private;
/* Only valid when operating as an overlay! */
assert( si->si_ops != 0 );
rs->sr_err = SLAP_CB_CONTINUE;
goto skip;
}
So I just put if ( strncasecmp( buf, "CONTINUE", 8 ) == 0 ) outside of if ( *line == '\n' ) { and it works..
I am no more a C specialist (1985 last time) so I don't know how to patch
Hope this helps other people, or if I'm wrong please correct me
Thanks
Dom