static int not, verbose, contoper;
static LDAP *ld;
-static int domodrdn LDAP_P((
+static int domodrdn(
LDAP *ld,
char *dn,
char *rdn,
- int remove, /* flag: remove old RDN */
- char *newSuperior));
+ char *newSuperior,
+ int remove ); /* flag: remove old RDN */
int
main(int argc, char **argv)
rc = 0;
if (havedn)
- rc = domodrdn(ld, entrydn, rdn, remove, newSuperior);
+ rc = domodrdn( ld, entrydn, rdn, newSuperior, remove );
else while ((rc == 0 || contoper) && fgets(buf, sizeof(buf), fp) != NULL) {
if ( *buf != '\0' ) { /* blank lines optional, skip */
buf[ strlen( buf ) - 1 ] = '\0'; /* remove nl */
perror( "strdup" );
return( EXIT_FAILURE );
}
- rc = domodrdn(ld, entrydn, rdn, remove, newSuperior);
+ rc = domodrdn(ld, entrydn, rdn, newSuperior, remove );
havedn = 0;
} else if ( !havedn ) { /* don't have DN yet */
if (( entrydn = strdup( buf )) == NULL ) {
LDAP *ld,
char *dn,
char *rdn,
- int remove, /* flag: remove old RDN */
- char *newSuperior)
+ char *newSuperior,
+ int remove ) /* flag: remove old RDN */
{
int i;
}
if ( !not ) {
- i = ldap_rename2_s( ld, dn, rdn, remove, newSuperior );
+ i = ldap_rename2_s( ld, dn, rdn, newSuperior, remove );
if ( i != LDAP_SUCCESS ) {
ldap_perror( ld, "ldap_rename2_s" );
} else if ( verbose ) {
LDAP *ld,
LDAP_CONST char *dn,
LDAP_CONST char *newrdn,
- int deleteoldrdn,
LDAP_CONST char *newSuperior,
+ int deleteoldrdn,
LDAPControl **sctrls,
LDAPControl **cctrls,
int *msgidp )
LDAP *ld,
LDAP_CONST char *dn,
LDAP_CONST char *newrdn,
- int deleteoldrdn,
- LDAP_CONST char *newSuperior )
+ LDAP_CONST char *newSuperior,
+ int deleteoldrdn )
{
int msgid;
int rc;
Debug( LDAP_DEBUG_TRACE, "ldap_rename2\n", 0, 0, 0 );
- rc = ldap_rename( ld, dn, newrdn, deleteoldrdn, newSuperior,
- NULL, NULL, &msgid );
+ rc = ldap_rename( ld, dn, newrdn, newSuperior,
+ deleteoldrdn, NULL, NULL, &msgid );
return rc == LDAP_SUCCESS ? msgid : -1;
}
LDAP_CONST char *newrdn,
int deleteoldrdn )
{
- return ldap_rename2( ld, dn, newrdn, deleteoldrdn, NULL );
+ return ldap_rename2( ld, dn, newrdn, NULL, deleteoldrdn );
}
int
ldap_modrdn( LDAP *ld, LDAP_CONST char *dn, LDAP_CONST char *newrdn )
{
- return( ldap_rename2( ld, dn, newrdn, 1, NULL ) );
+ return( ldap_rename2( ld, dn, newrdn, NULL, 1 ) );
}
LDAP *ld,
LDAP_CONST char *dn,
LDAP_CONST char *newrdn,
- int deleteoldrdn,
LDAP_CONST char *newSuperior,
+ int deleteoldrdn,
LDAPControl **sctrls,
LDAPControl **cctrls )
{
int msgid;
LDAPMessage *res;
- rc = ldap_rename( ld, dn, newrdn, deleteoldrdn,
- newSuperior, sctrls, cctrls, &msgid );
+ rc = ldap_rename( ld, dn, newrdn, newSuperior,
+ deleteoldrdn, sctrls, cctrls, &msgid );
if( rc != LDAP_SUCCESS ) {
return rc;
LDAP *ld,
LDAP_CONST char *dn,
LDAP_CONST char *newrdn,
- int deleteoldrdn,
- LDAP_CONST char *newSuperior )
+ LDAP_CONST char *newSuperior,
+ int deleteoldrdn )
{
- return ldap_rename_s( ld, dn, newrdn, deleteoldrdn, newSuperior, NULL, NULL );
+ return ldap_rename_s( ld, dn, newrdn, newSuperior,
+ deleteoldrdn, NULL, NULL );
}
int
ldap_modrdn2_s( LDAP *ld, LDAP_CONST char *dn, LDAP_CONST char *newrdn, int deleteoldrdn )
{
- return ldap_rename_s( ld, dn, newrdn, deleteoldrdn, NULL, NULL, NULL );
+ return ldap_rename_s( ld, dn, newrdn, NULL, deleteoldrdn, NULL, NULL );
}
int
ldap_modrdn_s( LDAP *ld, LDAP_CONST char *dn, LDAP_CONST char *newrdn )
{
- return ldap_rename_s( ld, dn, newrdn, 1, NULL, NULL, NULL );
+ return ldap_rename_s( ld, dn, newrdn, NULL, 1, NULL, NULL );
}