Hello community,
here is the log from the commit of package yast2-security for openSUSE:Factory checked in at 2012-02-20 16:20:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-security (Old)
and /work/SRC/openSUSE:Factory/.yast2-security.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-security", Maintainer is "jsuchome@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-security/yast2-security.changes 2012-02-01 10:01:13.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-security.new/yast2-security.changes 2012-02-20 16:20:19.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Feb 20 08:39:15 CET 2012 - jsuchome@suse.cz
+
+- corectly read/write ctrl-alt-delete behavior when systemd is used
+ (bnc#742783)
+- 2.22.2
+
+-------------------------------------------------------------------
Old:
----
yast2-security-2.22.1.tar.bz2
New:
----
yast2-security-2.22.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-security.spec ++++++
--- /var/tmp/diff_new_pack.yutTwl/_old 2012-02-20 16:20:20.000000000 +0100
+++ /var/tmp/diff_new_pack.yutTwl/_new 2012-02-20 16:20:20.000000000 +0100
@@ -18,7 +18,7 @@
Name: yast2-security
-Version: 2.22.1
+Version: 2.22.2
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-security-2.22.1.tar.bz2 -> yast2-security-2.22.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-2.22.1/VERSION new/yast2-security-2.22.2/VERSION
--- old/yast2-security-2.22.1/VERSION 2012-01-31 15:48:53.000000000 +0100
+++ new/yast2-security-2.22.2/VERSION 2012-02-20 08:39:56.000000000 +0100
@@ -1 +1 @@
-2.22.1
+2.22.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-2.22.1/configure new/yast2-security-2.22.2/configure
--- old/yast2-security-2.22.1/configure 2012-01-31 15:52:10.000000000 +0100
+++ new/yast2-security-2.22.2/configure 2012-02-20 08:43:15.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for yast2-security 2.22.1.
+# Generated by GNU Autoconf 2.68 for yast2-security 2.22.2.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -559,8 +559,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-security'
PACKAGE_TARNAME='yast2-security'
-PACKAGE_VERSION='2.22.1'
-PACKAGE_STRING='yast2-security 2.22.1'
+PACKAGE_VERSION='2.22.2'
+PACKAGE_STRING='yast2-security 2.22.2'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
PACKAGE_URL=''
@@ -1229,7 +1229,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-security 2.22.1 to adapt to many kinds of systems.
+\`configure' configures yast2-security 2.22.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1300,7 +1300,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-security 2.22.1:";;
+ short | recursive ) echo "Configuration of yast2-security 2.22.2:";;
esac
cat <<\_ACEOF
@@ -1380,7 +1380,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-security configure 2.22.1
+yast2-security configure 2.22.2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1397,7 +1397,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-security $as_me 2.22.1, which was
+It was created by yast2-security $as_me 2.22.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2327,7 +2327,7 @@
# Define the identity of the package.
PACKAGE='yast2-security'
- VERSION='2.22.1'
+ VERSION='2.22.2'
cat >>confdefs.h <<_ACEOF
@@ -2449,7 +2449,7 @@
-VERSION="2.22.1"
+VERSION="2.22.2"
RPMNAME="yast2-security"
MAINTAINER="Jiri Suchomel MissingMandatoryServices(integer runlevel)
@@ -360,6 +363,53 @@
}
/**
+ * Read the information about ctrl+alt+del behavior
+ * See bug 742783 for description
+ */
+global string ReadConsoleShutdown () {
+
+ string ret = "ignore";
+
+ if (Package::Installed ("systemd"))
+ {
+ if (!FileUtils::Exists (ctrl_alt_del_file))
+ {
+ ret = "reboot";
+ }
+ else
+ {
+ string link = (string) SCR::Read (.target.symlink, ctrl_alt_del_file);
+ if (link == "/lib/systemd/system/poweroff.target")
+ {
+ ret = "halt";
+ }
+ else if (link == "/lib/systemd/system/reboot.target" ||
+ link == "/lib/systemd/system/ctrl-alt-del.target")
+ {
+ ret = "reboot";
+ }
+ }
+ return ret;
+ }
+ list inittab = SCR::Dir(.etc.inittab);
+ if(contains(inittab, "ca")) {
+ string ca = (string) SCR::Read(.etc.inittab.ca);
+ if(issubstring(ca, "/bin/true") || issubstring(ca, "/bin/false"))
+ Settings["CONSOLE_SHUTDOWN"] = "ignore";
+ else if(issubstring(ca, "reboot") || issubstring(ca, " -r"))
+ Settings["CONSOLE_SHUTDOWN"] = "reboot";
+ else if(issubstring(ca, "halt") || issubstring(ca, " -h"))
+ Settings["CONSOLE_SHUTDOWN"] = "halt";
+ else {
+ y2error("Unknown ca status: %1", ca);
+ Settings["CONSOLE_SHUTDOWN"] = "ignore";
+ }
+ }
+ else
+ Settings["CONSOLE_SHUTDOWN"] = "ignore";
+}
+
+/**
* Read all security settings
* @return true on success
*/
@@ -391,22 +441,7 @@
});
y2debug("Settings=%1", Settings);
- list inittab = SCR::Dir(.etc.inittab);
- if(contains(inittab, "ca")) {
- string ca = (string) SCR::Read(.etc.inittab.ca);
- if(issubstring(ca, "/bin/true") || issubstring(ca, "/bin/false"))
- Settings["CONSOLE_SHUTDOWN"] = "ignore";
- else if(issubstring(ca, "reboot") || issubstring(ca, " -r"))
- Settings["CONSOLE_SHUTDOWN"] = "reboot";
- else if(issubstring(ca, "halt") || issubstring(ca, " -h"))
- Settings["CONSOLE_SHUTDOWN"] = "halt";
- else {
- y2error("Unknown ca status: %1", ca);
- Settings["CONSOLE_SHUTDOWN"] = "ignore";
- }
- }
- else
- Settings["CONSOLE_SHUTDOWN"] = "ignore";
+ Settings["CONSOLE_SHUTDOWN"] = ReadConsoleShutdown ();
y2debug("Settings=%1", Settings);
@@ -516,6 +551,45 @@
];
/**
+ * Write the value of ctrl-alt-delete behavior
+ */
+boolean WriteConsoleShutdown (string ca) {
+
+ if (Package::Installed ("systemd"))
+ {
+ if (ca == "reboot")
+ {
+ SCR::Execute (.target.remove, ctrl_alt_del_file);
+ }
+ else if (ca == "halt")
+ {
+ SCR::Execute (.target.bash,
+ sformat ("ln -s -f /lib/systemd/system/poweroff.target %1",
+ ctrl_alt_del_file));
+ }
+ else
+ {
+ SCR::Execute (.target.bash,
+ sformat ("ln -s -f /dev/null %1", ctrl_alt_del_file));
+ }
+ return true;
+ }
+
+ if(ca == "reboot")
+ SCR::Write(.etc.inittab.ca, ":ctrlaltdel:/sbin/shutdown -r -t 4 now");
+ else if(ca == "halt")
+ SCR::Write(.etc.inittab.ca, ":ctrlaltdel:/sbin/shutdown -h -t 4 now");
+ else
+ SCR::Write(.etc.inittab.ca, ":ctrlaltdel:/bin/true");
+ SCR::Write(.etc.inittab, nil);
+
+ // re-read the modified inittab (#83480)
+ SCR::Execute (.target.bash, "/sbin/telinit q");
+ return true;
+}
+
+
+/**
* Write all security settings
* @return true on success
*/
@@ -580,17 +654,7 @@
if(Abort()) return false;
Progress::NextStage();
- string ca = Settings["CONSOLE_SHUTDOWN"]:"ignore";
- if(ca == "reboot")
- SCR::Write(.etc.inittab.ca, ":ctrlaltdel:/sbin/shutdown -r -t 4 now");
- else if(ca == "halt")
- SCR::Write(.etc.inittab.ca, ":ctrlaltdel:/sbin/shutdown -h -t 4 now");
- else
- SCR::Write(.etc.inittab.ca, ":ctrlaltdel:/bin/true");
- SCR::Write(.etc.inittab, nil);
-
- // re-read the modified inittab (#83480)
- SCR::Execute (.target.bash, "/sbin/telinit q");
+ WriteConsoleShutdown (Settings["CONSOLE_SHUTDOWN"]:"ignore");
/* Write pam settings */
if(Abort()) return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-2.22.1/testsuite/tests/Level1.out new/yast2-security-2.22.2/testsuite/tests/Level1.out
--- old/yast2-security-2.22.1/testsuite/tests/Level1.out 2011-09-08 15:27:43.000000000 +0200
+++ new/yast2-security-2.22.2/testsuite/tests/Level1.out 2012-02-16 10:02:23.000000000 +0100
@@ -65,9 +65,7 @@
Write .sysconfig.security nil true
Write .sysconfig.services nil true
Write .sysconfig.suseconfig nil true
-Write .etc.inittab.ca ":ctrlaltdel:/sbin/shutdown -r -t 4 now" true
-Write .etc.inittab nil true
-Execute .target.bash "/sbin/telinit q" 0
+Execute .target.remove "/etc/systemd/system/ctrl-alt-del.target" 0
Read .etc.default.passwd."CRYPT_FILES" nil
Write .etc.default.passwd."CRYPT_FILES" "sha512" true
Execute .target.bash_output "/usr/sbin/pam-config -a --cracklib" $[]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-2.22.1/testsuite/tests/Level2.out new/yast2-security-2.22.2/testsuite/tests/Level2.out
--- old/yast2-security-2.22.1/testsuite/tests/Level2.out 2011-09-08 15:27:59.000000000 +0200
+++ new/yast2-security-2.22.2/testsuite/tests/Level2.out 2012-02-16 09:58:57.000000000 +0100
@@ -65,9 +65,7 @@
Write .sysconfig.security nil true
Write .sysconfig.services nil true
Write .sysconfig.suseconfig nil true
-Write .etc.inittab.ca ":ctrlaltdel:/bin/true" true
-Write .etc.inittab nil true
-Execute .target.bash "/sbin/telinit q" 0
+Execute .target.bash "ln -s -f /dev/null /etc/systemd/system/ctrl-alt-del.target" 0
Read .etc.default.passwd."CRYPT_FILES" nil
Write .etc.default.passwd."CRYPT_FILES" "sha512" true
Execute .target.bash_output "/usr/sbin/pam-config -a --cracklib" $[]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-2.22.1/testsuite/tests/Level3.out new/yast2-security-2.22.2/testsuite/tests/Level3.out
--- old/yast2-security-2.22.1/testsuite/tests/Level3.out 2011-09-08 15:28:12.000000000 +0200
+++ new/yast2-security-2.22.2/testsuite/tests/Level3.out 2012-02-16 09:59:14.000000000 +0100
@@ -65,9 +65,7 @@
Write .sysconfig.security nil true
Write .sysconfig.services nil true
Write .sysconfig.suseconfig nil true
-Write .etc.inittab.ca ":ctrlaltdel:/bin/true" true
-Write .etc.inittab nil true
-Execute .target.bash "/sbin/telinit q" 0
+Execute .target.bash "ln -s -f /dev/null /etc/systemd/system/ctrl-alt-del.target" 0
Read .etc.default.passwd."CRYPT_FILES" nil
Write .etc.default.passwd."CRYPT_FILES" "sha512" true
Execute .target.bash_output "/usr/sbin/pam-config -a --cracklib" $[]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-2.22.1/testsuite/tests/Read.out new/yast2-security-2.22.2/testsuite/tests/Read.out
--- old/yast2-security-2.22.1/testsuite/tests/Read.out 2011-09-15 09:36:48.000000000 +0200
+++ new/yast2-security-2.22.2/testsuite/tests/Read.out 2012-02-16 09:59:42.000000000 +0100
@@ -40,8 +40,7 @@
Read .sysconfig.suseconfig.CWD_IN_ROOT_PATH "r2"
Read .target.size "/etc/sysconfig/suseconfig" 1
Read .sysconfig.suseconfig.CWD_IN_USER_PATH "r3"
-Dir .etc.inittab: ["ca"]
-Read .etc.inittab.ca ":ctrlaltdel:/sbin/shutdown -r -t 4 now"
+Read .target.symlink "/etc/systemd/system/ctrl-alt-del.target" nil
Read .etc.default.passwd."CRYPT_FILES" "blowfish"
Read .etc.default.passwd.group_crypt nil
Read .etc.default.passwd.crypt "md5"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-2.22.1/testsuite/tests/Write.out new/yast2-security-2.22.2/testsuite/tests/Write.out
--- old/yast2-security-2.22.1/testsuite/tests/Write.out 2011-09-19 14:56:20.000000000 +0200
+++ new/yast2-security-2.22.2/testsuite/tests/Write.out 2012-02-17 10:04:12.000000000 +0100
@@ -65,9 +65,7 @@
Write .sysconfig.security nil true
Write .sysconfig.services nil true
Write .sysconfig.suseconfig nil true
-Write .etc.inittab.ca ":ctrlaltdel:/sbin/shutdown -r -t 4 now" true
-Write .etc.inittab nil true
-Execute .target.bash "/sbin/telinit q" 0
+Execute .target.bash "ln -s -f /lib/systemd/system/poweroff.target /etc/systemd/system/ctrl-alt-del.target" 0
Read .etc.default.passwd."CRYPT_FILES" nil
Write .etc.default.passwd."CRYPT_FILES" "sha512" true
Execute .target.bash_output "/usr/sbin/pam-config -d --cracklib" $[]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-2.22.1/testsuite/tests/Write.ycp new/yast2-security-2.22.2/testsuite/tests/Write.ycp
--- old/yast2-security-2.22.1/testsuite/tests/Write.ycp 2011-09-16 10:40:24.000000000 +0200
+++ new/yast2-security-2.22.2/testsuite/tests/Write.ycp 2012-02-20 08:42:20.000000000 +0100
@@ -7,7 +7,7 @@
* Authors:
* Michal Svec