/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1999-2006 The OpenLDAP Foundation.
+ * Copyright 1999-2012 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <stdio.h>
-#include <ac/stdlib.h>
+#include "ac/stdlib.h"
-#include <ac/ctype.h>
-#include <ac/param.h>
-#include <ac/socket.h>
-#include <ac/string.h>
-#include <ac/unistd.h>
-#include <ac/wait.h>
+#include "ac/ctype.h"
+#include "ac/param.h"
+#include "ac/socket.h"
+#include "ac/string.h"
+#include "ac/unistd.h"
+#include "ac/wait.h"
-#include <ldap.h>
-#include <lutil.h>
+#include "ldap.h"
+#include "lutil.h"
#include "slapd-common.h"
"-D <manager> "
"-w <passwd> "
"-e <entry> "
+ "[-i <ignore>] "
"[-l <loops>] "
"[-L <outerloops>] "
"[-r <maxretries>] "
int friendly = 0;
int chaserefs = 0;
- tester_init( "slapd-modify" );
+ tester_init( "slapd-modify", TESTER_MODIFY );
- while ( (i = getopt( argc, argv, "CFH:h:p:D:w:e:a:l:L:r:t:" )) != EOF ) {
+ while ( ( i = getopt( argc, argv, "a:CD:e:FH:h:i:L:l:p:r:t:w:" ) ) != EOF )
+ {
switch ( i ) {
case 'C':
chaserefs++;
host = strdup( optarg );
break;
+ case 'i':
+ /* ignored (!) by now */
+ break;
+
case 'p': /* the servers port */
if ( lutil_atoi( &port, optarg ) != 0 ) {
usage( argv[0] );
case 'w': /* the server managers password */
passwd.bv_val = strdup( optarg );
passwd.bv_len = strlen( optarg );
+ memset( optarg, '*', passwd.bv_len );
break;
case 'e': /* entry to modify */
{
LDAP *ld = NULL;
int i = 0, do_retry = maxretries;
- pid_t pid;
int rc = LDAP_SUCCESS;
struct ldapmod mod;
char *values[2];
int version = LDAP_VERSION3;
- pid = getpid();
-
values[0] = value;
values[1] = NULL;
mod.mod_op = LDAP_MOD_ADD;
}
done:;
- fprintf( stderr, " PID=%ld - Modify done (%d).\n", (long) pid, rc );
+ fprintf( stderr, " PID=%ld - Modify done (%d).\n", (long) pid, rc );
ldap_unbind_ext( ld, NULL, NULL );
}