]> git.sur5r.net Git - openldap/commitdiff
Remove -r from ldapmodify.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 29 Aug 2001 17:10:30 +0000 (17:10 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 29 Aug 2001 17:10:30 +0000 (17:10 +0000)
clients/tools/ldapmodify.c
doc/man/man1/ldapmodify.1

index 4e29e21abb72fad57df39e80d4dc5456bb380b19..a43d1011aecf3f01b83d8e3bda2f357e33dc3b67 100644 (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;
            }
        }
 
index e67de3e2020e2981a5436008e6310c762a66a7c2..577bc5db141da52c2369bde2de5654c07edb19b5 100644 (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)