use LDSHFLAGS not -shared in several places
authorAndrew Tridgell <tridge@samba.org>
Mon, 4 Jun 2001 05:13:59 +0000 (05:13 +0000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 4 Jun 2001 05:13:59 +0000 (05:13 +0000)
18 files changed:
source/Makefile.in
source/groupdb/mapping.c
source/lib/messages.c
source/libsmb/unexpected.c
source/locking/brlock.c
source/locking/locking.c
source/locking/posix.c
source/nsswitch/winbindd_cache.c
source/nsswitch/winbindd_idmap.c
source/passdb/pdb_tdb.c
source/passdb/secrets.c
source/printing/nt_printing.c
source/printing/printing.c
source/rpc_server/srv_srvsvc_nt.c
source/smbd/session.c
source/utils/smbcontrol.c
source/utils/status.c
source/web/statuspage.c

index 451b7ed4c5566c8bb55576239a3d02226d50bcb8..1e77a78ad94ac68f4e89f2ae0a9e38ad0a0309df 100644 (file)
@@ -610,7 +610,7 @@ bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32)
 
 bin/libsmbclient.so: $(LIBSMBCLIENT_PICOBJS)
        @echo Linking libsmbclient shared library $@
-       @$(LD) -shared -o $@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) # Anything else?
+       @$(LD) @LDSHFLAGS@ -o $@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) # Anything else?
 
 client/testsmbc: client/testsmbc.o bin/libsmbclient.so
        @echo Linking testsmbc
@@ -630,11 +630,11 @@ bin/winbindd: $(WINBINDD_OBJ) bin/.dummy
 
 nsswitch/libnss_winbind.so: $(WINBIND_NSS_PICOBJS)
        @echo "Linking $@"
-       @$(LINK) -shared -o $@ $(WINBIND_NSS_PICOBJS)
+       @$(LINK) @LDSHFLAGS@ -o $@ $(WINBIND_NSS_PICOBJS)
 
 nsswitch/pam_winbind.so: $(PAM_WINBIND_OBJ) bin/.dummy
        @echo Linking $@
-       @$(LINK) -shared -o $@ $(PAM_WINBIND_OBJ)
+       @$(LINK) @LDSHFLAGS@ -o $@ $(PAM_WINBIND_OBJ)
 
 bin/wbinfo: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) $(UBIQX_OBJ) bin/.dummy
        @echo Linking $@
index 2f258ea724b48b647f44be6f550b07f3701e6eed..8623e0ce3d493eff593a22cf5869ff6eaef0d709 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(lock_path("group_mapping.tdb"), 0, 0, O_RDWR|O_CREAT, 0600);
+       tdb = tdb_open_log(lock_path("group_mapping.tdb"), 0, 0, O_RDWR|O_CREAT, 0600);
        if (!tdb) {
                DEBUG(0,("Failed to open group mapping database\n"));
                return False;
index b18cebf6cf5b92f8d241faeea1f0aadf75a70e0c..ffa873960e76951d5a37dc9bc43871a67e5ba4f3 100644 (file)
@@ -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);
 
index 6c5dd611a9c2262275a4f1de72f52294b4d2fb75..d757551963bc3dc484dcca5578916167fb9a7129 100644 (file)
@@ -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) {
index 552ea617aae45944ad962f649f62b0df42c9f61a..8f7332783085e64d2f9f7157e2fb4017e1803c57 100644 (file)
@@ -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"));
index c2d3106a67aa05223ca4e801f34b45c756c34be1..c77a86cbf452d0f1d37d60463d7fd04918dd049d 100644 (file)
@@ -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);
index 75fc6272b5afc6dac9d64fb252bc73f98e2f13a8..9cfe25ed9d5617e383b6fbec49efb69d0d016e1f 100644 (file)
@@ -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"));
index 2e404a7eb0d16fa7845c702d7a62ed9718010e51..07b1cab58308d365faf4ae080546cb5b193d1207 100644 (file)
@@ -39,7 +39,7 @@ void winbindd_cache_init(void)
 {
        /* Open tdb cache */
 
-       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 | O_TRUNC, 
                                   0600))) {
                DEBUG(0, ("Unable to open tdb cache - user and group caching "
index 2bb942396b45db18108e45d00a7b2a983e083b6f..73d24f19f66e2193c68270bac8bee8a4fd7daea1 100644 (file)
@@ -215,7 +215,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, O_RDWR | O_CREAT, 0600))) {
         DEBUG(0, ("Unable to open idmap database\n"));
         return False;
index dc80c6250bc51f254e3d4742b344578669641a0d..0816ac9a998cea6c5521a87cf533a9e8f5044639 100644 (file)
@@ -344,10 +344,10 @@ BOOL pdb_setsampwent(BOOL update)
        pstrcat (tdbfile, PASSDB_FILE_NAME);
        
        /* Open tdb passwd */
-       if (!(global_tdb_ent.passwd_tdb = tdb_open(tdbfile, 0, 0, update ? O_RDWR : O_RDONLY, 0600)))
+       if (!(global_tdb_ent.passwd_tdb = tdb_open_log(tdbfile, 0, 0, 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(tdbfile, 0, 0, O_RDWR | O_CREAT | O_EXCL, 0600)))
+               if (!(global_tdb_ent.passwd_tdb = tdb_open_log(tdbfile, 0, 0, O_RDWR | O_CREAT | O_EXCL, 0600)))
                {
                        DEBUG(0, ("Unable to create TDB passwd (passdb.tdb) !!!"));
                        return False;
@@ -476,7 +476,7 @@ BOOL pdb_getsampwnam (SAM_ACCOUNT *user, char *sname)
        key.dsize = strlen (keystr) + 1;
 
        /* open the accounts TDB */
-       if (!(pwd_tdb = tdb_open(tdbfile, 0, 0, O_RDONLY, 0600)))
+       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, 0, O_RDONLY, 0600)))
        {
                DEBUG(0, ("pdb_getsampwnam: Unable to open TDB passwd!\n"));
                return False;
@@ -577,7 +577,7 @@ BOOL pdb_getsampwrid (SAM_ACCOUNT *user, uint32 rid)
        key.dsize = strlen (keystr) + 1;
 
        /* open the accounts TDB */
-       if (!(pwd_tdb = tdb_open(tdbfile, 0, 0, O_RDONLY, 0600)))
+       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, 0, O_RDONLY, 0600)))
        {
                DEBUG(0, ("pdb_getsampwrid: Unable to open TDB rid database!\n"));
                return False;
@@ -622,7 +622,7 @@ BOOL pdb_delete_sam_account(char *sname)
        pstrcat (tdbfile, PASSDB_FILE_NAME);
 
        /* open the TDB */
-       if (!(pwd_tdb = tdb_open(tdbfile, 0, 0, O_RDWR, 0600)))
+       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, 0, O_RDWR, 0600)))
        {
                DEBUG(0, ("Unable to open TDB passwd!"));
                return False;
@@ -744,13 +744,13 @@ static BOOL tdb_update_sam(SAM_ACCOUNT* newpwd, BOOL override, int flag)
        }
 
        /* open the account TDB passwd*/
-       if (!(pwd_tdb = tdb_open(tdbfile, 0, 0, O_RDWR, 0600)))
+       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, 0, 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(tdbfile, 0, 0, O_RDWR | O_CREAT | O_EXCL, 0600)))
+                       if (!(pwd_tdb = tdb_open_log(tdbfile, 0, 0, O_RDWR | O_CREAT | O_EXCL, 0600)))
                        {
                                DEBUG(0, ("Unable to create TDB passwd (passdb.tdb) !!!\n"));
                                return False;
index a3b49cd5916e0a76feabde07b6cef246b3c863e9..7c65da0264563c9cd5a419a0810862c1a6ff2eaf 100644 (file)
@@ -36,7 +36,7 @@ BOOL secrets_init(void)
        pstrcpy(fname, lp_private_dir());
        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));
index a0031ae35ad7346db82f19cb4aa22541d1fb5694..11d0cfbdd5f37d82d5c8230c739de7fafec992e0 100644 (file)
@@ -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) ));
index d98c7c4d4cb699d27e78b94d7e32b814289fa091..5fd2fc56806f51d5424e92491215b5e3117448dd 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(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)));
index 93c3e18ca737e6e9b2291ecf8b3760b5b548262b..13d27788e0442828773c1f953e3f0e59963efab7 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(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) ));
index 40654c0f43c94d137d64511997cb41062db4d0e4..8f6907c5378b6e6e9f0bd9080cdae0bc19ebf90d 100644 (file)
@@ -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"));
index b940b4006a0baf25b7cf11ae3eff8907e88aee21..843d56234ba1074d4dfeed4a3c235d3e3165cde6 100644 (file)
@@ -130,7 +130,7 @@ static BOOL send_message(char *dest, int msg_type, void *buf, int len, BOOL dupl
                TDB_CONTEXT *tdb;
                BOOL ret;
 
-               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) {
                        fprintf(stderr,"Failed to open connections database in send_message.\n");
                        return False;
index 55c3c1bad19a5510b08b46003b01066bedd9317e..e695e7572fe0e372cd51ed52af14d161f1664442 100644 (file)
@@ -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))
index 51f2e8f00e69cc9fe638b00ba3a342ac6ea5043a..f3b07425b7880ae1182b8a34e30a7027d121ed10 100644 (file)
@@ -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");