diff options
author | Michael Adam <obnox@samba.org> | 2009-02-24 10:44:48 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-02-26 11:05:22 +0100 |
commit | ba0e944c46b5c5e11c2539e15c9fe099a6c39fd1 (patch) | |
tree | 8b577799a893ff536fab5412eedd8f75f339effe /source3 | |
parent | 170830c0089088e7e30a3aa2d0c6d65b01ab83a0 (diff) | |
download | samba-ba0e944c46b5c5e11c2539e15c9fe099a6c39fd1.tar.gz samba-ba0e944c46b5c5e11c2539e15c9fe099a6c39fd1.tar.bz2 samba-ba0e944c46b5c5e11c2539e15c9fe099a6c39fd1.zip |
s3:registry: provide transaction_start|commit|cancel fns for the registry tdb
Michael
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 3 | ||||
-rw-r--r-- | source3/registry/reg_backend_db.c | 18 |
2 files changed, 21 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 2d92b0fc90..559d62fec3 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5049,6 +5049,9 @@ WERROR init_registry_data(void); WERROR regdb_init(void); WERROR regdb_open( void ); int regdb_close( void ); +WERROR regdb_transaction_start(void); +WERROR regdb_transaction_commit(void); +WERROR regdb_transaction_cancel(void); int regdb_get_seqnum(void); bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr); int regdb_fetch_keys(const char *key, REGSUBKEY_CTR *ctr); diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 689bd1038e..960e884404 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -482,6 +482,24 @@ int regdb_close( void ) return 0; } +WERROR regdb_transaction_start(void) +{ + return (regdb->transaction_start(regdb) == 0) ? + WERR_OK : WERR_REG_IO_FAILURE; +} + +WERROR regdb_transaction_commit(void) +{ + return (regdb->transaction_commit(regdb) == 0) ? + WERR_OK : WERR_REG_IO_FAILURE; +} + +WERROR regdb_transaction_cancel(void) +{ + return (regdb->transaction_cancel(regdb) == 0) ? + WERR_OK : WERR_REG_IO_FAILURE; +} + /*********************************************************************** return the tdb sequence number of the registry tdb. this is an indicator for the content of the registry |