[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Mon Jul 5 03:06:48 MDT 2010


The branch, master has been updated
       via  dfc84ec... s3: Remove procid_self() from srv_spoolss_reply[open|close]printer()
       via  9e4ae60... s3: Remove procid_self() from ctdb_read_req() and ctdb_handle_message()
       via  1832e38... s3: Remove some type-punned warnings
       via  2838047... s3: Put serverid_key and serverid_data together
       via  390c3ff... s3: Remove procid_self() from brl_close_fnum()
       via  6436ea3... s3: Remove procid_self() from srv_spoolss_drv_upgrade_printer()
       via  b0f76a3... s3: Remove procid_self() from cancel_pending_lock_requests_by_fid_smb2()
       via  a521ad4... s3: Remove procid_self() from remove_pending_lock()
       via  e168b85... s3: Remove procid_self() from fill_deferred_open_entry()
       via  aa217af... s3: Remove procid_self() from do_lock_cancel()
       via  1af668d... s3: Remove procid_self() from do_unlock()
       via  471a47a... s3: Remove procid_self() from do_lock()
       via  b485c19... s3: Remove procid_self() from query_lock()
       via  9b0fbcf... s3: Remove smbd_messaging_context() from shutdown_other_smbds()
       via  0ea7aed... s3: Remove smbd_messaging_context() from make_connection_snum()
       via  a2d7cd5... s3: Remove smbd_messaging_context() from reprocess_blocked_smb2_lock()
       via  3df821a... s3: Remove smbd_messaging_context() from remove_pending_lock()
       via  411412d... s3: Remove smbd_messaging_context() from push_blocking_lock_request_smb2()
       via  8aa3f47... s3: Remove procid_self() from irix_oplocks_read_fde_handler()
       via  c63f75f... s3: Remove smbd_messaging_context() from smb_set_posix_lock()
       via  8ea271b... s3: Remove smbd_messaging_context() from linux_oplock_signal_handler()
       via  02a42a0... s3: Remove procid_self() from blocking_lock_cancel_smb1()
       via  f60c6f5... s3: Remove procid_self() from process_blocking_lock_queue()
       via  a9aa582... s3: Remove procid_self() from remove_pending_lock_requests_by_mid_smb1()
       via  a07c158... s3: Remove procid_self() from cancel_pending_lock_requests_by_fid()
       via  c49f6a6... s3: Remove procid_self() from generic_blocking_lock_error()
       via  d42806a... s3: Remove procid_self() from push_blocking_lock_request()
       via  eb29f84... s3: Remove smbd_messaging_context() from blocking_lock_cancel_smb1()
       via  dd48e0a... s3: Remove smbd_messaging_context() from process_trans2()
       via  ae75a90... s3: Remove smbd_messaging_context() from process_lockingX()
       via  e606b27... s3: Remove smbd_messaging_context() from reply_lockingX_error()
       via  fef875f... s3: Remove smbd_messaging_context() from push_blocking_lock_request()
       via  75e1675... s3: Remove smbd_messaging_context() from contend_level2_oplocks_begin_default()
       via  d1587f9... s3: Remove smbd_messaging_context() from reply_to_oplock_break_requests()
       via  b01a41d... s3: Remove smbd_messaging_context() from smbd_do_locking()
       via  914b1c0... s3: Remove smbd_messaging_context() from rename_open_files()
       via  8da0575... s3: Remove smbd_messaging_context() from reply_unlock()
       via  9a3f530... s3: Remove smbd_messaging_context() from reply_lock()
       via  80cc726... s3: Remove smbd_messaging_context() from reply_writeunlock()
       via  298da9a... s3: Remove smbd_messaging_context() from reply_lockread()
       via  ba3b101... s3: Remove smbd_messaging_context() from send_break_message()
       via  e6a0894... s3: Remove smbd_messaging_context() from exit_server_common()
       via  6c53365... s3: Remove smbd_messaging_context() from close_normal_file()
       via  f22e58b... s3: Remove smbd_messaging_context() from notify_deferred_opens()
       via  50db5cb... s3: Remove procid_self() from fill_share_mode_entry()
       via  b903297... s3: Remove procid_self() from init_strict_lock_struct()
       via  07854cb... s3: Remove procid_self() from make_connection_snum()
       via  5387d6e... s3: Remove procid_self() from claim_connection()
       via  3324247... s3: Remove NULL checks from claim_connection()
       via  faef081... s3: Remove procid_self() from push_blocking_lock_request_smb2()
       via  c89b55b... s3: Remove procid_self() from reply_negprot()
       via  2d7cce6... s3: Remove procid_self() from break_kernel_oplock()
       via  13441a9... s3: Remove procid_self() from session_claim()
       via  f1d6eed... s3: Remove procid_self() from exit_server_common
       via  23790c9... s3: Add sconn_server_id()
       via  58b9595... s3: Add missing prototype for smb2_opcode_name
       via  0220246... s3: Add messaging_server_id
       via  9cc52e8... s3: Add msg_ctx to smbd_server_connection
       via  a27bd84... s3:Fix a bogus uninitialized variable warning
       via  300667e... s3: Pass procid_self() explicitly to messaging_ctdbd_connection()
       via  849f72b... s3: Create a unique id for the smbd parent
      from  da35836... s3: Keep the connections.tdb data format fixed

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit dfc84ece9ddcaf510bac79e006f05dfdad9f2770
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 21:53:52 2010 +0200

    s3: Remove procid_self() from srv_spoolss_reply[open|close]printer()

commit 9e4ae600b700406fdfb797b0217ec2b7503bfc59
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 20:50:11 2010 +0200

    s3: Remove procid_self() from ctdb_read_req() and ctdb_handle_message()

commit 1832e38425b12841d67aa6194bd4ae53697077ab
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 20:49:43 2010 +0200

    s3: Remove some type-punned warnings

commit 2838047657d5ba37b1ba0259577875919c47b09c
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 20:31:02 2010 +0200

    s3: Put serverid_key and serverid_data together

commit 390c3ffc2a5ec90ad0715c278ecef56a6c1bd9b2
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 20:20:44 2010 +0200

    s3: Remove procid_self() from brl_close_fnum()

commit 6436ea3e7a0000ee1e494b7e81138a948c33c731
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 20:18:29 2010 +0200

    s3: Remove procid_self() from srv_spoolss_drv_upgrade_printer()

commit b0f76a37d35b4e4c688d3a44180f9ae96d9ecb02
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 20:17:32 2010 +0200

    s3: Remove procid_self() from cancel_pending_lock_requests_by_fid_smb2()

commit a521ad4b5ab4849a503e14bef5cc1120ddb18fdc
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 20:16:35 2010 +0200

    s3: Remove procid_self() from remove_pending_lock()

commit e168b85f00540892508c888a17b07e1981e9ad5a
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 20:14:27 2010 +0200

    s3: Remove procid_self() from fill_deferred_open_entry()

commit aa217afc46f3be4b6e5dbdc7289044e661924ab3
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 20:06:07 2010 +0200

    s3: Remove procid_self() from do_lock_cancel()

commit 1af668df028e238a17e7ce0bf30107189a789f55
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 20:05:43 2010 +0200

    s3: Remove procid_self() from do_unlock()

commit 471a47a1de504ea60a1411f44ea82eec123ae0a8
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 20:02:30 2010 +0200

    s3: Remove procid_self() from do_lock()

commit b485c1917fd4320dee1efbafd77cbf402ed62971
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 20:01:48 2010 +0200

    s3: Remove procid_self() from query_lock()

commit 9b0fbcf35ad94e984c085eb209034325396db712
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 19:56:51 2010 +0200

    s3: Remove smbd_messaging_context() from shutdown_other_smbds()

commit 0ea7aed7461767fbdce90ea30dde33816bc41d5e
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 19:51:43 2010 +0200

    s3: Remove smbd_messaging_context() from make_connection_snum()

commit a2d7cd55582d6e8ec31661726ccbe231c0c47817
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 19:50:35 2010 +0200

    s3: Remove smbd_messaging_context() from reprocess_blocked_smb2_lock()

commit 3df821acc462626efba86acd7c6a278473d4f0c2
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 19:50:25 2010 +0200

    s3: Remove smbd_messaging_context() from remove_pending_lock()

commit 411412dc65961acf8132ae03a3120c24e8602ef0
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 19:47:45 2010 +0200

    s3: Remove smbd_messaging_context() from push_blocking_lock_request_smb2()

commit 8aa3f47dc96b41b1f8b589f55633a774492e253c
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 19:47:02 2010 +0200

    s3: Remove procid_self() from irix_oplocks_read_fde_handler()

commit c63f75f17c51d1e6ddb4411bc4c0ad3c3e7edb95
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 19:46:15 2010 +0200

    s3: Remove smbd_messaging_context() from smb_set_posix_lock()

commit 8ea271bb2e9e94093c1849a5840bb3a2a38f728e
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 19:44:57 2010 +0200

    s3: Remove smbd_messaging_context() from linux_oplock_signal_handler()

commit 02a42a0a1d7d10495711e1a8621d45629e810c67
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:46:27 2010 +0200

    s3: Remove procid_self() from blocking_lock_cancel_smb1()

commit f60c6f55c96f4ed1ed87a4bbc4746d6585d3552a
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:45:15 2010 +0200

    s3: Remove procid_self() from process_blocking_lock_queue()

commit a9aa582de51df042e17e5c35c9e925436bf35afa
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:44:46 2010 +0200

    s3: Remove procid_self() from remove_pending_lock_requests_by_mid_smb1()

commit a07c1586ba280d08dadf1db9ff3f478ac47c9307
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:44:14 2010 +0200

    s3: Remove procid_self() from cancel_pending_lock_requests_by_fid()

commit c49f6a681dca609353263410c809a8c0c90f7aae
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:43:39 2010 +0200

    s3: Remove procid_self() from generic_blocking_lock_error()

commit d42806a01389fc3f265f3490228c3f82600d7077
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:42:55 2010 +0200

    s3: Remove procid_self() from push_blocking_lock_request()

commit eb29f84b5f83306be68804d9edd9be8c1922fa9b
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:40:57 2010 +0200

    s3: Remove smbd_messaging_context() from blocking_lock_cancel_smb1()

commit dd48e0afe06087622483605f472f382f5448dd70
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:40:40 2010 +0200

    s3: Remove smbd_messaging_context() from process_trans2()

commit ae75a90b188a34eff806797fdcfd14586135c285
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:39:57 2010 +0200

    s3: Remove smbd_messaging_context() from process_lockingX()

commit e606b271144fb004adce0a3b265e61b44bf4d38e
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:39:31 2010 +0200

    s3: Remove smbd_messaging_context() from reply_lockingX_error()

commit fef875f64fcdae094aabe291b9b8849c28324015
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:38:12 2010 +0200

    s3: Remove smbd_messaging_context() from push_blocking_lock_request()

commit 75e16757e3e696f1a2f4e8d438d0634abe327ab0
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:35:06 2010 +0200

    s3: Remove smbd_messaging_context() from contend_level2_oplocks_begin_default()

commit d1587f99248c7616d168e7025d2c58c4fa7245e4
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:34:31 2010 +0200

    s3: Remove smbd_messaging_context() from reply_to_oplock_break_requests()

commit b01a41d05b06962cae748f0f8fbb7da87861db07
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:32:17 2010 +0200

    s3: Remove smbd_messaging_context() from smbd_do_locking()

commit 914b1c034fe9f52b4c858486730543bee8daaf88
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:31:41 2010 +0200

    s3: Remove smbd_messaging_context() from rename_open_files()

commit 8da057550758919fa0bded72c2ec973f2aefd1d6
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:31:09 2010 +0200

    s3: Remove smbd_messaging_context() from reply_unlock()

commit 9a3f53075ed1d5406dc3b09e8e01829c821723df
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:30:48 2010 +0200

    s3: Remove smbd_messaging_context() from reply_lock()

commit 80cc726b4aadcccca34a32f0352c4cad73d2af95
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:30:08 2010 +0200

    s3: Remove smbd_messaging_context() from reply_writeunlock()

commit 298da9a0a4f1c6374bdd99fd0ada9293a9eddb52
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:28:53 2010 +0200

    s3: Remove smbd_messaging_context() from reply_lockread()

commit ba3b101c45f67154fe11d27d6c432ddf9a65a0d1
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:28:04 2010 +0200

    s3: Remove smbd_messaging_context() from send_break_message()

commit e6a089484bbde72368a93ca83e69858fb3d2be8e
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:26:57 2010 +0200

    s3: Remove smbd_messaging_context() from exit_server_common()

commit 6c53365d119fa1b2685d6d6d85604d2c0bee6376
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:26:14 2010 +0200

    s3: Remove smbd_messaging_context() from close_normal_file()

commit f22e58bcd35a5219463863f7dae2d771d9cd5f0b
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:25:02 2010 +0200

    s3: Remove smbd_messaging_context() from notify_deferred_opens()

commit 50db5cb0dfaad0c556c375dee20ee6a2ee881db4
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:20:11 2010 +0200

    s3: Remove procid_self() from fill_share_mode_entry()

commit b9032978785be65dcc189ea982bd843fa8453b80
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:18:58 2010 +0200

    s3: Remove procid_self() from init_strict_lock_struct()

commit 07854cb099555a3d1590ec310b1d938e786a9eb5
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:17:36 2010 +0200

    s3: Remove procid_self() from make_connection_snum()

commit 5387d6ee16d575251d656ce3e17b933e1be52343
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:15:36 2010 +0200

    s3: Remove procid_self() from claim_connection()

commit 33242471e5ad974bf96d2340c9aa8d56941795e7
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:12:24 2010 +0200

    s3: Remove NULL checks from claim_connection()
    
    Nowadays this is only called from make_connection_snum() where we always
    provide a connection_struct.

commit faef081e967f657fb7043de683131f230f5e22c4
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:09:59 2010 +0200

    s3: Remove procid_self() from push_blocking_lock_request_smb2()

commit c89b55b5736db5a78ab5949c762afd281e707256
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:08:16 2010 +0200

    s3: Remove procid_self() from reply_negprot()

commit 2d7cce6b7c0e38a8eb3ecdd9972ba25138f1845e
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:07:29 2010 +0200

    s3: Remove procid_self() from break_kernel_oplock()

commit 13441a9e1832a99742b1ca9919f1b61fbccd8419
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:06:26 2010 +0200

    s3: Remove procid_self() from session_claim()

commit f1d6eed9626f286a41a0280e55b91cfd1d16eeb9
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:06:01 2010 +0200

    s3: Remove procid_self() from exit_server_common

commit 23790c9a8f54593602dce27a3fb1b1f752299431
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:02:36 2010 +0200

    s3: Add sconn_server_id()

commit 58b9595babebdeb42cd6ffdc2b12e54b46964127
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 18:02:19 2010 +0200

    s3: Add missing prototype for smb2_opcode_name

commit 0220246c2683e363d4871c7b93480438a5d88a7a
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 17:57:57 2010 +0200

    s3: Add messaging_server_id

commit 9cc52e8411c5b5bda73bbbe58d98a73ebd671b65
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 17:50:04 2010 +0200

    s3: Add msg_ctx to smbd_server_connection
    
    It would be obvious to initialize this in smbd_init_globals(), but there the
    messaging_context can't be initialized yet because we don't have smb.conf
    loaded yet.

commit a27bd84bf827fc3f7efe6afb6329d98a20a00389
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 17:49:30 2010 +0200

    s3:Fix a bogus uninitialized variable warning

commit 300667e4a9f02104fc8759dd846ea41f400441bf
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 16:54:04 2010 +0200

    s3: Pass procid_self() explicitly to messaging_ctdbd_connection()

commit 849f72b254ee52501ba46e8419938d3bf5e31900
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 4 16:51:06 2010 +0200

    s3: Create a unique id for the smbd parent

-----------------------------------------------------------------------

Summary of changes:
 source3/Makefile.in                              |    1 +
 source3/include/messages.h                       |    4 ++-
 source3/include/proto.h                          |   10 ++++---
 source3/lib/ctdbd_conn.c                         |   22 +++++++++------
 source3/lib/dbwrap_ctdb.c                        |   11 +++++---
 source3/lib/g_lock.c                             |    9 ++++--
 source3/lib/messages.c                           |    5 +++
 source3/lib/messages_ctdbd.c                     |    4 +-
 source3/lib/serverid.c                           |   10 +++---
 source3/lib/util.c                               |    4 +-
 source3/{libads/ads_utils.c => lib/util_sconn.c} |   11 +++----
 source3/locking/brlock.c                         |    3 +-
 source3/locking/locking.c                        |   28 +++++++++++--------
 source3/rpc_server/srv_spoolss_nt.c              |    7 +++--
 source3/smbd/blocking.c                          |   28 ++++++++++---------
 source3/smbd/close.c                             |   11 ++++---
 source3/smbd/connection.c                        |   15 +++++-----
 source3/smbd/globals.h                           |    4 +++
 source3/smbd/negprot.c                           |    2 +-
 source3/smbd/open.c                              |   17 ++++++++----
 source3/smbd/oplock.c                            |    6 ++--
 source3/smbd/oplock_irix.c                       |    2 +-
 source3/smbd/oplock_linux.c                      |    2 +-
 source3/smbd/password.c                          |    2 +-
 source3/smbd/process.c                           |    2 +-
 source3/smbd/reply.c                             |   16 +++++-----
 source3/smbd/server.c                            |    9 +++++-
 source3/smbd/server_exit.c                       |    4 +-
 source3/smbd/service.c                           |    5 ++-
 source3/smbd/session.c                           |    3 +-
 source3/smbd/sesssetup.c                         |   31 +++++++++++++--------
 source3/smbd/smb2_create.c                       |    3 +-
 source3/smbd/smb2_getinfo.c                      |    2 +-
 source3/smbd/smb2_lock.c                         |   14 +++++-----
 source3/smbd/smb2_sesssetup.c                    |    6 +++-
 source3/smbd/trans2.c                            |    4 +-
 36 files changed, 185 insertions(+), 132 deletions(-)
 copy source3/{libads/ads_utils.c => lib/util_sconn.c} (75%)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 4e41572..975b3fe 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -384,6 +384,7 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) \
 	  lib/interfaces.o lib/memcache.o \
 	  lib/talloc_dict.o \
 	  lib/serverid.o \
+	  lib/util_sconn.o \
 	  lib/util_transfer_file.o ../lib/async_req/async_sock.o \
 	  $(TDB_LIB_OBJ) \
 	  $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
diff --git a/source3/include/messages.h b/source3/include/messages.h
index 805889a..a64469e 100644
--- a/source3/include/messages.h
+++ b/source3/include/messages.h
@@ -116,7 +116,7 @@ bool messaging_tdb_parent_init(void);
 NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,
 			      TALLOC_CTX *mem_ctx,
 			      struct messaging_backend **presult);
-struct ctdbd_connection *messaging_ctdbd_connection(void);
+struct ctdbd_connection *messaging_ctdbd_connection(struct server_id id);
 
 bool message_send_all(struct messaging_context *msg_ctx,
 		      int msg_type,
@@ -127,6 +127,8 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
 					 struct server_id server_id, 
 					 struct event_context *ev);
 
+struct server_id messaging_server_id(const struct messaging_context *msg_ctx);
+
 /*
  * re-init after a fork
  */
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 2d79aed..2374c26 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3348,9 +3348,10 @@ void set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
 		    uid_t uid, uint64_t mid, uint16 op_type);
 void add_deferred_open(struct share_mode_lock *lck, uint64_t mid,
 		       struct timeval request_time,
-		       struct file_id id);
+		       struct server_id pid, struct file_id id);
 bool del_share_mode(struct share_mode_lock *lck, files_struct *fsp);
-void del_deferred_open_entry(struct share_mode_lock *lck, uint64_t mid);
+void del_deferred_open_entry(struct share_mode_lock *lck, uint64_t mid,
+			     struct server_id pid);
 bool remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
 bool downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
 NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32 dosmode);
@@ -5839,7 +5840,8 @@ bool map_open_params_to_ntcreate(const struct smb_filename *smb_fname,
 				 uint32 *pcreate_disposition,
 				 uint32 *pcreate_options,
 				 uint32_t *pprivate_flags);
-void remove_deferred_open_entry(struct file_id id, uint64_t mid);
+void remove_deferred_open_entry(struct file_id id, uint64_t mid,
+				struct server_id pid);
 NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn,
 			  struct smb_filename *smb_fname,
 			  files_struct **result);
@@ -6221,7 +6223,7 @@ void close_cnum(connection_struct *conn, uint16 vuid);
 /* The following definitions come from smbd/session.c  */
 
 bool session_init(void);
-bool session_claim(user_struct *vuser);
+bool session_claim(struct server_id pid, user_struct *vuser);
 void session_yield(user_struct *vuser);
 int list_sessions(TALLOC_CTX *mem_ctx, struct sessionid **session_list);
 
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index b4e7151..8dba3b2 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -135,7 +135,7 @@ static NTSTATUS ctdbd_connect(TALLOC_CTX *mem_ctx,
 	addr.sun_family = AF_UNIX;
 	strncpy(addr.sun_path, sockname, sizeof(addr.sun_path));
 
-	if (sys_connect(fd, (struct sockaddr *)&addr) == -1) {
+	if (sys_connect(fd, (struct sockaddr *)(void *)&addr) == -1) {
 		DEBUG(1, ("connect(%s) failed: %s\n", sockname,
 			  strerror(errno)));
 		close(fd);
@@ -368,9 +368,11 @@ static NTSTATUS ctdb_read_req(struct ctdbd_connection *conn, uint32 reqid,
 				  (msg->srvid == CTDB_SRVID_RECONFIGURE)
 				  ? "cluster reconfigure" : "SAMBA_NOTIFY"));
 
-			messaging_send(conn->msg_ctx, procid_self(),
+			messaging_send(conn->msg_ctx,
+				       messaging_server_id(conn->msg_ctx),
 				       MSG_SMB_BRL_VALIDATE, &data_blob_null);
-			messaging_send(conn->msg_ctx, procid_self(),
+			messaging_send(conn->msg_ctx,
+				       messaging_server_id(conn->msg_ctx),
 				       MSG_DBWRAP_G_LOCK_RETRY,
 				       &data_blob_null);
 			TALLOC_FREE(hdr);
@@ -564,10 +566,12 @@ static NTSTATUS ctdb_handle_message(uint8_t *buf, size_t length,
 		 * family has passed away (SAMBA_NOTIFY), we need to
 		 * clean the brl database
 		 */
-		messaging_send(conn->msg_ctx, procid_self(),
+		messaging_send(conn->msg_ctx,
+			       messaging_server_id(conn->msg_ctx),
 			       MSG_SMB_BRL_VALIDATE, &data_blob_null);
 
-		messaging_send(conn->msg_ctx, procid_self(),
+		messaging_send(conn->msg_ctx,
+			       messaging_server_id(conn->msg_ctx),
 			       MSG_DBWRAP_G_LOCK_RETRY,
 			       &data_blob_null);
 
@@ -1274,15 +1278,15 @@ NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn,
 
 	switch (client.ss_family) {
 	case AF_INET:
-		p4.dest = *(struct sockaddr_in *)&server;
-		p4.src = *(struct sockaddr_in *)&client;
+		p4.dest = *(struct sockaddr_in *)(void *)&server;
+		p4.src = *(struct sockaddr_in *)(void *)&client;
 		data.dptr = (uint8_t *)&p4;
 		data.dsize = sizeof(p4);
 		break;
 #ifdef HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR
 	case AF_INET6:
-		p.dest.ip6 = *(struct sockaddr_in6 *)&server;
-		p.src.ip6 = *(struct sockaddr_in6 *)&client;
+		p.dest.ip6 = *(struct sockaddr_in6 *)(void *)&server;
+		p.src.ip6 = *(struct sockaddr_in6 *)(void *)&client;
 		data.dptr = (uint8_t *)&p;
 		data.dsize = sizeof(p);
 		break;
diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c
index bef91cb..321a071 100644
--- a/source3/lib/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap_ctdb.c
@@ -794,7 +794,7 @@ static int db_ctdb_transaction_commit(struct db_context *db)
 
 again:
 	/* tell ctdbd to commit to the other nodes */
-	rets = ctdbd_control_local(messaging_ctdbd_connection(),
+	rets = ctdbd_control_local(messaging_ctdbd_connection(procid_self()),
 				   CTDB_CONTROL_TRANS3_COMMIT,
 				   h->ctx->db_id, 0,
 				   db_ctdb_marshall_finish(h->m_write),
@@ -1005,7 +1005,9 @@ again:
 			   ((struct ctdb_ltdb_header *)ctdb_data.dptr)->dmaster : -1,
 			   get_my_vnn()));
 
-		status = ctdbd_migrate(messaging_ctdbd_connection(),ctx->db_id, key);
+		status = ctdbd_migrate(
+			messaging_ctdbd_connection(procid_self()), ctx->db_id,
+			key);
 		if (!NT_STATUS_IS_OK(status)) {
 			DEBUG(5, ("ctdb_migrate failed: %s\n",
 				  nt_errstr(status)));
@@ -1110,7 +1112,8 @@ static int db_ctdb_fetch(struct db_context *db, TALLOC_CTX *mem_ctx,
 	SAFE_FREE(ctdb_data.dptr);
 
 	/* we weren't able to get it locally - ask ctdb to fetch it for us */
-	status = ctdbd_fetch(messaging_ctdbd_connection(),ctx->db_id, key, mem_ctx, data);
+	status = ctdbd_fetch(messaging_ctdbd_connection(procid_self()),
+			     ctx->db_id, key, mem_ctx, data);
 	if (!NT_STATUS_IS_OK(status)) {
 		DEBUG(5, ("ctdbd_fetch failed: %s\n", nt_errstr(status)));
 		return -1;
@@ -1288,7 +1291,7 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
 	db_ctdb->transaction = NULL;
 	db_ctdb->db = result;
 
-	conn = messaging_ctdbd_connection();
+	conn = messaging_ctdbd_connection(procid_self());
 
 	if (!NT_STATUS_IS_OK(ctdbd_db_attach(conn, name, &db_ctdb->db_id, tdb_flags))) {
 		DEBUG(0, ("ctdbd_db_attach failed for %s\n", name));
diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c
index d7828e2..49f719b 100644
--- a/source3/lib/g_lock.c
+++ b/source3/lib/g_lock.c
@@ -312,7 +312,8 @@ NTSTATUS g_lock_lock(struct g_lock_ctx *ctx, const char *name,
 
 #ifdef CLUSTER_SUPPORT
 	if (lp_clustering()) {
-		status = ctdb_watch_us(messaging_ctdbd_connection());
+		status = ctdb_watch_us(
+			messaging_ctdbd_connection(procid_self()));
 		if (!NT_STATUS_IS_OK(status)) {
 			DEBUG(10, ("could not register retry with ctdb: %s\n",
 				   nt_errstr(status)));
@@ -387,7 +388,9 @@ NTSTATUS g_lock_lock(struct g_lock_ctx *ctx, const char *name,
 
 #ifdef CLUSTER_SUPPORT
 		if (lp_clustering()) {
-			struct ctdbd_connection *conn = messaging_ctdbd_connection();
+			struct ctdbd_connection *conn;
+
+			conn = messaging_ctdbd_connection(procid_self());
 
 			r_fds = &_r_fds;
 			FD_ZERO(r_fds);
@@ -592,7 +595,7 @@ NTSTATUS g_lock_unlock(struct g_lock_ctx *ctx, const char *name)
 
 #ifdef CLUSTER_SUPPORT
 	if (lp_clustering()) {
-		ctdb_unwatch(messaging_ctdbd_connection());
+		ctdb_unwatch(messaging_ctdbd_connection(procid_self()));
 	}
 #endif
 	return status;
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index d53297e..ba0cd80 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -223,6 +223,11 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
 	return ctx;
 }
 
+struct server_id messaging_server_id(const struct messaging_context *msg_ctx)
+{
+	return msg_ctx->id;
+}
+
 /*
  * re-init after a fork
  */
diff --git a/source3/lib/messages_ctdbd.c b/source3/lib/messages_ctdbd.c
index 8713346..9b8fafe 100644
--- a/source3/lib/messages_ctdbd.c
+++ b/source3/lib/messages_ctdbd.c
@@ -38,7 +38,7 @@ struct messaging_ctdbd_context {
 static struct ctdbd_connection *global_ctdbd_connection;
 static int global_ctdb_connection_pid;
 
-struct ctdbd_connection *messaging_ctdbd_connection(void)
+struct ctdbd_connection *messaging_ctdbd_connection(struct server_id id)
 {
 	if (global_ctdb_connection_pid == 0 &&
 	    global_ctdbd_connection == NULL) {
@@ -50,7 +50,7 @@ struct ctdbd_connection *messaging_ctdbd_connection(void)
 			DEBUG(0,("event_context_init failed\n"));
 		}
 
-		msg = messaging_init(NULL, procid_self(), ev);
+		msg = messaging_init(NULL, id, ev);
 		if (!msg) {
 			DEBUG(0,("messaging_init failed\n"));
 			return NULL;
diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c
index 74effa4..fc17b4a 100644
--- a/source3/lib/serverid.c
+++ b/source3/lib/serverid.c
@@ -27,6 +27,11 @@ struct serverid_key {
 #endif
 };
 
+struct serverid_data {
+	uint64_t unique_id;
+	uint32_t msg_flags;
+};
+
 bool serverid_parent_init(void)
 {
 	struct tdb_wrap *db;
@@ -49,11 +54,6 @@ bool serverid_parent_init(void)
 	return true;
 }
 
-struct serverid_data {
-	uint64_t unique_id;
-	uint32_t msg_flags;
-};
-
 static struct db_context *serverid_db(void)
 {
 	static struct db_context *db;
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 2a4d050..dc243ec 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1294,8 +1294,8 @@ bool process_exists(const struct server_id pid)
 	}
 
 #ifdef CLUSTER_SUPPORT
-	return ctdbd_process_exists(messaging_ctdbd_connection(), pid.vnn,
-				    pid.pid);
+	return ctdbd_process_exists(messaging_ctdbd_connection(procid_self()),
+				    pid.vnn, pid.pid);
 #else
 	return False;
 #endif
diff --git a/source3/libads/ads_utils.c b/source3/lib/util_sconn.c
similarity index 75%
copy from source3/libads/ads_utils.c
copy to source3/lib/util_sconn.c
index 213242c..a98c046 100644
--- a/source3/libads/ads_utils.c
+++ b/source3/lib/util_sconn.c
@@ -1,9 +1,7 @@
 /*
    Unix SMB/CIFS implementation.
-   ads (active directory) utility library
-
-   Copyright (C) Stefan (metze) Metzmacher 2002
-   Copyright (C) Andrew Tridgell 2001
+   Implementation of a reliable server_exists()
+   Copyright (C) Volker Lendecke 2010
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,8 +18,9 @@
 */
 
 #include "includes.h"
+#include "smbd/globals.h"
 
-const char *ads_get_ldap_server_name(ADS_STRUCT *ads)
+struct server_id sconn_server_id(const struct smbd_server_connection *sconn)
 {
-	return ads->config.ldap_server_name;
+	return messaging_server_id(sconn->msg_ctx);
 }
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 985b98a..6c6094c 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -26,6 +26,7 @@
 
 #include "includes.h"
 #include "librpc/gen_ndr/messaging.h"
+#include "smbd/globals.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_LOCKING
@@ -1483,7 +1484,7 @@ void brl_close_fnum(struct messaging_context *msg_ctx,
 	unsigned int i, j, dcount=0;
 	int num_deleted_windows_locks = 0;
 	struct lock_struct *locks = br_lck->lock_data;
-	struct server_id pid = procid_self();
+	struct server_id pid = sconn_server_id(fsp->conn->sconn);
 	bool unlock_individually = False;
 	bool posix_level2_contention_ended = false;
 
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 917b436..a9b13d6 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -37,6 +37,7 @@
 
 #include "includes.h"
 #include "librpc/gen_ndr/messaging.h"
+#include "smbd/globals.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_LOCKING
@@ -87,7 +88,7 @@ void init_strict_lock_struct(files_struct *fsp,
 
 	plock->context.smblctx = smblctx;
         plock->context.tid = fsp->conn->cnum;
-        plock->context.pid = procid_self();
+        plock->context.pid = sconn_server_id(fsp->conn->sconn);
         plock->start = start;
         plock->size = size;
         plock->fnum = fsp->fnum;
@@ -189,7 +190,7 @@ NTSTATUS query_lock(files_struct *fsp,
 
 	return brl_lockquery(br_lck,
 			psmblctx,
-			procid_self(),
+			sconn_server_id(fsp->conn->sconn),
 			poffset,
 			pcount,
 			plock_type,
@@ -275,7 +276,7 @@ struct byte_range_lock *do_lock(struct messaging_context *msg_ctx,
 	*perr = brl_lock(msg_ctx,
 			br_lck,
 			smblctx,
-			procid_self(),
+			sconn_server_id(fsp->conn->sconn),
 			offset,
 			count,
 			lock_type,
@@ -324,7 +325,7 @@ NTSTATUS do_unlock(struct messaging_context *msg_ctx,
 	ok = brl_unlock(msg_ctx,
 			br_lck,
 			smblctx,
-			procid_self(),
+			sconn_server_id(fsp->conn->sconn),
 			offset,
 			count,
 			lock_flav);
@@ -374,7 +375,7 @@ NTSTATUS do_lock_cancel(files_struct *fsp,
 
 	ok = brl_lock_cancel(br_lck,
 			smblctx,
-			procid_self(),
+			sconn_server_id(fsp->conn->sconn),
 			offset,
 			count,
 			lock_flav,
@@ -1110,7 +1111,7 @@ static void fill_share_mode_entry(struct share_mode_entry *e,
 				  uid_t uid, uint64_t mid, uint16 op_type)
 {
 	ZERO_STRUCTP(e);
-	e->pid = procid_self();
+	e->pid = sconn_server_id(fsp->conn->sconn);
 	e->share_access = fsp->share_access;
 	e->private_options = fsp->fh->private_options;
 	e->access_mask = fsp->access_mask;
@@ -1126,10 +1127,12 @@ static void fill_share_mode_entry(struct share_mode_entry *e,
 
 static void fill_deferred_open_entry(struct share_mode_entry *e,
 				     const struct timeval request_time,
-				     struct file_id id, uint64_t mid)
+				     struct file_id id,
+				     struct server_id pid,
+				     uint64_t mid)
 {
 	ZERO_STRUCTP(e);
-	e->pid = procid_self();
+	e->pid = pid;
 	e->op_mid = mid;
 	e->op_type = DEFERRED_OPEN_ENTRY;
 	e->time.tv_sec = request_time.tv_sec;
@@ -1170,10 +1173,10 @@ void set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
 
 void add_deferred_open(struct share_mode_lock *lck, uint64_t mid,
 		       struct timeval request_time,
-		       struct file_id id)
+		       struct server_id pid, struct file_id id)
 {
 	struct share_mode_entry entry;
-	fill_deferred_open_entry(&entry, request_time, id, mid);
+	fill_deferred_open_entry(&entry, request_time, id, pid, mid);
 	add_share_mode_entry(lck, &entry);
 }
 
@@ -1247,12 +1250,13 @@ bool del_share_mode(struct share_mode_lock *lck, files_struct *fsp)
 	return True;
 }
 
-void del_deferred_open_entry(struct share_mode_lock *lck, uint64_t mid)
+void del_deferred_open_entry(struct share_mode_lock *lck, uint64_t mid,
+			     struct server_id pid)
 {
 	struct share_mode_entry entry, *e;
 
 	fill_deferred_open_entry(&entry, timeval_zero(),
-				 lck->id, mid);
+				 lck->id, pid, mid);
 
 	e = find_share_mode_entry(lck, &entry);
 	if (e == NULL) {
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index dae9f37..3b7b2a6 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -186,7 +186,7 @@ static void srv_spoolss_replycloseprinter(int snum, struct policy_handle *handle
 		 * printer notify messages. */
 
 		serverid_register_msg_flags(
-			procid_self(),
+			messaging_server_id(smbd_messaging_context()),
 			false, FLAG_MSG_PRINT_NOTIFY);
 	}
 
@@ -1267,7 +1267,8 @@ static bool srv_spoolss_drv_upgrade_printer(const char *drivername)
 	DEBUG(10,("srv_spoolss_drv_upgrade_printer: Sending message about driver upgrade [%s]\n",
 		drivername));
 
-	messaging_send_buf(smbd_messaging_context(), procid_self(),
+	messaging_send_buf(smbd_messaging_context(),
+			   messaging_server_id(smbd_messaging_context()),
 			   MSG_PRINTER_DRVUPGRADE,
 			   (uint8_t *)drivername, len+1);
 
@@ -2358,7 +2359,7 @@ static bool srv_spoolss_replyopenprinter(int snum, const char *printer,
 		/* Tell the connections db we're now interested in printer
 		 * notify messages. */
 		serverid_register_msg_flags(
-			procid_self(),
+			messaging_server_id(smbd_messaging_context()),
 			true, FLAG_MSG_PRINT_NOTIFY);
 	}
 
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index 5ee8a97..1b7431b 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -222,10 +222,10 @@ bool push_blocking_lock_request( struct byte_range_lock *br_lck,
 	blr->blr_private = NULL;
 
 	/* Add a pending lock record for this. */
-	status = brl_lock(smbd_messaging_context(),
+	status = brl_lock(req->sconn->msg_ctx,
 			br_lck,
 			smblctx,
-			procid_self(),
+			sconn_server_id(req->sconn),
 			offset,
 			count,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list