search for: envsiz

Displaying 20 results from an estimated 51 matches for "envsiz".

Did you mean: envsize
2000 Feb 27
0
[PATCH] Fix login.conf, expiration, BSD compatibility in OpenSSH
...fclose(f); } } +#ifdef LOGIN_CAP + login_close(lc); +#endif /* LOGIN_CAP */ /* Do common processing for the child, such as execing the command. */ do_child(command, pw, term, display, auth_proto, auth_data, ttyname); @@ -2363,7 +2453,7 @@ char buf[256]; FILE *f; unsigned int envsize, i; - char **env; + char **env = NULL; extern char **environ; struct stat st; char *argv[10]; @@ -2373,29 +2463,24 @@ lc = login_getpwclass(pw); if (lc == NULL) lc = login_getclassbyname(NULL, pw); -#endif /* LOGIN_CAP */ - + if (pw->pw_uid != 0) + auth_checknologin(lc); +#else /*...
2001 Dec 18
1
[PATCH]: Fix environment variable size restriction in Cygwin version
...e: /cvs/openssh_cvs/session.c,v retrieving revision 1.158 diff -u -p -r1.158 session.c --- session.c 7 Dec 2001 17:26:49 -0000 1.158 +++ session.c 18 Dec 2001 19:07:14 -0000 @@ -918,25 +918,29 @@ void do_pam_environment(char ***env, u_i #ifdef HAVE_CYGWIN void copy_environment(char ***env, u_int *envsize) { - char *equals, var_name[512], var_val[512]; + char *var_name = NULL, *var_val; + size_t size = 0, i_size; int i; for(i = 0; environ[i] != NULL; i++) { - if ((equals = strstr(environ[i], "=")) == NULL) + if ((i_size = strlen(environ[i]) + 1) < 3) continue; - if (str...
2000 Sep 04
1
trivial patch to post overridden command into env
...f (forced_command != NULL) { + saved_command = command; command = forced_command; debug("Forced command '%.500s'", forced_command); + } else { + saved_command = NULL; } if (have_pty) do_exec_pty(s, command, pw); @@ -1042,6 +1047,9 @@ env = xmalloc(envsize * sizeof(char *)); env[0] = NULL; + if (saved_command) { + child_set_env(&env, &envsize, "command", saved_command); + } if (!options.use_login) { /* Set basic environment. */ child_set_env(&env, &envsize, "USER", pw->pw_name); -------------- next...
2001 Feb 26
0
Problems with OpenSSH 2.5.1p1 on Solaris 8
..."_hard" @@ -1173,6 +1177,12 @@ #endif if (!options.use_login) { +#ifdef HAVE_ETC_DEFAULT_LOGIN + int fd, pagesize; + struct stat inode; + char *onemore = MAP_FAILED, *logstr = MAP_FAILED; + char *pathstr; +#endif /* Set basic environment. */ child_set_env(&env, &envsize, "USER", pw->pw_name); child_set_env(&env, &envsize, "LOGNAME", pw->pw_name); @@ -1188,7 +1198,83 @@ * needed for loading shared libraries. So the path better * remains intact here. */ +# ifdef HAVE_ETC_DEFAULT_LOGIN + if ((fd = open("/etc/de...
2006 Sep 18
1
BSD Auth: set child environment variables requested by login script [PATCH]
...#include "monitor_wrap.h" + +/* + * Set child environment variables starting with "X_BSD_AUTH". + * After the call to auth_close(), these variables are in the + * current environment if the login script has requested them. + */ +void +bsdauth_child_set_env(char ***envp, u_int *envsizep) +{ + extern char **environ; + char name[8*1024]; /* MAXSPOOLSIZE in auth_session_t */ + char *value; + u_int i, namelen; + + for (i = 0; environ[i] != NULL; i++) { + namelen = strcspn(environ[i], "="); + if (namelen + 1 > sizeof(name)) + continue; + snprintf(name, namelen + 1,...
2001 Mar 29
3
Patches for OpenSSH 2.5.2p2: evaluate /etc/default/login, makefiles manpages
...t isn't prohibited by a entry in file ETC_DEFAULT_LOGIN_FILENAME. + * + * Other flags in file ETC_DEFAULT_LOGIN_FILENAME that cause actions + * other than setting environment variables, + * setting the umask and ulimit + * will not be processed. + */ +void do_etc_default_login(char ***env, int *envsize, const char *shell, + const uid_t uid) +{ + char **default_login_env; + u_int default_login_env_size; + char *value; + + /* + * Read the assignments in file ETC_DEFAULT_LOGIN_FILENAME + * into the temporary environment default_login_env. + */ + default_login_env_size = 20; + default_...
2002 Nov 26
0
[Bug 446] New: $LOGIN not set by openssh under AIX
...chances of getting this incorporated into the openssh distribution? *** session.c.3.5p1 Wed Sep 25 20:38:50 2002 --- session.c Mon Nov 25 12:28:41 2002 *************** *** 969,974 **** --- 969,977 ---- /* Set basic environment. */ child_set_env(&env, &envsize, "USER", pw->pw_name); child_set_env(&env, &envsize, "LOGNAME", pw->pw_name); + #ifdef _AIX + child_set_env(&env, &envsize, "LOGIN", pw->pw_name); + #endif child_set_env(&env, &envsize, &qu...
2003 Nov 11
1
AIX KRB5CCNAME problem
...s in the OpenSSH source from at least as far back as 3.1 to the current source tree. On about line 1087 of session.c we see this: #ifdef _AIX { char *cp; if ((cp = getenv("AUTHSTATE")) != NULL) child_set_env(&env, &envsize, "AUTHSTATE", cp); if ((cp = getenv("KRB5CCNAME")) != NULL) child_set_env(&env, &envsize, "KRB5CCNAME", cp); read_environment_file(&env, &envsize, "/etc/environment"); } #endif...
2000 Oct 07
0
OpenSSH changes for BSD/OS
...text(lc, pw, pw->pw_uid, LOGIN_SETALL) < 0) + fatal("setusercontext failed."); + #endif /* HAVE_SETUSERCONTEXT */ } /* * Get the shell from the password data. An empty shell field is *************** *** 1013,1019 **** --- 1026,1038 ---- child_set_env(&env, &envsize, "USER", pw->pw_name); child_set_env(&env, &envsize, "LOGNAME", pw->pw_name); child_set_env(&env, &envsize, "HOME", pw->pw_dir); + #ifdef HAVE_SETUSERCONTEXT + /* update the path to the one setusercontext set for us */ + if (getenv...
2009 Sep 21
2
[patch] RFC: put server tunnel name in environment
If an ssh server receives a tun/tap tunnel request and sets up the tunnel concerned, as far as I can see there is currently no way for the server to configure the tunnel in a manner dependent upon (e.g) the key used to set up the ssh session. Whilst an id based on the key can be passed to the ssh child process, where the tunnel is dynamically allocated, its tunnel name is lost. This patch
2000 Feb 24
1
A problem with PATH in sshd.c
Dear Sirs, on my Linux (distribution Slackware 3.9), I have installed the ``openssh-1.2.2.tar.gz'' package into the /usr/local/bin directory. In the ``sshd.c'' file, the PATH variable is set up: child_set_env(&env, &envsize, "PATH", _PATH_STDPATH); (line no. 2405). I am unable to connect to my machine using scp. _PATH_STDPATH is "/usr/bin:/bin:/usr/sbin:/sbin", but the scp program dwells in /usr/local/bin. If I try to connect, enter password (etc., all OK), then the shell reports it could not f...
2000 May 24
0
'command' option in authorized_keys
...@@ -343,6 +344,7 @@ packet_integrity_check(plen, 0, type); } if (forced_command != NULL) { + original_command = command; command = forced_command; debug("Forced command '%.500s'", forced_command); } @@ -911,6 +913,8 @@ child_set_env(&env, &envsize, "TERM", term); if (display) child_set_env(&env, &envsize, "DISPLAY", display); + if (original_command) /* LEE */ + child_set_env(&env, &envsize, "SSH_ORIGINAL_COMMAND", original_command); /* LEE */ #ifdef _AIX { -- Lee Eakin - leakin...
2001 Oct 13
0
local IP in environment
...2/session.c.bak Sun Sep 16 15:17:15 2001 --- openssh-2.9.9p2/session.c Fri Oct 12 16:52:09 2001 *************** *** 1255,1260 **** --- 1255,1263 ---- snprintf(buf, sizeof buf, "%.50s %d %d", get_remote_ipaddr(), get_remote_port(), get_local_port()); child_set_env(&env, &envsize, "SSH_CLIENT", buf); + snprintf(buf, sizeof buf, "%.50s", + get_local_ipaddr2()); + child_set_env(&env, &envsize, "SSH_LOCAL", buf); if (s->ttyfd != -1) child_set_env(&env, &envsize, "SSH_TTY", s->tty);
2001 Aug 13
1
[PATCH] Maildir support
...* * Performs common processing for the child, such as setting up the * environment, closing extra file descriptors, setting the user and group @@ -1226,6 +1302,8 @@ #endif if (!options.use_login) { + struct stat mailstat; + /* Set basic environment. */ child_set_env(&env, &envsize, "USER", pw->pw_name); child_set_env(&env, &envsize, "LOGNAME", pw->pw_name); @@ -1245,10 +1323,22 @@ # endif /* HAVE_CYGWIN */ #endif /* HAVE_LOGIN_CAP */ +#ifndef MAILDIR_FORMAT snprintf(buf, sizeof buf, "%.200s/%.50s", _PATH_MAILDIR, pw...
2013 Aug 05
2
RemoteForward and dynamically allocated listen port
...warding unix sockets, which I have missed for a long time. Would any of these approaches be acceptable? Any other ideas? Thanks, Andrew --- session.c.orig 2013-08-03 13:22:10.354171156 -0700 +++ session.c 2013-08-05 09:58:00.017397667 -0700 @@ -1307,6 +1307,17 @@ child_set_env(&env, &envsize, SSH_AUTHSOCKET_ENV_NAME, auth_sock_name); + char name[256]; + u_int n = 0; + for (i = 0; i < 100; i++) { + Channel *c = channel_by_id(i); + if (c == NULL || c->type != SSH_CHANNEL_RPORT_LISTENER) + continue; + snprintf(name, sizeof name, "SSH_REMOTE_FORWARD_PORT_%d",...
2003 Sep 16
5
OpenSSH Security Advisory: buffer.adv
This is the 1st revision of the Advisory. This document can be found at: http://www.openssh.com/txt/buffer.adv 1. Versions affected: All versions of OpenSSH's sshd prior to 3.7 contain a buffer management error. It is uncertain whether this error is potentially exploitable, however, we prefer to see bugs fixed proactively. 2. Solution: Upgrade to OpenSSH
2001 May 17
0
Patch: Set SSH_AUTHKEY to key id used to authenticate.
...@@ #include "serverloop.h" #include "canohost.h" #include "session.h" +#include "key.h" #ifdef WITH_IRIX_PROJECT #include <proj.h> @@ -1281,6 +1282,8 @@ get_remote_ipaddr(), get_remote_port(), get_local_port()); child_set_env(&env, &envsize, "SSH_CLIENT", buf); + if (key_matching_data(NULL)) + child_set_env(&env, &envsize, "SSH_AUTHKEY", key_matching_data(NULL)); if (s->ttyfd != -1) child_set_env(&env, &envsize, "SSH_TTY", s->tty); if (s->term)
2013 May 15
1
[PATCH] Expose remote forwarding ports as environment variable
...; /* protocol handler */ diff -ru openssh-6.2p1/session.c openssh-6.2p1.patched/session.c --- openssh-6.2p1/session.c 2013-03-15 01:22:37.000000000 +0100 +++ openssh-6.2p1.patched/session.c 2013-05-15 23:27:12.459989713 +0200 @@ -1235,6 +1235,9 @@ xfree(laddr); child_set_env(&env, &envsize, "SSH_CONNECTION", buf); + channel_list_rport_listener(buf, sizeof buf); + child_set_env(&env, &envsize, "SSH_REMOTE_FORWARDING_PORTS", buf); + if (s->ttyfd != -1) child_set_env(&env, &envsize, "SSH_TTY", s->tty); if (s->term) Only in...
2003 Sep 16
2
openssh 3.7p1 bus error on sparcv9
...shd runs fine, and starts to allow the login. However, when reading from /etc/default/login, I get a bus error. I am able to get sshd to work by commenting out these lines in session.c: 1015,1018c1015 < # ifdef HAVE_ETC_DEFAULT_LOGIN < read_etc_default_login(&env, &envsize, pw->pw_uid); < path = child_get_env(env, "PATH"); < # endif /* HAVE_ETC_DEFAULT_LOGIN */ Here is an truss of the failure: 1904: open("/etc/default/login", O_RDONLY) = 7 1904: fstat(7, 0xFFFFFFFF7FFFD7F0) = 0 1904: i...
2001 Feb 16
1
OpenSSH 2.3.0p1 port to BSDI BSD/OS
...#include "includes.h" + +#ifndef HAVE_VIS #define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7') Index: session.c --- session.c 2001/02/13 07:43:17 1.1 +++ session.c 2001/02/13 07:45:46 1.2 @@ -1155,7 +1155,9 @@ child_set_env(&env, &envsize, "HOME", pw->pw_dir); #ifdef HAVE_LOGIN_CAP (void) setusercontext(lc, pw, pw->pw_uid, LOGIN_SETPATH); - child_set_env(&env, &envsize, "PATH", getenv("PATH")); + /* update the path to the one setusercontext set for us */ + if (getenv("PATH&quo...