Fix ldappasswd timeval.
/* no matches - bounce with user unknown */
if ( match == 0 ) {
- add_error( err, nerr, E_USERUNKNOWN, name, NULLMSG );
+ add_error( err, nerr, E_USERUNKNOWN, name, NULL );
return;
}
add_error( err, nerr,
E_JOINMEMBERNOFAXNUM, ndn,
- NULLMSG );
+ NULL );
free( ndn );
}
add_error( err, nerr,
E_JOINMEMBERNOEMAIL, ndn,
- NULLMSG );
+ NULL );
free( ndn );
}
if ( (rc = ldap_search_st( ld, dn, LDAP_SCOPE_BASE, "(objectclass=*)",
attrs, 0, &timeout, &res )) != LDAP_SUCCESS ) {
if ( rc == LDAP_NO_SUCH_OBJECT ) {
- add_error( err, nerr, E_BADMEMBER, dn, NULLMSG );
+ add_error( err, nerr, E_BADMEMBER, dn, NULL );
return;
} else {
ldap_value_free( mail );
ldap_msgfree( res );
} else {
- add_error( err, nerr, E_MEMBERNOFAXNUM, ndn, NULLMSG );
+ add_error( err, nerr, E_MEMBERNOFAXNUM, ndn, NULL );
}
break;
case MAIL500 :
/* else generate a bounce */
} else {
- add_error( err, nerr, E_MEMBERNOEMAIL, ndn, NULLMSG );
+ add_error( err, nerr, E_MEMBERNOEMAIL, ndn, NULL );
}
free( ndn );
ldap_value_free( requeststo );
} else {
- add_error( err, nerr, E_NOREQUEST, dn, NULLMSG );
+ add_error( err, nerr, E_NOREQUEST, dn, NULL );
}
}
ldap_value_free( errorsto );
} else {
- add_error( err, nerr, E_NOERRORS, dn, NULLMSG );
+ add_error( err, nerr, E_NOERRORS, dn, NULL );
}
}
if ( debug ) {
fprintf( stderr, "got %d bytes\n", len );
#ifdef LDAP_DEBUG
- lber_bprint( buf, len );
+ ber_bprint( buf, len );
#endif
}
if ( debug ) {
fprintf( stderr, "got %d bytes\n", len );
#ifdef LDAP_DEBUG
- lber_bprint( buf, len );
+ ber_bprint( buf, len );
#endif
}
/* no matches - bounce with user unknown */
if ( match == 0 ) {
if ( type == USER ) {
- add_error( err, nerr, E_USERUNKNOWN, name, NULLMSG );
+ add_error( err, nerr, E_USERUNKNOWN, name, NULL );
} else {
- add_error( err, nerr, E_GROUPUNKNOWN, name, NULLMSG );
+ add_error( err, nerr, E_GROUPUNKNOWN, name, NULL );
}
return;
}
if ( strcasecmp( joinable[0], "FALSE" ) == 0 ) {
if ( ! anymembers ) {
add_error( err, nerr, E_NOMEMBERS, dn,
- NULLMSG );
+ NULL );
}
ldap_value_free( joinable );
ndn = ldap_get_dn( ld, ee );
add_error( err, nerr,
- E_JOINMEMBERNOEMAIL, ndn, NULLMSG );
+ E_JOINMEMBERNOEMAIL, ndn, NULL );
free( ndn );
}
}
if ( ! anymembers ) {
- add_error( err, nerr, E_NOMEMBERS, dn, NULLMSG );
+ add_error( err, nerr, E_NOMEMBERS, dn, NULL );
}
}
if ( (rc = ldap_search_st( ld, dn, LDAP_SCOPE_BASE, "(objectclass=*)",
attrs, 0, &timeout, &res )) != LDAP_SUCCESS ) {
if ( rc == LDAP_NO_SUCH_OBJECT ) {
- add_error( err, nerr, E_BADMEMBER, dn, NULLMSG );
+ add_error( err, nerr, E_BADMEMBER, dn, NULL );
return;
} else {
} else {
if ( suppress == NULL || strcasecmp( suppress[0], "FALSE" )
== 0 ) {
- add_error( err, nerr, E_MEMBERNOEMAIL, ndn, NULLMSG );
+ add_error( err, nerr, E_MEMBERNOEMAIL, ndn, NULL );
}
}
ldap_value_free( requeststo );
} else {
- add_error( err, nerr, E_NOREQUEST, dn, NULLMSG );
+ add_error( err, nerr, E_NOREQUEST, dn, NULL );
}
}
ldap_value_free( errorsto );
} else {
- add_error( err, nerr, E_NOERRORS, dn, NULLMSG );
+ add_error( err, nerr, E_NOERRORS, dn, NULL );
}
}
add_to( to, nto, owner );
ldap_value_free( owner );
} else {
- add_error( err, nerr, E_NOOWNER, dn, NULLMSG );
+ add_error( err, nerr, E_NOOWNER, dn, NULL );
}
}
static char **defvals[] = { maildefvals, NULL };
- rc = ldap_entry2text_search( ldp, dn, searchbase, NULLMSG, tmpll,
+ rc = ldap_entry2text_search( ldp, dn, searchbase, NULL, tmpll,
defattrs, defvals, append_text, (void *)reply, "\n",
rdncount, LDAP_DISP_OPT_DOSEARCHACTIONS );
/* this is of questionable value
* gettimeofday not provide much usec
*/
- struct timeval tv;
- gettimeofday (&tv, NULL);
- srand (tv.tv_usec);
+ {
+ struct timeval tv;
+ gettimeofday (&tv, NULL);
+ srand (tv.tv_usec);
+ }
#else
/* The traditional seed */
srand((unsigned)time( NULL ));