GNOME Bugzilla – Bug 435552
DoubleLoginWarning=false gives no error
Last modified: 2007-05-11 05:52:29 UTC
The default software handling of DoubleLoginWarning appears to be "false" now. With the entry commented out in defaults.conf and not present in custom.conf, I see the "false" behavior. However, in this environment, a double login attempt gives no error whatsoever. The password is accepted, and the original prompt for User reappears. I think that there should be, at the least, a string displayed under the input text box indicating the cause of the failure, as for invalid password. The DoubleLoginWarning=false should result in the user not being able to proceed, but should not be failing silently.
Note that DoubleLoginWarning is true in GDM SVN head, so if you are seeing the default to be false, then this must be changed by your distro. I suspect the problem may be caused by the behavior of DoubleLoginWarning interacting with AlwaysLoginCurrentSession. I think it might be a problem to have DoubleLoginWarning=false and to have AlwaysLoginCurrentSession=true. Do you see it work better if you set AlwaysLoginCurrentSession=false? Also, do you see it work better if you set DoubleLoginWarning=true?
defaults.conf has AlwaysLoginCurrentSession commented out (but in the comment it is set to true). custom.conf has it explicitly set to false, so I don't think this is involved. I'll attach both files for reference. I'll test what happens setting DoubleLoginWarning=true today. What's *supposed* to happen when you have DoubleLoginWarning=false and you try a double login ?
Created attachment 87800 [details] defaults.conf
Created attachment 87801 [details] custom.conf
Aha ! DoubleLoginWarning=true exhibits the same behavior (password accepted and user prompt redisplayed with no indication of error). So maybe it's DoubleLoginWarning in general that's broken ?
Could you explain how you are getting to the double login situation? Are you using VT's (e.g. by using the FastUserSwitchApplet) or are you using XDMCP? Have you tested with DOUBLE_LOGIN_WARNING set to false and ALWAYS_LOGIN_CURRENT_SESSION set to false? The code in GDM looks like this: if (!gdm_daemon_config_get_value_bool (GDM_KEY_DOUBLE_LOGIN_WARNING)) { g_free (migrate_to); return TRUE; } if (gdm_daemon_config_get_value_bool (GDM_KEY_ALWAYS_LOGIN_CURRENT_SESSION)) r = 1; else r = ask_migrate (migrate_to); So you can see the ask_migrate pop-up should display when DOUBLE_LOGIN_WARNING is set to FALSE and ALWAYS_LOGIN_CURRENT_SESSION is false. If you aren't seeing the pop-up in this situation, then there is something odd going on. You can verify your settings of these two keys by running gdmflexiserver --command="GET_CONFIG daemon/AlwaysLoginCurrentSession" gdmflexiserver --command="GET_CONFIG daemon/DoubleLoginWarning" If they aren't set properly, you can get GDM to update the key by running gdm-restart as root.
All my testing has been through XDMCP. I ran the GET_CONFIGs, and found both values set to true, DoubleLoginWarning because I had set it in custom.conf for the last test, and AlwaysLoginCurrentSession apparently by default, since it was commented out in defaults.conf and not present in custom.conf. I then tested setting both of them to false in custom.conf. When I tried a second login via XDMCP, I was logged into my desktop without any indication of error. However, the Logout button, while the confirmation seemed to be accepted, had no effect and would not return me to GDM. Also, from your code snippet, it looks to me like a FALSE for DoubleLoginWarning will free migrate_to and return silently no matter what the value of AlwaysLoginCurrentSession.
I've just tried DoubleLoginWarning=true and AlwaysLoginCurrentSession=false, set explicitly in custom.conf, and the result is the same as the last test, i.e. no error or popup and the login succeeds.
Frank. Thanks for all your testing so far, and for being patient. But I'm hoping you can do one more test. My understanding is you have tested these cases: - both set to false = does not login - both set to true = you can login - DoubleLoginWarning set to true and AlwaysLoginCurrentSession set to false = you can login But what happens if you have DoubleLoginWarning set to true and AlwaysLoginCurrentSession set to false? In this case, I'd expect the pop-up to appear. The pop-up should say either 1) "You are already logged in. You can login in anway, return to your previous session, or abort this login" 2) "You are already logged in. You can log in anyway or abort this login". I'm guessing it will display #2 and it will work properly if you pick either choice. If you can test and verify this would be helpful. I suspect the problem is this: 1) the QUERYLOGIN call will return if the session is migratable. 2) the ask_migrate function returns 1 for "Return to previous login" if the session is migratable. But 1 for the non-migratable state means "Abort login". So we probably need to change the code as follows: In the function gdm_slave_check_user_wants_to_log_in in slave.c, change this code: if (gdm_daemon_config_get_value_bool (GDM_KEY_ALWAYS_LOGIN_CURRENT_SESSION)) r = 1; else r = ask_migrate (migrate_to); to just r = ask_migrate (migrate_to) Then change the ask_migrate function to check the GDM_KEY_ALWAYS_LOGIN_CURRENT_SESSION key and just return 1 when migrate_to is not NULL and to return 0 when migrate_to is NULL. For example, at the beginning of the function add this code: if (gdm_daemon_config_get_value_bool (GDM_KEY_ALWAYS_LOGIN_CURRENT_SESSION)) { if (migrate_to != NULL) return 1; else return 0; } I think this would fix the problem. If you can make a code change, recompile, and test, I think you'll find this fixes the problem. Let me know and I'll make this change to GDM 2.18 and 2.19 (SVN head).
Created attachment 87930 [details] [review] patch fixing this problem This patch fixes the problem. This is now fixed in 2.18 and SVN head.
Brian, in light of comment #10, do you still need this tested, or is this a done deal ?
If you can test my patch, it would be nice to know if fixes things from your perspective as well. If you don't, then that is okay - I think I got it right. If you do test, let me know what you find.