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:
parent
020fab300d
commit
906abe55cb
@ -732,11 +732,11 @@ WERROR regdb_init(void)
|
|||||||
|
|
||||||
regdb = db_open(NULL, state_path("registry.tdb"), 0,
|
regdb = db_open(NULL, state_path("registry.tdb"), 0,
|
||||||
REG_TDB_FLAGS, O_RDWR, 0600,
|
REG_TDB_FLAGS, O_RDWR, 0600,
|
||||||
DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE);
|
DBWRAP_LOCK_ORDER_1, REG_DBWRAP_FLAGS);
|
||||||
if (!regdb) {
|
if (!regdb) {
|
||||||
regdb = db_open(NULL, state_path("registry.tdb"), 0,
|
regdb = db_open(NULL, state_path("registry.tdb"), 0,
|
||||||
REG_TDB_FLAGS, O_RDWR|O_CREAT, 0600,
|
REG_TDB_FLAGS, O_RDWR|O_CREAT, 0600,
|
||||||
DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE);
|
DBWRAP_LOCK_ORDER_1, REG_DBWRAP_FLAGS);
|
||||||
if (!regdb) {
|
if (!regdb) {
|
||||||
werr = ntstatus_to_werror(map_nt_error_from_unix(errno));
|
werr = ntstatus_to_werror(map_nt_error_from_unix(errno));
|
||||||
DEBUG(1,("regdb_init: Failed to open registry %s (%s)\n",
|
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,
|
regdb = db_open(NULL, state_path("registry.tdb"), 0,
|
||||||
REG_TDB_FLAGS, O_RDWR, 0600,
|
REG_TDB_FLAGS, O_RDWR, 0600,
|
||||||
DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE);
|
DBWRAP_LOCK_ORDER_1, REG_DBWRAP_FLAGS);
|
||||||
if ( !regdb ) {
|
if ( !regdb ) {
|
||||||
result = ntstatus_to_werror( map_nt_error_from_unix( errno ) );
|
result = ntstatus_to_werror( map_nt_error_from_unix( errno ) );
|
||||||
DEBUG(0,("regdb_open: Failed to open %s! (%s)\n",
|
DEBUG(0,("regdb_open: Failed to open %s! (%s)\n",
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#define _REG_DB_H
|
#define _REG_DB_H
|
||||||
|
|
||||||
#define REG_TDB_FLAGS TDB_SEQNUM
|
#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_V1 1 /* first db version with write support */
|
||||||
#define REGDB_VERSION_V2 2 /* version 2 with normalized keys */
|
#define REGDB_VERSION_V2 2 /* version 2 with normalized keys */
|
||||||
|
Loading…
Reference in New Issue
Block a user