Rev 5349: open registry tdb with sequence number. preparation to
loadparm integration of registry global smb.conf optins: this
allows to detect changes in order to trigger reload. in
http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/
Michael Adam
ma at sernet.de
Wed Apr 11 14:41:04 GMT 2007
At http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/
------------------------------------------------------------
revno: 5349
revision-id: ma at sernet.de-20070411144102-b41fdc630c352740
parent: ma at sernet.de-20070411143428-49f14e3085db5e99
committer: Michael Adam <ma at sernet.de>
branch nick: SAMBA_3_0-registry.bzr
timestamp: Wed 2007-04-11 16:41:02 +0200
message:
open registry tdb with sequence number. preparation to loadparm integration of registry global smb.conf optins: this allows to detect changes in order to trigger reload.
modified:
source/registry/reg_db.c reg_db.c-20060530022627-e9a827257fb89131
=== modified file 'source/registry/reg_db.c'
--- a/source/registry/reg_db.c 2007-03-30 15:43:31 +0000
+++ b/source/registry/reg_db.c 2007-04-11 14:41:02 +0000
@@ -31,6 +31,8 @@
#define VALUE_PREFIX "SAMBA_REGVAL"
#define SECDESC_PREFIX "SAMBA_SECDESC"
+#define REG_TDB_FLAGS TDB_SEQNUM
+
/* List the deepest path into the registry. All part components will be created.*/
/* If you want to have a part of the path controlled by the tdb and part by
@@ -236,9 +238,9 @@
if ( tdb_reg )
return True;
- if ( !(tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600)) )
+ if ( !(tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR, 0600)) )
{
- tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+ tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR|O_CREAT, 0600);
if ( !tdb_reg ) {
DEBUG(0,("regdb_init: Failed to open registry %s (%s)\n",
lock_path("registry.tdb"), strerror(errno) ));
@@ -283,7 +285,7 @@
become_root();
- tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600);
+ tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR, 0600);
if ( !tdb_reg ) {
result = ntstatus_to_werror( map_nt_error_from_unix( errno ) );
DEBUG(0,("regdb_open: Failed to open %s! (%s)\n",
More information about the samba-cvs
mailing list