[lfs-support] CoreUtils 8.21 - test-getlogin fails for su'ed user

Bruce Dubbs bruce.dubbs at gmail.com
Sat Mar 23 08:54:04 PDT 2013

Samir Seth wrote:
> Hi
> Following LFS 7.3 instructions. I am logged in with user "foo", and the su
> into lfs user for the LFS build instructions.
> While building CoreUtils 8.21 i see one test failure. On debugging, i find
> that the failure is that getlogin() is returning "foo", while
> getenv("LOGNAME") is returning "lfs". Hence test assertion is failing.
> Is this
> a) expected behaviour, and can I ignore the error?

No.  Yes.

> b) a bug which needs reporting or


> c) am I wrong in working with an su'ed user login

I assume you just decided to use a user, foo, instead of 'nobody'.  That 
shouldn't make any difference, but why do you deviate (from our 
perspective in a random way) from the book and then ask us why there is 
a problem?

   -- Bruce

More information about the lfs-support mailing list