Displaying 12 results from an estimated 12 matches for "msgbufsiz".
2016 Mar 28
2
Is it possible to extend log message?
...s 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 : __prognam...
2000 Jan 18
0
More NetBSD patches
...ex: log-client.c
===================================================================
RCS file: /usr/local/cvs/openssh/log-client.c,v
retrieving revision 1.3
diff -u -r1.3 log-client.c
--- log-client.c 2000/01/17 16:53:09 1.3
+++ log-client.c 2000/01/18 15:21:54
@@ -45,12 +45,12 @@
}
}
-#define MSGBUFSIZE 1024
+#define SSH_MSGBUFSIZE 1024
void
do_log(LogLevel level, const char *fmt, va_list args)
{
- char msgbuf[MSGBUFSIZE];
+ char msgbuf[SSH_MSGBUFSIZE];
if (level > log_level)
return;
Index: log-server.c
===================================================================
RCS file: /...
2001 Aug 23
1
-q option doesn't do what it says in the man page?
...ge:
-q Quiet mode. Causes all warning and diagnostic messages
to be suppressed. Only fatal errors are displayed.
But in log.h:
typedef enum {
SYSLOG_LEVEL_QUIET,
SYSLOG_LEVEL_FATAL,
so in log.c:
void
do_log(LogLevel level, const char *fmt, va_list args)
{
char msgbuf[MSGBUFSIZ];
char fmtbuf[MSGBUFSIZ];
char *txt = NULL;
int pri = LOG_INFO;
if (level > log_level)
return;
This means that even fatal errors will be ignored if the -q flag is
passed. The simple fix would appear to be to reverse the ordering in
the enum. Any reason why this should not be done?
Than...
2012 Nov 21
3
Increasing the DMESG buffer....
Hi,
As a next question to my building this server.
I'm nogt able to get a full verbose dmesg.
Probably because the kernelbuffer for it is too small.
I know there used to be a kernel option to increase it.
But I can not find it with the setting in NOTES or any other place I
looked....
Is it still there?
Thanx,
--WjW
2002 Dec 18
2
patch for openssh3.5p1 - adds logging option
...(int) facility);
exit(1);
}
+ if(logfile != NULL) {
+ logf = fopen(logfile,"a");
+ if(logf == NULL) {
+ fprintf(stderr,"unable to open logfile \"%s\" for"
+ " writing\n",logfile);
+ exit(1);
+ }
+ } else {
+ logf = NULL;
+ }
}
#define MSGBUFSIZ 1024
@@ -342,6 +356,8 @@
char fmtbuf[MSGBUFSIZ];
char *txt = NULL;
int pri = LOG_INFO;
+ time_t t;
+ char *tm;
if (level > log_level)
return;
@@ -393,4 +409,11 @@
syslog(pri, "%.500s", msgbuf);
closelog();
}
+ if(logf != NULL) {
+ time(&t);
+ tm = ctime(&...
2012 Dec 05
1
[PATCH] Large log output does not print newline
Hi,
I think I found a minor bug in OpenSSH's log functionality: If a log
message which is larger than MSGBUFSIZE=1024 and logged to stderr, then the
newline (\r\n) is not printed. This is due to the fact that the newline is
added after the log message concatenated with "\r\n" is snprintf'd to
another buffer of the same size. If the source buffer (fmtbuf) would
already fill the destination buffe...
2003 Dec 01
1
[Bug 765] openssh client truncates banner at 1024 characters.
http://bugzilla.mindrot.org/show_bug.cgi?id=765
Summary: openssh client truncates banner at 1024 characters.
Product: Portable OpenSSH
Version: -current
Platform: ix86
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P2
Component: ssh
AssignedTo: openssh-bugs at mindrot.org
2017 Mar 04
6
[Bug 2688] New: Long log messages to stderr missing newlines
...logging to standard error (via -e) or to log file (via -E
<logfile>), long log messages do not end with a newline.
Problem occurs in log.c, line 456 in OpenSSH 7.4p1.
The snprintf() call attempts to copy fmtbuf and "\r\n" into msgbuf.
However, fmtbuf and msgbuf are the same size (MSGBUFSIZ, nominally 1024
bytes). When fmtbuf is completely filled (due to long log message),
then the snprintf() simply copies fmtbuf and ignores the "\r\n".
This was observed when testing certificate-based logins at LogLevel
DEBUG3.
For example, 3 logs messages appear on one line like this (wit...
2006 Aug 24
6
[Bug 1221] Banner only suppressed at log level = QUIET (used to be at log level < INFO)
...c/issue)
was suppressed at LogLevel=ERROR|FATAL|QUIET. Since 3.8, it has only
been suppressed at LogLevel=QUIET. This change was a side-effect of
the following mod:
- dtucker at cvs.openbsd.org 2003/10/07 01:47:27
[sshconnect2.c]
Don't use logit for banner, since it truncates to MSGBUFSIZ;
bz #668 & #707. ok markus@
The relevant code is in sshconnect2.c:
input_userauth_banner(int type, u_int32_t seq, void *ctxt)
{
char *msg, *lang;
debug3("input_userauth_banner");
msg = packet_get_string(NULL);
lang = packet_get_string(NULL);...
2001 Feb 12
0
log-server.c patch: adding tag to every log output.
...code in this post to
modify the names used for sshd_config.
RCS file: RCS/log-server.c,v
retrieving revision 1.1
diff -c -r1.1 log-server.c
*** log-server.c 2001/01/15 09:07:44 1.1
--- log-server.c 2001/01/25 05:56:57
***************
*** 122,127 ****
--- 122,140 ----
#define MSGBUFSIZ 1024
+ /* CI: verbose tag to show the difference between the internal
+ priority level and the syslog priority.
+
+ */
+ #if 0
+ #define TAGSTR(orig,pri) orig
+ #else
+ /* Verbose:
+ * ssh_internal_name(priority)
+ */
+ #define TAGSTR(orig,pri) orig "(" pri ")"...
2000 Oct 30
2
Minor fixes for openssh-SNAP-20001028
...ar *__progname = NULL;
#endif /* HAVE___PROGNAME */
static LogLevel log_level = SYSLOG_LEVEL_INFO;
@@ -118,6 +118,10 @@
exit(1);
}
log_on_stderr = on_stderr;
+ if (__progname == NULL)
+ __progname = av0;
+ if (! log_on_stderr)
+ openlog(__progname, LOG_PID, log_facility);
}
#define MSGBUFSIZ 1024
2011 Jun 02
2
preauth privsep logging via monitor
...handler_ctx;
extern char *__progname;
@@ -260,6 +262,9 @@ log_init(char *av0, LogLevel level, Sysl
exit(1);
}
+ log_handler = NULL;
+ log_handler_ctx = NULL;
+
log_on_stderr = on_stderr;
if (on_stderr)
return;
@@ -327,6 +332,23 @@ log_init(char *av0, LogLevel level, Sysl
#define MSGBUFSIZ 1024
void
+set_log_handler(log_handler_fn *handler, void *ctx)
+{
+ log_handler = handler;
+ log_handler_ctx = ctx;
+}
+
+void
+do_log2(LogLevel level, const char *fmt,...)
+{
+ va_list args;
+
+ va_start(args, fmt);
+ do_log(level, fmt, args);
+ va_end(args);
+}
+
+void
do_log(LogLevel level,...