retitle 294425 mozilla creates /.mozilla/ if HOME is unset
clone 294425 -1
retitle -1 mozilla crashes if HOME is unset
found -1 2:1.7.12-1.1
# This wont't work afaik:
block 294425 by -1
thanks

I noticed today that I have not only /.mozilla/ but also
/.bash_history, /.lesshst, and /.viminfo.  I wonder if all of these
pacakges should use getpwuid(getuid())->pw_dir.  Humm, getpwuid(3)
NOTES section says that they should not, to allow for greater
flexibility.

I also filed #285334 which was a perceived problem in aptitude, which
was fixed this way, but now I wonder if that bug was solved with a bad
fix.

I propose the following:

For mozilla, which probably shouldn't be run as root, detect if
getenv("HOME")==NULL, and if so, use getpwuid, otherwise use
getenv("HOME").

In the case of aptitude, which will often be run as UID root, and
often by a normal user with sudo (without -H, because we're lazy),
test the UID, if it is 0, use getpwuid() to get /root, or whatever
else it might have been changed to, otherwise use $HOME.

So, the current status of this bug: mozilla crashes when HOME is unset
(you have to set XAUTHORITY=/home/foo/.Xauthority to test it, though).

#0  0xb76c46e3 in strlen () from /usr/lib/debug/libc.so.6
        malloc_trace_buffer = 0x0
        mallstream = (FILE *) 0x0
        lock = {__m_reserved = 0, __m_count = 0, __m_owner = 0x0, 
  __m_kind = 0, __m_lock = {__status = 0, __spinlock = 0}}
        tr_old_free_hook = (void (*)(void *, const void *)) 0
        tr_old_memalign_hook = (void *(*)(size_t, size_t, const void *)) 0
        mallenv = "MALLOC_TRACE"
        tr_old_realloc_hook = (void *(*)(void *, size_t, const void *)) 0
        tr_old_malloc_hook = (void *(*)(size_t, const void *)) 0
        mallwatch = (void *) 0x0


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to