Skip to content
Snippets Groups Projects
Commit ca7dba51 authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

ITS#141: Add ldbm_ignore_nextid_file, since tools/ldif2* handles it privately

parent d8aef042
No related branches found
No related tags found
No related merge requests found
......@@ -142,6 +142,8 @@ struct ldbminfo {
#endif
};
extern int ldbm_ignore_nextid_file;
#include "proto-back-ldbm.h"
LDAP_END_DECL
......
......@@ -10,6 +10,9 @@
#include "slap.h"
#include "back-ldbm.h"
int ldbm_ignore_nextid_file = 0;
int
ldbm_back_db_config(
Backend *be,
......
......@@ -27,6 +27,9 @@ next_id_read( Backend *be )
char* file = li->li_nextid_file;
FILE* fp;
if ( ldbm_ignore_nextid_file )
return NOID;
if ( (fp = fopen( file, "r" )) == NULL ) {
Debug( LDAP_DEBUG_ANY,
"next_id_read: could not open \"%s\"\n",
......@@ -63,6 +66,9 @@ next_id_write( Backend *be, ID id )
FILE* fp;
int rc;
if ( ldbm_ignore_nextid_file )
return 0;
if ( (fp = fopen( file, "w" )) == NULL ) {
Debug( LDAP_DEBUG_ANY, "next_id_write(%ld): could not open \"%s\"\n",
id, file, 0 );
......
......@@ -42,6 +42,8 @@ main( int argc, char **argv )
struct berval bv;
struct berval *vals[2];
ldbm_ignore_nextid_file = 1;
tailorfile = SLAPD_DEFAULT_CONFIGFILE;
dbnum = -1;
while ( (i = getopt( argc, argv, "d:f:i:n:" )) != EOF ) {
......
......@@ -40,6 +40,8 @@ main( int argc, char **argv )
struct berval *vals[2];
FILE *fp;
ldbm_ignore_nextid_file = 1;
tailorfile = SLAPD_DEFAULT_CONFIGFILE;
dbnum = -1;
while ( (i = getopt( argc, argv, "d:f:i:n:" )) != EOF ) {
......
......@@ -39,6 +39,8 @@ main( int argc, char **argv )
struct berval bv;
struct berval *vals[2];
ldbm_ignore_nextid_file = 1;
inputfile = NULL;
tailorfile = SLAPD_DEFAULT_CONFIGFILE;
dbnum = -1;
......
......@@ -65,6 +65,8 @@ main( int argc, char **argv )
struct berval *vals[2];
Avlnode *avltypes = NULL;
ldbm_ignore_nextid_file = 1;
sbindir = DEFAULT_SBINDIR;
tailorfile = SLAPD_DEFAULT_CONFIGFILE;
dbnum = -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment