mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-12 07:13:41 -05:00
Add initial support for modify/increment. No over/under flow detection.
Currently discovered via a "feature", but should use a control. Start of a control made, but needs to be better integrated (with auto use in ldapmodify(1)).
This commit is contained in:
parent
1251d801c1
commit
b54780f940
45 changed files with 347 additions and 73 deletions
|
|
@ -181,15 +181,16 @@ typedef struct ldapcontrol {
|
|||
} LDAPControl;
|
||||
|
||||
/* LDAP Controls */
|
||||
#define LDAP_CONTROL_ASSERT "1.3.6.1.4.1.4203.666.5.9"
|
||||
#define LDAP_CONTROL_PRE_READ_BACK "1.3.6.1.4.1.4203.666.5.10.1"
|
||||
#define LDAP_CONTROL_POST_READ_BACK "1.3.6.1.4.1.4203.666.5.10.2"
|
||||
#define LDAP_CONTROL_ASSERT "1.3.6.1.4.1.4203.666.5.9"
|
||||
#define LDAP_CONTROL_PRE_READ_BACK "1.3.6.1.4.1.4203.666.5.10.1"
|
||||
#define LDAP_CONTROL_POST_READ_BACK "1.3.6.1.4.1.4203.666.5.10.2"
|
||||
#define LDAP_CONTROL_MODIFY_INCREMENT "1.3.6.1.4.1.4203.666.5.11"
|
||||
|
||||
#define LDAP_CONTROL_VALUESRETURNFILTER "1.2.826.0.1.334810.2.3"
|
||||
#define LDAP_CONTROL_SUBENTRIES "1.3.6.1.4.1.4203.1.10.1"
|
||||
#define LDAP_CONTROL_NOOP "1.3.6.1.4.1.4203.1.10.2"
|
||||
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
|
||||
#define LDAP_CONTROL_PROXY_AUTHZ "2.16.840.1.113730.3.4.18"
|
||||
#define LDAP_CONTROL_VALUESRETURNFILTER "1.2.826.0.1.334810.2.3"
|
||||
#define LDAP_CONTROL_SUBENTRIES "1.3.6.1.4.1.4203.1.10.1"
|
||||
#define LDAP_CONTROL_NOOP "1.3.6.1.4.1.4203.1.10.2"
|
||||
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
|
||||
#define LDAP_CONTROL_PROXY_AUTHZ "2.16.840.1.113730.3.4.18"
|
||||
|
||||
#if 0
|
||||
#define LDAP_CONTROL_DUPENT_REQUEST "2.16.840.1.113719.1.27.101.1"
|
||||
|
|
@ -198,7 +199,7 @@ typedef struct ldapcontrol {
|
|||
#define LDAP_CONTROL_DUPENT LDAP_CONTROL_DUPENT_REQUEST
|
||||
#endif
|
||||
|
||||
#define LDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319"
|
||||
#define LDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319"
|
||||
|
||||
#define LDAP_SYNC 2
|
||||
#ifdef LDAP_SYNC
|
||||
|
|
@ -248,7 +249,7 @@ typedef struct ldapcontrol {
|
|||
#define LDAP_FEATURE_ABSOLUTE_FILTERS "1.3.6.1.4.1.4203.1.5.3" /* (&) (|) */
|
||||
#define LDAP_FEATURE_LANGUAGE_TAG_OPTIONS "1.3.6.1.4.1.4203.1.5.4"
|
||||
#define LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS "1.3.6.1.4.1.4203.1.5.5"
|
||||
#define LDAP_FEATURE_MODIFY_INCREMENT "1.3.6.1.4.1.4203.1.5.6"
|
||||
#define LDAP_FEATURE_MODIFY_INCREMENT "1.3.6.1.4.1.4203.666.5.6"
|
||||
|
||||
/*
|
||||
* specific LDAP instantiations of BER types we know about
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ bdb_db_init( BackendDB *be )
|
|||
|
||||
/* indicate system schema supported */
|
||||
be->be_flags |=
|
||||
SLAP_BFLAG_INCREMENT |
|
||||
#ifdef BDB_SUBENTRIES
|
||||
SLAP_BFLAG_SUBENTRIES |
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -112,6 +112,28 @@ int bdb_modify_internal(
|
|||
}
|
||||
break;
|
||||
|
||||
case LDAP_MOD_INCREMENT:
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG ( OPERATION, DETAIL1,
|
||||
"bdb_modify_internal: increment\n", 0, 0, 0 );
|
||||
#else
|
||||
Debug(LDAP_DEBUG_ARGS,
|
||||
"bdb_modify_internal: increment\n", 0, 0, 0);
|
||||
#endif
|
||||
err = modify_increment_values( e, mod, get_permissiveModify(op),
|
||||
text, textbuf, textlen );
|
||||
if( err != LDAP_SUCCESS ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG ( OPERATION, ERR,
|
||||
"bdb_modify_internal: %d %s\n", err, *text, 0 );
|
||||
#else
|
||||
Debug(LDAP_DEBUG_ARGS,
|
||||
"bdb_modify_internal: %d %s\n",
|
||||
err, *text, 0);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
case SLAP_MOD_SOFTADD:
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG ( OPERATION, DETAIL1,
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ ldbm_back_db_init(
|
|||
|
||||
/* indicate system schema supported */
|
||||
be->be_flags |=
|
||||
SLAP_BFLAG_INCREMENT |
|
||||
#ifdef LDBM_SUBENTRIES
|
||||
SLAP_BFLAG_SUBENTRIES |
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -116,6 +116,28 @@ int ldbm_modify_internal(
|
|||
}
|
||||
break;
|
||||
|
||||
case LDAP_MOD_INCREMENT:
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( BACK_LDBM, DETAIL1,
|
||||
"ldbm_modify_internal: increment\n",0,0,0);
|
||||
#else
|
||||
Debug(LDAP_DEBUG_ARGS,
|
||||
"ldbm_modify_internal: increment\n",0,0,0);
|
||||
#endif
|
||||
|
||||
rc = modify_increment_values( e, mod, get_permissiveModify( op ),
|
||||
text, textbuf, textlen );
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( BACK_LDBM, INFO,
|
||||
"ldbm_modify_internal: failed %d (%s)\n", rc, *text, 0 );
|
||||
#else
|
||||
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: %d %s\n",
|
||||
rc, *text, 0);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
case SLAP_MOD_SOFTADD:
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( BACK_LDBM, DETAIL1,
|
||||
|
|
|
|||
|
|
@ -821,8 +821,8 @@ backend_check_controls(
|
|||
|
||||
if( ctrls ) {
|
||||
for( ; *ctrls != NULL ; ctrls++ ) {
|
||||
if( (*ctrls)->ldctl_iscritical &&
|
||||
!ldap_charray_inlist( op->o_bd->be_controls, (*ctrls)->ldctl_oid ) )
|
||||
if( (*ctrls)->ldctl_iscritical && !ldap_charray_inlist(
|
||||
op->o_bd->be_controls, (*ctrls)->ldctl_oid ) )
|
||||
{
|
||||
rs->sr_text = "control unavailable in context";
|
||||
rs->sr_err = LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
static SLAP_CTRL_PARSE_FN parseAssert;
|
||||
static SLAP_CTRL_PARSE_FN parseProxyAuthz;
|
||||
static SLAP_CTRL_PARSE_FN parseManageDSAit;
|
||||
static SLAP_CTRL_PARSE_FN parseModifyIncrement;
|
||||
static SLAP_CTRL_PARSE_FN parseNoOp;
|
||||
static SLAP_CTRL_PARSE_FN parsePagedResults;
|
||||
static SLAP_CTRL_PARSE_FN parseValuesReturnFilter;
|
||||
|
|
@ -102,6 +103,9 @@ static struct slap_control control_defs[] = {
|
|||
SLAP_CTRL_HIDE|SLAP_CTRL_SEARCH, NULL,
|
||||
parseLdupSync, LDAP_SLIST_ENTRY_INITIALIZER(next) },
|
||||
#endif
|
||||
{ LDAP_CONTROL_MODIFY_INCREMENT,
|
||||
SLAP_CTRL_MODIFY, NULL,
|
||||
parseModifyIncrement, LDAP_SLIST_ENTRY_INITIALIZER(next) },
|
||||
{ LDAP_CONTROL_MANAGEDSAIT,
|
||||
SLAP_CTRL_ACCESS, NULL,
|
||||
parseManageDSAit, LDAP_SLIST_ENTRY_INITIALIZER(next) },
|
||||
|
|
@ -632,6 +636,32 @@ return_results:
|
|||
return rs->sr_err;
|
||||
}
|
||||
|
||||
static int parseModifyIncrement (
|
||||
Operation *op,
|
||||
SlapReply *rs,
|
||||
LDAPControl *ctrl )
|
||||
{
|
||||
#if 0
|
||||
if ( op->o_parseModifyIncrement != SLAP_NO_CONTROL ) {
|
||||
rs->sr_text = "modifyIncrement control specified multiple times";
|
||||
return LDAP_PROTOCOL_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( ctrl->ldctl_value.bv_len ) {
|
||||
rs->sr_text = "modifyIncrement control value not empty";
|
||||
return LDAP_PROTOCOL_ERROR;
|
||||
}
|
||||
|
||||
#if 0
|
||||
op->o_parseModifyIncrement = ctrl->ldctl_iscritical
|
||||
? SLAP_CRITICAL_CONTROL
|
||||
: SLAP_NONCRITICAL_CONTROL;
|
||||
#endif
|
||||
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
static int parseManageDSAit (
|
||||
Operation *op,
|
||||
SlapReply *rs,
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ do_modify(
|
|||
Slapi_PBlock *pb = op->o_pb;
|
||||
#endif
|
||||
int manageDSAit;
|
||||
int increment = 0;
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( OPERATION, ENTRY, "do_modify: enter\n", 0, 0, 0 );
|
||||
|
|
@ -147,14 +148,53 @@ do_modify(
|
|||
case LDAP_MOD_REPLACE:
|
||||
break;
|
||||
|
||||
case LDAP_MOD_INCREMENT:
|
||||
if( op->o_protocol >= LDAP_VERSION3 ) {
|
||||
increment++;
|
||||
if ( mod->sml_values == NULL ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( OPERATION, ERR, "do_modify: "
|
||||
"modify/increment operation (%ld) requires value\n",
|
||||
(long)mop, 0, 0 );
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY, "do_modify: "
|
||||
"modify/increment operation (%ld) requires value\n",
|
||||
(long) mop, 0, 0 );
|
||||
#endif
|
||||
|
||||
send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR,
|
||||
"modify/increment operation requires value" );
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if( mod->sml_values[1].bv_val ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( OPERATION, ERR, "do_modify: modify/increment "
|
||||
"operation (%ld) requires single value\n",
|
||||
(long)mop, 0, 0 );
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY, "do_modify: modify/increment "
|
||||
"operation (%ld) requires single value\n",
|
||||
(long) mop, 0, 0 );
|
||||
#endif
|
||||
|
||||
send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR,
|
||||
"modify/increment operation requires single value" );
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
/* fall thru */
|
||||
|
||||
default: {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( OPERATION, ERR,
|
||||
"do_modify: invalid modify operation (%ld)\n",
|
||||
"do_modify: unrecognized modify operation (%ld)\n",
|
||||
(long)mop, 0, 0 );
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"do_modify: invalid modify operation (%ld)\n",
|
||||
"do_modify: unrecognized modify operation (%ld)\n",
|
||||
(long) mop, 0, 0 );
|
||||
#endif
|
||||
|
||||
|
|
@ -227,9 +267,10 @@ do_modify(
|
|||
for ( tmp = modlist; tmp != NULL; tmp = tmp->sml_next ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( OPERATION, DETAIL1, "\t%s: %s\n",
|
||||
tmp->sml_op == LDAP_MOD_ADD ?
|
||||
"add" : (tmp->sml_op == LDAP_MOD_DELETE ?
|
||||
"delete" : "replace"), tmp->sml_type.bv_val, 0 );
|
||||
tmp->sml_op == LDAP_MOD_ADD ? "add" :
|
||||
(tmp->sml_op == LDAP_MOD_INCREMENT ? "increment" :
|
||||
(tmp->sml_op == LDAP_MOD_DELETE ? "delete" :
|
||||
"replace")), tmp->sml_type.bv_val, 0 );
|
||||
|
||||
if ( tmp->sml_values == NULL ) {
|
||||
LDAP_LOG( OPERATION, DETAIL1, "\t\tno values", 0, 0, 0 );
|
||||
|
|
@ -243,9 +284,10 @@ do_modify(
|
|||
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ARGS, "\t%s: %s\n",
|
||||
tmp->sml_op == LDAP_MOD_ADD
|
||||
? "add" : (tmp->sml_op == LDAP_MOD_DELETE
|
||||
? "delete" : "replace"), tmp->sml_type.bv_val, 0 );
|
||||
tmp->sml_op == LDAP_MOD_ADD ? "add" :
|
||||
(tmp->sml_op == LDAP_MOD_INCREMENT ? "increment" :
|
||||
(tmp->sml_op == LDAP_MOD_DELETE ? "delete" :
|
||||
"replace")), tmp->sml_type.bv_val, 0 );
|
||||
|
||||
if ( tmp->sml_values == NULL ) {
|
||||
Debug( LDAP_DEBUG_ARGS, "%s\n",
|
||||
|
|
@ -311,7 +353,7 @@ do_modify(
|
|||
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
|
||||
} else {
|
||||
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
|
||||
"referral missing" );
|
||||
"referral missing" );
|
||||
}
|
||||
goto cleanup;
|
||||
}
|
||||
|
|
@ -327,6 +369,12 @@ do_modify(
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
/* check for modify/increment support */
|
||||
if( increment && !SLAP_INCREMENT( op->o_bd ) ) {
|
||||
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
|
||||
"modify/increment not supported in context" );
|
||||
}
|
||||
|
||||
#if defined( LDAP_SLAPI )
|
||||
slapi_x_pblock_set_operation( pb, op );
|
||||
slapi_pblock_set( pb, SLAPI_MODIFY_TARGET, (void *)dn.bv_val );
|
||||
|
|
@ -399,7 +447,7 @@ do_modify(
|
|||
*/
|
||||
#if defined(LDAP_SYNCREPL) && !defined(SLAPD_MULTIMASTER)
|
||||
if ( !op->o_bd->syncinfo &&
|
||||
( !op->o_bd->be_update_ndn.bv_len || repl_user ))
|
||||
( !op->o_bd->be_update_ndn.bv_len || repl_user ))
|
||||
#elif defined(LDAP_SYNCREPL) && defined(SLAPD_MULTIMASTER)
|
||||
if ( !op->o_bd->syncinfo ) /* LDAP_SYNCREPL overrides MM */
|
||||
#elif !defined(LDAP_SYNCREPL) && !defined(SLAPD_MULTIMASTER)
|
||||
|
|
@ -572,7 +620,9 @@ int slap_mods_check(
|
|||
}
|
||||
|
||||
if ( is_at_obsolete( ad->ad_type ) &&
|
||||
( ml->sml_op == LDAP_MOD_ADD || ml->sml_values != NULL ) )
|
||||
(( ml->sml_op != LDAP_MOD_REPLACE &&
|
||||
ml->sml_op != LDAP_MOD_DELETE ) ||
|
||||
ml->sml_values != NULL ))
|
||||
{
|
||||
/*
|
||||
* attribute is obsolete,
|
||||
|
|
@ -585,6 +635,22 @@ int slap_mods_check(
|
|||
return LDAP_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
|
||||
if ( ml->sml_op == LDAP_MOD_INCREMENT &&
|
||||
#ifdef SLAPD_REAL_SYNTAX
|
||||
!is_at_syntax( ad->ad_type, SLAPD_REAL_SYNTAX ) &&
|
||||
#endif
|
||||
!is_at_syntax( ad->ad_type, SLAPD_INTEGER_SYNTAX ) )
|
||||
{
|
||||
/*
|
||||
* attribute values must be INTEGER or REAL
|
||||
*/
|
||||
snprintf( textbuf, textlen,
|
||||
"%s: attribute syntax inappropriate for increment",
|
||||
ml->sml_type.bv_val );
|
||||
*text = textbuf;
|
||||
return LDAP_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
|
||||
/*
|
||||
* check values
|
||||
*/
|
||||
|
|
@ -679,8 +745,6 @@ int slap_mods_check(
|
|||
|
||||
ml->sml_nvalues[nvals].bv_val = NULL;
|
||||
ml->sml_nvalues[nvals].bv_len = 0;
|
||||
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -747,9 +811,7 @@ int slap_mods_opattrs(
|
|||
if( global_schemacheck ) {
|
||||
int rc = mods_structural_class( mods, &tmpval,
|
||||
text, textbuf, textlen );
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
return rc;
|
||||
}
|
||||
if( rc != LDAP_SUCCESS ) return rc;
|
||||
|
||||
mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
|
||||
mod->sml_op = mop;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#include <ac/string.h>
|
||||
|
||||
#include "slap.h"
|
||||
|
||||
int
|
||||
|
|
@ -40,8 +42,7 @@ modify_add_values(
|
|||
Modification *mod,
|
||||
int permissive,
|
||||
const char **text,
|
||||
char *textbuf, size_t textlen
|
||||
)
|
||||
char *textbuf, size_t textlen )
|
||||
{
|
||||
int i, j;
|
||||
int matched;
|
||||
|
|
@ -176,8 +177,8 @@ modify_add_values(
|
|||
|
||||
} else {
|
||||
rc = modify_check_duplicates( mod->sm_desc, mr,
|
||||
a ? a->a_vals : NULL, mod->sm_bvalues,
|
||||
permissive, text, textbuf, textlen );
|
||||
a ? a->a_vals : NULL, mod->sm_bvalues,
|
||||
permissive, text, textbuf, textlen );
|
||||
|
||||
if ( permissive && rc == LDAP_TYPE_OR_VALUE_EXISTS ) {
|
||||
return LDAP_SUCCESS;
|
||||
|
|
@ -190,8 +191,7 @@ modify_add_values(
|
|||
}
|
||||
|
||||
/* no - add them */
|
||||
if( attr_merge( e, mod->sm_desc, mod->sm_values, mod->sm_nvalues ) != 0 )
|
||||
{
|
||||
if( attr_merge( e, mod->sm_desc, mod->sm_values, mod->sm_nvalues ) != 0 ) {
|
||||
/* this should return result of attr_merge */
|
||||
*text = textbuf;
|
||||
snprintf( textbuf, textlen,
|
||||
|
|
@ -263,8 +263,7 @@ modify_delete_values(
|
|||
|
||||
for ( i = 0; mod->sm_values[i].bv_val != NULL; i++ ) {
|
||||
int found = 0;
|
||||
for ( j = 0; a->a_vals[j].bv_val != NULL; j++ )
|
||||
{
|
||||
for ( j = 0; a->a_vals[j].bv_val != NULL; j++ ) {
|
||||
int match;
|
||||
|
||||
if( mod->sm_nvalues ) {
|
||||
|
|
@ -312,7 +311,6 @@ modify_delete_values(
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
if ( found == 0 ) {
|
||||
*text = textbuf;
|
||||
snprintf( textbuf, textlen,
|
||||
|
|
@ -324,8 +322,7 @@ modify_delete_values(
|
|||
}
|
||||
|
||||
/* compact array skipping dummies */
|
||||
for ( k = 0, j = 0; a->a_vals[k].bv_val != NULL; k++ )
|
||||
{
|
||||
for ( k = 0, j = 0; a->a_vals[k].bv_val != NULL; k++ ) {
|
||||
/* skip dummies */
|
||||
if( a->a_vals[k].bv_val == &dummy ) {
|
||||
assert( a->a_nvals == NULL || a->a_nvals[k].bv_val == &dummy );
|
||||
|
|
@ -366,8 +363,7 @@ modify_replace_values(
|
|||
Modification *mod,
|
||||
int permissive,
|
||||
const char **text,
|
||||
char *textbuf, size_t textlen
|
||||
)
|
||||
char *textbuf, size_t textlen )
|
||||
{
|
||||
(void) attr_delete( &e->e_attrs, mod->sm_desc );
|
||||
|
||||
|
|
@ -378,11 +374,67 @@ modify_replace_values(
|
|||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
int
|
||||
modify_increment_values(
|
||||
Entry *e,
|
||||
Modification *mod,
|
||||
int permissive,
|
||||
const char **text,
|
||||
char *textbuf, size_t textlen )
|
||||
{
|
||||
Attribute *a;
|
||||
|
||||
a = attr_find( e->e_attrs, mod->sm_desc );
|
||||
if( a == NULL ) {
|
||||
*text = textbuf;
|
||||
snprintf( textbuf, textlen,
|
||||
"modify/increment: %s: no such attribute",
|
||||
mod->sm_desc->ad_cname.bv_val );
|
||||
return LDAP_NO_SUCH_ATTRIBUTE;
|
||||
}
|
||||
|
||||
|
||||
if ( !strcmp( a->a_desc->ad_type->sat_syntax_oid, SLAPD_INTEGER_SYNTAX )) {
|
||||
int i;
|
||||
char str[sizeof(long)*3 + 2]; /* overly long */
|
||||
long incr = atol( mod->sm_bvalues[0].bv_val );
|
||||
|
||||
/* treat zero and errors as a no-op */
|
||||
if( incr == 0 ) {
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
for( i=0; a->a_nvals[i].bv_val != NULL; i++ ) {
|
||||
char *tmp;
|
||||
long value = atol( a->a_nvals[i].bv_val );
|
||||
size_t strln = snprintf( str, sizeof(str), "%ld", value+incr );
|
||||
|
||||
tmp = SLAP_REALLOC( a->a_nvals[i].bv_val, strln+1 );
|
||||
if( tmp == NULL ) {
|
||||
*text = "modify/increment: reallocation error";
|
||||
return LDAP_OTHER;;
|
||||
}
|
||||
a->a_nvals[i].bv_val = tmp;
|
||||
a->a_nvals[i].bv_len = strln;
|
||||
|
||||
AC_MEMCPY( a->a_nvals[i].bv_val, str, strln+1 );
|
||||
}
|
||||
|
||||
} else {
|
||||
snprintf( textbuf, textlen,
|
||||
"modify/increment: %s: increment not supported for value syntax %s",
|
||||
mod->sm_desc->ad_cname.bv_val,
|
||||
a->a_desc->ad_type->sat_syntax_oid );
|
||||
return LDAP_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
slap_mod_free(
|
||||
Modification *mod,
|
||||
int freeit
|
||||
)
|
||||
int freeit )
|
||||
{
|
||||
if ( mod->sm_values != NULL ) ber_bvarray_free( mod->sm_values );
|
||||
mod->sm_values = NULL;
|
||||
|
|
@ -395,8 +447,7 @@ slap_mod_free(
|
|||
|
||||
void
|
||||
slap_mods_free(
|
||||
Modifications *ml
|
||||
)
|
||||
Modifications *ml )
|
||||
{
|
||||
Modifications *next;
|
||||
|
||||
|
|
|
|||
|
|
@ -619,6 +619,10 @@ LDAP_SLAPD_F( int ) modify_replace_values( Entry *e,
|
|||
Modification *mod,
|
||||
int permissive,
|
||||
const char **text, char *textbuf, size_t textlen );
|
||||
LDAP_SLAPD_F( int ) modify_increment_values( Entry *e,
|
||||
Modification *mod,
|
||||
int permissive,
|
||||
const char **text, char *textbuf, size_t textlen );
|
||||
|
||||
LDAP_SLAPD_F( void ) slap_mod_free( Modification *mod, int freeit );
|
||||
LDAP_SLAPD_F( void ) slap_mods_free( Modifications *mods );
|
||||
|
|
|
|||
|
|
@ -285,7 +285,9 @@ replog1(
|
|||
if ( ri && ri->ri_attrs ) {
|
||||
int is_in = ad_inlist( ml->sml_desc, ri->ri_attrs );
|
||||
|
||||
if ( ( !is_in && !ri->ri_exclude ) || ( is_in && ri->ri_exclude ) ) {
|
||||
if ( ( !is_in && !ri->ri_exclude )
|
||||
|| ( is_in && ri->ri_exclude ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
@ -302,9 +304,14 @@ replog1(
|
|||
case LDAP_MOD_REPLACE:
|
||||
fprintf( fp, "replace: %s\n", type );
|
||||
break;
|
||||
|
||||
case LDAP_MOD_INCREMENT:
|
||||
fprintf( fp, "increment: %s\n", type );
|
||||
break;
|
||||
}
|
||||
if ( ml->sml_bvalues )
|
||||
if ( ml->sml_bvalues ) {
|
||||
print_vals( fp, &ml->sml_desc->ad_cname, ml->sml_bvalues );
|
||||
}
|
||||
fprintf( fp, "-\n" );
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* $OpenLDAP$ */
|
||||
/* root_dse.c - Provides the ROOT DSA-Specific Entry
|
||||
/* root_dse.c - Provides the Root DSA-Specific Entry
|
||||
*
|
||||
* Copyright 1999-2003 The OpenLDAP Foundation.
|
||||
* All rights reserved.
|
||||
|
|
@ -25,11 +25,12 @@
|
|||
#endif
|
||||
|
||||
static struct berval supportedFeatures[] = {
|
||||
BER_BVC(LDAP_FEATURE_ALL_OPERATIONAL_ATTRS), /* all Operational Attributes ("+") */
|
||||
BER_BVC(LDAP_FEATURE_OBJECTCLASS_ATTRS), /* OCs in Attributes List */
|
||||
BER_BVC(LDAP_FEATURE_ALL_OPERATIONAL_ATTRS), /* All Op Attrs (+) */
|
||||
BER_BVC(LDAP_FEATURE_OBJECTCLASS_ATTRS), /* OCs in Attrs List (+person) */
|
||||
BER_BVC(LDAP_FEATURE_ABSOLUTE_FILTERS), /* (&) and (|) search filters */
|
||||
BER_BVC(LDAP_FEATURE_LANGUAGE_TAG_OPTIONS), /* Language Tag Options */
|
||||
BER_BVC(LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS), /* Language Range Options */
|
||||
BER_BVC(LDAP_FEATURE_MODIFY_INCREMENT), /* Modify/increment */
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
|
|
@ -96,24 +97,24 @@ root_dse_info(
|
|||
|
||||
vals[0].bv_val = "top";
|
||||
vals[0].bv_len = sizeof("top")-1;
|
||||
if( attr_merge( e, ad_objectClass, vals, NULL ) )
|
||||
{
|
||||
if( attr_merge( e, ad_objectClass, vals, NULL ) ) {
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
|
||||
vals[0].bv_val = "OpenLDAProotDSE";
|
||||
vals[0].bv_len = sizeof("OpenLDAProotDSE")-1;
|
||||
if( attr_merge( e, ad_objectClass, vals, NULL ) )
|
||||
if( attr_merge( e, ad_objectClass, vals, NULL ) ) {
|
||||
return LDAP_OTHER;
|
||||
if( attr_merge( e, ad_structuralObjectClass, vals, NULL ) )
|
||||
}
|
||||
if( attr_merge( e, ad_structuralObjectClass, vals, NULL ) ) {
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
|
||||
for ( i = 0; i < nbackends; i++ ) {
|
||||
if ( backends[i].be_flags & SLAP_BFLAG_MONITOR ) {
|
||||
vals[0] = backends[i].be_suffix[0];
|
||||
nvals[0] = backends[i].be_nsuffix[0];
|
||||
if( attr_merge( e, ad_monitorContext, vals, nvals ) )
|
||||
{
|
||||
if( attr_merge( e, ad_monitorContext, vals, nvals ) ) {
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
continue;
|
||||
|
|
@ -124,8 +125,7 @@ root_dse_info(
|
|||
for ( j = 0; backends[i].be_suffix[j].bv_val != NULL; j++ ) {
|
||||
vals[0] = backends[i].be_suffix[j];
|
||||
nvals[0] = backends[i].be_nsuffix[0];
|
||||
if( attr_merge( e, ad_namingContexts, vals, nvals ) )
|
||||
{
|
||||
if( attr_merge( e, ad_namingContexts, vals, nvals ) ) {
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
}
|
||||
|
|
@ -170,8 +170,7 @@ root_dse_info(
|
|||
snprintf(buf, sizeof buf, "%d", i);
|
||||
vals[0].bv_val = buf;
|
||||
vals[0].bv_len = strlen( vals[0].bv_val );
|
||||
if( attr_merge( e, ad_supportedLDAPVersion, vals, NULL ) )
|
||||
{
|
||||
if( attr_merge( e, ad_supportedLDAPVersion, vals, NULL ) ) {
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
}
|
||||
|
|
@ -183,8 +182,7 @@ root_dse_info(
|
|||
for ( i=0; supportedSASLMechanisms[i] != NULL; i++ ) {
|
||||
vals[0].bv_val = supportedSASLMechanisms[i];
|
||||
vals[0].bv_len = strlen( vals[0].bv_val );
|
||||
if( attr_merge( e, ad_supportedSASLMechanisms, vals, NULL ) )
|
||||
{
|
||||
if( attr_merge( e, ad_supportedSASLMechanisms, vals, NULL ) ) {
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
}
|
||||
|
|
@ -192,8 +190,7 @@ root_dse_info(
|
|||
}
|
||||
|
||||
if ( default_referral != NULL ) {
|
||||
if( attr_merge( e, ad_ref, default_referral, NULL /* FIXME */ ) )
|
||||
{
|
||||
if( attr_merge( e, ad_ref, default_referral, NULL /* FIXME */ ) ) {
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
}
|
||||
|
|
@ -202,7 +199,7 @@ root_dse_info(
|
|||
Attribute *a;
|
||||
for( a = usr_attr->e_attrs; a != NULL; a = a->a_next ) {
|
||||
if( attr_merge( e, a->a_desc, a->a_vals,
|
||||
(a->a_nvals == a->a_vals) ? NULL : a->a_nvals ) )
|
||||
(a->a_nvals == a->a_vals) ? NULL : a->a_nvals ) )
|
||||
{
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
|
|
@ -276,7 +273,7 @@ int read_root_dse_file( const char *fname )
|
|||
|
||||
for(a = e->e_attrs; a != NULL; a = a->a_next) {
|
||||
if( attr_merge( usr_attr, a->a_desc, a->a_vals,
|
||||
(a->a_nvals == a->a_vals) ? NULL : a->a_nvals ) )
|
||||
(a->a_nvals == a->a_vals) ? NULL : a->a_nvals ) )
|
||||
{
|
||||
rc = LDAP_OTHER;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@ LDAP_BEGIN_DECL
|
|||
/* must match in schema_init.c */
|
||||
#define SLAPD_DN_SYNTAX "1.3.6.1.4.1.1466.115.121.1.12"
|
||||
#define SLAPD_NAMEUID_SYNTAX "1.3.6.1.4.1.1466.115.121.1.34"
|
||||
#define SLAPD_INTEGER_SYNTAX "1.3.6.1.4.1.1466.115.121.1.27"
|
||||
#define SLAPD_GROUP_ATTR "member"
|
||||
#define SLAPD_GROUP_CLASS "groupOfNames"
|
||||
#define SLAPD_ROLE_ATTR "roleOccupant"
|
||||
|
|
@ -1395,23 +1396,28 @@ struct slap_backend_db {
|
|||
#define SLAP_BFLAG_GLUE_INSTANCE 0x0010U /* a glue backend */
|
||||
#define SLAP_BFLAG_GLUE_SUBORDINATE 0x0020U /* child of a glue hierarchy */
|
||||
#define SLAP_BFLAG_GLUE_LINKED 0x0040U /* child is connected to parent */
|
||||
#define SLAP_BFLAG_ALIASES 0x0100U
|
||||
#define SLAP_BFLAG_REFERRALS 0x0200U
|
||||
#define SLAP_BFLAG_SUBENTRIES 0x0400U
|
||||
#define SLAP_BFLAG_MONITOR 0x1000U
|
||||
#define SLAP_BFLAG_DYNAMIC 0x2000U
|
||||
#define SLAP_BFLAG_MONITOR 0x0080U /* a monitor backend */
|
||||
#define SLAP_BFLAG_INCREMENT 0x0100U
|
||||
#define SLAP_BFLAG_ALIASES 0x1000U
|
||||
#define SLAP_BFLAG_REFERRALS 0x2000U
|
||||
#define SLAP_BFLAG_SUBENTRIES 0x4000U
|
||||
#define SLAP_BFLAG_DYNAMIC 0x8000U
|
||||
slap_mask_t be_flags;
|
||||
#define SLAP_LASTMOD(be) (!((be)->be_flags & SLAP_BFLAG_NOLASTMOD))
|
||||
#define SLAP_GLUE_INSTANCE(be) ((be)->be_flags & SLAP_BFLAG_GLUE_INSTANCE)
|
||||
#define SLAP_GLUE_SUBORDINATE(be) \
|
||||
((be)->be_flags & SLAP_BFLAG_GLUE_SUBORDINATE)
|
||||
#define SLAP_GLUE_LINKED(be) ((be)->be_flags & SLAP_BFLAG_GLUE_LINKED)
|
||||
|
||||
#define SLAP_MONITOR(be) ((be)->be_flags & SLAP_BFLAG_MONITOR)
|
||||
#define SLAP_INCREMENT(be) ((be)->be_flags & SLAP_BFLAG_INCREMENT)
|
||||
|
||||
#define SLAP_ALIASES(be) ((be)->be_flags & SLAP_BFLAG_ALIASES)
|
||||
#define SLAP_REFERRALS(be) ((be)->be_flags & SLAP_BFLAG_REFERRALS)
|
||||
#define SLAP_SUBENTRIES(be) ((be)->be_flags & SLAP_BFLAG_SUBENTRIES)
|
||||
#define SLAP_MONITOR(be) ((be)->be_flags & SLAP_BFLAG_MONITOR)
|
||||
#define SLAP_DYNAMIC(be) ((be)->be_flags & SLAP_BFLAG_DYNAMIC)
|
||||
|
||||
|
||||
slap_mask_t be_restrictops; /* restriction operations */
|
||||
#define SLAP_RESTRICT_OP_ADD 0x0001U
|
||||
#define SLAP_RESTRICT_OP_BIND 0x0002U
|
||||
|
|
|
|||
|
|
@ -331,6 +331,16 @@ op_ldap_modify(
|
|||
nvals = 0;
|
||||
nops++;
|
||||
break;
|
||||
case T_MODOPINCREMENT:
|
||||
state = T_MODOPINCREMENT;
|
||||
ldmarr = ( LDAPMod ** )
|
||||
ch_realloc(ldmarr, (( nops + 2 ) * ( sizeof( LDAPMod * ))));
|
||||
ldmarr[ nops ] = ldm = alloc_ldapmod();
|
||||
ldm->mod_op = LDAP_MOD_INCREMENT | LDAP_MOD_BVALUES;
|
||||
ldm->mod_type = value;
|
||||
nvals = 0;
|
||||
nops++;
|
||||
break;
|
||||
default:
|
||||
if ( state == AWAITING_OP ) {
|
||||
#ifdef NEW_LOGGING
|
||||
|
|
@ -696,6 +706,9 @@ char *type )
|
|||
if ( !strcmp( type, T_MODOPDELETESTR )) {
|
||||
return( T_MODOPDELETE );
|
||||
}
|
||||
if ( !strcmp( type, T_MODOPINCREMENTSTR )) {
|
||||
return( T_MODOPINCREMENT );
|
||||
}
|
||||
return( T_ERR );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -117,8 +117,10 @@
|
|||
#define T_MODOPREPLACE 9
|
||||
#define T_MODOPDELETESTR "delete"
|
||||
#define T_MODOPDELETE 10
|
||||
#define T_MODOPINCREMENTSTR "increment"
|
||||
#define T_MODOPINCREMENT 11
|
||||
#define T_MODSEPSTR "-"
|
||||
#define T_MODSEP 11
|
||||
#define T_MODSEP 12
|
||||
|
||||
#define T_NEWRDNSTR "newrdn"
|
||||
#define T_DELOLDRDNSTR "deleteoldrdn"
|
||||
|
|
|
|||
|
|
@ -178,7 +178,10 @@ description: Manager of the directory
|
|||
|
||||
dn: ou=People,o=University of Michigan,c=US
|
||||
objectclass: organizationalUnit
|
||||
objectClass: extensibleObject
|
||||
ou: People
|
||||
uidNumber: 0
|
||||
gidNumber: 0
|
||||
|
||||
dn: o=University of Michigan,c=US
|
||||
objectclass: organization
|
||||
|
|
|
|||
|
|
@ -230,7 +230,10 @@ telephonenumber: +1 313 555 4177
|
|||
|
||||
dn: ou=People,o=University of Michigan,c=US
|
||||
objectclass: organizationalUnit
|
||||
objectclass: extensibleObject
|
||||
ou: People
|
||||
uidNumber: 1
|
||||
gidNumber: -1
|
||||
|
||||
dn: o=University of Michigan,c=US
|
||||
objectclass: organization
|
||||
|
|
|
|||
|
|
@ -253,7 +253,10 @@ telephonenumber: +1 313 555 4177
|
|||
|
||||
dn: ou=People,o=University of Michigan,c=US
|
||||
objectclass: organizationalUnit
|
||||
objectclass: extensibleObject
|
||||
ou: People
|
||||
uidNumber: 0
|
||||
gidNumber: 0
|
||||
|
||||
dn: o=University of Michigan,c=US
|
||||
objectclass: organization
|
||||
|
|
|
|||
|
|
@ -251,7 +251,10 @@ telephonenumber: +1 313 555 4177
|
|||
|
||||
dn: ou=People,o=University of Michigan,c=US
|
||||
objectclass: organizationalUnit
|
||||
objectclass: extensibleObject
|
||||
ou: People
|
||||
uidNumber: 0
|
||||
gidNumber: 0
|
||||
|
||||
dn: o=University of Michigan,c=US
|
||||
objectclass: organization
|
||||
|
|
|
|||
|
|
@ -246,7 +246,10 @@ userPassword:: c2VjcmV0
|
|||
|
||||
dn: ou=People,o=University of Michigan,c=US
|
||||
objectclass: organizationalUnit
|
||||
objectclass: extensibleObject
|
||||
ou: People
|
||||
uidNumber: 0
|
||||
gidNumber: 0
|
||||
|
||||
dn: o=University of Michigan,c=US
|
||||
objectclass: organization
|
||||
|
|
|
|||
|
|
@ -250,7 +250,10 @@ telephoneNumber: +1 313 555 4177
|
|||
|
||||
dn: ou=People,o=University of Michigan,c=US
|
||||
objectClass: organizationalUnit
|
||||
objectClass: extensibleObject
|
||||
ou: People
|
||||
uidNumber: 0
|
||||
gidNumber: 0
|
||||
|
||||
dn: o=University of Michigan,c=US
|
||||
objectClass: organization
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
pidfile ./test-db/slapd.pid
|
||||
argsfile ./test-db/slapd.args
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
#
|
||||
pidfile ./test-db/slapd.pid
|
||||
argsfile ./test-db/slapd.args
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
pidfile ./test-db/slapd.pid
|
||||
argsfile ./test-db/slapd.args
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
pidfile ./test-db/slapd.pid
|
||||
argsfile ./test-db/slapd.args
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
pidfile ./test-db/slapd.pid
|
||||
argsfile ./test-db/slapd.args
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
|
||||
pidfile ./test-cache/slapd.pid
|
||||
argsfile ./test-cache/slapd.args
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
pidfile ./test-db/slapd.pid
|
||||
argsfile ./test-db/slapd.args
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
#
|
||||
pidfile ./test-repl/slapd.pid
|
||||
argsfile ./test-repl/slapd.args
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
pidfile ./test-db/slapd.pid
|
||||
argsfile ./test-db/slapd.args
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
#
|
||||
pidfile ./test-db/slapd.pid
|
||||
argsfile ./test-db/slapd.args
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
#
|
||||
pidfile ./test-repl/slapd.pid
|
||||
argsfile ./test-repl/slapd.args
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
#
|
||||
pidfile ./test-db/slapd.pid
|
||||
argsfile ./test-db/slapd.args
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
#
|
||||
pidfile ./test-repl/slapd.pid
|
||||
argsfile ./test-repl/slapd.args
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
#
|
||||
pidfile ./test-db/slapd.pid
|
||||
argsfile ./test-db/slapd.args
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
#
|
||||
pidfile ./test-repl/p1/slapd.pid
|
||||
argsfile ./test-repl/p1/slapd.args
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
#
|
||||
pidfile ./test-repl/p2/slapd.pid
|
||||
argsfile ./test-repl/p2/slapd.args
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
#
|
||||
pidfile ./test-repl/p3/slapd.pid
|
||||
argsfile ./test-repl/p3/slapd.args
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
#
|
||||
pidfile ./test-repl/r1/slapd.pid
|
||||
argsfile ./test-repl/r1/slapd.args
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
#
|
||||
pidfile ./test-repl/r2/slapd.pid
|
||||
argsfile ./test-repl/r2/slapd.args
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ include ./schema/core.schema
|
|||
include ./schema/cosine.schema
|
||||
include ./schema/inetorgperson.schema
|
||||
include ./schema/openldap.schema
|
||||
include ./schema/nis.schema
|
||||
pidfile ./test-db/slapd.pid
|
||||
argsfile ./test-db/slapd.args
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,10 @@ associatedDomain: example.com
|
|||
|
||||
dn: ou=People,o=University of Michigan,c=US
|
||||
objectClass: organizationalUnit
|
||||
objectClass: extensibleObject
|
||||
ou: People
|
||||
uidNumber: 0
|
||||
gidNumber: 0
|
||||
|
||||
dn: ou=Alumni Association,ou=People,o=University of Michigan,c=US
|
||||
objectClass: organizationalUnit
|
||||
|
|
|
|||
|
|
@ -18,7 +18,10 @@ associateddomain: example.com
|
|||
|
||||
dn: ou=People,o=University of Michigan,c=US
|
||||
objectclass: organizationalUnit
|
||||
objectclass: extensibleObject
|
||||
ou: People
|
||||
uidNumber: 0
|
||||
gidNumber: 0
|
||||
|
||||
dn: ou=Groups,o=University of Michigan,c=US
|
||||
objectclass: organizationalUnit
|
||||
|
|
|
|||
|
|
@ -252,7 +252,10 @@ telephonenumber: +1 313 555 4177
|
|||
|
||||
dn: ou=People,o=University of Michigan,c=US
|
||||
objectclass: organizationalUnit
|
||||
objectclass: extensibleObject
|
||||
ou: People
|
||||
uidNumber: 0
|
||||
gidNumber: 0
|
||||
|
||||
dn: o=University of Michigan,c=US
|
||||
objectclass: organization
|
||||
|
|
|
|||
|
|
@ -129,6 +129,14 @@ dn: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=University
|
|||
changetype: delete
|
||||
# TRAILING COMMENT AND WHITE SPACE
|
||||
|
||||
dn: ou=People,o=University of Michigan,c=US
|
||||
changetype: modify
|
||||
increment: uidNumber
|
||||
uidNumber: 1
|
||||
-
|
||||
increment: gidNumber
|
||||
gidNumber: -1
|
||||
|
||||
EOMODS
|
||||
|
||||
RC=$?
|
||||
|
|
|
|||
Loading…
Reference in a new issue