Custom 'syslog.id' and openlog
Brought to you by:
artyom-beilis
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
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