[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Sun Jul 18 13:23:58 MDT 2010


The branch, master has been updated
       via  27aece7... s3: Actually use the usecs in aio_fork_suspend
       via  1946beb... s3: Fix an uninitialized variable
       via  55512f4... s3: Work better without the aio sighandler
       via  b1717ac... s3: Fix some nonempty blank lines
       via  7ac5828... s3: Remove a direct use of procid_self()
      from  898fd58... s3-rpc_client: Fixed a segfault in rpccli_samr_chng_pswd_auth_crap().

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


- Log -----------------------------------------------------------------
commit 27aece72004a84a6e0b2e00987d8a362e307d1d8
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 18 17:12:30 2010 +0200

    s3: Actually use the usecs in aio_fork_suspend
    
    Jeremy, please check!

commit 1946beb679c7de75b142b30d84b5e4bf12c7e6bd
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 18 17:12:11 2010 +0200

    s3: Fix an uninitialized variable

commit 55512f479172047ae7f69604c23fffecf66de8c4
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 18 14:40:43 2010 +0200

    s3: Work better without the aio sighandler
    
    Refuse async I/O if we can't set up the signal handler

commit b1717ac92edbc08e1f4cd2a38dd9f60be8492469
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jul 18 13:39:51 2010 +0200

    s3: Fix some nonempty blank lines

commit 7ac58281aeebe4be282ca719ba1da2f821e521a5
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jul 17 23:16:26 2010 +0200

    s3: Remove a direct use of procid_self()

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

Summary of changes:
 source3/modules/vfs_aio_fork.c   |    5 +++--
 source3/smbd/aio.c               |   29 ++++++++++++++++++++++-------
 source3/utils/net_dns.c          |   10 ++++------
 source3/winbindd/winbindd_dual.c |    8 +++++---
 4 files changed, 34 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c
index b43aad2..02b1394 100644
--- a/source3/modules/vfs_aio_fork.c
+++ b/source3/modules/vfs_aio_fork.c
@@ -765,10 +765,11 @@ static int aio_fork_suspend(struct vfs_handle_struct *handle,
 	}
 
 	if (timeout) {
-		struct timeval tv;
+		struct timeval tv = convert_timespec_to_timeval(*timeout);
 		struct tevent_timer *te = tevent_add_timer(ev,
 						frame,
-						timeval_current_ofs(tv.tv_sec,0),
+						timeval_current_ofs(tv.tv_sec,
+								    tv.tv_usec),
 						aio_fork_suspend_timed_out,
 						&timed_out);
 		if (!te) {
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index a5a0e44..dbce120 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -67,11 +67,17 @@ static void smbd_aio_signal_handler(struct tevent_context *ev_ctx,
 }
 
 
-static void initialize_async_io_handler(void)
+static bool initialize_async_io_handler(void)
 {
+	static bool tried_signal_setup = false;
+
 	if (aio_signal_event) {
-		return;
+		return true;
+	}
+	if (tried_signal_setup) {
+		return false;
 	}
+	tried_signal_setup = true;
 
 	aio_signal_event = tevent_add_signal(smbd_event_context(),
 					     smbd_event_context(),
@@ -79,7 +85,8 @@ static void initialize_async_io_handler(void)
 					     smbd_aio_signal_handler,
 					     NULL);
 	if (!aio_signal_event) {
-		exit_server("Failed to setup RT_SIGNAL_AIO handler");
+		DEBUG(10, ("Failed to setup RT_SIGNAL_AIO handler\n"));
+		return false;
 	}
 
 	/* tevent supports 100 signal with SA_SIGINFO */
@@ -145,7 +152,9 @@ NTSTATUS schedule_aio_read_and_X(connection_struct *conn,
 	int ret;
 
 	/* Ensure aio is initialized. */
-	initialize_async_io_handler();
+	if (!initialize_async_io_handler()) {
+		return NT_STATUS_RETRY;
+	}
 
 	if (fsp->base_fsp != NULL) {
 		/* No AIO on streams yet */
@@ -250,7 +259,9 @@ NTSTATUS schedule_aio_write_and_X(connection_struct *conn,
 	int ret;
 
 	/* Ensure aio is initialized. */
-	initialize_async_io_handler();
+	if (!initialize_async_io_handler()) {
+		return NT_STATUS_RETRY;
+	}
 
 	if (fsp->base_fsp != NULL) {
 		/* No AIO on streams yet */
@@ -382,7 +393,9 @@ NTSTATUS schedule_smb2_aio_read(connection_struct *conn,
 	int ret;
 
 	/* Ensure aio is initialized. */
-	initialize_async_io_handler();
+	if (!initialize_async_io_handler()) {
+		return NT_STATUS_RETRY;
+	}
 
 	if (fsp->base_fsp != NULL) {
 		/* No AIO on streams yet */
@@ -478,7 +491,9 @@ NTSTATUS schedule_aio_smb2_write(connection_struct *conn,
 	int ret;
 
 	/* Ensure aio is initialized. */
-	initialize_async_io_handler();
+	if (!initialize_async_io_handler()) {
+		return NT_STATUS_RETRY;
+	}
 
 	if (fsp->base_fsp != NULL) {
 		/* No AIO on streams yet */
diff --git a/source3/utils/net_dns.c b/source3/utils/net_dns.c
index f4ad6f7..61cb89d 100644
--- a/source3/utils/net_dns.c
+++ b/source3/utils/net_dns.c
@@ -1,4 +1,3 @@
-
 /* 
    Samba Unix/Linux Dynamic DNS Update
    net ads commands
@@ -10,12 +9,12 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  
 */
@@ -55,7 +54,7 @@ DNS_ERROR DoDNSUpdate(char *pszServerName,
 	if (!(mem_ctx = talloc_init("DoDNSUpdate"))) {
 		return ERROR_DNS_NO_MEMORY;
 	}
-		
+
 	err = dns_open_connection( pszServerName, DNS_TCP, mem_ctx, &conn );
 	if (!ERR_DNS_IS_OK(err)) {
 		goto error;
@@ -114,10 +113,9 @@ DNS_ERROR DoDNSUpdate(char *pszServerName,
 						     keyname, &gss_context, 
 						     DNS_SRV_WIN2000 );
 		}
-		
+
 		if (!ERR_DNS_IS_OK(err))
 			goto error;
-		
 
 		err = dns_sign_update(req, gss_context, keyname,
 				      "gss.microsoft.com", time(NULL), 3600);
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index ed8eb13..47348b9 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -1129,9 +1129,11 @@ bool winbindd_reinit_after_fork(const char *logfilename)
 	struct winbindd_child *cl;
 	NTSTATUS status;
 
-	status = reinit_after_fork(winbind_messaging_context(),
-				   winbind_event_context(),
-				   procid_self(), true);
+	status = reinit_after_fork(
+		winbind_messaging_context(),
+		winbind_event_context(),
+		messaging_server_id(winbind_messaging_context()),
+		true);
 	if (!NT_STATUS_IS_OK(status)) {
 		DEBUG(0,("reinit_after_fork() failed\n"));
 		return false;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list