Is it possible to extend log message?

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Hello folks,

Is it possible to extend log message as large as PATH_MAX?
Current length of message format including file path is small against linux PATH_MAX, 4096.

diff --git a/log.c b/log.c
index ad12930..95df4a9 100644
--- a/log.c
+++ b/log.c
@@ -359,7 +359,7 @@ log_redirect_stderr_to(const char *logfile)
        log_stderr_fd = fd;
 }

-#define MSGBUFSIZ 1024
+#define MSGBUFSIZ 5192

 void
 set_log_handler(log_handler_fn *handler, void *ctx)
@@ -448,11 +448,11 @@ do_log(LogLevel level, const char *fmt, va_list args)
        } else {
 #if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT)
                openlog_r(argv0 ? argv0 : __progname, LOG_PID, log_facility, &sd
-               syslog_r(pri, &sdata, "%.500s", fmtbuf);
+               syslog_r(pri, &sdata, "%s", fmtbuf);
                closelog_r(&sdata);
 #else
                openlog(argv0 ? argv0 : __progname, LOG_PID, log_facility);
-               syslog(pri, "%.500s", fmtbuf);
+               syslog(pri, "%s", fmtbuf);
                closelog();
 #endif
        }

Thanks

nakai
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux