Hello community, here is the log from the commit of package yast2-security for openSUSE:Factory checked in at 2019-10-03 14:06:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-security (Old) and /work/SRC/openSUSE:Factory/.yast2-security.new.2352 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-security" Thu Oct 3 14:06:20 2019 rev:85 rq:734111 version:4.2.3 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-security/yast2-security.changes 2019-09-23 13:14:52.509132338 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-security.new.2352/yast2-security.changes 2019-10-03 14:06:21.844578053 +0200 @@ -1,0 +2,7 @@ +Fri Sep 27 13:10:44 CEST 2019 - schubi@suse.de + +- AY: Settings have not been exported. "console_shutdown" entry + has not been evaluated (bsc#1150821). +- 4.2.3 + +------------------------------------------------------------------- Old: ---- yast2-security-4.2.2.tar.bz2 New: ---- yast2-security-4.2.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-security.spec ++++++ --- /var/tmp/diff_new_pack.Vpd9Nc/_old 2019-10-03 14:06:22.316576839 +0200 +++ /var/tmp/diff_new_pack.Vpd9Nc/_new 2019-10-03 14:06:22.320576828 +0200 @@ -17,7 +17,7 @@ Name: yast2-security -Version: 4.2.2 +Version: 4.2.3 Release: 0 Summary: YaST2 - Security Configuration License: GPL-2.0-only ++++++ yast2-security-4.2.2.tar.bz2 -> yast2-security-4.2.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.2.2/package/yast2-security.changes new/yast2-security-4.2.3/package/yast2-security.changes --- old/yast2-security-4.2.2/package/yast2-security.changes 2019-09-05 13:09:00.000000000 +0200 +++ new/yast2-security-4.2.3/package/yast2-security.changes 2019-09-30 16:42:37.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Sep 27 13:10:44 CEST 2019 - schubi@suse.de + +- AY: Settings have not been exported. "console_shutdown" entry + has not been evaluated (bsc#1150821). +- 4.2.3 + +------------------------------------------------------------------- Thu Sep 5 10:22:29 CEST 2019 - schubi@suse.de - AY: Supporting user defined permission files like diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.2.2/package/yast2-security.spec new/yast2-security-4.2.3/package/yast2-security.spec --- old/yast2-security-4.2.2/package/yast2-security.spec 2019-09-05 13:09:00.000000000 +0200 +++ new/yast2-security-4.2.3/package/yast2-security.spec 2019-09-30 16:42:37.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-security -Version: 4.2.2 +Version: 4.2.3 Release: 0 Group: System/YaST License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.2.2/src/lib/security/ctrl_alt_del_config.rb new/yast2-security-4.2.3/src/lib/security/ctrl_alt_del_config.rb --- old/yast2-security-4.2.2/src/lib/security/ctrl_alt_del_config.rb 2019-09-05 13:09:00.000000000 +0200 +++ new/yast2-security-4.2.3/src/lib/security/ctrl_alt_del_config.rb 2019-09-30 16:42:37.000000000 +0200 @@ -27,14 +27,14 @@ include Yast::Logger Yast.import "SCR" Yast.import "Arch" - Yast.import "Package" + Yast.import "PackageSystem" Yast.import "FileUtils" SYSTEMD_FILE = "/etc/systemd/system/ctrl-alt-del.target" class << self def systemd? - Yast::Package.Installed("systemd") + Yast::PackageSystem.Installed("systemd") end def inittab? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.2.2/src/modules/Security.rb new/yast2-security-4.2.3/src/modules/Security.rb --- old/yast2-security-4.2.2/src/modules/Security.rb 2019-09-05 13:09:00.000000000 +0200 +++ new/yast2-security-4.2.3/src/modules/Security.rb 2019-09-30 16:42:37.000000000 +0200 @@ -314,13 +314,7 @@ # Read the information about ctrl+alt+del behavior # See bug 742783 for description def ReadConsoleShutdown - ret = ::Security::CtrlAltDelConfig.current || ::Security::CtrlAltDelConfig.default - - return ret if ::Security::CtrlAltDelConfig.systemd? - - @Settings["CONSOLE_SHUTDOWN"] = ret if ::Security::CtrlAltDelConfig.inittab? - - nil + @Settings["CONSOLE_SHUTDOWN"] = ::Security::CtrlAltDelConfig.current || ::Security::CtrlAltDelConfig.default end # Read the settings from the files included in @Locations @@ -435,7 +429,7 @@ # Read security settings read_from_locations - @Settings["CONSOLE_SHUTDOWN"] = ReadConsoleShutdown() + ReadConsoleShutdown() log.debug "Settings (after read console shutdown): #{@Settings}" @@ -785,7 +779,6 @@ publish :function => :SetModified, :type => "void ()" publish :function => :Modified, :type => "boolean ()" publish :function => :ReadServiceSettings, :type => "void ()" - publish :function => :ReadConsoleShutdown, :type => "string ()" publish :function => :Read, :type => "boolean ()" publish :function => :Write, :type => "boolean ()" publish :function => :Import, :type => "boolean (map)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.2.2/test/security_test.rb new/yast2-security-4.2.3/test/security_test.rb --- old/yast2-security-4.2.2/test/security_test.rb 2019-09-05 13:09:00.000000000 +0200 +++ new/yast2-security-4.2.3/test/security_test.rb 2019-09-30 16:42:37.000000000 +0200 @@ -221,7 +221,7 @@ context "when systemd is installed" do before do - allow(Package).to receive(:Installed).with("systemd") { true } + allow(PackageSystem).to receive(:Installed).with("systemd") { true } end context "on a non s390 architecture" do @@ -230,10 +230,11 @@ end context "when ctrl+alt+del file not exist" do - it "returns 'reboot'" do + it "sets settings for shutdown as 'reboot'" do allow(FileUtils).to receive(:Exists).with(ctrl_alt_del_file) { false } - expect(Security.ReadConsoleShutdown).to eql("reboot") + Security.ReadConsoleShutdown + expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eql("reboot") end end @@ -242,34 +243,38 @@ allow(FileUtils).to receive(:Exists).with(ctrl_alt_del_file) { true } end - it "returns 'ignore' by default" do + it "sets settings for shutdown as 'ignore' by default" do allow(SCR).to receive(:Read).with(path(".target.symlink"), ctrl_alt_del_file) .and_return("dummy_file") - expect(Security.ReadConsoleShutdown).to eql("ignore") + Security.ReadConsoleShutdown + expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eql("ignore") end - it "returns 'halt' if links to poweroff.target" do + it "sets settings for shutdown as 'halt' if links to poweroff.target" do allow(SCR).to receive(:Read).with(path(".target.symlink"), ctrl_alt_del_file) .and_return(target_link) - expect(Security.ReadConsoleShutdown).to eql("halt") + Security.ReadConsoleShutdown + expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eql("halt") end - it "returns 'reboot' if links to reboot.target" do + it "sets settings for shutdown as 'reboot' if links to reboot.target" do target_link = "/usr/lib/systemd/system/reboot.target" allow(SCR).to receive(:Read).with(path(".target.symlink"), ctrl_alt_del_file) .and_return(target_link) - expect(Security.ReadConsoleShutdown).to eql("reboot") + Security.ReadConsoleShutdown + expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eql("reboot") end - it "returns 'reboot' if links to ctrl-alt-del.target" do + it "sets settings for shutdown as 'reboot' if links to ctrl-alt-del.target" do target_link = "/usr/lib/systemd/system/ctrl-alt-del.target" allow(SCR).to receive(:Read).with(path(".target.symlink"), ctrl_alt_del_file) .and_return(target_link) - expect(Security.ReadConsoleShutdown).to eql("reboot") + Security.ReadConsoleShutdown + expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eql("reboot") end end @@ -281,10 +286,11 @@ end context "when ctrl+alt+del file not exist" do - it "returns 'reboot'" do + it "sets settings for shutdown as 'reboot'" do allow(FileUtils).to receive(:Exists).with(ctrl_alt_del_file) { false } - expect(Security.ReadConsoleShutdown).to eql("halt") + Security.ReadConsoleShutdown + expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eql("halt") end end @@ -293,34 +299,38 @@ allow(FileUtils).to receive(:Exists).with(ctrl_alt_del_file) { true } end - it "returns 'ignore' by default" do + it "sets settings for shutdown as 'ignore' by default" do allow(SCR).to receive(:Read).with(path(".target.symlink"), ctrl_alt_del_file) .and_return("dummy_file") - expect(Security.ReadConsoleShutdown).to eql("ignore") + Security.ReadConsoleShutdown + expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eql("ignore") end - it "returns 'halt' if links to poweroff.target" do + it "sets settings for shutdown as 'halt' if links to poweroff.target" do allow(SCR).to receive(:Read).with(path(".target.symlink"), ctrl_alt_del_file) .and_return(target_link) - expect(Security.ReadConsoleShutdown).to eql("halt") + Security.ReadConsoleShutdown + expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eql("halt") end - it "returns 'reboot' if links to reboot.target" do + it "sets settings for shutdown as 'reboot' if links to reboot.target" do target_link = "/usr/lib/systemd/system/reboot.target" allow(SCR).to receive(:Read).with(path(".target.symlink"), ctrl_alt_del_file) .and_return(target_link) - expect(Security.ReadConsoleShutdown).to eql("reboot") + Security.ReadConsoleShutdown + expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eql("reboot") end - it "returns 'halt' if links to ctrl-alt-del.target" do + it "sets settings for shutdown as 'halt' if links to ctrl-alt-del.target" do target_link = "/usr/lib/systemd/system/ctrl-alt-del.target" allow(SCR).to receive(:Read).with(path(".target.symlink"), ctrl_alt_del_file) .and_return(target_link) - expect(Security.ReadConsoleShutdown).to eql("halt") + Security.ReadConsoleShutdown + expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eql("halt") end end @@ -329,17 +339,7 @@ context "when systemd is not installed but inittab exist" do before do - allow(Package).to receive(:Installed).with("systemd") { false } - end - - it "always returns nil" do - allow(FileUtils).to receive(:Exists).with("/etc/inittab") - .and_return(false, true) - allow(::Security::CtrlAltDelConfig).to receive(:current) - .and_return("reboot", "halt") - - expect(Security.ReadConsoleShutdown).to eql(nil) - expect(Security.ReadConsoleShutdown).to eql(nil) + allow(PackageSystem).to receive(:Installed).with("systemd") { false } end context "on a non s390 architecture" do @@ -349,7 +349,7 @@ end context "when no inittab ca entry" do - it "returns 'reboot'" do + it "sets settings for shutdown as 'reboot'" do allow(FileUtils).to receive(:Exists).with("/etc/inittab") { false } Security.ReadConsoleShutdown