diff options
author | Jeremy Allison <jra@samba.org> | 2001-06-08 21:28:47 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-06-08 21:28:47 +0000 |
commit | 912bd928b0b5887a48d2ce10951686e9c709efb4 (patch) | |
tree | b5a3ada27b3c2659f00b39f094ccbe6fcf0fea82 | |
parent | 18153c6b27b97eb112a211f15652eebd1d08230d (diff) | |
download | samba-912bd928b0b5887a48d2ce10951686e9c709efb4.tar.gz samba-912bd928b0b5887a48d2ce10951686e9c709efb4.tar.xz samba-912bd928b0b5887a48d2ce10951686e9c709efb4.zip |
Changed all tdb_open()'s to tdb_open_log()'s. As HEAD.
Jeremy.
-rw-r--r-- | source/lib/messages.c | 2 | ||||
-rw-r--r-- | source/libsmb/unexpected.c | 4 | ||||
-rw-r--r-- | source/locking/brlock.c | 2 | ||||
-rw-r--r-- | source/locking/locking.c | 2 | ||||
-rw-r--r-- | source/locking/posix.c | 4 | ||||
-rw-r--r-- | source/nsswitch/winbindd_cache.c | 2 | ||||
-rw-r--r-- | source/nsswitch/winbindd_idmap.c | 2 | ||||
-rw-r--r-- | source/passdb/secrets.c | 2 | ||||
-rw-r--r-- | source/passdb/tdbpass.c | 12 | ||||
-rw-r--r-- | source/printing/nt_printing.c | 2 | ||||
-rw-r--r-- | source/printing/printing.c | 2 | ||||
-rw-r--r-- | source/rpc_server/srv_srvsvc_nt.c | 2 | ||||
-rw-r--r-- | source/smbd/session.c | 2 | ||||
-rw-r--r-- | source/utils/smbcontrol.c | 2 | ||||
-rw-r--r-- | source/utils/status.c | 2 | ||||
-rw-r--r-- | source/web/statuspage.c | 2 |
16 files changed, 23 insertions, 23 deletions
diff --git a/source/lib/messages.c b/source/lib/messages.c index b18cebf6cf5..ffa873960e7 100644 --- a/source/lib/messages.c +++ b/source/lib/messages.c @@ -89,7 +89,7 @@ BOOL message_init(void) { if (tdb) return True; - tdb = tdb_open(lock_path("messages.tdb"), + tdb = tdb_open_log(lock_path("messages.tdb"), 0, TDB_CLEAR_IF_FIRST, O_RDWR|O_CREAT,0600); diff --git a/source/libsmb/unexpected.c b/source/libsmb/unexpected.c index 6c5dd611a9c..4aa566de5b2 100644 --- a/source/libsmb/unexpected.c +++ b/source/libsmb/unexpected.c @@ -49,7 +49,7 @@ void unexpected_packet(struct packet_struct *p) int len=0; if (!tdbd) { - tdbd = tdb_open(lock_path("unexpected.tdb"), 1, + tdbd = tdb_open_log(lock_path("unexpected.tdb"), 1, TDB_CLEAR_IF_FIRST, O_RDWR | O_CREAT, 0644); if (!tdbd) { @@ -151,7 +151,7 @@ struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, { TDB_CONTEXT *tdb2; - tdb2 = tdb_open(lock_path("unexpected.tdb"), 0, 0, O_RDONLY, 0); + tdb2 = tdb_open_log(lock_path("unexpected.tdb"), 0, 0, O_RDONLY, 0); if (!tdb2) return NULL; matched_packet = NULL; diff --git a/source/locking/brlock.c b/source/locking/brlock.c index 552ea617aae..8f733278308 100644 --- a/source/locking/brlock.c +++ b/source/locking/brlock.c @@ -176,7 +176,7 @@ void brl_init(int read_only) if (tdb) return; - tdb = tdb_open(lock_path("brlock.tdb"), 0, TDB_CLEAR_IF_FIRST, + tdb = tdb_open_log(lock_path("brlock.tdb"), 0, TDB_CLEAR_IF_FIRST, read_only?O_RDONLY:(O_RDWR|O_CREAT), 0644); if (!tdb) { DEBUG(0,("Failed to open byte range locking database\n")); diff --git a/source/locking/locking.c b/source/locking/locking.c index c2d3106a67a..c77a86cbf45 100644 --- a/source/locking/locking.c +++ b/source/locking/locking.c @@ -282,7 +282,7 @@ BOOL locking_init(int read_only) if (tdb) return True; - tdb = tdb_open(lock_path("locking.tdb"), + tdb = tdb_open_log(lock_path("locking.tdb"), 0, TDB_CLEAR_IF_FIRST, read_only?O_RDONLY:O_RDWR|O_CREAT, 0644); diff --git a/source/locking/posix.c b/source/locking/posix.c index 75fc6272b5a..9cfe25ed9d5 100644 --- a/source/locking/posix.c +++ b/source/locking/posix.c @@ -1350,14 +1350,14 @@ BOOL posix_locking_init(int read_only) return True; if (!posix_lock_tdb) - posix_lock_tdb = tdb_open(NULL, 0, TDB_INTERNAL, + posix_lock_tdb = tdb_open_log(NULL, 0, TDB_INTERNAL, read_only?O_RDONLY:(O_RDWR|O_CREAT), 0644); if (!posix_lock_tdb) { DEBUG(0,("Failed to open POSIX byte range locking database.\n")); return False; } if (!posix_pending_close_tdb) - posix_pending_close_tdb = tdb_open(NULL, 0, TDB_INTERNAL, + posix_pending_close_tdb = tdb_open_log(NULL, 0, TDB_INTERNAL, read_only?O_RDONLY:(O_RDWR|O_CREAT), 0644); if (!posix_pending_close_tdb) { DEBUG(0,("Failed to open POSIX pending close database.\n")); diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c index 7b263dfe009..bc519430f3a 100644 --- a/source/nsswitch/winbindd_cache.c +++ b/source/nsswitch/winbindd_cache.c @@ -39,7 +39,7 @@ void winbindd_cache_init(void) { /* Open tdb cache */ unlink(lock_path("winbindd_cache.tdb")); - if (!(cache_tdb = tdb_open(lock_path("winbindd_cache.tdb"), 0, + if (!(cache_tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 0, TDB_NOLOCK, O_RDWR | O_CREAT, 0600))) { DEBUG(0, ("Unable to open tdb cache - user and group caching " diff --git a/source/nsswitch/winbindd_idmap.c b/source/nsswitch/winbindd_idmap.c index 11f7b8aae7a..891b79c2758 100644 --- a/source/nsswitch/winbindd_idmap.c +++ b/source/nsswitch/winbindd_idmap.c @@ -210,7 +210,7 @@ BOOL winbindd_idmap_init(void) { /* Open tdb cache */ - if (!(idmap_tdb = tdb_open(lock_path("winbindd_idmap.tdb"), 0, + if (!(idmap_tdb = tdb_open_log(lock_path("winbindd_idmap.tdb"), 0, TDB_NOLOCK | TDB_NOMMAP, O_RDWR | O_CREAT, 0600))) { DEBUG(0, ("Unable to open idmap database\n")); diff --git a/source/passdb/secrets.c b/source/passdb/secrets.c index 1209232861e..7ab05c95205 100644 --- a/source/passdb/secrets.c +++ b/source/passdb/secrets.c @@ -41,7 +41,7 @@ BOOL secrets_init(void) *p = 0; pstrcat(fname,"/secrets.tdb"); - tdb = tdb_open(fname, 0, 0, O_RDWR|O_CREAT, 0600); + tdb = tdb_open_log(fname, 0, 0, O_RDWR|O_CREAT, 0600); if (!tdb) { DEBUG(0,("Failed to open %s\n", fname)); diff --git a/source/passdb/tdbpass.c b/source/passdb/tdbpass.c index 157a7ee59e7..0d9a0f7780b 100644 --- a/source/passdb/tdbpass.c +++ b/source/passdb/tdbpass.c @@ -89,10 +89,10 @@ static struct tdb_enum_info tdb_ent; static void *startsamtdbpwent(BOOL update) { /* Open tdb passwd */ - if (!(tdb_ent.passwd_tdb = tdb_open(lp_tdb_passwd_file(), 0, 0, update ? O_RDWR : O_RDONLY, 0600))) + if (!(tdb_ent.passwd_tdb = tdb_open_log(lp_tdb_passwd_file(), 0, 0, update ? O_RDWR : O_RDONLY, 0600))) { DEBUG(0, ("Unable to open TDB passwd, trying create new!\n")); - if (!(tdb_ent.passwd_tdb = tdb_open(lp_tdb_passwd_file(), 0, 0, O_RDWR | O_CREAT | O_EXCL, 0600))) + if (!(tdb_ent.passwd_tdb = tdb_open_log(lp_tdb_passwd_file(), 0, 0, O_RDWR | O_CREAT | O_EXCL, 0600))) { DEBUG(0, ("Unable to creat TDB passwd (smbpasswd.tdb) !!!")); return NULL; @@ -177,7 +177,7 @@ static BOOL del_samtdbpwd_entry(const char *name) TDB_DATA key; fstring keystr; - if (!(pwd_tdb = tdb_open(lp_tdb_passwd_file(), 0, 0, O_RDWR, 0600))) + if (!(pwd_tdb = tdb_open_log(lp_tdb_passwd_file(), 0, 0, O_RDWR, 0600))) { DEBUG(0, ("Unable to open TDB passwd!")); return False; @@ -217,7 +217,7 @@ static BOOL mod_samtdb21pwd_entry(struct sam_passwd* newpwd, BOOL override) int unknown_str_len = (newpwd->unknown_str) ? (strlen (newpwd->unknown_str) + 1) : 0; int munged_dial_len = (newpwd->munged_dial) ? (strlen (newpwd->munged_dial) + 1) : 0; - if (!(pwd_tdb = tdb_open(lp_tdb_passwd_file(), 0, 0, O_RDWR, 0600))) + if (!(pwd_tdb = tdb_open_log(lp_tdb_passwd_file(), 0, 0, O_RDWR, 0600))) { DEBUG(0, ("Unable to open TDB passwd!")); return False; @@ -328,7 +328,7 @@ static BOOL add_samtdb21pwd_entry(struct sam_passwd *newpwd) int unknown_str_len = (newpwd->unknown_str) ? (strlen (newpwd->unknown_str) + 1) : 1; int munged_dial_len = (newpwd->munged_dial) ? (strlen (newpwd->munged_dial) + 1) : 1; - if (!(pwd_tdb = tdb_open(lp_tdb_passwd_file(), 0, 0, O_RDWR, 0600))) + if (!(pwd_tdb = tdb_open_log(lp_tdb_passwd_file(), 0, 0, O_RDWR, 0600))) { DEBUG(0, ("Unable to open TDB passwd!")); return False; @@ -456,7 +456,7 @@ static struct sam_passwd *getsamtdb21pwnam(char *name) TDB_DATA key; fstring keystr; - if (!(pwd_tdb = tdb_open(lp_tdb_passwd_file(), 0, 0, O_RDONLY, 0600))) + if (!(pwd_tdb = tdb_open_log(lp_tdb_passwd_file(), 0, 0, O_RDONLY, 0600))) { DEBUG(0, ("Unable to open TDB passwd!")); return False; diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index a0031ae35ad..11d0cfbdd5f 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -180,7 +180,7 @@ BOOL nt_printing_init(void) char *vstring = "INFO/version"; if (tdb && local_pid == sys_getpid()) return True; - tdb = tdb_open(lock_path("ntdrivers.tdb"), 0, 0, O_RDWR|O_CREAT, 0600); + tdb = tdb_open_log(lock_path("ntdrivers.tdb"), 0, 0, O_RDWR|O_CREAT, 0600); if (!tdb) { DEBUG(0,("Failed to open nt drivers database %s (%s)\n", lock_path("ntdrivers.tdb"), strerror(errno) )); diff --git a/source/printing/printing.c b/source/printing/printing.c index d98c7c4d4cb..5fd2fc56806 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -55,7 +55,7 @@ BOOL print_backend_init(void) char *sversion = "INFO/version"; if (tdb && local_pid == sys_getpid()) return True; - tdb = tdb_open(lock_path("printing.tdb"), 0, 0, O_RDWR|O_CREAT, 0600); + tdb = tdb_open_log(lock_path("printing.tdb"), 0, 0, O_RDWR|O_CREAT, 0600); if (!tdb) { DEBUG(0,("print_backend_init: Failed to open printing backend database. Error = [%s]\n", tdb_errorstr(tdb))); diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c index 93c3e18ca73..13d27788e04 100644 --- a/source/rpc_server/srv_srvsvc_nt.c +++ b/source/rpc_server/srv_srvsvc_nt.c @@ -125,7 +125,7 @@ BOOL share_info_db_init(void) char *vstring = "INFO/version"; if (share_tdb && local_pid == sys_getpid()) return True; - share_tdb = tdb_open(lock_path("share_info.tdb"), 0, 0, O_RDWR|O_CREAT, 0600); + share_tdb = tdb_open_log(lock_path("share_info.tdb"), 0, 0, O_RDWR|O_CREAT, 0600); if (!share_tdb) { DEBUG(0,("Failed to open share info database %s (%s)\n", lock_path("share_info.tdb"), strerror(errno) )); diff --git a/source/smbd/session.c b/source/smbd/session.c index 40654c0f43c..8f6907c5378 100644 --- a/source/smbd/session.c +++ b/source/smbd/session.c @@ -62,7 +62,7 @@ BOOL session_claim(uint16 vuid) } if (!tdb) { - tdb = tdb_open(lock_path("sessionid.tdb"), 0, TDB_CLEAR_IF_FIRST, + tdb = tdb_open_log(lock_path("sessionid.tdb"), 0, TDB_CLEAR_IF_FIRST, O_RDWR | O_CREAT, 0644); if (!tdb) { DEBUG(1,("session_claim: failed to open sessionid tdb\n")); diff --git a/source/utils/smbcontrol.c b/source/utils/smbcontrol.c index 5bb4e602f00..13d1abfae87 100644 --- a/source/utils/smbcontrol.c +++ b/source/utils/smbcontrol.c @@ -127,7 +127,7 @@ static BOOL send_message(char *dest, int msg_type, void *buf, int len, BOOL dupl pid_t pid; TDB_CONTEXT *the_tdb; - the_tdb = tdb_open(lock_path("connections.tdb"), 0, 0, O_RDONLY, 0); + the_tdb = tdb_open_log(lock_path("connections.tdb"), 0, 0, O_RDONLY, 0); if (!the_tdb) { fprintf(stderr,"Failed to open connections database in send_message.\n"); return False; diff --git a/source/utils/status.c b/source/utils/status.c index e302393134d..4d7792e515a 100644 --- a/source/utils/status.c +++ b/source/utils/status.c @@ -310,7 +310,7 @@ static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *st return profile_dump(); } - tdb = tdb_open(lock_path("connections.tdb"), 0, 0, O_RDONLY, 0); + tdb = tdb_open_log(lock_path("connections.tdb"), 0, 0, O_RDONLY, 0); if (!tdb) { printf("connections.tdb not initialised\n"); if (!lp_status(-1)) diff --git a/source/web/statuspage.c b/source/web/statuspage.c index 51f2e8f00e6..f3b07425b78 100644 --- a/source/web/statuspage.c +++ b/source/web/statuspage.c @@ -187,7 +187,7 @@ void status_page(void) refresh_interval = atoi(v); } - tdb = tdb_open(lock_path("connections.tdb"), 0, 0, O_RDONLY, 0); + tdb = tdb_open_log(lock_path("connections.tdb"), 0, 0, O_RDONLY, 0); if (tdb) tdb_traverse(tdb, traverse_fn1, NULL); printf("<H2>Server Status</H2>\n"); |