From: Kurt Zeilenga Date: Wed, 29 Aug 2001 17:10:30 +0000 (+0000) Subject: Remove -r from ldapmodify. X-Git-Tag: OPENLDAP_REL_ENG_2_0_12~10 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a3ec40913f004687dbfed9a0554d335ec759d85a;p=openldap Remove -r from ldapmodify. --- diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index 4e29e21abb..a43d1011ae 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -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; } } diff --git a/doc/man/man1/ldapmodify.1 b/doc/man/man1/ldapmodify.1 index e67de3e202..577bc5db14 100644 --- a/doc/man/man1/ldapmodify.1 +++ b/doc/man/man1/ldapmodify.1 @@ -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)