ksh/hesiod

Chet Ramey chet at odin.INS.CWRU.Edu
Sat Jan 26 03:35:43 AEST 1991


In article <4825 at vela.acs.oakland.edu> schemers at vela.acs.oakland.edu (Roland Schemers III) writes:

>I just noticed that the ksh ~ expansion does not seem to work with
>hesiod. I logged into a system being served by hesiod, and tried
>a 'echo ~someuser', where someuser is a valid user, and the ksh
>just printed '~someuser'. If you just type 'echo ~' it works, but
>anything else doesn't. It appears that either the ksh is directly
>reading the password file, or is using the getpw routines without 
>hesiod support. This is happening in 4.0/4.1 mips/vax.

With a bare ~ or ~/xxxx, ksh just substitutes the value of $HOME, so
that will always work, whether you are using hesion, YP/NIS, ndbm,
or some other mechanism to manage the `password file'.

For the ~user expansions, old versions of ksh just perform the `regexp
search on /etc/passwd'.  I have been told that ksh88 includes code to
directly call YP, if the machine it is running on is using it.

I guess ksh just avoids the getpw* routines under any circumstances.  The
reason used to be that these routines used stdio, which used malloc, which
conflicted with the private ksh memory management scheme (which it
inherited from the Bourne shell).  I don't know whether or not this is
still the case.

Chet
-- 
Chet Ramey				``There's just no surf in
Network Services Group			  Cleveland, U.S.A. ...''
Case Western Reserve University
chet at ins.CWRU.Edu		My opinions are just those, and mine alone.



More information about the Comp.unix.ultrix mailing list