Blob Blame History Raw
--- gdm-2.20.0/daemon/gdm-daemon-config.c	2007-09-19 16:40:33.000000000 -0600
+++ gdm-2.20.0/daemon/gdm-daemon-config.c	2007-09-19 16:17:30.000000000 -0600
@@ -2846,10 +2846,20 @@
 	gchar *cfgstr;
 
 	cfgstr = g_build_filename (home_dir, ".dmrc", NULL);
-
 	dmrc = gdm_common_config_load (cfgstr, NULL);
 	if (dmrc == NULL) {
-		return;
+                gint fd = -1;
+		gdm_debug ("file: %s does not exist - creating it", cfgstr);
+		VE_IGNORE_EINTR (fd = g_open (cfgstr, O_CREAT | O_TRUNC | O_RDWR, 0644));
+		if (fd < 0) return;
+		write (fd, "\n", 2);
+		close (fd);
+                dmrc = gdm_common_config_load (cfgstr, NULL);
+                if (dmrc == NULL) {
+			gdm_debug ("failed to open %s after creating it", cfgstr);
+			return;
+		} 
+
 	}
 
 	if (savesess) {