SHA256
1
0
forked from pool/gdm

Accepting request 29925 from GNOME:Factory

Copy from GNOME:Factory/gdm based on submit request 29925 from user vuntz

OBS-URL: https://build.opensuse.org/request/show/29925
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdm?expand=0&rev=88
This commit is contained in:
OBS User autobuild 2010-01-18 14:27:14 +00:00 committed by Git OBS Bridge
commit e26a407297
13 changed files with 1170 additions and 1977 deletions

View File

@ -3,317 +3,19 @@
# Copyright (c) 2004-2006 SuSE
# Author: Stanislav Brabec <sbrabec@suse.cz>
type -p awk &> /dev/null || {
echo "${0##*/}: No awk in PATH ... skipping"
exit 0
}
type -p cmp &> /dev/null || {
echo "${0##*/}: No cmp in PATH ... skipping"
exit 0
}
# Read old values. We will need one for correct updating of
if test -f $r/etc/gdm/gdm_sysconfig.conf ; then
. $r/etc/gdm/gdm_sysconfig.conf
fi
export OLD_DISPLAYMANAGER_AUTOLOGIN="$DISPLAYMANAGER_AUTOLOGIN"
r=$ROOT
# Set default values. (This overwrites all variables from gdm_sysconfig.conf.)
DISPLAYMANAGER_REMOTE_ACCESS="no"
DISPLAYMANAGER_ROOT_LOGIN_REMOTE="no"
DISPLAYMANAGER_STARTS_XSERVER="yes"
DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN="no"
DISPLAYMANAGER_AUTOLOGIN=""
DISPLAYMANAGER_PASSWORD_LESS_LOGIN="no"
DISPLAYMANAGER_AD_INTEGRATION="no"
DISPLAYMANAGER_SHUTDOWN=""
test -f $r/etc/sysconfig/displaymanager || {
echo "${0##*/}: No $r/etc/sysconfig/displaymanager found."
exit 1
}
. $r/etc/sysconfig/displaymanager
test -f $r/etc/sysconfig/security || {
echo "${0##*/}: No $r/etc/sysconfig/security found."
exit 1
}
. $r/etc/sysconfig/security
test -f $r/lib/YaST/SuSEconfig.functions || {
echo "${0##*/}: ERROR - can not find $r"'/lib/YaST/SuSEconfig.functions!!'
echo "${0##*/}: This should not happen. Exit..."
exit 1
}
. $r/lib/YaST/SuSEconfig.functions
GDM_IS_RUNNING=false
if test -z "$r" ; then
if test "$DISPLAYMANAGER" = gdm ; then
if /etc/init.d/xdm status >/dev/null ; then
GDM_IS_RUNNING=false
fi
fi
fi
# Write new set of monitore variables.
echo -en "# custom.conf was last time updated with following sysconfig:\\nDISPLAYMANAGER_REMOTE_ACCESS=\"$DISPLAYMANAGER_REMOTE_ACCESS\"\\nDISPLAYMANAGER_ROOT_LOGIN_REMOTE=\"$DISPLAYMANAGER_ROOT_LOGIN_REMOTE\"\\nDISPLAYMANAGER_STARTS_XSERVER=\"$DISPLAYMANAGER_STARTS_XSERVER\"\\nDISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN=\"$DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN\"\\nDISPLAYMANAGER_AUTOLOGIN=\"$DISPLAYMANAGER_AUTOLOGIN\"\\nDISPLAYMANAGER_PASSWORD_LESS_LOGIN=\"$DISPLAYMANAGER_PASSWORD_LESS_LOGIN\"\\nDISPLAYMANAGER_AD_INTEGRATION=\"$DISPLAYMANAGER_AD_INTEGRATION\"\\nDISPLAYMANAGER_SHUTDOWN=\"$DISPLAYMANAGER_SHUTDOWN\"\\nPERMISSION_SECURITY=\"$PERMISSION_SECURITY\"\\n" >$r/etc/gdm/gdm_sysconfig.conf.new
# Are there any changes in monitored variables?
if cmp -s 2>/dev/null $r/etc/gdm/gdm_sysconfig.conf $r/etc/gdm/gdm_sysconfig.conf.new ; then
rm $r/etc/gdm/gdm_sysconfig.conf.new
exit
fi
function sysconfig_yesno_to_gdm {
eval local suseval=\$$1
case "$suseval" in
yes )
export $2=true
;;
* )
export $2=false
;;
esac
export comment_$2="displaymanager:$1"
}
function sysconfig_yesno_to_gdm_reversed {
eval local suseval=\$$1
case "$suseval" in
yes )
export $2=false
;;
* )
export $2=true
;;
esac
export comment_$2="displaymanager:~$1"
}
sysconfig_yesno_to_gdm DISPLAYMANAGER_REMOTE_ACCESS xdmcp_Enable
sysconfig_yesno_to_gdm DISPLAYMANAGER_ROOT_LOGIN_REMOTE security_AllowRemoteRoot
export comment_servers_0="displaymanager:DISPLAYMANAGER_STARTS_XSERVER"
case "$DISPLAYMANAGER_STARTS_XSERVER" in
"yes" )
export servers_0=@SKIP@
;;
* )
export servers_0=inactive
;;
esac
sysconfig_yesno_to_gdm_reversed DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN security_DisallowTCP
sysconfig_yesno_to_gdm DISPLAYMANAGER_AD_INTEGRATION greeter_ShowDomain
export comment_daemon_AutomaticLoginEnable="displaymanager:DISPLAYMANAGER_AUTOLOGIN"
export comment_daemon_AutomaticLogin="displaymanager:DISPLAYMANAGER_AUTOLOGIN"
case "$DISPLAYMANAGER_AUTOLOGIN" in
"" )
export daemon_AutomaticLoginEnable=false
export daemon_AutomaticLogin=@SKIP@
;;
* )
export daemon_AutomaticLoginEnable=true
export daemon_AutomaticLogin="$DISPLAYMANAGER_AUTOLOGIN"
;;
esac
export comment_greeter_AllowShutdown="displaymanager:DISPLAYMANAGER_SHUTDOWN"
export comment_greeter_SecureShutdown="displaymanager:DISPLAYMANAGER_SHUTDOWN"
case "$DISPLAYMANAGER_SHUTDOWN" in
root )
export greeter_AllowShutdown=true
export greeter_SecureShutdown=true
;;
# Remote users can never shutdown in GDM.
none )
export greeter_AllowShutdown=false
export greeter_SecureShutdown=true
;;
all )
export greeter_AllowShutdown=true
export greeter_SecureShutdown=false
;;
auto | * )
export comment_greeter_AllowShutdown="displaymanager:DISPLAYMANAGER_SHUTDOWN, security:PERMISSION_SECURITY"
export comment_greeter_SecureShutdown="displaymanager:DISPLAYMANAGER_SHUTDOWN, security:PERMISSION_SECURITY"
export comment_security_AllowRemoteRoot="displaymanager:DISPLAYMANAGER_ROOT_LOGIN_REMOTE,DISPLAYMANAGER_SHUTDOWN, security:PERMISSION_SECURITY"
case "$PERMISSION_SECURITY" in
paranoid )
export greeter_AllowShutdown=true
export greeter_SecureShutdown=true
export security_AllowRemoteRoot=false
;;
"easy local" )
export greeter_AllowShutdown=true
export greeter_SecureShutdown=false
;;
* )
export greeter_AllowShutdown=true
export greeter_SecureShutdown=true
;;
esac
;;
esac
unset unset ${!last_of_*} ${!custom_conf_*}
# Parse configuration file and record all items to environment values.
eval "$(
awk <$r/etc/gdm/custom.conf '
BEGIN {
section="BEGIN";
section_last_line=0;
after_empty_line=0;
}
# Do not set last_of_ initial comments of a new section.
/^#/ {
if (after_empty_line == 0)
section_last_line=NR;
else
next;
}
/^\[.*\]/ {
print "export last_of_"section"="section_last_line;
section=$0;
gsub ("[][]", "", section);
section_last_line=NR;
after_empty_line=0;
next;
}
/^[a-zA-Z0-9_]*=/ {
item=$0;
gsub ("=.*", "", item);
value=$0;
gsub ("^[a-zA-Z0-9_]*=", "", value);
gsub ("'\''", "'\''\\'\'''\''", value);
section_last_line=NR;
after_empty_line=0;
print "export custom_conf_"section"_"item"_seen=true";
# print "export custom_conf_"section"_"item"='\''"value"'\''";
next;
}
# Do not set last_of_ for empty lines - we want to add missing stuff before the final empty line.
/^$/ {
after_empty_line=1;
next;
}
/.*/ {
section_last_line=NR;
after_empty_line=0;
}
END {
print "export last_of_"section"="section_last_line;
}
'
)"
# And now set what is required.
awk <$r/etc/gdm/custom.conf >$r/etc/gdm/custom.conf.new '
# Prepare array from variable.
function gdm_prepare_var(var) {
gdm_conf_var[var]=ENVIRON[var];
}
# Update configuration from gdm_conf_var array.
function update_item(section, item) {
if (gdm_conf_var[section"_"item] != "@SKIP@") {
print "# SuSEconfig: "ENVIRON["comment_"section"_"item];
print item"="gdm_conf_var[section"_"item];
if (ENVIRON["GDM_IS_RUNNING"] == "true")
# FIXME: If gdm is running and no session is active, command is executed too early.
system("$r/usr/bin/gdmflexiserver --command=\"UPDATE_CONFIG "section"/"item"\"")
return "DONE";
} else
return "KEEP_ORIG";
}
function process_unseen() {
# Print all items not seen in the section.
if (ENVIRON["last_of_"section] == NR)
for (item in gdm_conf_var) {
item_section = item;
gsub ("_.*", "", item_section);
gsub ("[^_]*_", "", item);
if (item_section == section && ENVIRON["custom_conf_"section"_"item"_seen"] != "true")
update_item(section, item);
}
}
BEGIN {
section="BEGIN";
gdm_prepare_var("daemon_AutomaticLoginEnable");
gdm_prepare_var("daemon_AutomaticLogin");
gdm_prepare_var("security_AllowRemoteRoot");
gdm_prepare_var("security_DisallowTCP");
gdm_prepare_var("xdmcp_Enable");
gdm_prepare_var("greeter_AllowShutdown");
gdm_prepare_var("greeter_SecureShutdown");
gdm_prepare_var("greeter_ShowDomain");
gdm_prepare_var("servers_0");
}
# Remove invalid entry created by SuSEconfig.gdm in SuSE Linux 10.2.
/^enable=/ {
if (section == "xdmcp") {
# Remove old gdm_sysconfig.conf to force update of custom.conf.
system("rm -f $r/etc/gdm/gdm_sysconfig.conf");
process_unseen();
next;
}
}
/^# SuSEconfig:/ {
process_unseen();
next;
}
/^\[.*\]/ {
section=$0;
gsub ("[][]", "", section);
print;
process_unseen();
next;
}
/^[a-zA-Z0-9_]*=/ {
item=$0;
gsub ("=.*", "", item);
value=$0;
gsub ("^[a-zA-Z0-9_]*=", "", value);
# Update value of item.
if (section"_"item in gdm_conf_var) {
if (update_item(section, item) == "KEEP_ORIG")
# This is actually used only for daemon_AutomaticLogin and servers_0:
if (item == "servers_0") {
if (value != "inactive")
print;
} else {
if (value != ENVIRON["OLD_DISPLAYMANAGER_AUTOLOGIN"])
print;
}
} else
print;
process_unseen();
next;
}
/.*/ {
print;
process_unseen();
next;
}
'
# Password-less login is implemented by PAM. Do the required change.
if [ "$DISPLAYMANAGER_PASSWORD_LESS_LOGIN" = "yes" ] ; then
sed 's/^\(auth[[:space:]][[:space:]]*\)include[[:space:]]\([[:space:]]*\)common-auth/\1required\2pam_permit.so/' <$r/etc/pam.d/gdm >$r/etc/pam.d/gdm.new
@ -325,6 +27,3 @@ if cmp -s $r/etc/pam.d/gdm $r/etc/pam.d/gdm.new ; then
else
mv $r/etc/pam.d/gdm.new $r/etc/pam.d/gdm
fi
mv $r/etc/gdm/custom.conf.new $r/etc/gdm/custom.conf
mv $r/etc/gdm/gdm_sysconfig.conf.new $r/etc/gdm/gdm_sysconfig.conf

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cb0b2a7d8c832afb275a3a4c95b91097f18e9e2c0acc6bdbaa63ec466507c320
size 2360981

3
gdm-2.29.5.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7be227816e2a66fa6ee7f13cdbf7a5ad411632f56f5808c71b897798c4e990c3
size 2361557

View File

@ -0,0 +1,14 @@
diff --git a/data/locale.alias b/data/locale.alias
new file mode 100644
index 0000000..7cabea6
--- a/dev/null
+++ b/data/locale.alias
@@ -0,0 +1,7 @@
+# You could insert none UTF-8 locales likes C, ja_JP.eucJP
+# The format is language label, space and locale name but
+# the language label is no longer used.
+#
+# This file will be removed in the future once gdm setup tool is generated.
+#
+#Unspecified C,POSIX

View File

@ -1,17 +1,17 @@
Index: gdm-2.27.90/daemon/gdm-session-direct.c
Index: gdm-2.29.5/daemon/gdm-session-direct.c
===================================================================
--- gdm-2.27.90.orig/daemon/gdm-session-direct.c
+++ gdm-2.27.90/daemon/gdm-session-direct.c
@@ -47,6 +47,8 @@
#include <libhal.h>
--- gdm-2.29.5.orig/daemon/gdm-session-direct.c
+++ gdm-2.29.5/daemon/gdm-session-direct.c
@@ -48,6 +48,8 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
+#include "gdm-sysconfig.h"
+
#include "gdm-session-direct.h"
#include "gdm-session.h"
#include "gdm-session-private.h"
@@ -670,6 +672,15 @@ get_fallback_session_name (void)
@@ -647,6 +649,15 @@ get_fallback_session_name (void)
int i;
char *name;

View File

@ -1,8 +1,8 @@
diff --git a/gui/simple-greeter/Makefile.am b/gui/simple-greeter/Makefile.am
index bba7a4a..d652961 100644
--- a/gui/simple-greeter/Makefile.am
+++ b/gui/simple-greeter/Makefile.am
@@ -136,6 +136,14 @@ test_greeter_panel_SOURCES = \
Index: gdm-2.29.5/gui/simple-greeter/Makefile.am
===================================================================
--- gdm-2.29.5.orig/gui/simple-greeter/Makefile.am
+++ gdm-2.29.5/gui/simple-greeter/Makefile.am
@@ -134,6 +134,14 @@ test_greeter_panel_SOURCES = \
gdm-sessions.c \
gdm-session-option-widget.h \
gdm-session-option-widget.c \
@ -17,7 +17,7 @@ index bba7a4a..d652961 100644
$(NULL)
test_greeter_panel_LDADD = \
@@ -313,12 +321,20 @@ gdm_simple_greeter_SOURCES = \
@@ -312,12 +320,20 @@ gdm_simple_greeter_SOURCES = \
gdm-language-chooser-dialog.c \
gdm-language-option-widget.h \
gdm-language-option-widget.c \
@ -38,12 +38,12 @@ index bba7a4a..d652961 100644
$(NULL)
gdm_simple_greeter_LDADD = \
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
index f0298c6..4894eee 100644
--- a/gui/simple-greeter/gdm-chooser-widget.c
+++ b/gui/simple-greeter/gdm-chooser-widget.c
@@ -2105,6 +2105,20 @@ gdm_chooser_widget_remove_item (GdmChooserWidget *widget,
move_cursor_to_top (widget);
Index: gdm-2.29.5/gui/simple-greeter/gdm-chooser-widget.c
===================================================================
--- gdm-2.29.5.orig/gui/simple-greeter/gdm-chooser-widget.c
+++ gdm-2.29.5/gui/simple-greeter/gdm-chooser-widget.c
@@ -2121,6 +2121,21 @@ gdm_chooser_widget_remove_item (GdmChoos
update_chooser_visibility (widget);
}
+void
@ -58,16 +58,17 @@ index f0298c6..4894eee 100644
+
+ update_separator_visibility (widget);
+ move_cursor_to_top (widget);
+ update_chooser_visibility (widget);
+}
+
gboolean
gdm_chooser_widget_lookup_item (GdmChooserWidget *widget,
const char *id,
diff --git a/gui/simple-greeter/gdm-chooser-widget.h b/gui/simple-greeter/gdm-chooser-widget.h
index b73d1bb..b70016c 100644
--- a/gui/simple-greeter/gdm-chooser-widget.h
+++ b/gui/simple-greeter/gdm-chooser-widget.h
@@ -96,6 +96,8 @@ void gdm_chooser_widget_update_item (GdmChooserWidget *
Index: gdm-2.29.5/gui/simple-greeter/gdm-chooser-widget.h
===================================================================
--- gdm-2.29.5.orig/gui/simple-greeter/gdm-chooser-widget.h
+++ gdm-2.29.5/gui/simple-greeter/gdm-chooser-widget.h
@@ -96,6 +96,8 @@ void gdm_chooser_widget_update_i
void gdm_chooser_widget_remove_item (GdmChooserWidget *widget,
const char *id);
@ -76,11 +77,10 @@ index b73d1bb..b70016c 100644
gboolean gdm_chooser_widget_lookup_item (GdmChooserWidget *widget,
const char *id,
GdkPixbuf **image,
diff --git a/gui/simple-greeter/gdm-domain-chooser-dialog.c b/gui/simple-greeter/gdm-domain-chooser-dialog.c
new file mode 100644
index 0000000..f577b65
Index: gdm-2.29.5/gui/simple-greeter/gdm-domain-chooser-dialog.c
===================================================================
--- /dev/null
+++ b/gui/simple-greeter/gdm-domain-chooser-dialog.c
+++ gdm-2.29.5/gui/simple-greeter/gdm-domain-chooser-dialog.c
@@ -0,0 +1,207 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -289,11 +289,10 @@ index 0000000..f577b65
+
+ return GTK_WIDGET (object);
+}
diff --git a/gui/simple-greeter/gdm-domain-chooser-dialog.h b/gui/simple-greeter/gdm-domain-chooser-dialog.h
new file mode 100644
index 0000000..f11f183
Index: gdm-2.29.5/gui/simple-greeter/gdm-domain-chooser-dialog.h
===================================================================
--- /dev/null
+++ b/gui/simple-greeter/gdm-domain-chooser-dialog.h
+++ gdm-2.29.5/gui/simple-greeter/gdm-domain-chooser-dialog.h
@@ -0,0 +1,60 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -355,11 +354,10 @@ index 0000000..f11f183
+G_END_DECLS
+
+#endif /* __GDM_DOMAIN_CHOOSER_DIALOG_H */
diff --git a/gui/simple-greeter/gdm-domain-chooser-widget.c b/gui/simple-greeter/gdm-domain-chooser-widget.c
new file mode 100644
index 0000000..1d8b113
Index: gdm-2.29.5/gui/simple-greeter/gdm-domain-chooser-widget.c
===================================================================
--- /dev/null
+++ b/gui/simple-greeter/gdm-domain-chooser-widget.c
+++ gdm-2.29.5/gui/simple-greeter/gdm-domain-chooser-widget.c
@@ -0,0 +1,237 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -598,11 +596,10 @@ index 0000000..1d8b113
+
+ return GTK_WIDGET (object);
+}
diff --git a/gui/simple-greeter/gdm-domain-chooser-widget.h b/gui/simple-greeter/gdm-domain-chooser-widget.h
new file mode 100644
index 0000000..4ba9d18
Index: gdm-2.29.5/gui/simple-greeter/gdm-domain-chooser-widget.h
===================================================================
--- /dev/null
+++ b/gui/simple-greeter/gdm-domain-chooser-widget.h
+++ gdm-2.29.5/gui/simple-greeter/gdm-domain-chooser-widget.h
@@ -0,0 +1,59 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -663,11 +660,10 @@ index 0000000..4ba9d18
+G_END_DECLS
+
+#endif /* __GDM_DOMAIN_CHOOSER_WIDGET_H */
diff --git a/gui/simple-greeter/gdm-domain-option-widget.c b/gui/simple-greeter/gdm-domain-option-widget.c
new file mode 100644
index 0000000..31e76e2
Index: gdm-2.29.5/gui/simple-greeter/gdm-domain-option-widget.c
===================================================================
--- /dev/null
+++ b/gui/simple-greeter/gdm-domain-option-widget.c
+++ gdm-2.29.5/gui/simple-greeter/gdm-domain-option-widget.c
@@ -0,0 +1,379 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -1048,11 +1044,10 @@ index 0000000..31e76e2
+
+ gdm_option_widget_set_active_item (GDM_OPTION_WIDGET (widget), domain_name);
+}
diff --git a/gui/simple-greeter/gdm-domain-option-widget.h b/gui/simple-greeter/gdm-domain-option-widget.h
new file mode 100644
index 0000000..4913ede
Index: gdm-2.29.5/gui/simple-greeter/gdm-domain-option-widget.h
===================================================================
--- /dev/null
+++ b/gui/simple-greeter/gdm-domain-option-widget.h
+++ gdm-2.29.5/gui/simple-greeter/gdm-domain-option-widget.h
@@ -0,0 +1,59 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -1113,11 +1108,10 @@ index 0000000..4913ede
+ const char *domain_name);
+
+#endif /* __GDM_DOMAIN_OPTION_WIDGET_H */
diff --git a/gui/simple-greeter/gdm-domain-provider.c b/gui/simple-greeter/gdm-domain-provider.c
new file mode 100644
index 0000000..2924291
Index: gdm-2.29.5/gui/simple-greeter/gdm-domain-provider.c
===================================================================
--- /dev/null
+++ b/gui/simple-greeter/gdm-domain-provider.c
+++ gdm-2.29.5/gui/simple-greeter/gdm-domain-provider.c
@@ -0,0 +1,536 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -1655,11 +1649,10 @@ index 0000000..2924291
+
+ return priv->domains;
+}
diff --git a/gui/simple-greeter/gdm-domain-provider.h b/gui/simple-greeter/gdm-domain-provider.h
new file mode 100644
index 0000000..6a318ff
Index: gdm-2.29.5/gui/simple-greeter/gdm-domain-provider.h
===================================================================
--- /dev/null
+++ b/gui/simple-greeter/gdm-domain-provider.h
+++ gdm-2.29.5/gui/simple-greeter/gdm-domain-provider.h
@@ -0,0 +1,61 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -1722,35 +1715,40 @@ index 0000000..6a318ff
+G_END_DECLS
+
+#endif /* __GDM_DOMAIN_PROVIDER_H */
diff --git a/gui/simple-greeter/gdm-greeter-panel.c b/gui/simple-greeter/gdm-greeter-panel.c
index 50478c5..825f0c5 100644
--- a/gui/simple-greeter/gdm-greeter-panel.c
+++ b/gui/simple-greeter/gdm-greeter-panel.c
@@ -40,6 +40,7 @@
Index: gdm-2.29.5/gui/simple-greeter/gdm-greeter-panel.c
===================================================================
--- gdm-2.29.5.orig/gui/simple-greeter/gdm-greeter-panel.c
+++ gdm-2.29.5/gui/simple-greeter/gdm-greeter-panel.c
@@ -52,7 +52,10 @@
#include "gdm-layout-option-widget.h"
#include "gdm-session-option-widget.h"
#include "gdm-timer.h"
+#include "gdm-domain-option-widget.h"
#include "gdm-profile.h"
+#include "gdm-settings-client.h"
+#include "gdm-settings-keys.h"
#include "na-tray.h"
@@ -58,6 +59,7 @@ struct GdmGreeterPanelPrivate
@@ -83,6 +86,9 @@ struct GdmGreeterPanelPrivate
GtkWidget *language_option_widget;
GtkWidget *layout_option_widget;
GtkWidget *session_option_widget;
+ GtkWidget *domain_option_widget;
+
+ gboolean show_domain;
GdmTimer *animation_timer;
double progress;
@@ -72,6 +74,7 @@ enum {
@@ -104,6 +110,7 @@ enum {
LANGUAGE_SELECTED,
LAYOUT_SELECTED,
SESSION_SELECTED,
+ DOMAIN_SELECTED,
DIALOG_HIDDEN,
NUMBER_OF_SIGNALS
};
@@ -451,6 +454,17 @@ gdm_greeter_panel_class_init (GdmGreeterPanelClass *klass)
@@ -497,6 +504,17 @@ gdm_greeter_panel_class_init (GdmGreeter
G_TYPE_NONE,
1, G_TYPE_STRING);
@ -1765,10 +1763,10 @@ index 50478c5..825f0c5 100644
+ G_TYPE_NONE,
+ 1, G_TYPE_STRING);
+
g_object_class_install_property (object_class,
PROP_MONITOR,
g_param_spec_int ("monitor",
@@ -521,6 +535,24 @@ on_session_activated (GdmSessionOptionWidget *widget,
signals[DIALOG_HIDDEN] =
g_signal_new ("dialog-hidden",
G_TYPE_FROM_CLASS (object_class),
@@ -832,6 +850,32 @@ on_shutdown_menu_deactivate (GdmGreeterP
}
static void
@ -1789,11 +1787,31 @@ index 50478c5..825f0c5 100644
+ g_free (domain);
+}
+
+static void
+on_domain_dialog_hidden (GdmLanguageOptionWidget *widget,
+ GdmGreeterPanel *panel)
+{
+
+ g_signal_emit (panel, signals[DIALOG_HIDDEN], 0);
+}
+
+static void
gdm_greeter_panel_init (GdmGreeterPanel *panel)
{
NaTray *tray;
@@ -581,6 +613,12 @@ gdm_greeter_panel_init (GdmGreeterPanel *panel)
@@ -849,6 +893,11 @@ gdm_greeter_panel_init (GdmGreeterPanel
panel->priv->geometry.width = -1;
panel->priv->geometry.height = -1;
+ if (!gdm_settings_client_get_boolean (GDM_KEY_SHOW_DOMAIN,
+ &panel->priv->show_domain)) {
+ panel->priv->show_domain = FALSE;
+ }
+
gtk_window_set_title (GTK_WINDOW (panel), _("Panel"));
gtk_window_set_decorated (GTK_WINDOW (panel), FALSE);
@@ -901,6 +950,15 @@ gdm_greeter_panel_init (GdmGreeterPanel
G_CALLBACK (on_session_activated), panel);
gtk_box_pack_start (GTK_BOX (panel->priv->option_hbox), panel->priv->session_option_widget, FALSE, FALSE, 6);
@ -1801,24 +1819,35 @@ index 50478c5..825f0c5 100644
+ g_signal_connect (G_OBJECT (panel->priv->domain_option_widget),
+ "domain-activated",
+ G_CALLBACK (on_domain_activated), panel);
+ g_signal_connect (G_OBJECT (panel->priv->domain_option_widget),
+ "dialog-hidden",
+ G_CALLBACK (on_domain_dialog_hidden), panel);
+ gtk_box_pack_start (GTK_BOX (panel->priv->option_hbox), panel->priv->domain_option_widget, FALSE, FALSE, 6);
+
spacer = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (panel->priv->option_hbox), spacer, TRUE, TRUE, 6);
gtk_widget_show (spacer);
@@ -643,6 +681,7 @@ gdm_greeter_panel_show_user_options (GdmGreeterPanel *panel)
@@ -1025,6 +1083,11 @@ gdm_greeter_panel_show_user_options (Gdm
gtk_widget_show (panel->priv->session_option_widget);
gtk_widget_show (panel->priv->language_option_widget);
gtk_widget_show (panel->priv->layout_option_widget);
+ gtk_widget_show (panel->priv->domain_option_widget);
+ if (panel->priv->show_domain) {
+ gtk_widget_show (panel->priv->domain_option_widget);
+ } else {
+ gtk_widget_hide (panel->priv->domain_option_widget);
+ }
}
void
@@ -651,18 +690,26 @@ gdm_greeter_panel_hide_user_options (GdmGreeterPanel *panel)
@@ -1033,18 +1096,30 @@ gdm_greeter_panel_hide_user_options (Gdm
gtk_widget_hide (panel->priv->session_option_widget);
gtk_widget_hide (panel->priv->language_option_widget);
gtk_widget_hide (panel->priv->layout_option_widget);
+ gtk_widget_show (panel->priv->domain_option_widget);
+ if (panel->priv->show_domain) {
+ gtk_widget_show (panel->priv->domain_option_widget);
+ } else {
+ gtk_widget_hide (panel->priv->domain_option_widget);
+ }
g_debug ("GdmGreeterPanel: activating default layout");
gdm_layout_activate (NULL);
@ -1841,7 +1870,7 @@ index 50478c5..825f0c5 100644
}
void
@@ -730,3 +777,20 @@ gdm_greeter_panel_set_default_session_name (GdmGreeterPanel *panel,
@@ -1126,3 +1201,20 @@ gdm_greeter_panel_set_default_session_na
gdm_option_widget_set_default_item (GDM_OPTION_WIDGET (panel->priv->session_option_widget),
session_name);
}
@ -1862,21 +1891,21 @@ index 50478c5..825f0c5 100644
+ gdm_option_widget_set_default_item (GDM_OPTION_WIDGET (panel->priv->domain_option_widget),
+ domain_name);
+}
diff --git a/gui/simple-greeter/gdm-greeter-panel.h b/gui/simple-greeter/gdm-greeter-panel.h
index 07cca3f..6079569 100644
--- a/gui/simple-greeter/gdm-greeter-panel.h
+++ b/gui/simple-greeter/gdm-greeter-panel.h
@@ -53,6 +53,9 @@ typedef struct
Index: gdm-2.29.5/gui/simple-greeter/gdm-greeter-panel.h
===================================================================
--- gdm-2.29.5.orig/gui/simple-greeter/gdm-greeter-panel.h
+++ gdm-2.29.5/gui/simple-greeter/gdm-greeter-panel.h
@@ -54,6 +54,9 @@ typedef struct
void (* session_selected) (GdmGreeterPanel *panel,
const char *text);
+
+ void (* domain_selected) (GdmGreeterPanel *panel,
+ const char *text);
+
void (* dialog_hidden) (GdmGreeterPanel *panel);
} GdmGreeterPanelClass;
GType gdm_greeter_panel_get_type (void);
@@ -64,12 +67,16 @@ void gdm_greeter_panel_show_user_options (GdmGree
@@ -67,12 +70,16 @@ void gdm_greeter_panel
void gdm_greeter_panel_hide_user_options (GdmGreeterPanel *panel);
void gdm_greeter_panel_reset (GdmGreeterPanel *panel);
@ -1893,20 +1922,20 @@ index 07cca3f..6079569 100644
G_END_DECLS
#endif /* __GDM_GREETER_PANEL_H */
diff --git a/gui/simple-greeter/gdm-greeter-session.c b/gui/simple-greeter/gdm-greeter-session.c
index 83375b2..251e7c8 100644
--- a/gui/simple-greeter/gdm-greeter-session.c
+++ b/gui/simple-greeter/gdm-greeter-session.c
@@ -38,6 +38,8 @@
#include "gdm-greeter-panel.h"
Index: gdm-2.29.5/gui/simple-greeter/gdm-greeter-session.c
===================================================================
--- gdm-2.29.5.orig/gui/simple-greeter/gdm-greeter-session.c
+++ gdm-2.29.5/gui/simple-greeter/gdm-greeter-session.c
@@ -39,6 +39,8 @@
#include "gdm-greeter-login-window.h"
#include "gdm-user-chooser-widget.h"
+#include "gdm-domain-provider.h"
+
#include "gdm-profile.h"
#define GDM_GREETER_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_GREETER_SESSION, GdmGreeterSessionPrivate))
@@ -48,6 +50,11 @@ struct GdmGreeterSessionPrivate
@@ -49,6 +51,11 @@ struct GdmGreeterSessionPrivate
GtkWidget *login_window;
GtkWidget *panel;
@ -1918,7 +1947,7 @@ index 83375b2..251e7c8 100644
};
enum {
@@ -62,6 +69,33 @@ G_DEFINE_TYPE (GdmGreeterSession, gdm_greeter_session, G_TYPE_OBJECT)
@@ -63,6 +70,33 @@ G_DEFINE_TYPE (GdmGreeterSession, gdm_gr
static gpointer session_object = NULL;
@ -1952,7 +1981,7 @@ index 83375b2..251e7c8 100644
static void
on_info (GdmGreeterClient *client,
const char *text,
@@ -99,6 +133,10 @@ on_reset (GdmGreeterClient *client,
@@ -100,6 +134,10 @@ on_reset (GdmGreeterClient *client,
gdm_greeter_panel_reset (GDM_GREETER_PANEL (session->priv->panel));
gdm_greeter_login_window_reset (GDM_GREETER_LOGIN_WINDOW (session->priv->login_window));
@ -1963,7 +1992,7 @@ index 83375b2..251e7c8 100644
}
static void
@@ -174,6 +212,9 @@ on_secret_info_query (GdmGreeterClient *client,
@@ -187,6 +225,9 @@ on_secret_info_query (GdmGreeterClient
{
g_debug ("GdmGreeterSession: Secret info query: %s", text);
@ -1973,7 +2002,7 @@ index 83375b2..251e7c8 100644
gdm_greeter_login_window_secret_info_query (GDM_GREETER_LOGIN_WINDOW (session->priv->login_window), text);
}
@@ -198,8 +239,14 @@ on_begin_verification_for_user (GdmGreeterLoginWindow *login_window,
@@ -211,8 +252,14 @@ on_begin_verification_for_user (GdmGreet
const char *username,
GdmGreeterSession *session)
{
@ -1989,7 +2018,7 @@ index 83375b2..251e7c8 100644
}
static void
@@ -207,8 +254,21 @@ on_query_answer (GdmGreeterLoginWindow *login_window,
@@ -220,8 +267,21 @@ on_query_answer (GdmGreeterLoginWindow *
const char *text,
GdmGreeterSession *session)
{
@ -2012,15 +2041,13 @@ index 83375b2..251e7c8 100644
}
static void
@@ -236,13 +296,39 @@ on_select_layout (GdmGreeterSession *session,
@@ -249,6 +309,17 @@ on_select_layout (GdmGreeterSession
}
static void
+on_select_domain (GdmGreeterSession *session,
+ const char *text)
+{
+ char *domain_and_user;
+
+ g_free (session->priv->domain);
+ session->priv->domain = NULL;
+
@ -2029,13 +2056,15 @@ index 83375b2..251e7c8 100644
+}
+
+static void
on_select_user (GdmGreeterLoginWindow *login_window,
on_dialog_hidden (GdmGreeterSession *session)
{
gtk_window_present (GTK_WINDOW (session->priv->login_window));
@@ -259,9 +330,21 @@ on_select_user (GdmGreeterLoginWindow *l
const char *text,
GdmGreeterSession *session)
{
- show_or_hide_user_options (session, text);
+ char *domain_and_user;
+
gdm_greeter_panel_show_user_options (GDM_GREETER_PANEL (session->priv->panel));
+
+ g_free (session->priv->user);
+ session->priv->user = NULL;
@ -2045,6 +2074,7 @@ index 83375b2..251e7c8 100644
+
+ domain_and_user = maybe_prepend_domain_to_user (session, text);
+
+ show_or_hide_user_options (session, domain_and_user);
gdm_greeter_client_call_select_user (session->priv->client,
- text);
+ domain_and_user);
@ -2053,7 +2083,7 @@ index 83375b2..251e7c8 100644
}
static void
@@ -251,6 +337,10 @@ on_cancelled (GdmGreeterLoginWindow *login_window,
@@ -270,6 +353,10 @@ on_cancelled (GdmGreeterLoginWindow *log
{
gdm_greeter_panel_hide_user_options (GDM_GREETER_PANEL (session->priv->panel));
gdm_greeter_client_call_cancel (session->priv->client);
@ -2064,19 +2094,19 @@ index 83375b2..251e7c8 100644
}
static void
@@ -300,6 +390,11 @@ toggle_panel (GdmGreeterSession *session,
G_CALLBACK (on_select_session),
@@ -358,6 +445,11 @@ toggle_panel (GdmGreeterSession *session
session);
+ g_signal_connect_swapped (session->priv->panel,
g_signal_connect_swapped (session->priv->panel,
+ "domain-selected",
+ G_CALLBACK (on_select_domain),
+ session);
+
gtk_widget_show (session->priv->panel);
} else {
gtk_widget_destroy (session->priv->panel);
@@ -542,6 +637,8 @@ gdm_greeter_session_init (GdmGreeterSession *session)
+ g_signal_connect_swapped (session->priv->panel,
"dialog-hidden",
G_CALLBACK (on_dialog_hidden),
session);
@@ -604,6 +696,8 @@ gdm_greeter_session_init (GdmGreeterSess
G_CALLBACK (on_user_authorized),
session);
@ -2085,7 +2115,7 @@ index 83375b2..251e7c8 100644
/* We want to listen for panel mnemonics even if the
* login window is focused, so we intercept them here.
*/
@@ -563,6 +660,9 @@ gdm_greeter_session_finalize (GObject *object)
@@ -625,6 +719,9 @@ gdm_greeter_session_finalize (GObject *o
g_return_if_fail (greeter_session->priv != NULL);
@ -2095,11 +2125,11 @@ index 83375b2..251e7c8 100644
G_OBJECT_CLASS (gdm_greeter_session_parent_class)->finalize (object);
}
diff --git a/gui/simple-greeter/gdm-simple-greeter.schemas.in b/gui/simple-greeter/gdm-simple-greeter.schemas.in
index 55b441f..450cb22 100644
--- a/gui/simple-greeter/gdm-simple-greeter.schemas.in
+++ b/gui/simple-greeter/gdm-simple-greeter.schemas.in
@@ -92,6 +92,18 @@
Index: gdm-2.29.5/gui/simple-greeter/gdm-simple-greeter.schemas.in
===================================================================
--- gdm-2.29.5.orig/gui/simple-greeter/gdm-simple-greeter.schemas.in
+++ gdm-2.29.5/gui/simple-greeter/gdm-simple-greeter.schemas.in
@@ -91,6 +91,18 @@
</locale>
</schema>
<schema>
@ -2118,9 +2148,11 @@ index 55b441f..450cb22 100644
<key>/schemas/apps/gdm/simple-greeter/wm_use_compiz</key>
<applyto>/apps/gdm/simple-greeter/wm_use_compiz</applyto>
<owner>gdm-simple-greeter</owner>
--- gdm-2.24.0/po/POTFILES.in
+++ gdm-2.24.0/po/POTFILES.in
@@ -63,6 +63,9 @@
Index: gdm-2.29.5/po/POTFILES.in
===================================================================
--- gdm-2.29.5.orig/po/POTFILES.in
+++ gdm-2.29.5/po/POTFILES.in
@@ -64,6 +64,9 @@ gui/simple-chooser/gdm-host-chooser-widg
gui/simple-greeter/gdm-cell-renderer-timer.c
gui/simple-greeter/gdm-chooser-widget.c
gui/simple-greeter/gdm-clock-widget.c
@ -2129,4 +2161,112 @@ index 55b441f..450cb22 100644
+gui/simple-greeter/gdm-domain-option-widget.c
gui/simple-greeter/gdm-greeter-login-window.c
gui/simple-greeter/gdm-greeter-login-window.c
gui/simple-greeter/gdm-greeter-login-window.glade
[type: gettext/glade]gui/simple-greeter/gdm-greeter-login-window.ui
Index: gdm-2.29.5/common/gdm-settings-keys.h
===================================================================
--- gdm-2.29.5.orig/common/gdm-settings-keys.h
+++ gdm-2.29.5/common/gdm-settings-keys.h
@@ -35,6 +35,7 @@ G_BEGIN_DECLS
#define GDM_KEY_DEBUG "debug/Enable"
+#define GDM_KEY_SHOW_DOMAIN "greeter/ShowDomain"
#define GDM_KEY_INCLUDE "greeter/Include"
#define GDM_KEY_EXCLUDE "greeter/Exclude"
#define GDM_KEY_INCLUDE_ALL "greeter/IncludeAll"
Index: gdm-2.29.5/common/gdm-settings-system-backend.c
===================================================================
--- gdm-2.29.5.orig/common/gdm-settings-system-backend.c
+++ gdm-2.29.5/common/gdm-settings-system-backend.c
@@ -44,11 +44,11 @@
#define SYSCONFIG_AUTOLOGIN_KEY "DISPLAYMANAGER_AUTOLOGIN"
#define SYSCONFIG_TCP_OPEN_KEY "DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN"
#define SYSCONFIG_XDMCP_KEY "DISPLAYMANAGER_REMOTE_ACCESS"
+#define SYSCONFIG_AD_KEY "DISPLAYMANAGER_AD_INTEGRATION"
/* Keys from sysconfig that have no equivalent in GDM:
* - DISPLAYMANAGER_ROOT_LOGIN_REMOTE
* - DISPLAYMANAGER_STARTS_XSERVER (we always have a local display manager,
* see gdm_manager_constructor())
- * - DISPLAYMANAGER_AD_INTEGRATION
* - DISPLAYMANAGER_SHUTDOWN (handled by ConsoleKit)
*/
@@ -65,12 +65,14 @@ struct GdmSettingsSystemBackendPrivate
gboolean dirty_autologin_user;
gboolean dirty_tcp_open;
gboolean dirty_xdmcp;
+ gboolean dirty_show_domain;
gchar *set_autologin_user;
gboolean set_autologin_enabled;
gboolean set_tcp_open;
gboolean set_xdmcp;
+ gboolean set_show_domain;
};
static void gdm_settings_system_backend_class_init (GdmSettingsSystemBackendClass *klass);
@@ -140,6 +142,16 @@ gdm_settings_system_backend_get_value (G
val = g_strdup (xdmcp ? "true" : "false");
}
}
+ } else if (!strcasecmp (key, GDM_KEY_SHOW_DOMAIN)) {
+ if (priv->dirty_show_domain) {
+ val = g_strdup (priv->set_show_domain ? "true" : "false");
+ } else {
+ gboolean show_domain;
+
+ if (gdm_sysconfig_get_value_boolean ((const gchar **) priv->lines, SYSCONFIG_AD_KEY, &show_domain)) {
+ val = g_strdup (show_domain ? "true" : "false");
+ }
+ }
} else {
g_set_error (error, GDM_SETTINGS_BACKEND_ERROR, GDM_SETTINGS_BACKEND_ERROR_KEY_NOT_FOUND, "Key not found");
goto out;
@@ -200,6 +212,12 @@ save_settings (GdmSettingsSystemBackend
backend->priv->set_xdmcp ? "yes" : "no");
}
+ if (backend->priv->dirty_show_domain) {
+ if (!gdm_sysconfig_set_value_boolean (backend->priv->lines, SYSCONFIG_AD_KEY, backend->priv->set_show_domain))
+ g_warning ("Unable to set key %s to '%s'.", SYSCONFIG_AD_KEY,
+ backend->priv->set_show_domain ? "yes" : "no");
+ }
+
if (!gdm_sysconfig_save_file (backend->priv->filename, backend->priv->lines))
g_warning ("Unable to save settings to %s.", backend->priv->filename);
@@ -208,6 +226,7 @@ save_settings (GdmSettingsSystemBackend
backend->priv->dirty_autologin_user = FALSE;
backend->priv->dirty_tcp_open = FALSE;
backend->priv->dirty_xdmcp = FALSE;
+ backend->priv->dirty_show_domain = FALSE;
}
static gboolean
@@ -275,6 +294,9 @@ gdm_settings_system_backend_set_value (G
} else if (!strcasecmp (key, GDM_KEY_XDMCP_ENABLE)) {
priv->set_xdmcp = value_to_boolean (value);
GDM_SETTINGS_SYSTEM_BACKEND (backend)->priv->dirty_xdmcp = TRUE;
+ } else if (!strcasecmp (key, GDM_KEY_SHOW_DOMAIN)) {
+ priv->set_show_domain = value_to_boolean (value);
+ GDM_SETTINGS_SYSTEM_BACKEND (backend)->priv->dirty_show_domain = TRUE;
} else {
g_set_error (error, GDM_SETTINGS_BACKEND_ERROR, GDM_SETTINGS_BACKEND_ERROR_KEY_NOT_FOUND, "Key not found");
return FALSE;
Index: gdm-2.29.5/data/gdm.schemas.in.in
===================================================================
--- gdm-2.29.5.orig/data/gdm.schemas.in.in
+++ gdm-2.29.5/data/gdm.schemas.in.in
@@ -61,6 +61,11 @@
</schema>
<schema>
+ <key>greeter/ShowDomain</key>
+ <signature>b</signature>
+ <default>false</default>
+ </schema>
+ <schema>
<key>greeter/Include</key>
<signature>s</signature>
<default></default>

File diff suppressed because it is too large Load Diff

View File

@ -1,123 +0,0 @@
Index: gdm-2.28.0/configure.ac
===================================================================
--- gdm-2.28.0.orig/configure.ac
+++ gdm-2.28.0/configure.ac
@@ -70,6 +70,7 @@ PKG_CHECK_MODULES(DAEMON,
dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
gobject-2.0 >= $GLIB_REQUIRED_VERSION
gio-2.0 >= $GLIB_REQUIRED_VERSION
+ hal
)
AC_SUBST(DAEMON_CFLAGS)
AC_SUBST(DAEMON_LIBS)
Index: gdm-2.28.0/daemon/gdm-session-direct.c
===================================================================
--- gdm-2.28.0.orig/daemon/gdm-session-direct.c
+++ gdm-2.28.0/daemon/gdm-session-direct.c
@@ -45,6 +45,8 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
+#include <libhal.h>
+
#include "gdm-session-direct.h"
#include "gdm-session.h"
#include "gdm-session-private.h"
@@ -600,14 +602,66 @@ get_default_language_name (GdmSessionDir
return setlocale (LC_MESSAGES, NULL);
}
+static char *
+get_system_default_layout (GdmSessionDirect *session)
+{
+ DBusConnection *connection;
+ LibHalContext *ctx;
+ char **devices;
+ int n_devices;
+ char *layout;
+ char *result;
+
+ result = NULL;
+
+ connection = dbus_g_connection_get_connection (session->priv->connection);
+ ctx = libhal_ctx_new ();
+ libhal_ctx_set_dbus_connection (ctx, connection);
+
+ if (!libhal_ctx_init (ctx, NULL)) {
+ goto out;
+ }
+
+ devices = libhal_find_device_by_capability (ctx,
+ "input.keyboard",
+ &n_devices,
+ NULL);
+ if (n_devices > 0) {
+ layout = libhal_device_get_property_string (ctx,
+ devices[0],
+ "input.x11_options.XkbLayout",
+ NULL);
+ if (!layout) {
+ layout = libhal_device_get_property_string (ctx,
+ devices[0],
+ "input.xkb.layout",
+ NULL);
+ }
+ result = g_strdup (layout);
+ libhal_free_string (layout);
+ }
+
+ libhal_free_string_array (devices);
+
+ libhal_ctx_shutdown (ctx, NULL);
+ libhal_ctx_free (ctx);
+
+out:
+ if (!result) {
+ result = g_strdup ("us");
+ }
+
+ return result;
+}
+
static const char *
get_default_layout_name (GdmSessionDirect *session)
{
- if (session->priv->saved_layout != NULL) {
- return session->priv->saved_layout;
+ if (!session->priv->saved_layout) {
+ session->priv->saved_layout = get_system_default_layout (session);
}
- return "us";
+ return session->priv->saved_layout;
}
static char *
@@ -1970,9 +2024,10 @@ setup_session_environment (GdmSessionDir
if (strcmp (get_layout_name (session),
get_default_layout_name (session)) == 0) {
- gdm_session_direct_set_environment_variable (session,
- "GDM_KEYBOARD_LAYOUT",
- get_layout_name (session));
+ if (g_strcmp0 (get_layout_name (session), get_system_default_layout (session)) != 0)
+ gdm_session_direct_set_environment_variable (session,
+ "GDM_KEYBOARD_LAYOUT",
+ get_layout_name (session));
}
gdm_session_direct_set_environment_variable (session,
Index: gdm-2.28.0/daemon/gdm-session-settings.c
===================================================================
--- gdm-2.28.0.orig/daemon/gdm-session-settings.c
+++ gdm-2.28.0/daemon/gdm-session-settings.c
@@ -149,8 +149,7 @@ gdm_session_settings_set_layout_name (Gd
{
g_return_if_fail (GDM_IS_SESSION_SETTINGS (settings));
- if (settings->priv->layout_name == NULL ||
- strcmp (settings->priv->layout_name, layout_name) != 0) {
+ if (g_strcmp0 (settings->priv->layout_name, layout_name) != 0) {
settings->priv->layout_name = g_strdup (layout_name);
g_object_notify (G_OBJECT (settings), "layout-name");
}

View File

@ -1,6 +1,7 @@
diff -urN gdm-2.27.4/data/Init.in gdm-2.27.4.patched//data/Init.in
--- gdm-2.27.4/data/Init.in 2009-05-19 17:18:12.000000000 +0200
+++ gdm-2.27.4.patched//data/Init.in 2009-07-20 17:06:44.000000000 +0200
Index: gdm-2.29.5/data/Init.in
===================================================================
--- gdm-2.29.5.orig/data/Init.in
+++ gdm-2.29.5/data/Init.in
@@ -1,4 +1,9 @@
#!/bin/sh
+
@ -11,9 +12,10 @@ diff -urN gdm-2.27.4/data/Init.in gdm-2.27.4.patched//data/Init.in
# Stolen from the debian kdm setup, aren't I sneaky
# Plus a lot of fun stuff added
# -George
diff -urN gdm-2.27.4/data/PostSession.in gdm-2.27.4.patched//data/PostSession.in
--- gdm-2.27.4/data/PostSession.in 2009-05-19 17:18:12.000000000 +0200
+++ gdm-2.27.4.patched//data/PostSession.in 2009-07-20 17:06:44.000000000 +0200
Index: gdm-2.29.5/data/PostSession.in
===================================================================
--- gdm-2.29.5.orig/data/PostSession.in
+++ gdm-2.29.5/data/PostSession.in
@@ -1,3 +1,7 @@
#!/bin/sh
@ -22,246 +24,18 @@ diff -urN gdm-2.27.4/data/PostSession.in gdm-2.27.4.patched//data/PostSession.in
+fi
+
exit 0
diff -urN gdm-2.27.4/data/Xsession.in gdm-2.27.4.patched//data/Xsession.in
--- gdm-2.27.4/data/Xsession.in 2009-07-20 03:09:09.000000000 +0200
+++ gdm-2.27.4.patched//data/Xsession.in 2009-07-20 17:09:51.000000000 +0200
@@ -1,235 +1,6 @@
-#!@XSESSION_SHELL@
-#
-# This is SORT OF LIKE an X session, but not quite. You get a command as the
-# first argument (it could be multiple words, so run it with "eval"). As a
-# special case, the command can be:
-# default - Run the appropriate Xclients startup (see the code below)
-# custom - Run ~/.xsession and if that's not available run 'default'
-#
-# (Note that other arguments could also follow, but only the command one is
-# right now relevant and supported)
-#
-# The output is ALREADY redirected to .xsession-errors in GDM. This way
-# .xsession-errors actually gets more output such as if the PreSession script
-# is failing. This also prevents DoS attacks if some app in the users session
-# can be prodded to dump lots of stuff on the stdout/stderr. We wish to be
-# robust don't we? In case you wish to use an existing script for other DM's,
-# you can just not redirect when GDMSESSION is set. GDMSESSION will always
-# be set from gdm.
-#
-# Also note that this is not run as a login shell, this is just executed.
-# This is why we source the profile files below.
-#
-# based on:
-# $XConsortium: Xsession /main/10 1995/12/18 18:21:28 gildea $
-
-command="$@"
-
-# this will go into the .xsession-errors along with all other echo's
-# good for debugging where things went wrong
-echo "$0: Beginning session setup..."
-
-# First read /etc/profile and .profile
-test -f /etc/profile && . /etc/profile
-test -f "$HOME/.profile" && . "$HOME/.profile"
-# Second read /etc/xprofile and .xprofile for X specific setup
-test -f /etc/xprofile && . /etc/xprofile
-test -f "$HOME/.xprofile" && . "$HOME/.xprofile"
-
-# Translation stuff
-if [ -x "@libexecdir@/gdmtranslate" ] ; then
- gdmtranslate="@libexecdir@/gdmtranslate"
-else
- gdmtranslate=
-fi
-
-# Note that this should only go to zenity dialogs which always expect utf8
-gettextfunc () {
- if [ "x$gdmtranslate" != "x" ] ; then
- "$gdmtranslate" --utf8 "$1"
- else
- echo "$1"
- fi
-}
-
-OLD_IFS=$IFS
-
-gdmwhich () {
- COMMAND="$1"
- OUTPUT=
- IFS=:
- for dir in $PATH
- do
- if test -x "$dir/$COMMAND" ; then
- if test "x$OUTPUT" = "x" ; then
- OUTPUT="$dir/$COMMAND"
- fi
- fi
- done
- IFS=$OLD_IFS
- echo "$OUTPUT"
-}
-
-zenity=`gdmwhich zenity`
-
-# Note: ~/.xsession-errors is now done in the daemon so that it
-# works for ALL sessions (except ones named 'Failsafe')
-
-# clean up after xbanner
-freetemp=`gdmwhich freetemp`
-if [ -n "$freetemp" ] ; then
- "$freetemp"
-fi
-
-userresources="$HOME/.Xresources"
-usermodmap="$HOME/.Xmodmap"
-userxkbmap="$HOME/.Xkbmap"
-
-sysresources=/etc/X11/Xresources
-sysmodmap=/etc/X11/Xmodmap
-sysxkbmap=/etc/X11/Xkbmap
-
-rh6sysresources=/etc/X11/xinit/Xresources
-rh6sysmodmap=/etc/X11/xinit/Xmodmap
-
-# merge in defaults
-if [ -f "$rh6sysresources" ]; then
- xrdb -nocpp -merge "$rh6sysresources"
-fi
-
-if [ -f "$sysresources" ]; then
- xrdb -nocpp -merge "$sysresources"
-fi
-
-if [ -f "$userresources" ]; then
- xrdb -nocpp -merge "$userresources"
-fi
-
-# merge in keymaps
-if [ -f "$sysxkbmap" ]; then
- setxkbmap `cat "$sysxkbmap"`
- XKB_IN_USE=yes
-fi
-
-if [ -f "$userxkbmap" ]; then
- setxkbmap `cat "$userxkbmap"`
- XKB_IN_USE=yes
-fi
-
-#
-# Eeek, this seems like too much magic here
-#
-if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then
- if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then
- xkbsymbols=`sed -n -e 's/^[ ]*XkbSymbols[ ]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config`
- if [ -n "$xkbsymbols" ]; then
- setxkbmap -symbols "$xkbsymbols"
- XKB_IN_USE=yes
- fi
- fi
-fi
-
-# xkb and xmodmap don't play nice together
-if [ -z "$XKB_IN_USE" ]; then
- if [ -f "$rh6sysmodmap" ]; then
- xmodmap "$rh6sysmodmap"
- fi
-
- if [ -f "$sysmodmap" ]; then
- xmodmap "$sysmodmap"
- fi
-
- if [ -f "$usermodmap" ]; then
- xmodmap "$usermodmap"
- fi
-fi
-
-unset XKB_IN_USE
-
-# Normalize languages, some places/distros screw us up in /etc/profile,
-# so in case the user did select a language
-if [ -n "$GDM_LANG" ]; then
- LANG="$GDM_LANG"
- export LANG
-
- if [ -n "$LC_ALL" ]; then
- if [ "$LC_ALL" != "$LANG" ]; then
- LC_ALL="$LANG"
- fi
- else
- unset LC_ALL
- fi
-
- if [ -n "$LANGUAGE" ]; then
- if [ "$LANGUAGE" != "$LANG" ]; then
- LANGUAGE="$LANG"
- fi
- else
- unset LANGUAGE
- fi
-
- if [ -n "$LINGUAS" ]; then
- if [ "$LINGUAS" != "$LANG" ]; then
- LINGUAS="$LANG"
- fi
- else
- unset LINGUAS
- fi
-fi
-
-# run all system xinitrc shell scripts.
-if [ -d /etc/X11/xinit/xinitrc.d ]; then
- for i in /etc/X11/xinit/xinitrc.d/* ; do
- if [ -x "$i" ]; then
- . "$i"
- fi
- done
-fi
-
-if [ "x$command" = "xcustom" ] ; then
- if [ -x "$HOME/.xsession" ]; then
- command="$HOME/.xsession"
- else
- echo "$0: Cannot find ~/.xsession will try the default session"
- command="default"
- fi
-fi
-
-if [ "x$command" = "xdefault" ] ; then
- if [ -x "$HOME/.Xclients" ]; then
- command="$HOME/.Xclients"
- elif [ -x /etc/X11/xinit/Xclients ]; then
- command="/etc/X11/xinit/Xclients"
- elif [ -x /etc/X11/Xclients ]; then
- command="/etc/X11/Xclients"
- else
- if [ -n "$zenity" ] ; then
- disptext=`gettextfunc "System has no Xclients file, so starting a failsafe xterm session. Windows will have focus only if the mouse pointer is above them. To get out of this mode type 'exit' in the window."`
- "$zenity" --info --text "$disptext"
- else
- echo "$0: Cannot find Xclients"
- fi
- exec xterm -geometry 80x24+0+0
- fi
-fi
-
-# add ssh-agent if found
-sshagent="`gdmwhich ssh-agent`"
-if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
- command="$sshagent -- $command"
-elif [ -z "$sshagent" ] ; then
- echo "$0: ssh-agent not found!"
-fi
-
-echo "$0: Setup done, will execute: $command"
-
-eval exec $command
-
-echo "$0: Executing $command failed, will run xterm"
-
-if [ -n "$zenity" ] ; then
- disptext=`gettextfunc "Failed to start the session, so starting a failsafe xterm session. Windows will have focus only if the mouse pointer is above them. To get out of this mode type 'exit' in the window."`
- "$zenity" --info --text "$disptext"
+#!/bin/sh
Index: gdm-2.29.5/data/Xsession.in
===================================================================
--- gdm-2.29.5.orig/data/Xsession.in
+++ gdm-2.29.5/data/Xsession.in
@@ -1,4 +1,10 @@
#!@XSESSION_SHELL@
+
+if test -f /etc/X11/xdm/Xstartup -a -x /etc/X11/xdm/Xsession; then
+ /bin/bash /etc/X11/xdm/Xstartup
+ exec /etc/X11/xdm/Xsession $1 $GDM_LANG
fi
-exec xterm -geometry 80x24+0+0
+fi
+
#
# This is SORT OF LIKE an X session, but not quite. You get a command as the
# first argument (it could be multiple words, so run it with "eval"). As a

View File

@ -1,8 +1,8 @@
diff --git a/common/Makefile.am b/common/Makefile.am
index 101b3f4..5e9e9d1 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -83,6 +83,8 @@ libgdmcommon_la_SOURCES = \
Index: gdm-2.29.4/common/Makefile.am
===================================================================
--- gdm-2.29.4.orig/common/Makefile.am
+++ gdm-2.29.4/common/Makefile.am
@@ -84,6 +84,8 @@ libgdmcommon_la_SOURCES = \
gdm-settings-backend.h \
gdm-settings-desktop-backend.c \
gdm-settings-desktop-backend.h \
@ -11,7 +11,7 @@ index 101b3f4..5e9e9d1 100644
gdm-settings-keys.h \
gdm-settings-utils.h \
gdm-settings-utils.c \
@@ -90,6 +92,8 @@ libgdmcommon_la_SOURCES = \
@@ -91,6 +93,8 @@ libgdmcommon_la_SOURCES = \
gdm-settings-direct.h \
gdm-settings-client.h \
gdm-settings-client.c \
@ -20,12 +20,11 @@ index 101b3f4..5e9e9d1 100644
gdm-log.h \
gdm-log.c \
gdm-md5.h \
diff --git a/common/gdm-settings-system-backend.c b/common/gdm-settings-system-backend.c
new file mode 100644
index 0000000..4cf6a3a
Index: gdm-2.29.4/common/gdm-settings-system-backend.c
===================================================================
--- /dev/null
+++ b/common/gdm-settings-system-backend.c
@@ -0,0 +1,281 @@
+++ gdm-2.29.4/common/gdm-settings-system-backend.c
@@ -0,0 +1,348 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Hans Petter Jansson <hpj@copyleft.no>
@ -70,6 +69,15 @@ index 0000000..4cf6a3a
+#include "gdm-log.h"
+
+#define SYSCONFIG_AUTOLOGIN_KEY "DISPLAYMANAGER_AUTOLOGIN"
+#define SYSCONFIG_TCP_OPEN_KEY "DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN"
+#define SYSCONFIG_XDMCP_KEY "DISPLAYMANAGER_REMOTE_ACCESS"
+/* Keys from sysconfig that have no equivalent in GDM:
+ * - DISPLAYMANAGER_ROOT_LOGIN_REMOTE
+ * - DISPLAYMANAGER_STARTS_XSERVER (we always have a local display manager,
+ * see gdm_manager_constructor())
+ * - DISPLAYMANAGER_AD_INTEGRATION
+ * - DISPLAYMANAGER_SHUTDOWN (handled by ConsoleKit)
+ */
+
+#define GDM_SETTINGS_SYSTEM_BACKEND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_SETTINGS_SYSTEM_BACKEND, GdmSettingsSystemBackendPrivate))
+
@ -77,11 +85,19 @@ index 0000000..4cf6a3a
+{
+ char *filename;
+ gchar **lines;
+ gboolean dirty;
+ guint save_id;
+
+ gboolean dirty;
+ gboolean dirty_autologin;
+ gboolean dirty_autologin_user;
+ gboolean dirty_tcp_open;
+ gboolean dirty_xdmcp;
+
+ gchar *set_autologin_user;
+ gboolean set_autologin_enabled;
+
+ gboolean set_tcp_open;
+ gboolean set_xdmcp;
+};
+
+static void gdm_settings_system_backend_class_init (GdmSettingsSystemBackendClass *klass);
@ -105,20 +121,15 @@ index 0000000..4cf6a3a
+ g_return_val_if_fail (key != NULL, FALSE);
+
+ priv = system_backend->priv;
+ val = NULL;
+ ret = FALSE;
+
+ if (value != NULL) {
+ *value = NULL;
+ }
+
+ if (strcasecmp (key, GDM_KEY_AUTO_LOGIN_ENABLE) &&
+ strcasecmp (key, GDM_KEY_AUTO_LOGIN_USER)) {
+ g_set_error (error, GDM_SETTINGS_BACKEND_ERROR, GDM_SETTINGS_BACKEND_ERROR_KEY_NOT_FOUND, "Key not found");
+ goto out;
+ }
+
+ if (!strcasecmp (key, GDM_KEY_AUTO_LOGIN_ENABLE)) {
+ if (priv->dirty) {
+ if (priv->dirty_autologin) {
+ val = g_strdup (priv->set_autologin_enabled ? "true" : "false");
+ } else {
+ const gchar *new_val;
@ -129,22 +140,46 @@ index 0000000..4cf6a3a
+ g_free (val);
+ val = g_strdup (new_val);
+ }
+ } else {
+ if (priv->dirty && priv->set_autologin_user) {
+ } else if (!strcasecmp (key, GDM_KEY_AUTO_LOGIN_USER)) {
+ if (priv->dirty_autologin_user) {
+ val = g_strdup (priv->set_autologin_user);
+ } else {
+ val = gdm_sysconfig_get_value ((const gchar **) priv->lines, SYSCONFIG_AUTOLOGIN_KEY);
+ }
+ } else if (!strcasecmp (key, GDM_KEY_DISALLOW_TCP)) {
+ /* beware: that's the opposite of the sysconfig key */
+ if (priv->dirty_tcp_open) {
+ val = g_strdup (priv->set_tcp_open ? "false" : "true");
+ } else {
+ gboolean tcp_open;
+
+ if (gdm_sysconfig_get_value_boolean ((const gchar **) priv->lines, SYSCONFIG_TCP_OPEN_KEY, &tcp_open)) {
+ val = g_strdup (tcp_open ? "false" : "true");
+ }
+ }
+ } else if (!strcasecmp (key, GDM_KEY_XDMCP_ENABLE)) {
+ if (priv->dirty_xdmcp) {
+ val = g_strdup (priv->set_xdmcp ? "true" : "false");
+ } else {
+ gboolean xdmcp;
+
+ if (gdm_sysconfig_get_value_boolean ((const gchar **) priv->lines, SYSCONFIG_XDMCP_KEY, &xdmcp)) {
+ val = g_strdup (xdmcp ? "true" : "false");
+ }
+ }
+ } else {
+ g_set_error (error, GDM_SETTINGS_BACKEND_ERROR, GDM_SETTINGS_BACKEND_ERROR_KEY_NOT_FOUND, "Key not found");
+ goto out;
+ }
+
+ ret = (val != NULL);
+
+ if (value != NULL && val != NULL && *val != '\0') {
+ *value = val;
+ } else {
+ g_free (val);
+ }
+
+ ret = TRUE;
+
+ out:
+ return ret;
+}
@ -152,29 +187,54 @@ index 0000000..4cf6a3a
+static void
+save_settings (GdmSettingsSystemBackend *backend)
+{
+ GError *local_error;
+ char *contents;
+ gsize length;
+
+ if (! backend->priv->dirty) {
+ return;
+ }
+
+ g_debug ("Saving settings to %s", backend->priv->filename);
+
+ if (!backend->priv->set_autologin_enabled) {
+ g_free (backend->priv->set_autologin_user);
+ backend->priv->set_autologin_user = g_strdup ("");
+ if (backend->priv->dirty_autologin || backend->priv->dirty_autologin_user) {
+ if (!backend->priv->dirty_autologin) {
+ gchar *val;
+
+ val = gdm_sysconfig_get_value ((const gchar **) backend->priv->lines, SYSCONFIG_AUTOLOGIN_KEY);
+ backend->priv->set_autologin_enabled = (val && *val);
+ g_free (val);
+ }
+
+ if (!backend->priv->set_autologin_enabled) {
+ g_free (backend->priv->set_autologin_user);
+ backend->priv->set_autologin_user = g_strdup ("");
+ } else if (!backend->priv->dirty_autologin_user) {
+ g_free (backend->priv->set_autologin_user);
+ backend->priv->set_autologin_user = gdm_sysconfig_get_value ((const gchar **) backend->priv->lines, SYSCONFIG_AUTOLOGIN_KEY);
+ }
+
+ if (!gdm_sysconfig_set_value (backend->priv->lines, SYSCONFIG_AUTOLOGIN_KEY, backend->priv->set_autologin_user))
+ g_warning ("Unable to set key %s to '%s'.", SYSCONFIG_AUTOLOGIN_KEY,
+ backend->priv->set_autologin_user);
+ }
+
+ if (!gdm_sysconfig_set_value (backend->priv->lines, SYSCONFIG_AUTOLOGIN_KEY, backend->priv->set_autologin_user))
+ g_warning ("Unable to set key %s to '%s'.", SYSCONFIG_AUTOLOGIN_KEY,
+ backend->priv->set_autologin_user);
+ if (backend->priv->dirty_tcp_open) {
+ if (!gdm_sysconfig_set_value_boolean (backend->priv->lines, SYSCONFIG_TCP_OPEN_KEY, backend->priv->set_tcp_open))
+ g_warning ("Unable to set key %s to '%s'.", SYSCONFIG_TCP_OPEN_KEY,
+ backend->priv->set_tcp_open ? "yes" : "no");
+ }
+
+ if (backend->priv->dirty_xdmcp) {
+ if (!gdm_sysconfig_set_value_boolean (backend->priv->lines, SYSCONFIG_XDMCP_KEY, backend->priv->set_xdmcp))
+ g_warning ("Unable to set key %s to '%s'.", SYSCONFIG_XDMCP_KEY,
+ backend->priv->set_xdmcp ? "yes" : "no");
+ }
+
+ if (!gdm_sysconfig_save_file (backend->priv->filename, backend->priv->lines))
+ g_warning ("Unable to save settings to %s.", backend->priv->filename);
+
+ backend->priv->dirty = FALSE;
+ backend->priv->dirty_autologin = FALSE;
+ backend->priv->dirty_autologin_user = FALSE;
+ backend->priv->dirty_tcp_open = FALSE;
+ backend->priv->dirty_xdmcp = FALSE;
+}
+
+static gboolean
@ -201,6 +261,17 @@ index 0000000..4cf6a3a
+}
+
+static gboolean
+value_to_boolean (const char *value)
+{
+ gchar t = 0;
+
+ if (value)
+ t = g_ascii_tolower (*value);
+
+ return (t == 'y' || t == 't');
+}
+
+static gboolean
+gdm_settings_system_backend_set_value (GdmSettingsBackend *backend,
+ const char *key,
+ const char *value,
@ -215,27 +286,25 @@ index 0000000..4cf6a3a
+
+ priv = system_backend->priv;
+
+ if (strcasecmp ("key", GDM_KEY_AUTO_LOGIN_ENABLE) &&
+ strcasecmp ("key", GDM_KEY_AUTO_LOGIN_USER)) {
+ g_set_error (error, GDM_SETTINGS_BACKEND_ERROR, GDM_SETTINGS_BACKEND_ERROR_KEY_NOT_FOUND, "Key not found");
+ return FALSE;
+ }
+
+ gdm_settings_system_backend_get_value (backend, key, &old_val, NULL);
+
+ if (!strcasecmp ("key", GDM_KEY_AUTO_LOGIN_ENABLE)) {
+ gchar t = 0;
+
+ if (value)
+ t = g_ascii_tolower (*value);
+
+ if (t == 'y' || t == 't')
+ priv->set_autologin_enabled = TRUE;
+ else
+ priv->set_autologin_enabled = FALSE;
+ } else {
+ if (!strcasecmp (key, GDM_KEY_AUTO_LOGIN_ENABLE)) {
+ priv->set_autologin_enabled = value_to_boolean (value);
+ GDM_SETTINGS_SYSTEM_BACKEND (backend)->priv->dirty_autologin = TRUE;
+ } else if (!strcasecmp (key, GDM_KEY_AUTO_LOGIN_USER)) {
+ g_free (priv->set_autologin_user);
+ priv->set_autologin_user = g_strdup (value);
+ GDM_SETTINGS_SYSTEM_BACKEND (backend)->priv->dirty_autologin_user = TRUE;
+ } else if (!strcasecmp (key, GDM_KEY_DISALLOW_TCP)) {
+ /* beware: that's the opposite of the sysconfig key */
+ priv->set_tcp_open = !value_to_boolean (value);
+ GDM_SETTINGS_SYSTEM_BACKEND (backend)->priv->dirty_tcp_open = TRUE;
+ } else if (!strcasecmp (key, GDM_KEY_XDMCP_ENABLE)) {
+ priv->set_xdmcp = value_to_boolean (value);
+ GDM_SETTINGS_SYSTEM_BACKEND (backend)->priv->dirty_xdmcp = TRUE;
+ } else {
+ g_set_error (error, GDM_SETTINGS_BACKEND_ERROR, GDM_SETTINGS_BACKEND_ERROR_KEY_NOT_FOUND, "Key not found");
+ return FALSE;
+ }
+
+ GDM_SETTINGS_SYSTEM_BACKEND (backend)->priv->dirty = TRUE;
@ -265,9 +334,6 @@ index 0000000..4cf6a3a
+static void
+gdm_settings_system_backend_init (GdmSettingsSystemBackend *backend)
+{
+ gboolean res;
+ GError *error;
+
+ backend->priv = GDM_SETTINGS_SYSTEM_BACKEND_GET_PRIVATE (backend);
+
+ backend->priv->filename = g_strdup ("/etc/sysconfig/displaymanager");
@ -307,11 +373,10 @@ index 0000000..4cf6a3a
+
+ return GDM_SETTINGS_BACKEND (object);
+}
diff --git a/common/gdm-settings-system-backend.h b/common/gdm-settings-system-backend.h
new file mode 100644
index 0000000..3cd16b7
Index: gdm-2.29.4/common/gdm-settings-system-backend.h
===================================================================
--- /dev/null
+++ b/common/gdm-settings-system-backend.h
+++ gdm-2.29.4/common/gdm-settings-system-backend.h
@@ -0,0 +1,56 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -369,10 +434,10 @@ index 0000000..3cd16b7
+G_END_DECLS
+
+#endif /* __GDM_SETTINGS_SYSTEM_BACKEND_H */
diff --git a/common/gdm-settings.c b/common/gdm-settings.c
index 00fe73e..4c31394 100644
--- a/common/gdm-settings.c
+++ b/common/gdm-settings.c
Index: gdm-2.29.4/common/gdm-settings.c
===================================================================
--- gdm-2.29.4.orig/common/gdm-settings.c
+++ gdm-2.29.4/common/gdm-settings.c
@@ -41,6 +41,7 @@
#include "gdm-settings-glue.h"
@ -390,7 +455,7 @@ index 00fe73e..4c31394 100644
};
enum {
@@ -94,15 +95,29 @@ gdm_settings_get_value (GdmSettings *settings,
@@ -94,15 +95,29 @@ gdm_settings_get_value (GdmSettings *set
{
GError *local_error;
gboolean res;
@ -424,7 +489,7 @@ index 00fe73e..4c31394 100644
if (! res) {
g_propagate_error (error, local_error);
}
@@ -122,6 +137,7 @@ gdm_settings_set_value (GdmSettings *settings,
@@ -122,6 +137,7 @@ gdm_settings_set_value (GdmSettings *set
{
GError *local_error;
gboolean res;
@ -432,7 +497,7 @@ index 00fe73e..4c31394 100644
g_return_val_if_fail (GDM_IS_SETTINGS (settings), FALSE);
g_return_val_if_fail (key != NULL, FALSE);
@@ -129,10 +145,23 @@ gdm_settings_set_value (GdmSettings *settings,
@@ -129,10 +145,23 @@ gdm_settings_set_value (GdmSettings *set
g_debug ("Setting value %s", key);
local_error = NULL;
@ -460,7 +525,7 @@ index 00fe73e..4c31394 100644
if (! res) {
g_propagate_error (error, local_error);
}
@@ -210,13 +239,21 @@ backend_value_changed (GdmSettingsBackend *backend,
@@ -210,13 +239,21 @@ backend_value_changed (GdmSettingsBacken
static void
gdm_settings_init (GdmSettings *settings)
{
@ -500,12 +565,11 @@ index 00fe73e..4c31394 100644
G_OBJECT_CLASS (gdm_settings_parent_class)->finalize (object);
}
diff --git a/common/gdm-sysconfig.c b/common/gdm-sysconfig.c
new file mode 100644
index 0000000..0e9e754
Index: gdm-2.29.4/common/gdm-sysconfig.c
===================================================================
--- /dev/null
+++ b/common/gdm-sysconfig.c
@@ -0,0 +1,439 @@
+++ gdm-2.29.4/common/gdm-sysconfig.c
@@ -0,0 +1,481 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Hans Petter Jansson <hpj@novell.com>
@ -546,6 +610,7 @@ index 0000000..0e9e754
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <glib/gstdio.h>
+
+#include "gdm-sysconfig.h"
+
@ -582,7 +647,7 @@ index 0000000..0e9e754
+ g_debug ("%s", str);
+ } else {
+ g_ptr_array_add (lines, g_strdup (""));
+ g_debug ("", str);
+ g_debug ("%s", "");
+ }
+ }
+
@ -765,7 +830,7 @@ index 0000000..0e9e754
+ value = g_strdup ("");
+ }
+ } else {
+ temp = g_strndup (p0, p1 - p0);
+ temp = g_strndup (p0, p1 - p0);
+ value = g_strcompress (temp);
+ g_free (temp);
+ g_strchomp (value);
@ -905,6 +970,47 @@ index 0000000..0e9e754
+ return set_value (sysconfig, key, value);
+}
+
+gboolean
+gdm_sysconfig_get_value_boolean (const gchar **sysconfig, const gchar *key, gboolean *value)
+{
+ char *val;
+ gboolean val_bool;
+
+ g_return_val_if_fail (sysconfig != NULL, FALSE);
+ g_return_val_if_fail (key != NULL, FALSE);
+
+ val = get_value (sysconfig, key);
+ if (val == NULL) {
+ return FALSE;
+ }
+
+ if (!strcasecmp (val, "yes")) {
+ val_bool = TRUE;
+ } else if (!strcasecmp (val, "no")) {
+ val_bool = FALSE;
+ } else {
+ g_free (val);
+ return FALSE;
+ }
+
+ g_free (val);
+
+ if (value != NULL) {
+ *value = val_bool;
+ }
+
+ return TRUE;
+}
+
+gboolean
+gdm_sysconfig_set_value_boolean (gchar **sysconfig, const gchar *key, gboolean value)
+{
+ g_return_val_if_fail (sysconfig != NULL, FALSE);
+ g_return_val_if_fail (key != NULL, FALSE);
+
+ return set_value (sysconfig, key, value ? "yes" : "no");
+}
+
+gchar *
+gdm_sysconfig_load_value (const gchar *file_name, const gchar *key)
+{
@ -945,12 +1051,11 @@ index 0000000..0e9e754
+ g_strfreev (lines);
+ return result;
+}
diff --git a/common/gdm-sysconfig.h b/common/gdm-sysconfig.h
new file mode 100644
index 0000000..9bc21ec
Index: gdm-2.29.4/common/gdm-sysconfig.h
===================================================================
--- /dev/null
+++ b/common/gdm-sysconfig.h
@@ -0,0 +1,40 @@
+++ gdm-2.29.4/common/gdm-sysconfig.h
@@ -0,0 +1,43 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Hans Petter Jansson <hpj@novell.com>
@ -985,9 +1090,24 @@ index 0000000..9bc21ec
+gchar *gdm_sysconfig_get_value (const gchar **sysconfig, const gchar *key);
+gboolean gdm_sysconfig_set_value (gchar **sysconfig, const gchar *key, const gchar *value);
+
+gboolean gdm_sysconfig_get_value_boolean (const gchar **sysconfig, const gchar *key, gboolean *value);
+gboolean gdm_sysconfig_set_value_boolean (gchar **sysconfig, const gchar *key, gboolean value);
+
+gchar *gdm_sysconfig_load_value (const gchar *file_name, const gchar *key);
+gboolean gdm_sysconfig_save_value (const gchar *file_name, const gchar *key, const gchar *value);
+
+G_END_DECLS
+
+#endif /* __GDM_SYSCONFIG_H */
Index: gdm-2.29.4/data/gdm.conf-custom.in
===================================================================
--- gdm-2.29.4.orig/data/gdm.conf-custom.in
+++ gdm-2.29.4/data/gdm.conf-custom.in
@@ -1,4 +1,7 @@
# GDM configuration storage
+#
+# Note: settings from /etc/sysconfig/displaymanager have a higher priority
+#
[daemon]

View File

@ -1,3 +1,64 @@
-------------------------------------------------------------------
Sun Jan 17 22:52:01 CET 2010 - vuntz@opensuse.org
- Update gdm-sysconfig-settings.patch:
+ support DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN for
security/DisallowTCP in gdm.conf
+ support DISPLAYMANAGER_REMOTE_ACCESS for xdmcp/Enable in
gdm.conf
+ do not pretend we got a value from sysconfig if we didn't get a
result (we were returning TRUE too easily from
gdm_settings_system_backend_get_value()
+ make sure that, when saving the configuration, we put the right
value if it wasn't supposed to be changed (before, we used to
put whatever we had in memory, which was never initialized to
the right values, so random data)
+ add a note to gdm.conf about the fact that
/etc/sysconfig/displaymanager is used
- Remove the parts of SuSEconfig.gdm that were dealing with
updating gdm.conf, since gdm-sysconfig-settings.patch make gdm
poke directly in sysconfig. SuSEconfig.gdm is still needed for
the DISPLAYMANAGER_PASSWORD_LESS_LOGIN option, though.
- Rebase gdm-domain-logon.patch, and only show the domain chooser
if DISPLAYMANAGER_AD_INTEGRATION is set in sysconfig.
- Reenable gnome-patch-translation support, since
gdm-domain-logon.patch is applied again.
- This means we can remove /etc/gdm/gdm_sysconfig.conf from the
package.
- Remove sysconfig.displaymanager-gdm source: this has not been
used for a long time.
-------------------------------------------------------------------
Mon Jan 16 16:38:41 CET 2010 - vuntz@opensuse.org
- Remove libglade2-devel BuildRequires.
- Also remove hal-devel BuildRequires which was added for the
gdm-keyboard-from-hal.patch (removed now).
- Redo gdm-suse-xsession.patch in a way that won't require further
updates when upstream files change (which is something we can
ignore).
- Rebase gdm-greeter-greater-ui.patch.
-------------------------------------------------------------------
Thu Jan 14 01:40:29 CET 2010 - captain.magnus@opensuse.org
- Update to version 2.29.5:
+ XDMCP fixes on Solaris
+ run PostLogin script as user instead of gdm
+ Fix ellipses usage on User Switch Applet
+ Add ability to customize system language list
+ Solaris NULL printf fixes
+ Convert from glade to gtkbuilder
+ Detect default keyboard layout better
+ Ignore executable subfolders of xinitrc.d
+ Don't reveal valid usernames when authenticating
- Respin gdm-suse-xsession.patch
- Remove gdm-keyboard-from-hal.patch: fixed upstream another way.
- Disable gdm-greeter-greater-ui.patch: it needs to be rebased.
- Update gdm-default-wm.patch to apply without fuzz.
- Add gdm-add-missing-locale.patch. Patch taken from upstream and
can be removed with the next version update
-------------------------------------------------------------------
Thu Dec 24 17:57:48 CET 2009 - vuntz@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package gdm (Version 2.29.4)
# spec file for package gdm (Version 2.29.5)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -26,12 +26,9 @@ BuildRequires: gconf2-devel
BuildRequires: gnome-doc-utils-devel
BuildRequires: gnome-panel-devel
BuildRequires: gnome-patch-translation
# Needed for Patch32 - gdm-keyboard-from-hal.patch
BuildRequires: hal-devel
BuildRequires: intltool
BuildRequires: iso-codes-devel
BuildRequires: libcanberra-devel
BuildRequires: libglade2-devel
BuildRequires: libselinux-devel
BuildRequires: libxklavier-devel
BuildRequires: pam-devel
@ -44,7 +41,7 @@ BuildRequires: xorg-x11-server-extra
BuildRequires: zenity
License: GPLv2+
Group: System/GUI/GNOME
Version: 2.29.4
Version: 2.29.5
Release: 1
Summary: The GNOME 2.x Display Manager
Source: %{name}-%{version}.tar.bz2
@ -52,7 +49,6 @@ Source1: gdm.pamd
Source2: gdm-autologin.pamd
# FIXME: See FIXME in the script.
Source3: SuSEconfig.gdm
Source5: sysconfig.displaymanager-gdm
# PATCH-FIX-UPSTREAM gdm-helper-directory.patch bgo582320 vuntz@novell.com -- Add --with-gnome-settings-daemon-directory, --with-consolekit-directory, --with-at-spi-registryd-directory
Patch1: gdm-helper-directory.patch
# PATCH-FIX-OPENSUSE gdm-2.21.9-no-fatal-warnings.patch -- Do not accept fatal warnings in development version: gdm is too critical
@ -63,10 +59,10 @@ Patch4: gdm-vt-allocation-hack.patch
Patch6: gdm-desktop-session-env-pam.patch
# PATCH-FIX-OPENSUSE gdm-suse-xsession.patch vuntz@novell.com -- Use the /etc/X11/xdm/* scripts
Patch7: gdm-suse-xsession.patch
# PATCH-NEEDS-REBASE gdm-domain-logon.patch hpj@novell.com -- Add UI to log in a specific domain (was: PATCH-FEATURE-SLED)
Patch8: gdm-domain-logon.patch
# PATCH-FIX-OPENSUSE gdm-sysconfig-settings.patch bnc432360 hpj@novell.com -- Read autologin options from /etc/sysconfig/displaymanager
Patch13: gdm-sysconfig-settings.patch
Patch8: gdm-sysconfig-settings.patch
# PATCH-FEATURE-SLED gdm-domain-logon.patch hpj@novell.com -- Add UI to log in a specific domain
Patch9: gdm-domain-logon.patch
# PATCH-FIX-UPSTREAM gdm-greeter-greater-ui.patch bnc436431 bgo560508 vuntz@novell.com -- Improve the layout of the greeter. Note: the patch contains a patched glade file *and* the result glade file (for reference only, in case we need to rebase the patch)
Patch15: gdm-greeter-greater-ui.patch
# PATCH-FIX-UPSTREAM gdm-always-reflect-keyboard-layout.patch bnc438159 bgo561771 hpj@novell.com -- Make keyboard selector not neglect to apply the selected keyboard in some situations.
@ -77,8 +73,6 @@ Patch19: gdm-save-panel-space-on-low-resolutions.patch
Patch20: gdm-selecting-desktop-environment.patch
# PATCH-FIX-OPENSUSE gdm-gconf-path.patch vuntz@novell.com -- Fix gconf paths to be consistent with the ones used in openSUSE
Patch31: gdm-gconf-path.patch
# PATCH-FIX-UPSTREAM gdm-keyboard-from-hal.patch bnc492284 bnc478083 vuntz@novell.com -- Read the keyboard layout from hal
Patch32: gdm-keyboard-from-hal.patch
# PATCH-FIX-OPENSUSE gdm-default-wm.patch vuntz@novell.com -- Use sysconfig to know to which desktop to use by default
Patch34: gdm-default-wm.patch
# PATCH-FIX-OPENSUSE gdm-xauthlocalhostname.patch bgo555464 vuntz@novell.com -- Set XAUTHLOCALHOSTNAME to localhost for local logins to avoid issues in the session in case the hostname changes
@ -89,6 +83,8 @@ Patch37: gdm-autologin-once.patch
Patch39: gdm-polkit-gnome-path.patch
# PATCH-FIX-UPSTREAM gdm-look-at-runlevel.patch bnc540482 bgo599180 vuntz@opensuse.org -- Look at the current runlevel before managing the display again, so we don't do this when shutting down or rebooting
Patch40: gdm-look-at-runlevel.patch
# PATCH-FIX-UPSTREAM gdm-add-missing-locale.patch captain.magnus@opensuse.org -- Add missing locale.alias file. This patch can be removed with the next version update
Patch41: gdm-add-missing-locale.patch
# PATCH-FIX-OPENSUSE gdm-selinux.patch -- Small changes to make it compile fine with SELinux
Patch60: gdm-selinux.patch
Url: http://www.gnome.org/
@ -144,22 +140,21 @@ gnome-patch-translation-prepare
%patch4 -p1
%patch6 -p1
%patch7 -p1
# NEEDS-REBASE - also re-enable gnome-patch-translation-update after patch rebase
# %%patch8 -p1
%patch13 -p1
%patch8 -p1
%patch9 -p1
%patch15 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch31 -p1
%patch32 -p1
%patch34 -p1
%patch35 -p1
%patch37 -p1
%patch39 -p1
%patch40 -p1
%patch41 -p1
%patch60
# gnome-patch-translation-update
gnome-patch-translation-update
%build
libtoolize -f -i
@ -194,7 +189,6 @@ mv $RPM_BUILD_ROOT%{_sysconfdir}/gdm/PostLogin/Default.sample $RPM_BUILD_ROOT%{_
mkdir -p $RPM_BUILD_ROOT/sbin/conf.d
cp %{S:3} $RPM_BUILD_ROOT/sbin/conf.d
chmod +x $RPM_BUILD_ROOT/sbin/conf.d/SuSEconfig.gdm
touch $RPM_BUILD_ROOT%{_sysconfdir}/gdm/gdm_sysconfig.conf
mkdir -p $RPM_BUILD_ROOT{_localstatedir}/log/gdm
mkdir -p $RPM_BUILD_ROOT{_localstatedir}/run/gdm
%find_lang %{name}
@ -210,8 +204,6 @@ rm -rf $RPM_BUILD_ROOT
/usr/sbin/useradd -r -o -g gdm -s /bin/false \
-c "Gnome Display Manager daemon" -d /var/lib/gdm gdm 2> /dev/null || :
/usr/sbin/usermod -g gdm -G gdm -s /bin/false gdm 2> /dev/null
# Remove old gdm_sysconfig.conf to update custom.conf from sysconfig settings.
rm -f etc/gdm/gdm_sysconfig.conf
# Fix incorrect interpretation of DISPLAYMANAGER_PASSWORD_LESS_LOGIN (#307566).
# Last done in SLED10&10.1, first fixed in 10.3.
# Can be removed after SLES12:
@ -238,7 +230,6 @@ fi
%doc AUTHORS COPYING ChangeLog NEWS README
%dir %config %{_sysconfdir}/gdm
%config %{_sysconfdir}/gdm/[IPXl]*
%ghost %{_sysconfdir}/gdm/gdm_sysconfig.conf
%{_sbindir}/*
%{_bindir}/*
%{_datadir}/gdm

View File

@ -1,48 +0,0 @@
## Path: Desktop/Display manager
## Description: settings to generate a proper displaymanager config
## Config: gdm
## Type: yesno
## Default: no
#
# Allow remote access of the user root to your display manager. Note
# that root can never login if DISPLAYMANAGER_SHUTDOWN is "auto" and
# System/Security/Permissions/PERMISSION_SECURITY is "paranoid"
#
DISPLAYMANAGER_ROOT_LOGIN_REMOTE="no"
## Type: string
## Default:
#
# Define the user whom should get logged in without request. If string
# is empty, display standard login dialog.
#
DISPLAYMANAGER_AUTOLOGIN=""
## Type: yesno
## Default: no
#
# Allow all users to login without password, but ask for the user, if
# DISPLAYMANAGER_AUTOLOGIN is empty.
#
DISPLAYMANAGER_PASSWORD_LESS_LOGIN="no"
## Type: yesno
## Default: no
#
# Display a combobox for Active Directory domains.
#
DISPLAYMANAGER_AD_INTEGRATION="no"
## Type: list(root,all,none,auto)
## Default: auto
#
# Determine who will be able to shutdown or reboot the system in kdm
# and gdm. Valid values are: "root" (only root can shutdown), "all"
# (everybody can shutdown), "none" (nobody can shutdown from
# displaymanager), "auto" (follow
# System/Security/Permissions/PERMISSION_SECURITY to decide: "easy
# local" is equal to "all", everything else is equal to "root") Note
# that remote user can never shutdown in GDM.
#
DISPLAYMANAGER_SHUTDOWN="auto"