From 548196362bf5f81de823a075e86bb9ac10e6b14b Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Fri, 6 Jun 1997 16:14:17 +0000 Subject: loadparm.c: Made explicit max packet now ignored. namedbwork.c: Don't announce potential browser if local master = False. nameelect.c: Raise debug level of comment to 2. proto.h: Added reset_globals_after_fork(). server.c: Call reset_globals_after_fork() after forking child. util.c: Added reset_globals_after_fork() - should stop problems with % substitutions in children. (This used to be commit 77be0f710cc96441d966ab7b026a0d591b01ffb0) --- source3/smbd/server.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/smbd') diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 51710b7b77..299ae07aa3 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -2065,6 +2065,7 @@ static BOOL open_sockets(BOOL is_daemon,int port) #else if (Client != -1 && fork()==0) { + /* Child code ... */ #ifndef NO_SIGNAL_TEST signal(SIGPIPE, SIGNAL_CAST sig_pipe); signal(SIGCLD, SIGNAL_CAST SIG_DFL); @@ -2079,6 +2080,11 @@ static BOOL open_sockets(BOOL is_daemon,int port) set_socket_options(Client,"SO_KEEPALIVE"); set_socket_options(Client,user_socket_options); + /* Reset global variables in util.c so that + client substitutions will be done correctly + in the process. + */ + reset_globals_after_fork(); return True; } close(Client); /* The parent doesn't need this socket */ @@ -3119,7 +3125,7 @@ BOOL yield_connection(int cnum,char *name,int max_connections) f = fopen(fname,"r+"); if (!f) { - DEBUG(2,("Coudn't open lock file %s (%s)\n",fname,strerror(errno))); + DEBUG(2,("Couldn't open lock file %s (%s)\n",fname,strerror(errno))); return(False); } -- cgit