[SCM] Samba Shared Repository - branch v3-5-test updated

Karolin Seeger kseeger at samba.org
Wed Jun 13 11:47:24 MDT 2012


The branch, v3-5-test has been updated
       via  5293333 s3-winbindd: call dump_core_setup after command line option has been parsed
      from  bc4a2c1 s3: Fix uninitialized memory read in talloc_free()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -----------------------------------------------------------------
commit 529333322fb373ad23a0ce9034bf9630cdb17765
Author: Matthieu Patou <mat at matws.net>
Date:   Fri Jun 1 15:33:04 2012 -0700

    s3-winbindd: call dump_core_setup after command line option has been parsed
    
    Without this fix in some situations winbindd can't coredump.
    Such cases append when samba is compiled in a custom prefix (ie.
    /home/build/mat/prod/1/) in this case get_dyn_LOGFILEBASE or basename(lp_logfile)
    before the configuration file and the command line is parsed will be something like /home/build/mat/prod/1/var
    which might not exists on the host where you run it (where it's most
    probably more "normal" directories).
    Specifying --log-basename didn't help as dump_core_setup is called before the command line and
    the config file is read so it didn't help getting a correct value in dump_core_setup.
    We fix this issue by calling dump_core_setup() also after the command
    line has been read and also after the configfile has been parsed so that
    the final location for the coredump is coherent with the final logile
    location.
    
    Fix bug #8975 (winbindd can't coredump).
    (cherry picked from commit 4cf3fb815610c6f0939f8b142296cd836faac7e6)

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

Summary of changes:
 source3/winbindd/winbindd.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 0550da8..ca5a53b 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -1073,6 +1073,15 @@ int main(int argc, char **argv, char **envp)
 		}
 	}
 
+	/* We call dump_core_setup one more time because the command line can
+	 * set the log file or the log-basename and this will influence where
+	 * cores are stored. Without this call get_dyn_LOGFILEBASE will be
+	 * the default value derived from build's prefix. For EOM this value
+	 * is often not related to the path where winbindd is actually run
+	 * in production.
+	 */
+	dump_core_setup("winbindd");
+
 	if (is_daemon && interactive) {
 		d_fprintf(stderr,"\nERROR: "
 			  "Option -i|--interactive is not allowed together with -D|--daemon\n\n");
@@ -1107,6 +1116,11 @@ int main(int argc, char **argv, char **envp)
 		DEBUG(0, ("error opening config file\n"));
 		exit(1);
 	}
+	/* After parsing the configuration file we setup the core path one more time
+	 * as the log file might have been set in the configuration and cores's
+	 * path is by default basename(lp_logfile()).
+	 */
+	dump_core_setup("winbindd");
 
 	/* Initialise messaging system */
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list