gdm r6651 - in branches/gnome-2-20: . daemon



Author: bcameron
Date: Tue Jan  6 00:30:11 2009
New Revision: 6651
URL: http://svn.gnome.org/viewvc/gdm?rev=6651&view=rev

Log:
2008-01-05 Brian Cameron <brian cameron sun com>

        * daemon/gdm.[hc], daemon/verify-pam.c, daemon/server.c:
          Update SDTLOGIN logic so that the "/var/dt" directory
          gets created if it is missing.
        * daemon/server.c, daemon/gdm-daemon-config.c: Use "#ifdef __sun"
          instead of "#ifdef sun".


Modified:
   branches/gnome-2-20/ChangeLog
   branches/gnome-2-20/daemon/gdm-daemon-config.c
   branches/gnome-2-20/daemon/gdm.c
   branches/gnome-2-20/daemon/gdm.h
   branches/gnome-2-20/daemon/server.c
   branches/gnome-2-20/daemon/verify-pam.c

Modified: branches/gnome-2-20/daemon/gdm-daemon-config.c
==============================================================================
--- branches/gnome-2-20/daemon/gdm-daemon-config.c	(original)
+++ branches/gnome-2-20/daemon/gdm-daemon-config.c	Tue Jan  6 00:30:11 2009
@@ -1051,7 +1051,7 @@
 }
 
 /* PRIO_MIN and PRIO_MAX are not defined on Solaris, but are -20 and 20 */
-#if sun
+#if __sun
 #ifndef PRIO_MIN
 #define PRIO_MIN -20
 #endif

Modified: branches/gnome-2-20/daemon/gdm.c
==============================================================================
--- branches/gnome-2-20/daemon/gdm.c	(original)
+++ branches/gnome-2-20/daemon/gdm.c	Tue Jan  6 00:30:11 2009
@@ -1707,8 +1707,18 @@
 		gdm_daemonify ();
 
 #ifdef __sun
-	g_unlink (SDTLOGIN_DIR);
-	g_mkdir (SDTLOGIN_DIR, 0700);
+	{
+		struct stat statbuf;
+		int r;
+
+		r = stat (GDM_DT_DIR, &statbuf);
+		if (r < 0) {
+			g_mkdir (GDM_DT_DIR, 0755);
+		}
+		
+		g_unlink (GDM_SDTLOGIN_DIR);
+		g_mkdir (GDM_SDTLOGIN_DIR, 0700);
+	}
 #endif
 
 	/* Signal handling */

Modified: branches/gnome-2-20/daemon/gdm.h
==============================================================================
--- branches/gnome-2-20/daemon/gdm.h	(original)
+++ branches/gnome-2-20/daemon/gdm.h	Tue Jan  6 00:30:11 2009
@@ -68,7 +68,8 @@
 #define GDM_CUSTOM_COMMAND_MAX 10 /* maximum number of supported custom commands */
 
 #ifdef __sun
-#define SDTLOGIN_DIR "/var/dt/sdtlogin"
+#define GDM_DT_DIR "/var/dt"
+#define GDM_SDTLOGIN_DIR "/var/dt/sdtlogin"
 #endif
 
 /* If id == NULL, then get the first X server */

Modified: branches/gnome-2-20/daemon/server.c
==============================================================================
--- branches/gnome-2-20/daemon/server.c	(original)
+++ branches/gnome-2-20/daemon/server.c	Tue Jan  6 00:30:11 2009
@@ -1320,12 +1320,12 @@
 		setgroups (1, groups);
 	}
 
-#if sun
+#if __sun
     {
         /* Remove old communication pipe, if present */
         char old_pipe[MAXPATHLEN];
 
-        sprintf (old_pipe, "%s/%d", SDTLOGIN_DIR, d->name);
+        sprintf (old_pipe, "%s/%d", GDM_SDTLOGIN_DIR, d->name);
         g_unlink (old_pipe);
     }
 #endif

Modified: branches/gnome-2-20/daemon/verify-pam.c
==============================================================================
--- branches/gnome-2-20/daemon/verify-pam.c	(original)
+++ branches/gnome-2-20/daemon/verify-pam.c	Tue Jan  6 00:30:11 2009
@@ -360,17 +360,17 @@
                 displayNumber = atoi (tmp);
 	}
 
-        sprintf (pipe, "%s/%d", SDTLOGIN_DIR, displayNumber);
+        sprintf (pipe, "%s/%d", GDM_SDTLOGIN_DIR, displayNumber);
 
-        if (g_stat (SDTLOGIN_DIR, &statbuf) == 0) {
+        if (g_stat (GDM_SDTLOGIN_DIR, &statbuf) == 0) {
 		if (! statbuf.st_mode & S_IFDIR) {
 			gdm_debug ("solaris_xserver_cred: %s is not a directory\n",
-				   SDTLOGIN_DIR);
+				   GDM_SDTLOGIN_DIR);
 			return;
 		}
 	}
 	else {
-		gdm_debug ("solaris_xserver_cred: %s does not exist\n", SDTLOGIN_DIR);
+		gdm_debug ("solaris_xserver_cred: %s does not exist\n", GDM_SDTLOGIN_DIR);
 		return;
 	}
 



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