Bug#95213: [Pkg-shadow-devel] Bug#95213: Passing env variables after the login name does not work

Tomasz Kłoczko Tomasz Kłoczko , 95213@bugs.debian.org
Tue, 5 Apr 2005 22:35:21 +0200 (CEST)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--568760595-954245889-1112733321=:4397
Content-Type: TEXT/PLAIN; charset=ISO-8859-2
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Tue, 5 Apr 2005, Nicolas [iso-8859-1] Fran=E7ois wrote:
[..]
> In fact, it (can) work:
>=20
> 21:35:49# login fzt FOO=3DBAR
> Password:
> Last login: Tue Apr  5 18:50:59 2005 on :0
> Linux nekral 2.4.27 #1 sam oct 9 16:13:52 CEST 2004 i686 GNU/Linux
> You have mail.
> fzt@nekral:~$ echo $FOO
> BAR
>=20
> (Can you try it on Solaris?)

I'm wrote "login from Solaris do not have this kind abilities" only after=
=20
reading Solaris login(1) man page text. But now ..

v440 console login: root FOO=3DBAR
Password:
Last login: Sat Apr  2 09:29:02 from test1.zie.pg.gd
Apr  5 22:15:17 v440 login: ROOT LOGIN /dev/console
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
[root@v440 ~]# echo $FOO
BAR

Hmm .. seems woks ;>

> It depends on the args login receives (it doesn't work with:
> login "fzt FOO=3DBAR").
> When login is started without any argument (when it prints a "login:"
> prompt), the text entered by the user is just taken as a user name, no en=
v
> can be provided.
>=20
>=20
> The same thing happen when login is invoked by getty (getty prints the
> prompt, and then invoke login with the username in argument).
>=20
> This could be solved by login or getty by splitting the text entered by
> the user on spaces (this may be much more complex because of quotes...).
>=20
> I don't think this functionality is really useful, so maybe it is not
> worth doing something else than updating the man page (it should indicate
> that it only woks when the variables are indicated on the command line, a=
s
> in the synopsis).

I plan transform shadow to fully Solaris compliant form (I'm wrote about=20
this more than week ago on Debian shadow list and shadow@pld.org.pl list).=
=20
So .. consequence this will be also implement this kind functionality. For=
=20
now remove one paragrap from man login pages is for keep true description=
=20
of currently abvalaible things implemented in shadow login. This can be=20
reverted after implemting above behavior.

kloczek
--=20
-----------------------------------------------------------
*Ludzie nie maj=B1 problem=F3w, tylko sobie sami je stwarzaj=B1*
-----------------------------------------------------------
Tomasz K=B3oczko, sys adm @zie.pg.gda.pl|*e-mail: kloczek@rudy.mif.pg.gda.p=
l*
--568760595-954245889-1112733321=:4397--