Displaying 20 results from an estimated 40 matches for "log_init".
2002 Dec 18
2
patch for openssh3.5p1 - adds logging option
this patch adds a LogFile option to sshd_config. it just logs messages
directly to a file instead of stderr or syslog. the largest change
is an additional argument to log_init() in log.c for the log file name
(and then changes to the rest of the tools to add a NULL arg).
galt
-------------- next part --------------
diff -urN openssh-3.5p1-orig/log.c openssh-3.5p1/log.c
--- openssh-3.5p1-orig/log.c 2002-12-18 10:10:13.000000000 -0500
+++ openssh-3.5p1/log.c 2002-12-18 11...
2001 Apr 12
1
ssh's readconf.c debug() goes to /dev/null
...", arg);
debug("Reading configuration data %.200s", filename);
---
Goes to /dev/null.
This is caused by the fact, that in ssh.c there is:
---
/*
* Initialize "log" output. Since we are the client all output
* actually goes to stderr.
*/
==> log_init(av[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1);
/* Read per-user configuration file. */
snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, _PATH_SSH_USER_CONFFILE);
read_config_file(buf, host, &options);
/* Read systemwide configuration fil...
2007 Jun 18
0
[PATCH] sftp-server argument error handling
When you give sftp-server a bogus -l or -f parameter, it logs a useful
error message then blunders on to call log_init() with the bogus value.
log_init() then prints a less useful message to stderr and exits. The
following patch tidies this up by only printing the more useful error to
stderr and not blundering on afterwards.
--- sftp-server.c.orig Mon Jun 18 16:37:46 2007
+++ sftp-server.c Mon Jun 18 16:39:14 2007...
2017 Feb 20
3
[Bug 2681] New: postauth processes to log via monitor
https://bugzilla.mindrot.org/show_bug.cgi?id=2681
Bug ID: 2681
Summary: postauth processes to log via monitor
Product: Portable OpenSSH
Version: 7.4p1
Hardware: Other
OS: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: sshd
Assignee: unassigned-bugs at
2001 Jan 04
2
Patch to allow openssh-2.2.0-p1 to be started from /etc/inittab
...VE_DAEMON */
+ int sshd_daemon(int nochdir, int noclose);
+
#endif /* _BSD_DAEMON_H */
diff -c -r openssh-2.2.0p1/sshd.c openssh-2.2.0p1-pen1/sshd.c
*** openssh-2.2.0p1/sshd.c Tue Aug 29 02:05:50 2000
--- openssh-2.2.0p1-pen1/sshd.c Thu Jan 4 23:30:46 2001
***************
*** 552,558 ****
log_init(av0,
options.log_level == -1 ? SYSLOG_LEVEL_INFO : options.log_level,
options.log_facility == -1 ? SYSLOG_FACILITY_AUTH : options.log_facility,
! !silent && !inetd_flag);
/* Read server configuration options from the configuration file. */
read_server_config(&...
2002 Mar 26
1
Two patches for OpenSSH 3.1p1
...g_stderr = 1;
break;
+ case 'I':
+ init_flag = 1;
+ break;
case 'i':
inetd_flag = 1;
break;
***************
*** 706,719 ****
/*
* Force logging to stderr until we have loaded the private host
! * key (unless started from inetd)
*/
log_init(__progname,
options.log_level == SYSLOG_LEVEL_NOT_SET ?
SYSLOG_LEVEL_INFO : options.log_level,
options.log_facility == SYSLOG_FACILITY_NOT_SET ?
SYSLOG_FACILITY_AUTH : options.log_facility,
! !inetd_flag);
#ifdef _CRAY
/* Cray can define user privs drop all...
2005 Jan 17
19
[Bug 973] sshd behaves differently while doing syslog entries for tcpwrappers denied message, with -r and without -r option.
http://bugzilla.mindrot.org/show_bug.cgi?id=973
Summary: sshd behaves differently while doing syslog entries for
tcpwrappers denied message, with -r and without -r
option.
Product: Portable OpenSSH
Version: 3.9p1
Platform: All
OS/Version: All
Status: NEW
Severity: normal
2003 Aug 16
0
sftp-server (secure) chroot patch, comment fix
...+ if (setgroups(1, gidset) < 0)
+ fatal("setgroups: %.100s", strerror(errno));
+ permanently_set_uid(pw);
+}
+#endif /* CHROOT */
+
static int
errno_to_portable(int unixerrno)
{
@@ -1028,15 +1082,19 @@
int in, out, max;
ssize_t len, olen, set_size;
+#ifdef DEBUG_SFTP-SERVER
+ log_init("sftp-server", SYSLOG_LEVEL_DEBUG3, SYSLOG_FACILITY_AUTH, 0);
+#endif
+
+#ifdef CHROOT
+ chroot_init();
+#endif
+
/* XXX should use getopt */
__progname = get_progname(av[0]);
handle_init();
-#ifdef DEBUG_SFTP_SERVER
- log_init("sftp-server", SYSLOG_LEVEL_DEBUG1, SYSLO...
2003 Sep 30
1
[PATCH] sftp-server (secure) chroot patch, 3.7.1p2 update
...>pw_gid) < 0)
+ fatal(\"setgid failed for %u\", (u_int)pw->pw_gid );
+
+ permanently_set_uid(pw);
+
+}
+#endif /* CHROOT */
+
static int
errno_to_portable(int unixerrno)
{
@@ -1028,15 +1081,19 @@
int in, out, max;
ssize_t len, olen, set_size;
+#ifdef DEBUG_SFTP_SERVER
+ log_init(\"sftp-server\", SYSLOG_LEVEL_DEBUG1, SYSLOG_FACILITY_AUTH,
0);
+#endif
+
+#ifdef CHROOT
+ chroot_init();
+#endif
+
/* XXX should use getopt */
__progname = ssh_get_progname(av[0]);
handle_init();
-#ifdef DEBUG_SFTP_SERVER
- log_init(\"sftp-server\", SYSLOG_LEVEL_DEBUG...
1999 Nov 20
1
openssh and DOS
.../* Child. Close the listening socket, and start using
- the accepted socket. Reinitialize logging (since our
- pid has changed). We break out of the loop to handle
- the connection. */
- close(listen_sock);
- sock_in = newsock;
- sock_out = newsock;
- log_init(av0, options.log_level, options.log_facility, log_stderr);
- break;
+ /* Make sure we don't have too many connections. */
+ if (options.max_connections > 0
+ && current_connections >= options.max_connections)
+ error ("Maximum number of connections (%d) re...
2003 Aug 16
0
sftp-server (secure) chroot patch?
...: %.100s", strerror(errno));
+ permanently_set_uid(pw);
+}
+#endif /* CHROOT */
+
static int
errno_to_portable(int unixerrno)
{
@@ -1028,15 +1082,17 @@
int in, out, max;
ssize_t len, olen, set_size;
- /* XXX should use getopt */
+#ifdef DEBUG_SFTP-SERVER
+ log_init("sftp-server", SYSLOG_LEVEL_DEBUG3, SYSLOG_FACILITY_AUTH, 0);
+#endif
+
+#ifdef CHROOT
+ chroot_init();
+#endif
__progname = get_progname(av[0]);
handle_init();
-#ifdef DEBUG_SFTP_SERVER
- log_init("sftp-server", SYSLOG_LEVEL_DEBUG1, SYSLOG_FACILITY...
2011 Jun 02
2
preauth privsep logging via monitor
...+ log.c 2 Jun 2011 03:59:56 -0000
@@ -56,6 +56,8 @@ static LogLevel log_level = SYSLOG_LEVEL
static int log_on_stderr = 1;
static int log_facility = LOG_AUTH;
static char *argv0;
+static log_handler_fn *log_handler;
+static void *log_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 *...
2001 Jun 20
1
SFTP Logging Redux.
...*/
+ cuid = getuid();
+ if ((upw = getpwuid(cuid)) == NULL) {
+ cuname = NULL;
+ } else {
+ cuname = upw->pw_name;
+ }
+
+ /* Initialize the parent process ID. */
+ ppid = getppid();
+
+ /* Initialize the logfile, loglevel dependent on DEBUG compile-time setting. */
#ifdef DEBUG_SFTP_SERVER
log_init("sftp-server", SYSLOG_LEVEL_DEBUG1, SYSLOG_FACILITY_AUTH, 0);
+#else
+ log_init("sftp-server", SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_AUTH, 0);
#endif
+ /* Log session start. */
+ log("(%d/%d/%s) SFTP session started.", ppid, cuid, CUNAME);
+
in = dup(STDIN_FILENO);...
2018 Nov 19
2
[PATCH] openssl-compat: Test for OpenSSL_add_all_algorithms before using.
OpenSSL 1.1.0 has deprecated this function.
---
configure.ac | 1 +
openbsd-compat/openssl-compat.c | 2 ++
openbsd-compat/openssl-compat.h | 4 ++++
3 files changed, 7 insertions(+)
diff --git a/configure.ac b/configure.ac
index 3f7fe2cd..db2aade8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2710,6 +2710,7 @@ if test "x$openssl" = "xyes" ; then
])
2024 Apr 25
1
[PATCH] Enable ssh_config to set LogPath option (-E)
...(use_syslog && options.log_path != NULL)
fatal("Can't specify both -y and -E");
- if (logfile != NULL)
- log_redirect_stderr_to(logfile);
+ if (options.log_path != NULL)
+ log_redirect_stderr_to(options.log_path);
log_init(argv0,
options.log_level == SYSLOG_LEVEL_NOT_SET ?
SYSLOG_LEVEL_INFO : options.log_level,
--
2.39.2
2001 Feb 01
0
warnings on aix325
....h:88: warning: its scope is only this definition or declaration,
/usr/include/usersec.h:88: warning: which is probably not what you want.
session.c: In function `do_exec_no_pty':
session.c:474: warning: implicit declaration of function `socketpair'
session.c:493: warning: passing arg 1 of `log_init' discards `const' from pointer target type
session.c: In function `do_exec_pty':
session.c:606: warning: passing arg 1 of `log_init' discards `const' from pointer target type
session.c: In function `do_login':
session.c:707: warning: implicit declaration of function `getpeer...
2004 Jan 13
3
Progress reporting: N more to check
...eck them)
and the "more" number will often not go down to zero (if the final
file in the list is up-to-date).
Thoughts? Suggestions?
..wayne..
-------------- next part --------------
--- log.c 13 Jan 2004 04:50:45 -0000 1.69
+++ log.c 13 Jan 2004 04:51:01 -0000
@@ -191,6 +191,8 @@ void log_init(void)
#ifndef LOG_NDELAY
logit(LOG_INFO,"rsyncd started\n");
#endif
+
+ stats.current_file_index = -1;
}
void log_open(void)
--- progress.c 13 Jan 2004 05:13:57 -0000 1.5
+++ progress.c 13 Jan 2004 05:00:29 -0000
@@ -21,6 +21,7 @@
#include "rsync.h"
+extern struct s...
2001 Dec 18
1
chroot howto for sftp-server
...dir) != 0)
+ fatal("Couldn't chroot to user directory %s: %s",user_dir, strerror(errno));
+
+ setenv("HOME", new_root, 1);
+ break;
+ }
+ new_root += 2;
+ }
+}
+#endif /* CHROOT */
+
int
main(int ac, char **av)
{
@@ -1022,6 +1054,13 @@
#ifdef DEBUG_SFTP_SERVER
log_init("sftp-server", SYSLOG_LEVEL_DEBUG1, SYSLOG_FACILITY_AUTH, 0);
#endif
+
+#ifdef CHROOT
+ chroot_init();
+#endif /* CHROOT */
+
+ if (setuid(getuid()) != 0)
+ fatal("Couldn't drop privileges: %s", strerror(errno));
in = dup(STDIN_FILENO);
out = dup(STDOUT_FILENO);
--...
2002 Jun 05
1
Trailing comma in enum for 3.2.3p1
...G_FACILITY_LOCAL7,
- SYSLOG_FACILITY_NOT_SET = -1,
+ SYSLOG_FACILITY_NOT_SET = -1
} SyslogFacility;
typedef enum {
@@ -45,7 +45,7 @@
SYSLOG_LEVEL_DEBUG1,
SYSLOG_LEVEL_DEBUG2,
SYSLOG_LEVEL_DEBUG3,
- SYSLOG_LEVEL_NOT_SET = -1,
+ SYSLOG_LEVEL_NOT_SET = -1
} LogLevel;
void log_init(char *, LogLevel, SyslogFacility, int);
2004 Oct 12
0
Pseudo-terminal notification and quiet logging
Is there any reason why the notification:
"Pseudo-terminal will not be allocated because stdin is not a terminal."
should appear in ssh even when quiet mode is enabled?
Looking at the ssh.c source the log_init is called just after this
notification. Why shouldn't this be the other way around?
I tested this with openssh-3.6.1p2 but it seems to be this way still in
the latest snapshot.
regards,
Olli-Pekka Lehto