1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s3:registry: introduce REG_DBWRAP_FLAGS to use for all db_open calls

This is in accordance with the use of REG_TDB_FLAGS.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Michael Adam 2014-01-27 16:19:52 +01:00 committed by Stefan Metzmacher
parent 020fab300d
commit 906abe55cb
2 changed files with 4 additions and 3 deletions

View File

@ -732,11 +732,11 @@ WERROR regdb_init(void)
regdb = db_open(NULL, state_path("registry.tdb"), 0,
REG_TDB_FLAGS, O_RDWR, 0600,
DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE);
DBWRAP_LOCK_ORDER_1, REG_DBWRAP_FLAGS);
if (!regdb) {
regdb = db_open(NULL, state_path("registry.tdb"), 0,
REG_TDB_FLAGS, O_RDWR|O_CREAT, 0600,
DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE);
DBWRAP_LOCK_ORDER_1, REG_DBWRAP_FLAGS);
if (!regdb) {
werr = ntstatus_to_werror(map_nt_error_from_unix(errno));
DEBUG(1,("regdb_init: Failed to open registry %s (%s)\n",
@ -852,7 +852,7 @@ WERROR regdb_open( void )
regdb = db_open(NULL, state_path("registry.tdb"), 0,
REG_TDB_FLAGS, O_RDWR, 0600,
DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE);
DBWRAP_LOCK_ORDER_1, REG_DBWRAP_FLAGS);
if ( !regdb ) {
result = ntstatus_to_werror( map_nt_error_from_unix( errno ) );
DEBUG(0,("regdb_open: Failed to open %s! (%s)\n",

View File

@ -21,6 +21,7 @@
#define _REG_DB_H
#define REG_TDB_FLAGS TDB_SEQNUM
#define REG_DBWRAP_FLAGS DBWRAP_FLAG_NONE
#define REGDB_VERSION_V1 1 /* first db version with write support */
#define REGDB_VERSION_V2 2 /* version 2 with normalized keys */