[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: Telnet login not in home directory
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2008-10-30 23:58:18
Message-ID: 200810310058.18879.vda.linux () googlemail ! com
[Download RAW message or body]
On Thursday 30 October 2008 12:20, Sergio wrote:
> Hello,
>
> I have a telnet server (in.telnetd) on a PPC board. I'm using BusyBox login
> and switching from 1.9.2 to 1.12.1 I noticed that user doesn't login
> anymore in its $HOME directory.
>
> $HOME directory, however, is correctly set because with a "cd" command I
> jump in it.
>
> I've seen the difference between 1.9.2 and 1.12.1 was introduced with svn
> revision 21346 where 2nd and 3rd parameters of setup_environment() were
> switched:
>
> - /* setup_environment params: shell, loginshell, changeenv, pw */
> - setup_environment(tmp, 1, !(opt & LOGIN_OPT_p), pw);
> - /* FIXME: login shell = 1 -> 3rd parameter is ignored! */
> + /* setup_environment params: shell, clear_env, change_env, pw */
> + setup_environment(tmp, !(opt & LOGIN_OPT_p), 1, pw);
>
> I see that in.telnetd calls login with "-p" argument that, in fact, asks
> login to preserve environment so (in the setup_environment.c code) the
> setup_environment() does not chdir() to $HOME.
>
> Is this correct?
Don't know, but have a feeling that it is not.
I propose chdir'ing to user's home directory
in setup_environment() regardless of the clear_env value.
What do you think?
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic