Telnet login not in home directory

Sergio sergio.biasi at elsagdatamat.com
Thu Oct 30 11:20:54 UTC 2008


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?

Thanks for support

	Sergio

-- 
Free software is a matter of liberty, not price. To understand the concept, 
you should think of free as in free speech, not as in free beer
- Richard Stallman

http://www.gnu.org/philosophy/free-sw.html



More information about the busybox mailing list