]> git.sur5r.net Git - openldap/commitdiff
Add initial support for modify/increment. No over/under flow detection.
authorKurt Zeilenga <kurt@openldap.org>
Thu, 7 Aug 2003 16:42:40 +0000 (16:42 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 7 Aug 2003 16:42:40 +0000 (16:42 +0000)
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)).

45 files changed:
include/ldap.h
servers/slapd/back-bdb/init.c
servers/slapd/back-bdb/modify.c
servers/slapd/back-ldbm/init.c
servers/slapd/back-ldbm/modify.c
servers/slapd/backend.c
servers/slapd/controls.c
servers/slapd/modify.c
servers/slapd/mods.c
servers/slapd/proto-slap.h
servers/slapd/repl.c
servers/slapd/root_dse.c
servers/slapd/slap.h
servers/slurpd/ldap_op.c
servers/slurpd/slurp.h
tests/data/acl.out.master
tests/data/modify.out.master
tests/data/modrdn.out.master
tests/data/modrdn.out.master.0
tests/data/search.out.master
tests/data/search.out.xsearch
tests/data/slapd-acl.conf
tests/data/slapd-cache-master.conf
tests/data/slapd-glue.conf
tests/data/slapd-master.conf
tests/data/slapd-passwd.conf
tests/data/slapd-proxycache.conf
tests/data/slapd-pw.conf
tests/data/slapd-ref-slave.conf
tests/data/slapd-referrals.conf
tests/data/slapd-repl-master.conf
tests/data/slapd-repl-slave.conf
tests/data/slapd-repl-submaster.conf
tests/data/slapd-repl-subslave.conf
tests/data/slapd-syncrepl-master.conf
tests/data/slapd-syncrepl-slave-persist1.conf
tests/data/slapd-syncrepl-slave-persist2.conf
tests/data/slapd-syncrepl-slave-persist3.conf
tests/data/slapd-syncrepl-slave-refresh1.conf
tests/data/slapd-syncrepl-slave-refresh2.conf
tests/data/slapd.conf
tests/data/test-glued.ldif
tests/data/test-ordered.ldif
tests/data/test.ldif
tests/scripts/test004-modify

index 81194df71caf3a44cf0b42aeb133e6913889ae16..da0459ca666820d0481c2844736ccf7cde73822f 100644 (file)
@@ -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
index f2d880ea48c7e9fb07ef948ebea25ac3d864a071..0ab747ac7c9e3e8bfe1f73136dd4c5c0310d2429 100644 (file)
@@ -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
index 6df4d5d71b0765d9cc91ac827b102be0f7292aee..467c55936c7487a15b31ca0e20e84bc8552cfc1d 100644 (file)
@@ -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, 
index ca095eccfe256e883bc0db343f95ea10ed808bc3..3797b2b60cb9a7f341b2e1c4164cc752e335b966 100644 (file)
@@ -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
index 1c6754b399589002e1857783f8508476e070c4bf..2448c6ad42c639aaa26d83e596cfb96f34583c3c 100644 (file)
@@ -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, 
index 590666032ae694231c018b3d08aa0d744ea4c26d..62e3957ea866b22b8950064c935970ede8084d72 100644 (file)
@@ -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;
index 7137c03ae5c312bb0433380d376b87a50a1a05fb..8a022a0dd47e8c169a68c291ccfdfedac7ce5578 100644 (file)
@@ -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,
index 547e8c035c75eaf81a4e5e74ed260dfc9959ec71..bae64a9f7aab03e2367f4b7b99db4d213f53ebc9 100644 (file)
@@ -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;
index e097e44b8ccf59c83c84ebdbb7a8ece4cd8765e2..02d4bcb207883a7fe5daddb40b5731d1fc092447 100644 (file)
@@ -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;
 
index 621c7e69c3b39dac38a2d30a1c29068c81e4d309..0125d2f3087201cd6408f4d0b2c2f3f0aeab6b02 100644 (file)
@@ -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 );
index 77dbe9dafc559fe61619f2b53a39781b463ca3d7..807cb8a92f9dcba960cf03040a3da78b72ceb645 100644 (file)
@@ -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;
index 06f1ea12b2e6887f0d6b0a047c569482043be1e7..0ff22bbaec4a77655652c718f9981d465fbdedf1 100644 (file)
@@ -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.
 #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;
index 168dfe521c0f54afddaf2bc1d28cec994aea9799..8c72ab573d1f42db381c42a601aa9db3bdeb9196 100644 (file)
@@ -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
index b3a8561b2affa84a79f14002af5376fd0827c45a..f501a17cf08f7fac7ca924757e715ea3c51d636e 100644 (file)
@@ -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 );
 }
 
index d5884f1c2b93ace83efc5e34ed08cd9ff6838c01..04db465f3e2eb4111e6645f58c127344b69359ae 100644 (file)
 #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"
index 1b7d849b0671cfc205d9a90202e27b78d16362e0..430f4422dfb5b2c49cc1ae1c7659e9bab23ababc 100644 (file)
@@ -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
index 8e348a429c94de2bc59abe71e98735d95b30b4ca..d66f9df2cc2977002bec169c5137a4d0476879ac 100644 (file)
@@ -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
index eb83c1c3c061baab69c39ce3ee274b3e68c4e9eb..9105cb381509c281b39ec9bab6e95a2e4a82cadb 100644 (file)
@@ -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
index e5ffa8e9cd41d4d997699ea567fa14c8a4a4210f..e2198316396a72e1fd70f91ff14a46349c44d557 100644 (file)
@@ -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
index 7e409424daff3cb0ddae82c562cab4cc58ac983f..fed8b0c80620d5138da36e354522dbde0963c52a 100644 (file)
@@ -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
index ddb5fe8409edb4ea111f2216ed9b030999b622f7..83f0c5cde3ce63ad9dd58d335ff161685bfbb023 100644 (file)
@@ -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
index dfc247fac1ec3f81ce67c8a3ac7d09b3590f8a6e..0eee54cdec8039bbe7bdf9e05f756fc595d0192b 100644 (file)
@@ -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
 
index 3dad68c4a99866d78746fc6a01810bf375aaf0b5..c6721fcf42cd6ea1dddfe84463c31aeae4954d06 100644 (file)
@@ -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
index 257f75f7e129e604701de3ecd0a30f4de0da782d..e3979d08337c890fd9d87b8c4ffac413c1fd575e 100644 (file)
@@ -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
 
index a11c45afde9305b63d6bf988d87277df2eb9ec48..f11a4013fedace557ea3961283cad9e551445c0f 100644 (file)
@@ -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
 
index d6e2dadcb4b42986507f87ede3b39c6bc7f20663..ac3dc41071ae3633da7b97ecf330e0288604f2dc 100644 (file)
@@ -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
 
index 0afe6cb9f6b4cec8574afcaf67f2062ac1c4fc29..3a106ca08c6b15de1c04baf534df3e5eaad5508f 100644 (file)
@@ -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
index 8fb5b873e51af38a9413cf6fd0457cbed44513f1..2c6dd4166600dabb2456fb4a04e0a84aa4de4823 100644 (file)
@@ -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
 
index 109c7632084cd2697c51c340d61e72e4499b3740..c4ae949fdd813a333171d847d9299047c7025e11 100644 (file)
@@ -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
index a523cc030ccba952a8d683d83f8f9edf91e935f9..ed0fb9db32b04f56352c567f11619d6a3614224f 100644 (file)
@@ -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
 
index 0123ae6a389cc710aea75323a18d5e4edac4aa6d..f2afea37f1ffa55f33e6f0fd4493d88cde04407b 100644 (file)
@@ -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
index 18c6e1c4e67f10b60786193a94cff8d8798be7fc..569faabb98813f402c0013bd15d9e0e46c0b8d9c 100644 (file)
@@ -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
index f7598665c6942aa87a411174d3a647d3f04a4950..a2d44a5946df06bcc167eec14200e782f0b5588c 100644 (file)
@@ -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
index c6ba42f792946af019f01b1973dd2377843b6d9a..b67ad304041f204ca09a91f9e01a48300dd74047 100644 (file)
@@ -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
index 5cc86cb82f86532d198a2b7f3bfe40bea650810c..e9e2b286fd4c3c27363c9af80a215f5e368f82dd 100644 (file)
@@ -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
index 7451d23cd774b0703af0b787b19a497fad54dc53..ff78f8406720731c3e3b4e3160414eeb2fba3868 100644 (file)
@@ -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
index 1a949c2b76a743b4cdc4982ab67a7a2de0be5e93..bab32b0d85737aad2d0ed7660b87c6222203d67f 100644 (file)
@@ -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
index d24815a1c4393cbfe8912d7b54040b990ab79919..b3dbd61c8962eb54e7b48c39c1dfce7c0177ae53 100644 (file)
@@ -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
index d2310e6034e47e1e22578c88d31e9815030ed498..fdb41f096f6280c9c6932ed466d9e7117d082aa9 100644 (file)
@@ -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
index 199d5c384e0510241d894f1ce57a33a34b4644d9..a6bdc14a27939c827903ba316ba78495edc53963 100644 (file)
@@ -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
index 5d6f39169c109fee965f59523c3bf3fe5e002e25..5942610de95847fefcfba9ac07915cca593e3db5 100644 (file)
@@ -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
 
index b0f4af64e08d6a9f0255a90c0c571531ed7737c0..356c3305f287da6aff37d12d048d0b4f27b0f591 100644 (file)
@@ -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
index a6893b6fe02b00aacf2fd573d5f985523dfb4d06..b2d329e33521535023aa8cae16d9b30f5ac8bf85 100644 (file)
@@ -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
index 17c6f4f3ee70b1a1efcff43154ca3f0dd91e42ff..7b4961f5939f345e5a8e425ce2ae35d391e54e3f 100644 (file)
@@ -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
index fdc1c5fe95e0d83be59ec5aa0a48786e192b88a9..8a46a4a60d3340c81a57c133718d16143251365b 100755 (executable)
@@ -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=$?