(I've also heard of crashes, but I'm not quite sure about this) When $HOME is not set, the application, whatever it may be, tries to find the profile in a /.$VENDOR/ directory, for example. Basically, the main problem is that GetUnixHomeDir (http://lxr.mozilla.org/seamonkey/source/xpcom/io/SpecialSystemDirectory.cpp#222) just tries to get the HOME environment variable without a fallback. If HOME is not set, it should use getpwuid(getuid())->pw_dir (or the NSPR equivalent if there is any). Speaking of this function, it's strange that VMS uses getenv while others use PR_GetEnv, probably something that should be corrected. I also found several places that use the HOME environment variable, such as http://lxr.mozilla.org/seamonkey/source/xpcom/io/nsAppFileLocationProvider.cpp#378 or http://lxr.mozilla.org/seamonkey/source/toolkit/xre/nsXREDirProvider.cpp#951, they probably should use the GetUnixHomeDir instead.
Created attachment 441799 [details] [diff] [review] Set $HOME with data from getpwuid if $HOME is not set. This makes sure that any code using $HOME will get a value.
Assignee: nobody → mh+mozilla
Attachment #441799 - Flags: review?(benjamin)
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
You need to log in before you can comment on or make changes to this bug.