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 "jsuch...@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 - jsuch...@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 <jsuch...@suse.cz>"
 
@@ -3379,7 +3379,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by yast2-security $as_me 2.22.1, which was
+This file was extended by yast2-security $as_me 2.22.2, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -3432,7 +3432,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-yast2-security config.status 2.22.1
+yast2-security config.status 2.22.2
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-security-2.22.1/configure.in 
new/yast2-security-2.22.2/configure.in
--- old/yast2-security-2.22.1/configure.in      2012-01-31 15:52:06.000000000 
+0100
+++ new/yast2-security-2.22.2/configure.in      2012-02-20 08:43:13.000000000 
+0100
@@ -3,7 +3,7 @@
 dnl -- This file is generated by y2autoconf 2.21.8 - DO NOT EDIT! --
 dnl    (edit configure.in.in instead)
 
-AC_INIT(yast2-security, 2.22.1, http://bugs.opensuse.org/, yast2-security)
+AC_INIT(yast2-security, 2.22.2, http://bugs.opensuse.org/, yast2-security)
 dnl Check for presence of file 'RPMNAME'
 AC_CONFIG_SRCDIR([RPMNAME])
 
@@ -18,7 +18,7 @@
 AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
 
 dnl Important YaST2 variables
-VERSION="2.22.1"
+VERSION="2.22.2"
 RPMNAME="yast2-security"
 MAINTAINER="Jiri Suchomel <jsuch...@suse.cz>"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-security-2.22.1/src/Security.ycp 
new/yast2-security-2.22.2/src/Security.ycp
--- old/yast2-security-2.22.1/src/Security.ycp  2012-01-31 15:50:17.000000000 
+0100
+++ new/yast2-security-2.22.2/src/Security.ycp  2012-02-20 08:42:20.000000000 
+0100
@@ -24,7 +24,7 @@
  * Summary:    Data for the security configuration
  * Authors:    Michal Svec <ms...@suse.cz>
  *
- * $Id: Security.ycp 67332 2012-01-31 14:50:15Z jsuchome $
+ * $Id: Security.ycp 67481 2012-02-20 07:42:18Z jsuchome $
  */
 
 {
@@ -33,6 +33,7 @@
 textdomain "security";
 
 import "FileUtils";
+import "Package";
 import "Pam";
 import "PamSettings";
 import "Progress";
@@ -54,6 +55,8 @@
 ];
 // All other services should be turned off
 
+// systemd target, defining ctrl-alt-del behavior
+string ctrl_alt_del_file        =       
"/etc/systemd/system/ctrl-alt-del.target";
 
 // return list of missing mandatory services in a runlevel
 global list<list<string> > 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 <ms...@suse.cz>
  *
- * $Id: Write.ycp 65732 2011-09-16 08:40:20Z jsuchome $
+ * $Id: Write.ycp 67481 2012-02-20 07:42:18Z jsuchome $
  *
  * testedfiles: Security.ycp PamSettings.ycp Pam.ycp
  */
@@ -19,7 +19,7 @@
 import "Security";
 
 map<string,string> m = $[
-    "CONSOLE_SHUTDOWN"         :       "reboot",
+    "CONSOLE_SHUTDOWN"         :       "halt",
     "CWD_IN_ROOT_PATH"         :       "r2",
     "CWD_IN_USER_PATH"         :       "r2s",
     "DISPLAYMANAGER_REMOTE_ACCESS":    "r4",

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to