Logs: no ODBC user and password in messages about a log

A log string is shown only up to its first comma, where an ODBC string
goes on with the user and the password: in the message on a log which
failed, and in the errors on a log or -l which cannot be opened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Vladimir DubrovinandClaude Opus 5.5 committed 2026-10-23 11:47:23 +03:00
1 parent d613750b94
commit e87ffcd7e1
4 files changed
+16 -3

No files matched your search

+3 -1
View File
@@ -388,7 +388,9 @@ static int h_log(int argc, unsigned char ** argv){
/* the same log as before is not opened again */
lg = logget((argc > 1)? argv[1] : (unsigned char *)"", rotation);
if(!lg){
perror((argc > 1)? (char *)argv[1] : "log");
fprintf(stderr, "Unable to open log %.*s: %s, line %d\n",
(int)logselen((argc > 1)? argv[1] : (unsigned char *)""),
(argc > 1)? (char *)argv[1] : "", strerror(errno), linenum);
return 1;
}
if(conf->stacksize < lg->type->stacksize) conf->stacksize = lg->type->stacksize;