gdm r6791 - in trunk: . daemon



Author: halfline
Date: Fri Mar 20 02:23:04 2009
New Revision: 6791
URL: http://svn.gnome.org/viewvc/gdm?rev=6791&view=rev

Log:
2009-03-19  Ray Strode  <rstrode redhat com>

	* daemon/gdm-display-access-file.c
	(_get_auth_info_for_display):
	Use gethostname() instead of g_get_host_name(),
	in xauth database since the latter doesn't give
	up to date information when the hostname changes.


Modified:
   trunk/ChangeLog
   trunk/daemon/gdm-display-access-file.c

Modified: trunk/daemon/gdm-display-access-file.c
==============================================================================
--- trunk/daemon/gdm-display-access-file.c	(original)
+++ trunk/daemon/gdm-display-access-file.c	Fri Mar 20 02:23:04 2009
@@ -438,8 +438,13 @@
         gdm_display_is_local (display, &is_local, NULL);
 
         if (is_local) {
+                char localhost[HOST_NAME_MAX + 1] = "";
                 *family = FamilyLocal;
-                *address = g_strdup (g_get_host_name ());
+                if (gethostname (localhost, HOST_NAME_MAX) == 0) {
+                        *address = g_strdup (localhost);
+                } else {
+                        *address = g_strdup ("localhost");
+                }
         } else {
                 *family = FamilyWild;
                 gdm_display_get_remote_hostname (display, address, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]