From 6f1544c51e9e009f6fd39ca0bf6535e78f9262d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Tue, 11 Aug 2015 14:28:43 +0200 Subject: [PATCH] ITS#8215 Make editing of invalid entries possible If the database does not conform to any known schema, make it possible to edit such a database using slapmodify when schema-checking is disabled. --- servers/slapd/slapmodify.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/servers/slapd/slapmodify.c b/servers/slapd/slapmodify.c index 96c1c09f97..5ceec3e210 100644 --- a/servers/slapd/slapmodify.c +++ b/servers/slapd/slapmodify.c @@ -38,6 +38,8 @@ #include "slapcommon.h" +extern int slap_DN_strict; /* dn.c */ + static char csnbuf[ LDAP_PVT_CSNSTR_BUFSIZE ]; int @@ -98,9 +100,12 @@ slapmodify( int argc, char **argv ) lmax = 0; nextline = 0; - /* enforce schema checking unless not disabled */ + /* enforce schema checking unless not disabled and allow unknown + * attributes otherwise */ if ( (slapMode & SLAP_TOOL_NO_SCHEMA_CHECK) == 0) { SLAP_DBFLAGS(be) &= ~(SLAP_DBFLAG_NO_SCHEMA_CHECK); + } else { + slap_DN_strict = 0; } if( !dryrun && be->be_entry_open( be, 1 ) != 0 ) { -- 2.39.5