attrs, attrsonly, NULL, NULL, NULL, -1 );
} else {
- rc = 0;
first = 1;
- while ( rc == 0 && fgets( line, sizeof( line ), fp ) != NULL ) {
+ while ( fgets( line, sizeof( line ), fp ) != NULL ) {
line[ strlen( line ) - 1 ] = '\0';
if ( !first ) {
putchar( '\n' );
}
rc = dosearch( ld, base, scope, filtpattern, line,
attrs, attrsonly, NULL, NULL, NULL, -1 );
+
+ if ( rc != 0 && !contoper ) {
+ break;
+ }
}
if ( fp != stdin ) {
fclose( fp );
[\c
.BR \-n ]
[\c
+.BR \-c ]
+[\c
.BR \-u ]
[\c
.BR \-v ]
Show what would be done, but don't actually perform the search. Useful for
debugging in conjunction with -v.
.TP
+.B \-c
+Continuous operation mode. Errors are reported, but ldapsearch will continue
+with searches. The default is to exit after reporting an error. Only useful
+in conjunction with -f.
+.TP
.B \-u
Include the User Friendly Name form of the Distinguished Name (DN)
in the output.
the character should be encoded as \fB\\25\fP (see RFC 4515).
If \fIfile\fP is a single
\fI-\fP character, then the lines are read from standard input.
+.B ldapsearch
+will exit when the first non-successful search result is returned,
+unless -c is used.
.TP
.B \-x
Use simple authentication instead of SASL.