Displaying 16 results from an estimated 16 matches for "do_setup_env".
2002 Dec 07
0
[Bug 453] New: [PATCH] The SHELL env variable is set incorrectly, when shell is overridden from login.conf.
...cutes.
Fix:
--- ssh/session.c.orig2 Sat Dec 7 07:48:46 2002
+++ ssh/session.c Sat Dec 7 07:57:16 2002
@@ -1325,11 +1325,19 @@
* legal, and means /bin/sh.
*/
shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell;
+
+
/* Set up the environment for child */
+
env = do_setup_env(s, shell);
+
+
/*
+
* The shell specifed in login class overrides the shell in passwd,
+
* but, according to the login.conf(5), the SHELL env variable must
+
* contain the value from passwd, so we do this *after* setting up
+
* child's environment.
+
*/
#ifdef HAVE_LOGIN_CAP
shell = log...
2004 Apr 08
1
openssh-3.8p1 fails to set TZ environment variable bug
Found on while running on IRIX 6.5.22f, sshd from openssh-3.8p1 nukes
its envrionment in main(), causing sshd to loose track of the TZ
environment variable passed to it by the system. This means that inside
do_setup_env(), the call to getenv("TZ") will never succeed, despite the
fact that this variable should have a value.
2002 Sep 04
4
Determining Local IP Address within .profile
...a remote client could connect and we like to know within .profile which interface the client has connected to.
I've looked at the sourcecode and maybe the following could do something I described :
session.c:871 RCSID("$OpenBSD: session.c,v 1.142 2002/06/26 13:49:26 deraadt Exp $");
do_setup_env
child_set_env(&env, &envsize, "SSH_LOCAL_IP", get_local_ipaddr(packet_get_connection_in());
what do you think of it ?
thanx, mario
2014 Aug 14
0
Problem with enabling /etc/default(s)/login on Cygwin
...ks,
Corinna
Index: session.c
===================================================================
RCS file: /cvs/openssh/session.c,v
retrieving revision 1.434
diff -u -p -r1.434 session.c
--- session.c 18 Jul 2014 04:11:26 -0000 1.434
+++ session.c 14 Aug 2014 11:29:58 -0000
@@ -1188,13 +1188,6 @@ do_setup_env(Session *s, const char *she
else
child_set_env(&env, &envsize, "PATH", getenv("PATH"));
#else /* HAVE_LOGIN_CAP */
-# ifndef HAVE_CYGWIN
- /*
- * There's no standard path on Windows. The path contains
- * important components pointing to the system direc...
2003 Oct 04
1
pam problem in openssh-3.7.1p2
...alex ~/ssh/openssh-3.7.1p2+ make > /dev/null
uuencode.c: In function `uuencode':
uuencode.c:35: warning: implicit declaration of function `__b64_ntop'
uuencode.c: In function `uudecode':
uuencode.c:53: warning: implicit declaration of function `__b64_pton'
session.c: In function `do_setup_env':
session.c:975: warning: unused variable `path'
auth-pam.c:56:1: warning: "__unused" redefined
In file included from /usr/include/stdio.h:43,
from includes.h:24,
from auth-pam.c:33:
/usr/include/sys/cdefs.h:139:1: warning: this is the location of...
2013 Aug 05
2
RemoteForward and dynamically allocated listen port
...options are.
Without changing the protocol, we could at least set an environment
variable for each dynamically allocated port, numbered by the order of
the RemoteForward requests, eg. SSH_REMOTE_FORWARD_PORT_1,
SSH_REMOTE_FORWARD_PORT_2, .... I was able to wedge a proof of concept
into session.c:do_setup_env (patch below). It's a hack because there
doesn't seem to be an API to iterate channels outside of channels.c.
Would it be agreeable to export channels and channels_alloc? Also,
struct Channel doesn't let you tell which forwards were dynamically
allocated, so an environment variable is...
2002 Feb 26
1
Locale problems on Solaris
Hi there.
With OpenSSH 3.0.2p1 on Solaris, the locale does not appear to get set
correctly at login, as it does with, say telnet:
/etc/default/init:
TZ=GB
CMASK=022
LC_COLLATE=en_GB.ISO8859-1
LC_CTYPE=en_GB.ISO8859-1
LC_MESSAGES=C
LC_MONETARY=en_GB.ISO8859-1
LC_NUMERIC=en_GB.ISO8859-1
LC_TIME=en_GB.ISO8859-1
When logging in via SSH:
scot /home/scot > locale
LANG=
2002 Jul 28
0
[Bug 372] New: [authkrb5] : KRB5CCNAME set to pointer
.../3.2 at least
seen on i386 and sparc, with net/openbsd, cygwin ...
when trying to authentify trough kerberos V, KRB5CCNAME var set to wrong value
on client :
shiva:krb {50} klist
klist: No ticket file: 0x506c0
v4-ticket file: /tmp/tkt1003
klist: No ticket file (tf_util)
think it something near do_setup_env in session.c :
892 #ifdef KRB5
893 if (s->authctxt->krb5_ticket_file)
894 child_set_env(&env, &envsize, "KRB5CCNAME",
895 (char *)s->authctxt->krb5_ticket_file);
896 #endif
hope this help !
regards,
Ju...
2005 Mar 21
0
Why not to read environment before do_pwchange() ?
...password. From now on passwd talks in system's default $LANG, which
is English.
I've found the cause of such behavior in session.c
Function do_child() invokes do_pwchange() at the beginning, before
everything else. (4.0p1 session.c line 1445)
Environment is read later by do_setup_env() - when setting $SHELL
(line 1496)
When /usr/bin/passwd is executed by do_pwchange() it doesn't know
environment and uses default from /etc/environment.
The solution is to read user environment before forcing password
change.
Is this appropriate place for asking for a fix...
2013 Sep 13
1
openssh (6.2p2), inherit host environment variables to subsystem sftp-server process
Hi,
is there a regular way that a subsystem process (sftpserver
here) inherits environment variables from its parent (sshd)?
Namely LANG and LC_* variables.
In my case it's important to get the variable of hosting
environment and not from client side (AcceptEnv).
Regards
Martin
--
Registered Linux User #87175, http://linuxcounter.net
2010 Mar 31
2
Sending PATH using SendEnv
Hi
I thought this was something that might concern the developers so I thought I'd post here. Apologies in advance if that's not the case.
I'm setting up a CentOS cluster with OpenSSH_4.3p2 which uses ssh to launch processes on the remote nodes. I'm trying to use the SendEnv/AcceptEnv functionality to send the PATH environment variable from the headnode when users are launching
2003 Oct 07
0
FW: Environment passing in Solaris 8 with later versions of SSH a nd UseLogin=yes
...f:
>
> 1. Define char **env
> 2. Define "extern char **environ", which I assume will reach
> the environment setup by the C RTL.
> 3. Populate "env" by various calls to child_set_env (which
> in OpenSSH 3.7.1p1 is called in another routine, by env =
> do_setup_env - is this the problem??)
> 4. "environ = env", which I assume will set the external
> environment to the newly defined environment stored in "env".
> 5. Call "execl(LOGIN_PROGRAM, "login", "-h", hostname, "-p"
,"-f", &quo...
2006 May 04
2
xmalloc(foo*bar) -> xcalloc(foo, bar) for Portable
...===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/session.c,v
retrieving revision 1.327
diff -u -p -r1.327 session.c
--- session.c 23 Apr 2006 02:10:49 -0000 1.327
+++ session.c 4 May 2006 01:59:13 -0000
@@ -984,7 +984,7 @@ do_setup_env(Session *s, const char *she
/* Initialize the environment. */
envsize = 100;
- env = xmalloc(envsize * sizeof(char *));
+ env = xcalloc(envsize, sizeof(char *));
env[0] = NULL;
#ifdef HAVE_CYGWIN
Index: ssh-rand-helper.c
===================================================================...
2003 Sep 29
1
Environment passing in Solaris 8 with later versions of SSH and U seLogin=yes
...ns of code is doing much the same stuff:
1. Define char **env
2. Define "extern char **environ", which I assume will reach the
environment setup by the C RTL.
3. Populate "env" by various calls to child_set_env (which in OpenSSH
3.7.1p1 is called in another routine, by env = do_setup_env - is this the
problem??)
4. "environ = env", which I assume will set the external environment to the
newly defined environment stored in "env".
5. Call "execl(LOGIN_PROGRAM, "login", "-h", hostname, "-p" ,"-f", "--",
pw-&l...
2017 Oct 10
3
tunnel device name acquisition?
Numerous how-tos all over the Internet show how one would set up
a tunnel using ssh, e.g.:
ssh -f -o Tunnel=ethernet <server_ip> true
I was wondering if there's a way to subsequently acquire the names
of the local and remote tun/tap interfaces (e.g., using the default
"-w any:any") for subsequent automatic tunnel configuration, e.g.:
ip link set $TapDev up
ip link set
2017 Mar 02
64
[Bug 2687] New: Coverity scan fixes
https://bugzilla.mindrot.org/show_bug.cgi?id=2687
Bug ID: 2687
Summary: Coverity scan fixes
Product: Portable OpenSSH
Version: 7.4p1
Hardware: Other
OS: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: Miscellaneous
Assignee: unassigned-bugs at mindrot.org