search for: handle_init

Displaying 9 results from an estimated 9 matches for "handle_init".

Did you mean: handle_exit
2003 Aug 16
0
sftp-server (secure) chroot patch, comment fix
...,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, SYSLOG_FACILITY_AUTH, 0); -#endif - in = dup(STDIN_FILENO); out = dup(STDOUT_FILENO);
2002 Nov 11
0
changes to allow chroot'ed sftp
...ld use getopt */ + if(ac == 2 && strcmp(av[1],"-c") == 0 ){ + chroot("."); + chdir("/"); /* get rid of '.' chroot hole */ + setuid(getuid()); + }; __progname = get_progname(av[0]); handle_init(); =================================================================== =================================================================== RCS file: RCS/sftp-server.8,v retrieving revision 1.1 diff -u -r1.1 sftp-server.8 --- sftp-server.8 2002/11/10 23:17:06 1.1 +++ sftp-server.8 20...
2003 Sep 30
1
[PATCH] sftp-server (secure) chroot patch, 3.7.1p2 update
...081,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_DEBUG1, SYSLOG_FACILITY_AUTH, 0); -#endif - in = dup(STDIN_FILENO); out = dup(STDOUT_FILENO); To apply this patch on OpenSSH 3.7.1p2: - patch -p0 < sftp-server.patch - edit Makefile and include uidswap.o in...
2003 Aug 16
0
sftp-server (secure) chroot patch?
...ax; 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_AUTH, 0); -#endif - in = dup(STDIN_FILENO); out = dup(STDOUT_FILENO);
2006 Oct 09
1
About sftp-server root path
Hi, I saw in archive that some people made a patch to sftp-server, and that patch sets a root path. I'd like to know if there's an ideia to apply that patch in main tree of openssh? With the use of SSHFS [wich uses sftp-server], it would be interesting to have someting like that, because as we have netboot workstations, the access to devices [such as, floppy, cdrom and usb data] are
2001 Jun 20
1
SFTP Logging Redux.
...if (msg_len > 256 * 1024) { error("bad message "); + log("(%d/%d/%s) SFTP session closing (%s).", ppid, cuid, CUNAME, "Bad Message"); exit(11); } if (buffer_len(&iqueue) < msg_len + 4) @@ -1036,10 +1075,27 @@ __progname = get_progname(av[0]); handle_init(); + /* Initialize the username of the user running the process. */ + 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 depe...
2002 Dec 18
2
patch for openssh3.5p1 - adds logging option
...Close the master side of the pseudo tty. */ close(ptyfd); diff -urN openssh-3.5p1-orig/sftp-server.c openssh-3.5p1/sftp-server.c --- openssh-3.5p1-orig/sftp-server.c 2002-12-18 10:10:13.000000000 -0500 +++ openssh-3.5p1/sftp-server.c 2002-12-18 10:42:50.000000000 -0500 @@ -1021,7 +1021,7 @@ handle_init(); #ifdef DEBUG_SFTP_SERVER - log_init("sftp-server", SYSLOG_LEVEL_DEBUG1, SYSLOG_FACILITY_AUTH, 0); + log_init("sftp-server", SYSLOG_LEVEL_DEBUG1, SYSLOG_FACILITY_AUTH, 0,NULL); #endif in = dup(STDIN_FILENO); diff -urN openssh-3.5p1-orig/sftp.c openssh-3.5p1/sftp.c ---...
2007 Nov 11
1
ftp-server patch - restrict user to directory
...ame, config_file_mandatory); + log_init(__progname, log_level, log_facility, log_stderr); if ((cp = getenv("SSH_CONNECTION")) != NULL) { @@ -1271,6 +1458,8 @@ logit("session opened for local user %s from [%s]", pw->pw_name, client_addr); + set_user_opts(); + handle_init(); in = dup(STDIN_FILENO); --- sftp-server.8.orig 2007-06-05 09:27:13.000000000 +0100 +++ sftp-server.8 2007-11-11 23:15:51.000000000 +0000 @@ -60,6 +60,12 @@ The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The default is AUTH. +.I...
2002 Mar 15
4
PATCH: sftp-server logging.
...; + #ifdef SFTP_LOGGING + log("(%d/%d/%s) SFTP session closing (%s).", ppid, cuid, CUNAME, "Bad Message"); + #endif exit(11); } if (buffer_len(&iqueue) < msg_len + 4) *************** *** 1050,1055 **** --- 1236,1260 ---- __progname = get_progname(av[0]); handle_init(); + #ifdef SFTP_LOGGING + /* Initialize the username of the user running the process. */ + cuid = getuid(); + if ((upw = getpwuid(cuid)) == NULL) { + cuname = NULL; + } else { + cuname = xstrdup(upw->pw_name); + } + + /* Initialize the parent process ID. */ + ppid = getppid(); +...