[Date Prev][Date Next] [Chronological] [Thread] [Top]

Adding Subtree Capability



 
 Here are some patches I have made to add a subtree capability to
 slurpd. This allows you to only replicate part of the tree to
 specific hosts. This has been especially useful when dealing with
 hosts on our DMZ that I don't want to have the entire database ...
 only what they need.

  - branson

-------------------------------------------------------------------------------
Branson Matheson       	        " If you are falling off of a mountain,
Unix Systems Manager              You may as well try to fly." 
Ferguson Enterprises, Inc.           - Delenn, Minbari Ambassador 
           ( $statements = <BRANSON> ) !~ /Corporate Opinion/;
RCS file: RCS/ri.c,v
retrieving revision 1.1
rdiff -e -r1.1 ri.c
82a
		/* This Re is not in the subtree to replicated */
			} else if ( strstr(re->re_dn, ri->ri_subtree ) != 0 ) {
		Debug( LDAP_DEBUG_TRACE,
			"Replica %s:%d, skip repl record for %s (not in subtree)\n",
			ri->ri_hostname, ri->ri_port, re->re_dn );
.
===================================================================
RCS file: RCS/config.c,v
retrieving revision 1.1
rdiff -e -r1.1 config.c
350a
	} else if ( !strncasecmp( cargv[ i ],
		SUBTREESTR, strlen( SUBTREESTR ))) {
			val = cargv[ i ] + strlen( SUBTREESTR ) + 1;
			ri->ri_subtree = strdup( val );
.
===================================================================
RCS file: RCS/slurp.h,v
retrieving revision 1.1
rdiff -e -r1.1 slurp.h
175a
		char  *ri_subtree;    /* subpart of the tree to replicate */
.
104a
#define SUBTREESTR	"subtree"
.