Commit 11fc1689 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Sync with HEAD

parent ee25190e
......@@ -132,7 +132,6 @@ objectclass: OpenLDAPperson
cn: James A Jones 1
cn: James Jones
cn: Jim Jones
sn: Jones
uid: jaj
postaladdress: Alumni Association $ 111 Maple St $ Ann Arbor, MI 48109
seealso: cn=All Staff,ou=Groups,o=University of Michigan,c=US
......@@ -146,6 +145,7 @@ mail: jaj@mail.alumni.example.com
facsimiletelephonenumber: +1 313 555 4332
telephonenumber: +1 313 555 0895
drink: Orange Juice
sn: Jones
dn: cn=Jane Doe,ou=Alumni Association,ou=People,o=University of Michigan,c=US
objectclass: OpenLDAPperson
......
......@@ -30,8 +30,7 @@ rootpw secret
#bdb#index cn,sn,uid pres,eq,sub
#
# normal installations should protect root dse,
# cn=monitor, cn=schema, and cn=config
# normal installations should protect root dse, cn=monitor, cn=subschema
#
access to dn="" by * read
......
# $OpenLDAP$
## Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
## Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
##
## tests Makefile.in for OpenLDAP
PROGRAMS = slapd-tester slapd-search slapd-read slapd-addel
PROGRAMS = slapd-tester slapd-search slapd-read slapd-addel slapd-modrdn
SRCS = slapd-tester.c slapd-search.c slapd-read.c slapd-addel.c
SRCS = slapd-tester.c slapd-search.c slapd-read.c slapd-addel.c \
slapd-modrdn.c
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
......@@ -31,4 +32,6 @@ slapd-read: slapd-read.o $(XLIBS)
slapd-addel: slapd-addel.o $(XLIBS)
$(LTLINK) -o $@ slapd-addel.o $(LIBS)
slapd-modrdn: slapd-modrdn.o $(XLIBS)
$(LTLINK) -o $@ slapd-modrdn.o $(LIBS)
......@@ -278,7 +278,7 @@ do_addel(
}
/* wait a second for the add to really complete */
/* sleep( 1 ); */
sleep( 1 );
/* now delete the entry again */
if ( ldap_delete_s( ld, entry ) != LDAP_SUCCESS ) {
......
......@@ -24,6 +24,7 @@
#define SEARCHCMD "slapd-search"
#define READCMD "slapd-read"
#define ADDCMD "slapd-addel"
#define MODRDNCMD "slapd-modrdn"
#define MAXARGS 100
#define MAXREQS 20
#define LOOPS "100"
......@@ -31,6 +32,7 @@
#define TSEARCHFILE "do_search.0"
#define TREADFILE "do_read.0"
#define TADDFILE "do_add."
#define TMODRDNFILE "do_modrdn.0"
static char *get_file_name( char *dirname, char *filename );
static int get_search_filters( char *filename, char *filters[] );
......@@ -79,6 +81,9 @@ main( int argc, char **argv )
int rnum = 0;
char *afiles[MAXREQS];
int anum = 0;
char *mfile = NULL;
char *mreqs[MAXREQS];
int mnum = 0;
char *sargs[MAXARGS];
int sanum;
char scmd[MAXPATHLEN];
......@@ -88,6 +93,9 @@ main( int argc, char **argv )
char *aargs[MAXARGS];
int aanum;
char acmd[MAXPATHLEN];
char *margs[MAXARGS];
int manum;
char mcmd[MAXPATHLEN];
while ( (i = getopt( argc, argv, "H:h:p:D:w:b:d:j:l:P:" )) != EOF ) {
switch( i ) {
......@@ -153,7 +161,7 @@ main( int argc, char **argv )
}
/* look for search, read, and add/delete files */
/* look for search, read, modrdn, and add/delete files */
for ( file = readdir( datadir ); file; file = readdir( datadir )) {
if ( !strcasecmp( file->d_name, TSEARCHFILE )) {
......@@ -162,6 +170,9 @@ main( int argc, char **argv )
} else if ( !strcasecmp( file->d_name, TREADFILE )) {
rfile = get_file_name( dirname, file->d_name );
continue;
} else if ( !strcasecmp( file->d_name, TMODRDNFILE )) {
mfile = get_file_name( dirname, file->d_name );
continue;
} else if ( !strncasecmp( file->d_name, TADDFILE, strlen( TADDFILE ))
&& ( anum < MAXREQS )) {
afiles[anum++] = get_file_name( dirname, file->d_name );
......@@ -181,6 +192,11 @@ main( int argc, char **argv )
rnum = get_read_entries( rfile, rreqs );
}
/* look for modrdn requests */
if ( mfile ) {
mnum = get_read_entries( mfile, mreqs );
}
/*
* generate the search clients
*/
......@@ -229,6 +245,33 @@ main( int argc, char **argv )
rargs[ranum++] = NULL; /* will hold the read entry */
rargs[ranum++] = NULL;
/*
* generate the modrdn clients
*/
manum = 0;
snprintf( mcmd, sizeof mcmd, "%s" LDAP_DIRSEP MODRDNCMD,
progdir );
margs[manum++] = mcmd;
if ( uri ) {
margs[manum++] = "-H";
margs[manum++] = uri;
} else {
margs[manum++] = "-h";
margs[manum++] = host;
margs[manum++] = "-p";
margs[manum++] = port;
}
margs[manum++] = "-D";
margs[manum++] = manager;
margs[manum++] = "-w";
margs[manum++] = passwd;
margs[manum++] = "-l";
margs[manum++] = loops;
margs[manum++] = "-e";
margs[manum++] = NULL; /* will hold the modrdn entry */
margs[manum++] = NULL;
/*
* generate the add/delete clients
*/
......@@ -272,6 +315,13 @@ main( int argc, char **argv )
}
if ( j < mnum ) {
margs[manum - 2] = mreqs[j];
fork_child( mcmd, margs );
}
if ( j < anum ) {
aargs[aanum - 2] = afiles[j];
......
......@@ -74,7 +74,19 @@ dn: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Michigan,
# EMBEDDED COMMENT
changetype: modify
add: drink
drink: Pils
-
add: drink
drink: Orange Juice
-
delete: drink
drink: Pils
-
delete: sn
sn: Jones
-
add: sn
sn: Jones
dn: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=University of Michigan,c=US
changetype: modify
......@@ -88,6 +100,7 @@ drink: Iced Tea
drink: Mad Dog 20/20
dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
changetype: modify
delete: member
member: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=University of Michigan,c=US
member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=University of Michigan,c=US
......
......@@ -114,6 +114,12 @@ dn: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michig
changetype: modify
add: drink
drink: Orange Juice
-
delete: sn
sn: Jones
-
add: sn
sn: Jones
dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
changetype: modify
......
......@@ -127,6 +127,12 @@ dn: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michig
changetype: modify
add: drink
drink: Orange Juice
-
delete: sn
sn: Jones
-
add: sn
sn: Jones
dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
changetype: modify
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment