s3-winbindd: call dump_core_setup after command line option has been parsed
commit48c601c4dff6f7799dbf96f7dcc7965f8274246a
authorMatthieu Patou <mat@matws.net>
Fri, 1 Jun 2012 22:33:04 +0000 (1 15:33 -0700)
committerKarolin Seeger <kseeger@samba.org>
Fri, 22 Jun 2012 19:50:17 +0000 (22 21:50 +0200)
treeed9b08459450b64a884c56dbe57b37c1ccbe60c8
parent1985c531a1898c8f08b0c97fbab4ecede0141bf5
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)
source3/winbindd/winbindd.c