static char *sasl_secprops = NULL;
#endif
static int use_tls = 0;
-static int ldapadd, replace, not, verbose, contoper, force;
+static int ldapadd, not, verbose, contoper, force;
static LDAP *ld = NULL;
#define LDAPMOD_MAXLINE 4096
" specified by \"-f file\".\n"
"Add or modify options:\n"
" -a add values (default%s)\n"
-" -r replace values\n"
" -F force all changes records to be used\n"
"Common options:\n"
case 'F': /* force all changes records to be used */
force = 1;
break;
- case 'r': /* default is to replace rather than add values */
- replace = 1;
- break;
/* Common Options */
case 'C':
prog );
return( EXIT_FAILURE );
#endif
+ case 'r': /* replace (obsolete) */
+ break;
+
case 'R':
#ifdef HAVE_CYRUS_SASL
if( sasl_realm != NULL ) {
addmodifyop( &pmods, modop, val.bv_val, NULL );
goto end_line;
} else { /* no modify op: use default */
- modop = replace ? LDAP_MOD_REPLACE : LDAP_MOD_ADD;
+ modop = ldapadd ? LDAP_MOD_ADD : LDAP_MOD_REPLACE;
}
}
[\c
.BR \-c ]
[\c
-.BR \-r ]
-[\c
.BR \-n ]
[\c
.BR \-v ]
[\c
.BR \-c ]
[\c
-.BR \-r ]
-[\c
.BR \-n ]
[\c
.BR \-v ]
will continue with modifications. The default is to exit after
reporting an error.
.TP
-.B \-r
-Replace existing values by default.
-.TP
.B \-n
Show what would be done, but don't actually modify entries. Useful for
debugging in conjunction with -v.
and "modify" otherwise.
.LP
If changetype is "modify" and no "add:", "replace:", or "delete:" lines
-appear, the default is "replace" if the -r flag is set and "add"
-otherwise.
+appear, the default is "replace" for and "add"
+.BR ldapmodify (1)
+for
+.BR ldapadd (1).
.LP
Note that the above exceptions to the
.BR slapd.replog (5)