Hello community, here is the log from the commit of package gdm checked in at Tue Oct 31 16:56:12 CET 2006. -------- --- GNOME/gdm/gdm.changes 2006-10-27 17:36:19.000000000 +0200 +++ /mounts/work_src_done/STABLE/gdm/gdm.changes 2006-10-31 16:53:39.000000000 +0100 @@ -1,0 +2,6 @@ +Tue Oct 31 16:53:31 CET 2006 - sbrabec@suse.cz + +- Rewritten SuSEconfig.gdm to work better with new custom.conf + (#213037). + +------------------------------------------------------------------- New: ---- gdm-conf-custom-sysconfig.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gdm.spec ++++++ --- /var/tmp/diff_new_pack.sOi0GW/_old 2006-10-31 16:55:58.000000000 +0100 +++ /var/tmp/diff_new_pack.sOi0GW/_new 2006-10-31 16:55:58.000000000 +0100 @@ -22,7 +22,7 @@ Group: System/GUI/GNOME Autoreqprov: on Version: 2.16.1 -Release: 15 +Release: 16 Summary: The GNOME 2.x Display Manager Source: %{name}-%{version}.tar.bz2 Source1: gdm.pamd @@ -51,6 +51,7 @@ Patch27: gdm-autobuild-warning.patch Patch28: gdm-X_SERVER.patch Patch29: gdm-gdmsetup.patch +Patch30: gdm-conf-custom-sysconfig.patch URL: http://www.gnome.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Docdir: %{_defaultdocdir} @@ -99,6 +100,7 @@ %patch27 %patch28 %patch29 +%patch30 #gnome-patch-translation-update %build @@ -229,6 +231,9 @@ %dir /usr/share/xsessions %changelog -n gdm +* Tue Oct 31 2006 - sbrabec@suse.cz +- Rewritten SuSEconfig.gdm to work better with new custom.conf + (#213037). * Fri Oct 27 2006 - jhargadon@suse.de - changed TryExec to be the same as Exec in gdmsetup.desktop to resolve bug #210943 ++++++ SuSEconfig.gdm ++++++ --- GNOME/gdm/SuSEconfig.gdm 2006-09-20 22:02:26.000000000 +0200 +++ /mounts/work_src_done/STABLE/gdm/SuSEconfig.gdm 2006-10-31 16:51:11.000000000 +0100 @@ -12,8 +12,14 @@ exit 0 } +# Read old values. We will need one for correct updating of +if test -f $r/etc/opt/gnome/gdm/gdm_sysconfig.conf ; then +. $r/etc/opt/gnome/gdm/gdm_sysconfig.conf +fi +export OLD_DISPLAYMANAGER_AUTOLOGIN="$DISPLAYMANAGER_AUTOLOGIN" + r=$ROOT -# Set default values. +# Set default values. (This overwrites all variables from gdm_sysconfig.conf.) DISPLAYMANAGER_REMOTE_ACCESS="no" DISPLAYMANAGER_ROOT_LOGIN_REMOTE="no" DISPLAYMANAGER_STARTS_XSERVER="yes" @@ -41,7 +47,14 @@ } . $r/lib/YaST/SuSEconfig.functions -export DISPLAYMANAGER_REMOTE_ACCESS DISPLAYMANAGER_ROOT_LOGIN_REMOTE DISPLAYMANAGER_STARTS_XSERVER DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN DISPLAYMANAGER_AUTOLOGIN DISPLAYMANAGER_PASSWORD_LESS_LOGIN DISPLAYMANAGER_AD_INTEGRATION +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/opt/gnome/gdm/gdm_sysconfig.conf.new @@ -52,345 +65,231 @@ 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" +} + +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 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 ) - GDM_ALLOW_SHUTDOWN=true - GDM_SECURE_SHUTDOWN=true + export greeter_AllowShutdown=true + export greeter_SecureShutdown=true ;; # Remote users can never shutdown in GDM. none ) - GDM_ALLOW_SHUTDOWN=false - GDM_SECURE_SHUTDOWN=true + export greeter_AllowShutdown=false + export greeter_SecureShutdown=true ;; all ) - GDM_ALLOW_SHUTDOWN=true - GDM_SECURE_SHUTDOWN=false + 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 ) - GDM_ALLOW_SHUTDOWN=true - GDM_SECURE_SHUTDOWN=true - export DISPLAYMANAGER_ROOT_LOGIN_REMOTE="no" + export greeter_AllowShutdown=true + export greeter_SecureShutdown=true + export security_AllowRemoteRoot=false ;; "easy local" ) - GDM_ALLOW_SHUTDOWN=true - GDM_SECURE_SHUTDOWN=false + export greeter_AllowShutdown=true + export greeter_SecureShutdown=false ;; * ) - GDM_ALLOW_SHUTDOWN=true - GDM_SECURE_SHUTDOWN=true + export greeter_AllowShutdown=true + export greeter_SecureShutdown=true ;; esac ;; esac -# There are changes. Update gdm.conf. -## New change! There is no longer a gdm.conf file. It is now custom.conf. -if test -n "$(sed -n '/^\[servers\]$/,/^\[/{/^[0-9][0-9]*=/p}' <$r/etc/opt/gnome/gdm/custom.conf)" ; then - GDM_SERVER_DEFINED=1 -else - GDM_SERVER_DEFINED=0 -fi - -export GDM_ALLOW_SHUTDOWN GDM_SECURE_SHUTDOWN GDM_SERVER_DEFINED +unset unset ${!last_of_*} ${!custom_conf_*} -awk <$r/etc/opt/gnome/gdm/custom.conf >$r/etc/opt/gnome/gdm/custom.conf.new ' +# Parse configuration file and record all items to environment values. +eval "$( +awk <$r/etc/opt/gnome/gdm/custom.conf ' BEGIN { - server_seen=ENVIRON["GDM_SERVER_DEFINED"]; - expecting_disallow_tcp=0; - expecting_allowshutdown=0; - expecting_secureshutdown=0; + section="BEGIN"; + section_last_line=0; + after_empty_line=0; } -!/^DisallowTCP=.*/ { - if (expecting_disallow_tcp == 1) { - expecting_disallow_tcp = 0; - if (ENVIRON["DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN"] == "yes") { - print "DisallowTCP=false"; - } - } -} - -/^\[.*\]/ { - if (expecting_showdomain == 1) { - if (ENVIRON["DISPLAYMANAGER_AD_INTEGRATION"] == "yes") { - print "ShowDomain=true"; - } - expecting_showdomain=0; - } - if (expecting_allowshutdown == 1) { - if (ENVIRON["GDM_ALLOW_SHUTDOWN"] == "false") { - print "AllowShutdown=false"; - } - expecting_allowshutdown=0; - } - if (expecting_secureshutdown == 1) { - if (ENVIRON["GDM_SECURE_SHUTDOWN"] == "true") { - print "SecureShutdown=true"; - } - expecting_secureshutdown=0; - } - print; - gsub ("[][]", ""); - section = $0; - if (section == "greeter") { - expecting_showdomain=1; - } - if (section == "security") { - expecting_allowshutdown=1; - expecting_secureshutdown=1; - } +# Do not set last_of_ initial comments of a new section. +/^#/ { + if (after_empty_line == 0) + section_last_line=NR; + else next; } -/^Enable=.*/ { - line="$0"; - gsub ("^Enable=", "", line); - if (section == "xdmcp") { - if (ENVIRON["DISPLAYMANAGER_REMOTE_ACCESS"] == "yes") { - print "Enable=true"; - } else { - print "Enable=false"; - } - } else - print $line; +/^\[.*\]/ { + print "export last_of_"section"="section_last_line; + section=$0; + gsub ("[][]", "", section); + section_last_line=NR; + after_empty_line=0; next; } -/^#ShowDomain=.*/ { - line="$0"; - gsub ("^#ShowDomain=", "", line); - if (section == "greeter") { - if (ENVIRON["DISPLAYMANAGER_AD_INTEGRATION"] == "yes") { - print "ShowDomain=true"; - } else { - print $line; - } - expecting_showdomain=0; - } else - print $line; +/^[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; } -/^ShowDomain=.*/ { - line="$0"; - gsub ("^(#|)ShowDomain=", "", line); - if (section == "greeter") { - if (ENVIRON["DISPLAYMANAGER_AD_INTEGRATION"] == "yes") { - print "ShowDomain=true"; - } else { - print "#ShowDomain=false"; - } - expecting_showdomain=0; - } else - print $line; +# Do not set last_of_ for empty lines - we want to add missing stuff before the final empty line. +/^$/ { + after_empty_line=1; next; } -/^# The chooser is what/ { - if (expecting_showdomain == 1) { - if (ENVIRON["DISPLAYMANAGER_AD_INTEGRATION"] == "yes") { - print "ShowDomain=true"; - print ""; - } - expecting_showdomain=0; - } - print; - next; +/.*/ { + section_last_line=NR; + after_empty_line=0; } -/^#AllowShutdown=.*/ { - line="$0"; - gsub ("^#AllowShutdown=", "", line); - if (section == "security") { - if (ENVIRON["GDM_ALLOW_SHUTDOWN"] == "false") { - print "AllowShutdown=false"; - } else { - print $line; - } - expecting_allowshutdown=0; - } else - print $line; - next; +END { + print "export last_of_"section"="section_last_line; } +' +)" -/^AllowShutdown=.*/ { - line="$0"; - gsub ("^(#|)AllowShutdown=", "", line); - if (section == "security") { - if (ENVIRON["GDM_ALLOW_SHUTDOWN"] == "false") { - print "AllowShutdown=false"; - } else { - print "#AllowShutdown=true"; +# And now set what is required. +awk <$r/etc/opt/gnome/gdm/custom.conf >$r/etc/opt/gnome/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") + system("$r/opt/gnome/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); } - expecting_allowshutdown=0; - } else - print $line; - next; } -/^#SecureShutdown=.*/ { - line="$0"; - gsub ("^#SecureShutdown=", "", line); - if (section == "security") { - if (ENVIRON["GDM_SECURE_SHUTDOWN"] == "true") { - print "SecureShutdown=true"; - } else { - print $line; - } - expecting_secureshutdown=0; - } else - print $line; - next; +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"); } -/^SecureShutdown=.*/ { - line="$0"; - gsub ("^(#|)SecureShutdown=", "", line); - if (section == "security") { - if (ENVIRON["GDM_SECURE_SHUTDOWN"] == "true") { - print "SecureShutdown=true"; - } else { - print "#SecureShutdown=false"; - } - expecting_secureshutdown=0; - } else - print $line; +/^# SuSEconfig:/ { + process_unseen(); next; } -/^# XDMCP is the protocol/ { - if (expecting_allowshutdown == 1) { - if (ENVIRON["GDM_ALLOW_SHUTDOWN"] == "false") { - print "AllowShutdown=false"; - print ""; - } - expecting_allowshutdown=0; - } - if (expecting_secureshutdown == 1) { - if (ENVIRON["GDM_SECURE_SHUTDOWN"] == "true") { - print "SecureShutdown=true"; - print ""; - } - expecting_secureshutdown=0; - } +/^\[.*\]/ { + section=$0; + gsub ("[][]", "", section); print; + process_unseen(); next; } -/^AllowRemoteRoot=.*/ { - line="$0"; - gsub ("AllowRemoteRoot=", "", line); - if (section == "security") { - if (ENVIRON["DISPLAYMANAGER_ROOT_LOGIN_REMOTE"] == "yes") { - print "AllowRemoteRoot=true"; - } else { - print "AllowRemoteRoot=false"; - } +/^[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 $line; - next; -} - -/^#[0-9][0-9]*=(Standard|Chooser)$/ { - if (server_seen != 0) { print; - next; - } - if (section == "servers") { - if (ENVIRON["DISPLAYMANAGER_STARTS_XSERVER"] == "yes") { - server_seen = 1; - gsub ("^#", ""); - } - } - print; - next; -} - -/^[0-9][0-9]*=(Standard|Chooser)$/ { - if (section == "servers") { - server_seen = 1; - if (ENVIRON["DISPLAYMANAGER_STARTS_XSERVER"] != "yes") { - server_seen = 1; - print "#"$0; - next; - } - } - print; - next; -} - -/^DisallowTCP=.*/ { - expecting_disallow_tcp = 0; - line="$0"; - gsub ("DisallowTCP=", "", line); - if (section == "security") { - if (ENVIRON["DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN"] == "yes") { - print "DisallowTCP=false"; - } else { - print "DisallowTCP=true"; - } - } else - print $line; - next; -} - -/^#DisallowTCP=.*/ { - expecting_disallow_tcp = 1; - print; - next; -} - -/^AutomaticLoginEnable=.*/ { - line="$0"; - gsub ("AutomaticLoginEnable=", "", line); - if (section == "daemon") { - if (ENVIRON["DISPLAYMANAGER_AUTOLOGIN"] == "") { - print "AutomaticLoginEnable=false"; - } else { - print "AutomaticLoginEnable=true"; - } - } else - print $line; - next; -} - -/^AutomaticLogin=.*/ { - line="$0"; - gsub ("AutomaticLogin=", "", line); - if (section == "daemon") { - if (ENVIRON["DISPLAYMANAGER_AUTOLOGIN"] == "") { - print "AutomaticLogin="; - } else { - print "AutomaticLogin="ENVIRON["DISPLAYMANAGER_AUTOLOGIN"]; - } - } else - print $line; + process_unseen(); next; } /.*/ { print; + process_unseen(); + next; } ' - mv $r/etc/opt/gnome/gdm/custom.conf.new $r/etc/opt/gnome/gdm/custom.conf mv $r/etc/opt/gnome/gdm/gdm_sysconfig.conf.new $r/etc/opt/gnome/gdm/gdm_sysconfig.conf - -# 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/#&/' <$r/etc/pam.d/gdm-autologin >$r/etc/pam.d/gdm-autologin.new -else - sed 's/#\(auth[[:space:]][[:space:]]*include[[:space:]][[:space:]]*common-auth\)/\1/' <$r/etc/pam.d/gdm-autologin >$r/etc/pam.d/gdm-autologin.new -fi -if cmp -s $r/etc/pam.d/gdm-autologin $r/etc/pam.d/gdm-autologin.new ; then - rm $r/etc/pam.d/gdm-autologin.new -else - mv $r/etc/pam.d/gdm-autologin.new $r/etc/pam.d/gdm-autologin -fi - -# -# end -# ++++++ gdm-conf-custom-sysconfig.patch ++++++ --- config/gdm.conf-custom +++ config/gdm.conf-custom @@ -37,6 +37,12 @@ # # NOTE: Lines that begin with "#" are considered comments. # +# SuSEconfig comments: Some of entries in this file are updated by SuSEconfig, +# whenever sysconfig entry change. To edit these entries, please use sysconfig +# (or never touch these sysconfig variables). +# Comment for each of this entry contains related /etc/sysconfig file and +# variable. +# # Have fun! [daemon] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@suse.de