Closed
Bug 368477
Opened 19 years ago
Closed 16 years ago
Unsuitable behaviour when $HOME is not set
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a5
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(1 file)
|
1.38 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
(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.
Comment 1•17 years ago
|
||
| Assignee | ||
Comment 2•16 years ago
|
||
This makes sure that any code using $HOME will get a value.
Assignee: nobody → mh+mozilla
Attachment #441799 -
Flags: review?(benjamin)
Updated•16 years ago
|
Attachment #441799 -
Flags: review?(benjamin) → review+
| Assignee | ||
Comment 3•16 years ago
|
||
Status: NEW → RESOLVED
Closed: 16 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.
Description
•