Remove -r from ldapmodify.

This commit is contained in:
Kurt Zeilenga 2001-08-29 17:10:30 +00:00
parent 28ed7e8ef4
commit a3ec40913f
2 changed files with 9 additions and 15 deletions

View File

@ -48,7 +48,7 @@ static char *sasl_mech = NULL;
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
@ -102,7 +102,6 @@ usage( const char *prog )
" 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"
@ -180,9 +179,6 @@ main( int argc, char **argv )
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':
@ -376,6 +372,9 @@ main( int argc, char **argv )
prog );
return( EXIT_FAILURE );
#endif
case 'r': /* replace (obsolete) */
break;
case 'R':
#ifdef HAVE_CYRUS_SASL
if( sasl_realm != NULL ) {
@ -844,7 +843,7 @@ process_ldif_rec( char *rbuf, int count )
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;
}
}

View File

@ -11,8 +11,6 @@ ldapmodify, ldapadd \- LDAP modify entry and LDAP add entry tools
[\c
.BR \-c ]
[\c
.BR \-r ]
[\c
.BR \-n ]
[\c
.BR \-v ]
@ -61,8 +59,6 @@ ldapmodify, ldapadd \- LDAP modify entry and LDAP add entry tools
[\c
.BR \-c ]
[\c
.BR \-r ]
[\c
.BR \-n ]
[\c
.BR \-v ]
@ -135,9 +131,6 @@ Continuous operation mode. Errors are reported, but
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.
@ -255,8 +248,10 @@ flag is set (or if the program was invoked as
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)