From 2967b8a9981b3e193988f76e4fec24296a3858c1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 5 Jan 2009 12:34:02 -0800 Subject: [PATCH] Attempt to fix crash seen with new CUPS async printcap loading code. Jeremy. (cherry picked from commit 101ef64e3181335b66524296af08f7df04391b9a) --- source/Makefile.in | 2 +- source/printing/print_cups.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Makefile.in b/source/Makefile.in index 730e130e11e..a4944b1ad81 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -693,7 +693,7 @@ NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ SWAT_OBJ1 = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \ web/swat.o web/neg_lang.o -SWAT_OBJ = $(SWAT_OBJ1) $(PARAM_OBJ) $(PRINTING_OBJ) $(LIBSMB_OBJ) \ +SWAT_OBJ = $(SWAT_OBJ1) $(PARAM_OBJ) $(PRINTING_OBJ) $(PRINTBASE_OBJ) $(LIBSMB_OBJ) \ $(LOCKING_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(KRBCLIENT_OBJ) \ $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) \ $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \ diff --git a/source/printing/print_cups.c b/source/printing/print_cups.c index 1bb149cc866..f3eb73c4009 100644 --- a/source/printing/print_cups.c +++ b/source/printing/print_cups.c @@ -388,6 +388,8 @@ static bool cups_pcap_load_async(int *pfd) } /* Child. */ + close_all_print_db(); + if (!reinit_after_fork(smbd_messaging_context(), true)) { DEBUG(0,("cups_pcap_load_async: reinit_after_fork() failed\n")); smb_panic("cups_pcap_load_async: reinit_after_fork() failed"); -- 2.11.4.GIT