Commit ccb6ad0e authored by William Jon McCann's avatar William Jon McCann Committed by William Jon McCann

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
parent ae3993ad
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),
......
......@@ -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}
......
......@@ -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",
......
......@@ -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);
......
......@@ -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,
......
......@@ -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",
......
......@@ -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);
......
......@@ -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,
......
......@@ -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,
......
......@@ -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)
......
......@@ -89,7 +89,7 @@
"uucp", \
"operator", \
"nobody", \
"gdm", \
GDM_USERNAME, \
"postgres", \
"pvm", \
"rpm", \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment