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

This commit is contained in:
Hallvard Furuseth 1999-04-30 05:24:16 +00:00
parent d8aef04224
commit ca7dba5182
7 changed files with 19 additions and 0 deletions

View File

@ -142,6 +142,8 @@ struct ldbminfo {
#endif
};
extern int ldbm_ignore_nextid_file;
#include "proto-back-ldbm.h"
LDAP_END_DECL

View File

@ -10,6 +10,9 @@
#include "slap.h"
#include "back-ldbm.h"
int ldbm_ignore_nextid_file = 0;
int
ldbm_back_db_config(
Backend *be,

View File

@ -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 );

View File

@ -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 ) {

View File

@ -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 ) {

View File

@ -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;

View File

@ -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;