got rid of USE_TDB_MMAP_FLAG as its not needed any more
authorAndrew Tridgell <tridge@samba.org>
Thu, 6 Sep 2001 22:08:19 +0000 (22:08 +0000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 6 Sep 2001 22:08:19 +0000 (22:08 +0000)
(This used to be commit c26e0d3f27a05ecc8bd2390f9aab7f9451524e47)

19 files changed:
source3/groupdb/mapping.c
source3/include/smb_macros.h
source3/lib/messages.c
source3/libsmb/unexpected.c
source3/locking/brlock.c
source3/locking/locking.c
source3/nmbd/nmbd_incomingdgrams.c
source3/nmbd/nmbd_processlogon.c
source3/passdb/pdb_tdb.c
source3/passdb/secrets.c
source3/printing/nt_printing.c
source3/printing/printing.c
source3/rpc_server/srv_netlog_nt.c
source3/rpc_server/srv_srvsvc_nt.c
source3/smbd/connection.c
source3/smbd/session.c
source3/utils/smbcontrol.c
source3/utils/status.c
source3/web/statuspage.c

index 268a1b1bd478989b66a9f149c8832c81e0b53990..129f0940a231bf3b53d98ff3740d240aab91e2f9 100644 (file)
@@ -130,7 +130,7 @@ BOOL init_group_mapping(void)
        char *vstring = "INFO/version";
 
        if (tdb && local_pid == sys_getpid()) return True;
-       tdb = tdb_open_log(lock_path("group_mapping.tdb"), 0, USE_TDB_MMAP_FLAG, O_RDWR|O_CREAT, 0600);
+       tdb = tdb_open_log(lock_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
        if (!tdb) {
                DEBUG(0,("Failed to open group mapping database\n"));
                return False;
index f6d547ea53b95850519d5fe52068a41c48f68d7a..315cb5e5ee7e1916e3ca74bc7cc42bf31fff1504 100644 (file)
@@ -252,5 +252,4 @@ copy an IP address from one buffer to another
 
 #define vfs_chdir(conn,fname) ((conn)->vfs_ops.chdir((conn),fname))
 
-#define USE_TDB_MMAP_FLAG (!lp_use_mmap() ? TDB_NOMMAP : TDB_DEFAULT)
 #endif /* _SMB_MACROS_H */
index 54f6321041aa809bb5407629ad3ac4f057227352..18f9d0c1d50be2c53a370b1604865766b268bd54 100644 (file)
@@ -90,7 +90,7 @@ BOOL message_init(void)
        if (tdb) return True;
 
        tdb = tdb_open_log(lock_path("messages.tdb"), 
-                      0, TDB_CLEAR_IF_FIRST|USE_TDB_MMAP_FLAG,
+                      0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT,
                       O_RDWR|O_CREAT,0600);
 
        if (!tdb) {
index 41249aba56fcc5afe88caab7384a1bdb012c9bc1..7d221e173e85693c8097992744e9a8e1bb3bcecf 100644 (file)
@@ -50,7 +50,7 @@ void unexpected_packet(struct packet_struct *p)
 
        if (!tdbd) {
                tdbd = tdb_open_log(lock_path("unexpected.tdb"), 1, 
-                              TDB_CLEAR_IF_FIRST|USE_TDB_MMAP_FLAG,
+                              TDB_CLEAR_IF_FIRST|TDB_DEFAULT,
                               O_RDWR | O_CREAT, 0644);
                if (!tdbd) {
                        DEBUG(0,("Failed to open unexpected.tdb\n"));
index f4c41d03490d7d3f523731b2f2d8ce8f27f1742d..2b21761cb220d405d8c20352109f85306e09a49a 100644 (file)
@@ -229,7 +229,7 @@ void brl_init(int read_only)
 
        if (tdb)
                return;
-       tdb = tdb_open_log(lock_path("brlock.tdb"), 0,  USE_TDB_MMAP_FLAG|(read_only?0x0:TDB_CLEAR_IF_FIRST),
+       tdb = tdb_open_log(lock_path("brlock.tdb"), 0,  TDB_DEFAULT|(read_only?0x0: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"));
index a1e4ba6d6c7d240318a0ead996528e1ade86cd3b..4092c989d051a90ed3f5cd5b08aaa639f40f483e 100644 (file)
@@ -284,7 +284,7 @@ BOOL locking_init(int read_only)
                return True;
 
        tdb = tdb_open_log(lock_path("locking.tdb"), 
-                      0, USE_TDB_MMAP_FLAG|(read_only?0x0:TDB_CLEAR_IF_FIRST), 
+                      0, TDB_DEFAULT|(read_only?0x0:TDB_CLEAR_IF_FIRST), 
                       read_only?O_RDONLY:O_RDWR|O_CREAT,
                       0644);
 
index 5ee051e98b32912fb2c870c05449b9ed747c24a0..eaafd63f1adfef519a0762148a7144b0366c912d 100644 (file)
@@ -780,7 +780,7 @@ request from %s IP %s state=0x%X\n",
   /* Request to stop browsing altogether. */
   if (state & 0x4)
     DEBUG(1,("process_reset_browser: ignoring request to stop being a browser.\n"));
-done:
+
   END_PROFILE(reset_browser);
 }
 
index 3d117b1615d50112836b6201bc4d7771f6c4d9c2..4f98a23584c054bdffff14a6af4a281dcb7672d0 100644 (file)
@@ -45,7 +45,7 @@ static void send_repl_message(uint32 low_serial)
         TDB_CONTEXT *tdb;
 
         tdb = tdb_open_log(lock_path("connections.tdb"), 0,
-                           USE_TDB_MMAP_FLAG, O_RDONLY, 0);
+                           TDB_DEFAULT, O_RDONLY, 0);
 
         if (!tdb) {
                 DEBUG(3, ("send_repl_message(): failed to open connections "
index 909a5d809f1060ef9d5742a46c449e6ac649ebe0..6da6215c79cf3b387afbb9eff34b91111d404b63 100644 (file)
@@ -349,10 +349,10 @@ BOOL pdb_setsampwent(BOOL update)
        pstrcat (tdbfile, PASSDB_FILE_NAME);
        
        /* Open tdb passwd */
-       if (!(global_tdb_ent.passwd_tdb = tdb_open_log(tdbfile, 0, USE_TDB_MMAP_FLAG, update ? O_RDWR : O_RDONLY, 0600)))
+       if (!(global_tdb_ent.passwd_tdb = tdb_open_log(tdbfile, 0, TDB_DEFAULT, update ? O_RDWR : O_RDONLY, 0600)))
        {
                DEBUG(0, ("Unable to open TDB passwd, trying create new!\n"));
-               if (!(global_tdb_ent.passwd_tdb = tdb_open_log(tdbfile, 0, USE_TDB_MMAP_FLAG, O_RDWR | O_CREAT | O_EXCL, 0600)))
+               if (!(global_tdb_ent.passwd_tdb = tdb_open_log(tdbfile, 0, TDB_DEFAULT, O_RDWR | O_CREAT | O_EXCL, 0600)))
                {
                        DEBUG(0, ("Unable to create TDB passwd (passdb.tdb) !!!"));
                        return False;
@@ -481,7 +481,7 @@ BOOL pdb_getsampwnam (SAM_ACCOUNT *user, char *sname)
        key.dsize = strlen (keystr) + 1;
 
        /* open the accounts TDB */
-       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, USE_TDB_MMAP_FLAG, O_RDONLY, 0600)))
+       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, TDB_DEFAULT, O_RDONLY, 0600)))
        {
                DEBUG(0, ("pdb_getsampwnam: Unable to open TDB passwd!\n"));
                return False;
@@ -582,7 +582,7 @@ BOOL pdb_getsampwrid (SAM_ACCOUNT *user, uint32 rid)
        key.dsize = strlen (keystr) + 1;
 
        /* open the accounts TDB */
-       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, USE_TDB_MMAP_FLAG, O_RDONLY, 0600)))
+       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, TDB_DEFAULT, O_RDONLY, 0600)))
        {
                DEBUG(0, ("pdb_getsampwrid: Unable to open TDB rid database!\n"));
                return False;
@@ -627,7 +627,7 @@ BOOL pdb_delete_sam_account(char *sname)
        pstrcat (tdbfile, PASSDB_FILE_NAME);
 
        /* open the TDB */
-       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, USE_TDB_MMAP_FLAG, O_RDWR, 0600)))
+       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, TDB_DEFAULT, O_RDWR, 0600)))
        {
                DEBUG(0, ("Unable to open TDB passwd!"));
                return False;
@@ -749,13 +749,13 @@ static BOOL tdb_update_sam(SAM_ACCOUNT* newpwd, BOOL override, int flag)
        }
 
        /* open the account TDB passwd*/
-       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, USE_TDB_MMAP_FLAG, O_RDWR, 0600)))
+       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, TDB_DEFAULT, O_RDWR, 0600)))
        {
                DEBUG(0, ("tdb_update_sam: Unable to open TDB passwd!\n"));
                if (flag == TDB_INSERT)
                {
                        DEBUG(0, ("Unable to open TDB passwd, trying create new!\n"));
-                       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, USE_TDB_MMAP_FLAG, O_RDWR | O_CREAT | O_EXCL, 0600)))
+                       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, TDB_DEFAULT, O_RDWR | O_CREAT | O_EXCL, 0600)))
                        {
                                DEBUG(0, ("Unable to create TDB passwd (passdb.tdb) !!!\n"));
                                return False;
index 3b2d0b8d4bd5a5a81f22edc229f6e08698493f2c..e69b7204e106d2f18313850b7171e6ea24e6c670 100644 (file)
@@ -36,7 +36,7 @@ BOOL secrets_init(void)
        pstrcpy(fname, lp_private_dir());
        pstrcat(fname,"/secrets.tdb");
 
-       tdb = tdb_open_log(fname, 0, USE_TDB_MMAP_FLAG, O_RDWR|O_CREAT, 0600);
+       tdb = tdb_open_log(fname, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
 
        if (!tdb) {
                DEBUG(0,("Failed to open %s\n", fname));
index cfdf6955d775c364d140f19a73153fcd97aacd48..b678f583d78936cb2aab6d97fe22407277e09d2e 100644 (file)
@@ -239,21 +239,21 @@ BOOL nt_printing_init(void)
        if (tdb_drivers && tdb_printers && tdb_forms && local_pid == sys_getpid())
                return True;
  
-       tdb_drivers = tdb_open_log(lock_path("ntdrivers.tdb"), 0, USE_TDB_MMAP_FLAG, O_RDWR|O_CREAT, 0600);
+       tdb_drivers = tdb_open_log(lock_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
        if (!tdb_drivers) {
                DEBUG(0,("nt_printing_init: Failed to open nt drivers database %s (%s)\n",
                        lock_path("ntdrivers.tdb"), strerror(errno) ));
                return False;
        }
  
-       tdb_printers = tdb_open_log(lock_path("ntprinters.tdb"), 0, USE_TDB_MMAP_FLAG, O_RDWR|O_CREAT, 0600);
+       tdb_printers = tdb_open_log(lock_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
        if (!tdb_printers) {
                DEBUG(0,("nt_printing_init: Failed to open nt printers database %s (%s)\n",
                        lock_path("ntprinters.tdb"), strerror(errno) ));
                return False;
        }
  
-       tdb_forms = tdb_open_log(lock_path("ntforms.tdb"), 0, USE_TDB_MMAP_FLAG, O_RDWR|O_CREAT, 0600);
+       tdb_forms = tdb_open_log(lock_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
        if (!tdb_forms) {
                DEBUG(0,("nt_printing_init: Failed to open nt forms database %s (%s)\n",
                        lock_path("ntforms.tdb"), strerror(errno) ));
index e0eb2a06d768c57353dd57e908fb89ecbf0c719b..301422c1c2a7c00d90fa4c495bed5d7b392bc6c4 100644 (file)
@@ -55,7 +55,7 @@ BOOL print_backend_init(void)
        char *sversion = "INFO/version";
 
        if (tdb && local_pid == sys_getpid()) return True;
-       tdb = tdb_open_log(lock_path("printing.tdb"), 0, USE_TDB_MMAP_FLAG, O_RDWR|O_CREAT, 0600);
+       tdb = tdb_open_log(lock_path("printing.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
        if (!tdb) {
                DEBUG(0,("print_backend_init: Failed to open printing backend database. Error = [%s]\n",
                                 tdb_errorstr(tdb)));
index 455f8d8be58587d442a9d9994cf90c4e6478cce6..fd137e6038052447049a4d77621895dca8d767a6 100644 (file)
@@ -84,7 +84,7 @@ static void send_sync_message(void)
         TDB_CONTEXT *tdb;
 
         tdb = tdb_open_log(lock_path("connections.tdb"), 0,
-                           USE_TDB_MMAP_FLAG, O_RDONLY, 0);
+                           TDB_DEFAULT, O_RDONLY, 0);
 
         if (!tdb) {
                 DEBUG(3, ("send_sync_message(): failed to open connections "
index 5ba460b607e280edcbd0adb611c833feef4501d5..a0ae9050e2dda21affc6089779d5413419fa84e4 100644 (file)
@@ -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_log(lock_path("share_info.tdb"), 0, USE_TDB_MMAP_FLAG, O_RDWR|O_CREAT, 0600);
+    share_tdb = tdb_open_log(lock_path("share_info.tdb"), 0, TDB_DEFAULT, 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) ));
index df5869791712c72a99be8b25cd070c6a2dde45ee..399851302c7d67e4a4b76ca0992bd67d7126cecf 100644 (file)
@@ -119,7 +119,7 @@ BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOO
        BOOL ret = True;
 
        if (!tdb) {
-               tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_CLEAR_IF_FIRST|USE_TDB_MMAP_FLAG
+               tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT
                               O_RDWR | O_CREAT, 0644);
        }
        if (!tdb)
index eaff78c6854c92106ca84befaa7180688240c837..6a27cd7326c9d8bc586d0039a85aeb33d610de7c 100644 (file)
@@ -52,7 +52,7 @@ BOOL session_claim(uint16 vuid)
        }
 
        if (!tdb) {
-               tdb = tdb_open_log(lock_path("sessionid.tdb"), 0, TDB_CLEAR_IF_FIRST|USE_TDB_MMAP_FLAG
+               tdb = tdb_open_log(lock_path("sessionid.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT
                               O_RDWR | O_CREAT, 0644);
                if (!tdb) {
                        DEBUG(1,("session_claim: failed to open sessionid tdb\n"));
index 377f7a148b02397d5298ef5cbccf91424d83829e..40892ba1c0e6c096423dd965e9cf49b77cad5e14 100644 (file)
@@ -133,7 +133,7 @@ static BOOL send_message(char *dest, int msg_type, void *buf, int len, BOOL dupl
                TDB_CONTEXT *tdb;
                BOOL ret;
 
-               tdb = tdb_open_log(lock_path("connections.tdb"), 0, USE_TDB_MMAP_FLAG, O_RDWR, 0);
+               tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_DEFAULT, O_RDWR, 0);
                if (!tdb) {
                        fprintf(stderr,"Failed to open connections database in send_message.\n");
                        return False;
index 77e76a34e8ba9c438a8ada7c5e23c983bc2cb939..27c6d9b51b2bd8744dc91fb33c1cc5db75a14864 100644 (file)
@@ -619,7 +619,7 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo
                return profile_dump();
        }
        
-       tdb = tdb_open_log(lock_path("sessionid.tdb"), 0, USE_TDB_MMAP_FLAG, O_RDONLY, 0);
+       tdb = tdb_open_log(lock_path("sessionid.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0);
        if (!tdb) {
                printf("sessionid.tdb not initialised\n");
        }
@@ -633,7 +633,7 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo
        tdb_traverse(tdb, traverse_sessionid, NULL);
        tdb_close(tdb);
   
-       tdb = tdb_open_log(lock_path("connections.tdb"), 0, USE_TDB_MMAP_FLAG, O_RDONLY, 0);
+       tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0);
        if (!tdb) {
                printf("connections.tdb not initialised\n");
        }  else if (verbose) {
index c112deb224a5aa214f3dd6c6eb0d970d7e347add..e930629eee5d0c1b712be6a4494a72eee27dc2f1 100644 (file)
@@ -187,7 +187,7 @@ void status_page(void)
                refresh_interval = atoi(v);
        }
 
-       tdb = tdb_open_log(lock_path("connections.tdb"), 0, USE_TDB_MMAP_FLAG, O_RDONLY, 0);
+       tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0);
        if (tdb) tdb_traverse(tdb, traverse_fn1, NULL);
 
        printf("<H2>Server Status</H2>\n");