summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2007-04-09 06:29:30 +0000
committerBrian Cameron <bcameron@src.gnome.org>2007-04-09 06:29:30 +0000
commit0f7cfedcc2b9dd9e116752ccfd1c7c453ef81c76 (patch)
tree0b64f6aa31ce6921b8a9fc479176cf05eb710ab7
parentbb1081cb416021b3015f0f6baba130c888051d2c (diff)
downloadgdm-0f7cfedcc2b9dd9e116752ccfd1c7c453ef81c76.tar.gz
Updated. Update to new release version. Fix typo in gdm.h.
2006-04-09 Brian Cameron <brian.cameron@sun.com> * Release 2.14.12: * NEWS: Updated. * configure.ac: Update to new release version. * daemon/gdm.h: Fix typo in gdm.h. 2007-04-09 Brian Cameron <brian.cameron@sun.com> * configure.ac, daemon/gdm.[ch], gui/gdmlogin.c, gui/gdmcomm.c, gui/gdmXnestchooser.c, gui/greeter/greeter.c, gui/gdmflexiserver.c: Deprecated GDM_KEY_PID_FILE and now use /var/run/gdm.pid. This fixes bug #162849. Backported from head, patch by William Jon McCann <mccann@jhu.edu>. svn path=/branches/gnome-2-14/; revision=4801
-rw-r--r--ChangeLog15
-rw-r--r--NEWS15
-rw-r--r--configure.ac17
-rw-r--r--daemon/gdm.c21
-rw-r--r--daemon/gdm.h5
-rw-r--r--gui/gdmXnestchooser.c2
-rw-r--r--gui/gdmcomm.c2
-rw-r--r--gui/gdmflexiserver.c51
-rw-r--r--gui/gdmlogin.c1
-rw-r--r--gui/greeter/greeter.c1
10 files changed, 96 insertions, 34 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c277b69..94238b39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2006-04-09 Brian Cameron <brian.cameron@sun.com>
+
+ * Release 2.14.12:
+ * NEWS: Updated.
+ * configure.ac: Update to new release version.
+ * daemon/gdm.h: Fix typo in gdm.h.
+
+2007-04-09 Brian Cameron <brian.cameron@sun.com>
+
+ * configure.ac, daemon/gdm.[ch], gui/gdmlogin.c, gui/gdmcomm.c,
+ gui/gdmXnestchooser.c, gui/greeter/greeter.c,
+ gui/gdmflexiserver.c: Deprecated GDM_KEY_PID_FILE and now
+ use /var/run/gdm.pid. This fixes bug #162849. Backported
+ from head, patch by William Jon McCann <mccann@jhu.edu>.
+
2007-04-02 Brian Cameron <brian.cameron@sun.com>
* gui/gdmdynamic.c: Fix comparison with string literal.
diff --git a/NEWS b/NEWS
index 70cf59a5..36d1a9a1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,20 @@
Ahh news...
+2.14.12 stuff:
+
+- The GDM configuration option daemon/PidFile is now deprecated and
+ GDM now always uses /var/run/gdm.pid. The location can be configured
+ at compile time with the configure --with-pid-file option. This
+ fixes bug #162849. (William Jon McCann)
+
+- Fix strcpy so source and destination do not overlap. Fixes bug
+ #424299. (Ray Strode)
+
+- Remove gnome glade references since GNOME does not use libglade anymore.
+ (Kristof Vansant)
+
+- Fix comparison with string literal in gdmdynamic. (Hans Petter Jansson)
+
2.14.11 stuff:
- Fix for a recently reported security issue that has ID
diff --git a/configure.ac b/configure.ac
index 4841be24..66229249 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ(2.52)
AC_INIT(daemon/gdm.h)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(gdm,2.14.11)
+AM_INIT_AUTOMAKE(gdm,2.14.12)
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
@@ -1064,6 +1064,21 @@ if test "x$USER_POST_PATH" != "x"; then
GDM_USER_PATH="$GDM_USER_PATH:$USER_POST_PATH"
fi
+dnl ---------------------------------------------------------------------------
+dnl - PID file
+dnl ---------------------------------------------------------------------------
+
+AC_ARG_WITH(pid-file, [ --with-pid-file=<file> pid file])
+
+if ! test -z "$with_pid_file"; then
+ GDM_PID_FILE=$with_pid_file
+else
+ GDM_PID_FILE=/var/run/gdm.pid
+fi
+
+AC_SUBST(GDM_PID_FILE)
+AC_DEFINE_UNQUOTED(GDM_PID_FILE, "$GDM_PID_FILE", [pid file])
+
AC_SUBST(HALT_COMMAND)
AC_DEFINE_UNQUOTED(HALT_COMMAND,"$HALT_COMMAND")
AC_SUBST(REBOOT_COMMAND)
diff --git a/daemon/gdm.c b/daemon/gdm.c
index 51ed879e..d0a956a8 100644
--- a/daemon/gdm.c
+++ b/daemon/gdm.c
@@ -186,7 +186,7 @@ gdm_daemonify (void)
pid = fork ();
if (pid > 0) {
- gchar *pidfile = gdm_get_value_string (GDM_KEY_PID_FILE);
+ gchar *pidfile = GDM_PID_FILE;
errno = 0;
if ((pf = gdm_safe_fopen_w (pidfile)) != NULL) {
@@ -386,7 +386,7 @@ gdm_final_cleanup (void)
closelog ();
- pidfile = gdm_get_value_string (GDM_KEY_PID_FILE);
+ pidfile = GDM_PID_FILE;
if (pidfile != NULL) {
VE_IGNORE_EINTR (g_unlink (pidfile));
}
@@ -1467,7 +1467,7 @@ main (int argc, char *argv[])
/* get the name of the root user */
gdm_root_user ();
- pidfile = gdm_get_value_string (GDM_KEY_PID_FILE);
+ pidfile = GDM_PID_FILE;
/* Check if another gdm process is already running */
if (g_access (pidfile, R_OK) == 0) {
@@ -1482,8 +1482,6 @@ main (int argc, char *argv[])
kill (pidv, 0) == 0 &&
linux_only_is_running (pidv)) {
/* make sure the pid file doesn't get wiped */
- gdm_set_value_string (GDM_KEY_PID_FILE, NULL);
- pidfile = NULL;
VE_IGNORE_EINTR (fclose (pf));
gdm_fail (_("GDM already running. Aborting!"));
}
@@ -3147,7 +3145,7 @@ gdm_handle_user_message (GdmConnection *conn, const gchar *msg, gpointer data)
done_prefetch = TRUE;
}
return;
- }
+ }
if (splitstr[0] != NULL) {
/*
@@ -3161,12 +3159,19 @@ gdm_handle_user_message (GdmConnection *conn, const gchar *msg, gpointer data)
gdm_connection_printf (conn, "OK %s\n", retval);
g_free (retval);
} else {
- if (gdm_is_valid_key ((gchar *)splitstr[0]))
+ /* Check deprecated keys */
+ if (strcmp (splitstr[0],
+ GDM_KEY_PID_FILE) == 0) {
+ gdm_connection_printf (conn,
+ "OK %s\n", GDM_PID_FILE);
+ return;
+ } else if (gdm_is_valid_key ((gchar *)splitstr[0])) {
gdm_connection_printf (conn, "OK \n");
- else
+ } else {
gdm_connection_printf (conn,
"ERROR 50 Unsupported key <%s>\n",
splitstr[0]);
+ }
}
g_strfreev (splitstr);
}
diff --git a/daemon/gdm.h b/daemon/gdm.h
index 48dfa0a9..8fc3c974 100644
--- a/daemon/gdm.h
+++ b/daemon/gdm.h
@@ -184,8 +184,7 @@ enum {
*
* + The gui/gdmsetup.c program should be updated to support the new option
* unless there's a good reason not to (like it is a configuration value
- * that only someone who really knows what they are doing should change
- * like GDM_KEY_PID_FILE).
+ * that only someone who really knows what they are doing should change).
*
* + Currently GDM treats any key in the "gui" and "greeter" categories,
* and security/PamStack as available for per-display configuration.
@@ -227,7 +226,7 @@ enum {
#define GDM_KEY_KILL_INIT_CLIENTS "daemon/KillInitClients=true"
#define GDM_KEY_LOG_DIR "daemon/LogDir=" LOGDIR
#define GDM_KEY_PATH "daemon/DefaultPath=" GDM_USER_PATH
-#define GDM_KEY_PID_FILE "daemon/PidFile=/var/run/gdm.pid"
+#define GDM_KEY_PID_FILE "daemon/PidFile=" GDM_PID_FILE
#define GDM_KEY_POSTSESSION "daemon/PostSessionScriptDir=" GDMCONFDIR "/PostSession/"
#define GDM_KEY_PRESESSION "daemon/PreSessionScriptDir=" GDMCONFDIR "/PreSession/"
#define GDM_KEY_POSTLOGIN "daemon/PostLoginScriptDir=" GDMCONFDIR "/PreSession/"
diff --git a/gui/gdmXnestchooser.c b/gui/gdmXnestchooser.c
index 2380daf4..e2cf49db 100644
--- a/gui/gdmXnestchooser.c
+++ b/gui/gdmXnestchooser.c
@@ -498,7 +498,7 @@ main (int argc, char *argv[])
xdmcp_enabled = gdm_config_get_bool (GDM_KEY_XDMCP);
honor_indirect = gdm_config_get_bool (GDM_KEY_INDIRECT);
- pidfile = gdm_config_get_string (GDM_KEY_PID_FILE);
+ pidfile = GDM_PID_FILE;
xnest = gdm_config_get_string (GDM_KEY_XNEST);
/* At this point we are done using the socket, so close it */
diff --git a/gui/gdmcomm.c b/gui/gdmcomm.c
index a5d5080e..0e8ec352 100644
--- a/gui/gdmcomm.c
+++ b/gui/gdmcomm.c
@@ -593,7 +593,7 @@ gdmcomm_check (gboolean show_dialog)
struct stat s;
int statret;
- pidfile = gdm_config_get_string (GDM_KEY_PID_FILE);
+ pidfile = GDM_PID_FILE;
pid = 0;
if (pidfile != NULL)
diff --git a/gui/gdmflexiserver.c b/gui/gdmflexiserver.c
index b507e90a..756a964c 100644
--- a/gui/gdmflexiserver.c
+++ b/gui/gdmflexiserver.c
@@ -729,8 +729,26 @@ main (int argc, char *argv[])
if (args != NULL && args[0] != NULL)
server = args[0];
- if ( ! gdmcomm_check (FALSE)) {
- return 1;
+ if (send_command != NULL) {
+ if ( ! gdmcomm_check (FALSE)) {
+ gdm_common_error ("Error: GDM (GNOME Display Manager) "
+ "is not running.");
+ gdm_common_error ("You might be using a different "
+ "display manager.");
+ return 1;
+ }
+ } else {
+ /*
+ * The --command argument does not display anything, so avoid
+ * running gtk_init until it finishes. Sometimes the
+ * --command argument is used when there is no display so it
+ * will fail and cause the program to exit, complaining about
+ * "no display".
+ */
+ gtk_init(&argc, &argv);
+ if ( ! gdmcomm_check (TRUE)) {
+ return 1;
+ }
}
/* Start reading config data in bulk */
@@ -796,25 +814,22 @@ main (int argc, char *argv[])
}
/*
- * The --command argument does not display anything, so avoid running
- * gtk_init until it finishes. Sometimes the --command argument is
- * used when there is no display so it will fail and cause the
- * program to exit, complaining about "no display".
+ * Now process what gdmflexiserver is more frequently used to
+ * do, start VT (Virtual Terminal) sesions - at least on
+ * systems where it is supported. On systems where it is not
+ * supporteed VT stands for "Very Tight" and will mess up your
+ * display if you use it. Tight! So do not use it.
*
- * Now process what gdmflexiserver is more used to do, start a
- * VT virtual terminal sesions - at least on systems where it
- * works. On systems where it doesn't work VT stands for
- * "Very Tight" and will mess up your display if you try to
- * use it. Tight! So don't use it. I'd accept a patch to
- * disable it, but its easy to avoid not using it as long
- * as your distro doesn't put the menu choice in the
- * application launch button on the panel (don't ship the
- * desktop file).
+ * I would accept a patch to disable it on such systems, but it
+ * is easy to avoid not using it as long as your distro does not
+ * put the menu choice in the application launch button on the
+ * panel (don't ship the desktop file).
*/
- gtk_init(&argc, &argv);
- /* always attempt to get cookie and authenticate. On remote
- servers */
+ /*
+ * Always attempt to get cookie and authenticate. On remote
+ * servers
+ */
auth_cookie = gdmcomm_get_auth_cookie ();
/* check for other displays/logged in users */
diff --git a/gui/gdmlogin.c b/gui/gdmlogin.c
index 89eb528b..4255b839 100644
--- a/gui/gdmlogin.c
+++ b/gui/gdmlogin.c
@@ -3013,7 +3013,6 @@ gdm_read_config (void)
/* Keys not to include in reread_config */
gdm_config_get_bool (GDM_KEY_LOCK_POSITION);
- gdm_config_get_string (GDM_KEY_PID_FILE);
gdm_config_get_int (GDM_KEY_POSITION_X);
gdm_config_get_int (GDM_KEY_POSITION_Y);
gdm_config_get_string (GDM_KEY_PRE_FETCH_PROGRAM);
diff --git a/gui/greeter/greeter.c b/gui/greeter/greeter.c
index 86fc245a..e9d00243 100644
--- a/gui/greeter/greeter.c
+++ b/gui/greeter/greeter.c
@@ -792,7 +792,6 @@ gdm_read_config (void)
/* Keys not to include in reread_config */
gdm_config_get_string (GDM_KEY_SESSION_DESKTOP_DIR);
- gdm_config_get_string (GDM_KEY_PID_FILE);
gdm_config_get_string (GDM_KEY_PRE_FETCH_PROGRAM);
gdmcomm_comm_bulk_stop ();