For any reason, if user needs to specify custom syslog.id value; CppCMS is
calling 'openlog' function with id variable stored on the stack.
According to
this man page: https://linux.die.net/man/3/openlog,
and this Debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=102350
'openlog' is free to use given 'ident' pointer as-is (without making copy of it).
Even on my Ubuntu 16.04 system, openlog is not copying given ident value.
In the current code, CppCMS is reading 'syslog.id' value from configuration into a std::string which is allocated from the stack. Then it passes string's c_str buffer to openlog. But when the code reaches to the end of block; that std::string will be destructed and the pointer passed to openlog will be invalidated.
Regards.
Anonymous
Fixed in cs 2415 in trunk