[lfs-support] More Control and Package Management using Package Users - LFS 7.2+

David Buchan davidsbuchan at gmail.com
Wed Oct 10 11:02:31 PDT 2012


Hi,

Thanks but I solved it! Quite chuffed with myself.

Here is how:

I installed shadow into /tools at the end of chapter 5.
But even though I did --prefix=/tools su still demanded login.defs to be in
/etc (it got installed into /tools/etc as it should have done.
I simply copied the files in /tools/etc into /etc and su suddenly worked.

I found out that it was failing by
adding in printf statements into su.c and slowly narrowing it down.
I had to go into console.c (inside libmisc) and then into getdef.c (in lib)

The call stack I suppose went
src/su.c - main
src/su.c - save_caller_context
libmisc/console.c - console
libmisc/console.c - is_listed
lib/getdef.c - getdef_str
lib/getdef.c - def_load

This uses a constant within lib/getdef.c called LOGINDEFS which is set to
"/etc/login.defs"

Is that a problem? Why doesn't it use the prefix set in ./configure script.
(problem for another day)

Now all I need to do is contact the owner of the hint and offer to update
it.

Ken Moffat,
Thanks for your suggestion. I would have used it if I hadn't managed to
figure it out.

Thanks

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20121010/292097bf/attachment.html>


More information about the lfs-support mailing list