From: Stefan B. <st...@li...> - 2011-07-01 15:47:16
|
On 07/01/2011 11:27 AM, Rajiv Andrade wrote: > On Fri, Jul 01, 2011 at 10:02:34AM -0500, Kent Yoder wrote: >> Hi Stefan, >> >>> =================================================================== >>> --- trousers.orig/src/tcsd/svrside.c >>> +++ trousers/src/tcsd/svrside.c >>> @@ -44,6 +44,7 @@ struct tpm_properties tpm_metrics; >>> static volatile int hup = 0, term = 0; >>> extern char *optarg; >>> int sd; >>> +char *tcsd_config_file; >> You'll need to initialize tcsd_config_file to NULL here, or you could >> initialize it to TCSD_CONFIG_FILE and let getopts overwrite it. That way it'll >> always print properly in the LogError calls in tcsd_conf.c. >> >> Kent > Isn't this line handled before that? > > @@ -244,6 +250,9 @@ main(int argc, char **argv) > } > } > > + if (!tcsd_config_file) > + tcsd_config_file = TCSD_DEFAULT_CONFIG_FILE; > + > if ((result = tcsd_startup())) > return (int)result; > Rajiv I think Kent is right. Since it's not a static variable, it's safer to init it with NULL. I'll submit a patch shortly. Stefan |