[SCM] Samba Shared Repository - branch v3-2-stable updated -
release-3-2-5-197-g32dcaab
Karolin Seeger
kseeger at samba.org
Wed Dec 10 08:29:49 GMT 2008
The branch, v3-2-stable has been updated
via 32dcaab09e893c9a33629dccc5103ad67e8231fd (commit)
via 7e4b110c88153150babdb220683a1b8441f067bd (commit)
from 1e7c488097d67457632778a09e7f82db5d0e93e3 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable
- Log -----------------------------------------------------------------
commit 32dcaab09e893c9a33629dccc5103ad67e8231fd
Author: Karolin Seeger <kseeger at samba.org>
Date: Wed Dec 10 09:28:49 2008 +0100
WHATSNEW: Update changes.
Karolin
(cherry picked from commit 760de2d48940ed88aca1fa459e4af455b541940c)
commit 7e4b110c88153150babdb220683a1b8441f067bd
Author: SATOH Fumiyasu <fumiyas at osstech.co.jp>
Date: Tue Dec 9 14:26:39 2008 -0800
Fix bug #5688 LPQ process is orphaned if socket address parameter is invalid
Karolin please pull for 3-2-stable.
Jeremy
(cherry picked from commit 5dfccee083490eea8230a5965cb52b01ddf5041e)
-----------------------------------------------------------------------
Summary of changes:
WHATSNEW.txt | 3 +++
source/printing/printing.c | 39 +++++++++++++++++++++++++++++++++------
2 files changed, 36 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 769ae24..447844b 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -10,7 +10,10 @@ Major enhancements included in Samba 3.2.6 are:
o Fix Winbind crash bugs.
o Fix moving of readonly files.
+ o Fix "write list" in setups using "security = share".
o Fix access to cups-printers with cups 1.3.4.
+ o Fix timeouts in setups with large groups.
+ o Fix several bugs concerning Alternate Data Streams.
o Add new SMB traffic analyzer VFS module.
diff --git a/source/printing/printing.c b/source/printing/printing.c
index af89852..9bd237c 100644
--- a/source/printing/printing.c
+++ b/source/printing/printing.c
@@ -1394,7 +1394,19 @@ main thread of the background lpq updater
****************************************************************************/
void start_background_queue(void)
{
+ /* Use local variables for this as we don't
+ * need to save the parent side of this, just
+ * ensure it closes when the process exits.
+ */
+ int pause_pipe[2];
+
DEBUG(3,("start_background_queue: Starting background LPQ thread\n"));
+
+ if (pipe(pause_pipe) == -1) {
+ DEBUG(5,("start_background_queue: cannot create pipe. %s\n", strerror(errno) ));
+ exit(1);
+ }
+
background_lpq_updater_pid = sys_fork();
if (background_lpq_updater_pid == -1) {
@@ -1406,6 +1418,9 @@ void start_background_queue(void)
/* Child. */
DEBUG(5,("start_background_queue: background LPQ thread started\n"));
+ close(pause_pipe[0]);
+ pause_pipe[0] = -1;
+
if (!reinit_after_fork(smbd_messaging_context(), true)) {
DEBUG(0,("reinit_after_fork() failed\n"));
smb_panic("reinit_after_fork() failed");
@@ -1420,13 +1435,23 @@ void start_background_queue(void)
messaging_register(smbd_messaging_context(), NULL,
MSG_PRINTER_UPDATE, print_queue_receive);
-
+
DEBUG(5,("start_background_queue: background LPQ thread waiting for messages\n"));
while (1) {
- pause();
-
+ fd_set pause_fds;
+ int pause_select;
+
+ FD_ZERO(&pause_fds);
+ FD_SET(pause_pipe[1], &pause_fds);
+ pause_select = sys_select(pause_pipe[1]+1, &pause_fds, NULL, NULL, NULL);
+ /* If pause_pipe[0] is closed it means the parent smbd
+ * and children exited or aborted. */
+ if (pause_select == 1) {
+ exit_server_cleanly(NULL);
+ }
+
/* check for some essential signals first */
-
+
if (got_sig_term) {
exit_server_cleanly(NULL);
}
@@ -1437,9 +1462,9 @@ void start_background_queue(void)
reload_services(False);
reload_after_sighup = 0;
}
-
+
/* now check for messages */
-
+
DEBUG(10,("start_background_queue: background LPQ thread got a message\n"));
message_dispatch(smbd_messaging_context());
@@ -1449,6 +1474,8 @@ void start_background_queue(void)
0);
}
}
+
+ close(pause_pipe[1]);
}
/****************************************************************************
--
Samba Shared Repository
More information about the samba-cvs
mailing list