mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-17 14:00:30 +08:00
ITS#141: Add ldbm_ignore_nextid_file, since tools/ldif2* handles it privately
This commit is contained in:
parent
d8aef04224
commit
ca7dba5182
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user