make check fails if USER environment variable unset.elric_sig_20120118160826
commit7a3f8725ecde0efe270162aef6b6882f36ea3260
authorRoland C. Dowdeswell <elric@imrryr.org>
Wed, 18 Jan 2012 14:41:07 +0000 (18 14:41 +0000)
committerRoland C. Dowdeswell <elric@imrryr.org>
Wed, 18 Jan 2012 16:07:49 +0000 (18 16:07 +0000)
treebc0c83edb29844dbb31f60a8f9464a26d54123a0
parent19aa0344b319e80ecf53ce998447b65cff40d5bf
make check fails if USER environment variable unset.

getxxyyy.c uses the USER environment variable to determine a user
to test getpwnam_r().  If this variable is unset then the test will
seg fault.  We work around this issue by defaulting to ``root'' if
USER is not set.  This is not perfect as root may not exist on the
system but given that user does exist on most systems, this is the
best default that we can choose if we have no other options available.
lib/roken/getxxyyy.c