[Gtkradiant] [Bug 785] ~/.radiant has wrong ownership and permissions
Sun, 14 Sep 2003 04:49:50 -0500
------- Additional Comments From email@example.com 2003-09-14 04:49 -------
In main.cpp, we use g_get_home_dir() from glib to find .radiant. It turns out that this bug was
resolved with the switch to gtk+2 (which brought in glib2). The problem is discussed at some
length at <http://bugzilla.gnome.org/show_bug.cgi?id=2311>.
The solution that glib2 adopted was to use the home directory of the current user id, rather than
the HOME environment variable as glib1 did. So if you're running radiant with sudo, glib2
considers home to be root's home, not the logged-in user's.
However, since we don't want to run as root anyway, it's still worthwhile in that case to setuid() to
the logged-in user. See attached patch.