summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2008-08-20 00:23:50 +0000
committerWilliam Jon McCann <mccann@src.gnome.org>2008-08-20 00:23:50 +0000
commitccb6ad0eafbfe91cc16e3435c70740a5013b922a (patch)
tree01312ee064afd15b512b004f7325fb9c9325b93b
parentae3993ad27a3067543259c3e6b81f36a38e2da1f (diff)
downloadgdm-ccb6ad0eafbfe91cc16e3435c70740a5013b922a.tar.gz
Allow the gdm greeter username to be configured at build time. Patch from
2008-08-19 William Jon McCann <jmccann@redhat.com> * configure.ac: * daemon/gdm-chooser-server.c (gdm_chooser_server_class_init): * daemon/gdm-display.c (gdm_display_real_create_authority): * daemon/gdm-factory-slave.c (run_greeter): * daemon/gdm-greeter-server.c (gdm_greeter_server_class_init): * daemon/gdm-simple-slave.c (on_session_accredited), (run_greeter): * daemon/gdm-welcome-session.c (gdm_welcome_session_class_init): * daemon/gdm-xdmcp-chooser-slave.c (run_chooser): * data/Makefile.am: * gui/simple-greeter/gdm-user-manager.c: Allow the gdm greeter username to be configured at build time. Patch from Patryk Zawadzki <patrys@pld-linux.org> Fixes #504565 svn path=/trunk/; revision=6395
-rw-r--r--ChangeLog16
-rw-r--r--configure.ac32
-rw-r--r--daemon/gdm-chooser-server.c4
-rw-r--r--daemon/gdm-display.c2
-rw-r--r--daemon/gdm-factory-slave.c2
-rw-r--r--daemon/gdm-greeter-server.c4
-rw-r--r--daemon/gdm-simple-slave.c4
-rw-r--r--daemon/gdm-welcome-session.c4
-rw-r--r--daemon/gdm-xdmcp-chooser-slave.c2
-rw-r--r--data/Makefile.am6
-rw-r--r--gui/simple-greeter/gdm-user-manager.c2
11 files changed, 64 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 92f6c12f..8d0308f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
2008-08-19 William Jon McCann <jmccann@redhat.com>
+ * configure.ac:
+ * daemon/gdm-chooser-server.c (gdm_chooser_server_class_init):
+ * daemon/gdm-display.c (gdm_display_real_create_authority):
+ * daemon/gdm-factory-slave.c (run_greeter):
+ * daemon/gdm-greeter-server.c (gdm_greeter_server_class_init):
+ * daemon/gdm-simple-slave.c (on_session_accredited), (run_greeter):
+ * daemon/gdm-welcome-session.c (gdm_welcome_session_class_init):
+ * daemon/gdm-xdmcp-chooser-slave.c (run_chooser):
+ * data/Makefile.am:
+ * gui/simple-greeter/gdm-user-manager.c:
+ Allow the gdm greeter username to be configured at build time.
+ Patch from Patryk Zawadzki <patrys@pld-linux.org>
+ Fixes #504565
+
+2008-08-19 William Jon McCann <jmccann@redhat.com>
+
* gui/user-switch-applet/applet.c (applet_size_allocate_cb),
(reset_icon), (fill_applet):
Make the applet icon scale with panel size
diff --git a/configure.ac b/configure.ac
index 6f85334b..ba4ea32a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -445,6 +445,34 @@ AC_TRY_CPP([#include <sys/mount.h>
fi
AC_MSG_RESULT($fstype)
+dnl GDM user
+withval=""
+AC_ARG_WITH(user,
+ AS_HELP_STRING([--with-user=<username>],
+ [specify gdm's user name]))
+
+if test x$withval != x; then
+ GDM_USERNAME="$withval"
+else
+ GDM_USERNAME=gdm
+fi
+AC_SUBST(GDM_USERNAME)
+AC_DEFINE_UNQUOTED([GDM_USERNAME], "$GDM_USERNAME", [User to use])
+
+dnl GDM group
+withval=""
+AC_ARG_WITH(group,
+ AS_HELP_STRING([--with-group=<username>],
+ [specify gdm's user name]))
+
+if test x$withval != x; then
+ GDM_GROUPNAME="$withval"
+else
+ GDM_GROUPNAME=gdm
+fi
+AC_SUBST(GDM_GROUPNAME)
+AC_DEFINE_UNQUOTED([GDM_GROUPNAME], "$GDM_GROUPNAME", [Group to use])
+
dnl ---------------------------------------------------------------------------
dnl - Check for PAM stuff
@@ -1415,6 +1443,7 @@ gui/simple-greeter/libnotificationarea/Makefile
gui/simple-chooser/Makefile
gui/user-switch-applet/Makefile
utils/Makefile
+data/gdm.conf
data/Makefile
data/faces/Makefile
data/pixmaps/Makefile
@@ -1452,6 +1481,9 @@ echo "
cflags: ${CFLAGS}
Maintainer mode: ${USE_MAINTAINER_MODE}
+ user: ${GDM_USERNAME}
+ group: ${GDM_GROUPNAME}
+
dbus-1 system.d dir: ${DBUS_SYS_DIR}
PAM prefix: ${PAM_PREFIX}
X server: ${X_SERVER}
diff --git a/daemon/gdm-chooser-server.c b/daemon/gdm-chooser-server.c
index 48beb2cf..2268838d 100644
--- a/daemon/gdm-chooser-server.c
+++ b/daemon/gdm-chooser-server.c
@@ -552,14 +552,14 @@ gdm_chooser_server_class_init (GdmChooserServerClass *klass)
g_param_spec_string ("user-name",
"user name",
"user name",
- "gdm",
+ GDM_USERNAME,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class,
PROP_GROUP_NAME,
g_param_spec_string ("group-name",
"group name",
"group name",
- "gdm",
+ GDM_GROUPNAME,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
signals [HOSTNAME_SELECTED] =
g_signal_new ("hostname-selected",
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index 0c5efc29..f93c5027 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -161,7 +161,7 @@ gdm_display_real_create_authority (GdmDisplay *display)
g_return_val_if_fail (display->priv->access_file == NULL, FALSE);
error = NULL;
- access_file = _create_access_file_for_user (display, "gdm", &error);
+ access_file = _create_access_file_for_user (display, GDM_USERNAME, &error);
if (access_file == NULL) {
g_critical ("could not create display access file: %s", error->message);
diff --git a/daemon/gdm-factory-slave.c b/daemon/gdm-factory-slave.c
index 33501984..d09c913b 100644
--- a/daemon/gdm-factory-slave.c
+++ b/daemon/gdm-factory-slave.c
@@ -489,7 +489,7 @@ run_greeter (GdmFactorySlave *slave)
/* FIXME: send a signal back to the master */
/* Run the init script. gdmslave suspends until script has terminated */
- gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/Init", "gdm");
+ gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/Init", GDM_USERNAME);
slave->priv->greeter_server = gdm_greeter_server_new (display_id);
g_signal_connect (slave->priv->greeter_server,
diff --git a/daemon/gdm-greeter-server.c b/daemon/gdm-greeter-server.c
index 45376223..2e01d33d 100644
--- a/daemon/gdm-greeter-server.c
+++ b/daemon/gdm-greeter-server.c
@@ -1113,14 +1113,14 @@ gdm_greeter_server_class_init (GdmGreeterServerClass *klass)
g_param_spec_string ("user-name",
"user name",
"user name",
- "gdm",
+ GDM_USERNAME,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class,
PROP_GROUP_NAME,
g_param_spec_string ("group-name",
"group name",
"group name",
- "gdm",
+ GDM_GROUPNAME,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
signals [BEGIN_VERIFICATION] =
g_signal_new ("begin-verification",
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index b010ddfb..3a9fd4b0 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -367,7 +367,7 @@ on_session_accredited (GdmSession *session,
queue_start_session (slave);
/* Run the PostLogin script. gdmslave suspends until script has terminated */
- gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/PostLogin", "gdm");
+ gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/PostLogin", GDM_USERNAME);
}
static void
@@ -855,7 +855,7 @@ run_greeter (GdmSimpleSlave *slave)
}
/* Run the init script. gdmslave suspends until script has terminated */
- gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/Init", "gdm");
+ gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/Init", GDM_USERNAME);
create_new_session (slave);
diff --git a/daemon/gdm-welcome-session.c b/daemon/gdm-welcome-session.c
index ca35f317..21b6407e 100644
--- a/daemon/gdm-welcome-session.c
+++ b/daemon/gdm-welcome-session.c
@@ -1122,14 +1122,14 @@ gdm_welcome_session_class_init (GdmWelcomeSessionClass *klass)
g_param_spec_string ("user-name",
"user name",
"user name",
- "gdm",
+ GDM_USERNAME,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class,
PROP_GROUP_NAME,
g_param_spec_string ("group-name",
"group name",
"group name",
- "gdm",
+ GDM_GROUPNAME,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class,
PROP_SERVER_ADDRESS,
diff --git a/daemon/gdm-xdmcp-chooser-slave.c b/daemon/gdm-xdmcp-chooser-slave.c
index d8b6bd1e..5898efd5 100644
--- a/daemon/gdm-xdmcp-chooser-slave.c
+++ b/daemon/gdm-xdmcp-chooser-slave.c
@@ -190,7 +190,7 @@ run_chooser (GdmXdmcpChooserSlave *slave)
}
/* Run the init script. gdmslave suspends until script has terminated */
- gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/Init", "gdm");
+ gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/Init", GDM_USERNAME);
slave->priv->chooser_server = gdm_chooser_server_new (display_id);
g_signal_connect (slave->priv->chooser_server,
diff --git a/data/Makefile.am b/data/Makefile.am
index 7b8697e9..8d25b34c 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -34,7 +34,8 @@ gdm.conf-custom: $(srcdir)/gdm.conf-custom.in
<$(srcdir)/gdm.conf-custom.in >gdm.conf-custom
dbusconfdir = $(DBUS_SYS_DIR)
-dbusconf_DATA = gdm.conf
+dbusconf_in_files = gdm.conf.in
+dbusconf_DATA = $(dbusconf_in_files:.conf.in=.conf)
@INTLTOOL_SCHEMAS_RULE@
@@ -72,7 +73,7 @@ gdm.schemas.in: $(srcdir)/gdm.schemas.in.in
EXTRA_DIST = \
$(schemas_in_files) \
$(schemas_DATA) \
- $(dbusconf_DATA) \
+ $(dbusconf_in_files) \
gdm.schemas.in.in \
gdm.conf-custom.in \
Xsession.in \
@@ -95,6 +96,7 @@ CLEANFILES = \
$(NULL)
DISTCLEANFILES = \
+ $(dbusconf_DATA) \
gdm.schemas \
$(NULL)
diff --git a/gui/simple-greeter/gdm-user-manager.c b/gui/simple-greeter/gdm-user-manager.c
index 88539b41..12e79185 100644
--- a/gui/simple-greeter/gdm-user-manager.c
+++ b/gui/simple-greeter/gdm-user-manager.c
@@ -89,7 +89,7 @@
"uucp", \
"operator", \
"nobody", \
- "gdm", \
+ GDM_USERNAME, \
"postgres", \
"pvm", \
"rpm", \