GNOME Bugzilla – Bug 436803
Env var cleanups
Last modified: 2007-05-09 03:45:01 UTC
Hi, While going over the gdm diff, I found a change which doesn't seem to be Debian specific. It stops unsetting MAIL and sets PWD. (Patch will follow.) You're likely to be intersted in the PWD change, but the MAIL change might need some clarification. What I understand is that in the past MAIL caused problem to some broken shells as it might have been set if root called /etc/init.d/gdm restart from a console with MAIL set. I suppose someone needed to set MAIL in Debian, but couldn't because of the gdm unset()ing. If you think it's risky to remove the MAIL unset(), perhaps the list of env vars to unset could be made configurable? [ We also have a patch dropping gdm_clearenv_no_lang() which might have removed too many env vars, but I don't have any corresponding Debian bug reference for this either. ] Bye,
Created attachment 87774 [details] [review] Don't unset MAIL environment variable; set PWD
Created attachment 87775 [details] [review] (For documentation, our patch dropping gdm_clearenv_no_lang())
Could you explain why PWD needs to be set here? I'm comfortable considering removing unsetting MAIL, but will need to think about this a bit more. Second patch doesn't make sense to me. The function is called from slave.c, but the patch doesn't remove the function call. Is this right? I'd also like to know a bit more about what broke by calling gdm_clearenv_no_lang. I realize that you don't have the bug reference, but perhaps you could look a bit more?
(In reply to comment #3) > Could you explain why PWD needs to be set here? I checked the changelog harder, and it mentions: ... * Set $PWD to $HOME, which makes shells happier when $HOME is a symlink (closes: #179814) http://bugs.debian.org/179814 It seems this is useful when the $HOME is a symlink. > Second patch doesn't make sense to me. The function is called from slave.c, > but the patch doesn't remove the function call. Is this right? I'd also like > to know a bit more about what broke by calling gdm_clearenv_no_lang. I realize > that you don't have the bug reference, but perhaps you could look a bit more? I wondered too; it's really weird. It looks like a leftover, but unfortunately I can not find any reference to this change. The full changelog is at: http://packages.debian.org/changelogs/pool/main/g/gdm/current/changelog I tried getting older gdm versions from snapshot.debian.net back to 2.6.0.8-1, but it already had this weird change (and still no corresponding removal of any gdm_clearenv_no_lang() call!). I will try to ask the previous gdm maintainer if he has any idea of whether this is still useful; I think it's not.
First patch now in SVN head.