Bug 10237

Summary: twm: uses only getenv(HOME), not getpwent()
Product: xorg Reporter: Brice Goglin <brice.goglin>
Component: App/twmAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED NOTABUG QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=129933
Whiteboard:
i915 platform: i915 features:

Description Brice Goglin 2007-03-09 13:22:32 UTC
Bur reported in the Debian BTS by Adam Heath 5 years ago, still applies.

If twm is called without $HOME set, it can't find the users home directory, so
can't look there for config files.

[23:06:56,385,Twm-Log] can't find user's HOME, looking for config file in current directory.

I've straced and ltraced twm, and it calls getenv("HOME"), but not getpwent.
Gimp, in this same situation, does properly find the user's home directory.

This particular user is not logged in.  Su was used to change to the user, and
start the process.
Comment 1 Uwe Kleine-König 2011-02-22 02:22:06 UTC
According to getpwnam(3) [1] using HOME is the right thing to do.  So I suggest to close this bug without source changes.

[1] http://www.kernel.org/doc/man-pages/online/pages/man3/getpwnam.3.html#NOTES
Comment 2 Alistair Leslie-Hughes 2011-04-07 03:14:11 UTC
Debian reference
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=129933
Comment 3 Jeremy Huddleston Sequoia 2011-09-25 00:24:47 UTC
Comment #1.  Not a bug.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.