Hello community,
here is the log from the commit of package yast2-security for openSUSE:Factory
checked in at 2020-12-18 19:56:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-security (Old)
and /work/SRC/openSUSE:Factory/.yast2-security.new.5145 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-security"
Fri Dec 18 19:56:50 2020 rev:99 rq:855997 version:4.3.7
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-security/yast2-security.changes
2020-12-15 12:33:04.752130584 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-security.new.5145/yast2-security.changes
2020-12-18 19:56:51.765900518 +0100
@@ -1,0 +2,6 @@
+Tue Dec 15 12:33:52 UTC 2020 - schubi <schubi@localhost>
+
+- Removed old code for sysvinit configuration (bsc#1175494).
+- 4.3.7
+
+-------------------------------------------------------------------
Old:
----
yast2-security-4.3.6.tar.bz2
New:
----
yast2-security-4.3.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-security.spec ++++++
--- /var/tmp/diff_new_pack.A3KqOe/_old 2020-12-18 19:56:52.517901322 +0100
+++ /var/tmp/diff_new_pack.A3KqOe/_new 2020-12-18 19:56:52.521901326 +0100
@@ -17,7 +17,7 @@
Name: yast2-security
-Version: 4.3.6
+Version: 4.3.7
Release: 0
Summary: YaST2 - Security Configuration
License: GPL-2.0-only
++++++ yast2-security-4.3.6.tar.bz2 -> yast2-security-4.3.7.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-security-4.3.6/package/yast2-security.changes
new/yast2-security-4.3.7/package/yast2-security.changes
--- old/yast2-security-4.3.6/package/yast2-security.changes 2020-12-14
17:21:01.000000000 +0100
+++ new/yast2-security-4.3.7/package/yast2-security.changes 2020-12-15
14:43:55.000000000 +0100
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Dec 15 12:33:52 UTC 2020 - schubi <schubi@localhost>
+
+- Removed old code for sysvinit configuration (bsc#1175494).
+- 4.3.7
+
+-------------------------------------------------------------------
Mon Dec 14 14:49:26 UTC 2020 - schubi <schubi@intern>
- Removed obsolete setting DISPLAYMANAGER_SHUTDOWN from
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-security-4.3.6/package/yast2-security.spec
new/yast2-security-4.3.7/package/yast2-security.spec
--- old/yast2-security-4.3.6/package/yast2-security.spec 2020-12-14
17:21:01.000000000 +0100
+++ new/yast2-security-4.3.7/package/yast2-security.spec 2020-12-15
14:43:55.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-security
-Version: 4.3.6
+Version: 4.3.7
Release: 0
Group: System/YaST
License: GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-security-4.3.6/src/lib/security/ctrl_alt_del_config.rb
new/yast2-security-4.3.7/src/lib/security/ctrl_alt_del_config.rb
--- old/yast2-security-4.3.6/src/lib/security/ctrl_alt_del_config.rb
2020-12-14 17:21:01.000000000 +0100
+++ new/yast2-security-4.3.7/src/lib/security/ctrl_alt_del_config.rb
2020-12-15 14:43:55.000000000 +0100
@@ -37,10 +37,6 @@
Yast::PackageSystem.Installed("systemd")
end
- def inittab?
- Yast::FileUtils.Exists("/etc/inittab")
- end
-
def default
Yast::Arch.s390 ? "halt" : "reboot"
end
@@ -55,7 +51,6 @@
def current
return current_systemd if systemd?
- return current_inittab if inittab?
nil
end
@@ -80,26 +75,6 @@
end
ret
end
-
- def current_inittab
- ca = Yast::SCR.Read(Yast::Path.new(".etc.inittab.ca"))
- ret =
- case ca
- when /\/bin\/true/, /\/bin\/false/
- "ignore"
- when /reboot/, / -r/
- "reboot"
- when /halt/, / -h/
- "halt"
- when nil
- log.error("No ca entry")
- nil
- else
- log.error "Unknown ca status: #{ca}"
- "ignore"
- end
- ret
- end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-security-4.3.6/src/modules/Security.rb
new/yast2-security-4.3.7/src/modules/Security.rb
--- old/yast2-security-4.3.6/src/modules/Security.rb 2020-12-14
17:21:01.000000000 +0100
+++ new/yast2-security-4.3.7/src/modules/Security.rb 2020-12-15
14:43:55.000000000 +0100
@@ -221,7 +221,6 @@
}
# Remaining settings:
- # - CONSOLE_SHUTDOWN (/etc/inittab)
# - PASSWD_ENCRYPTION (/etc/pam?)
# - MANDATORY_SERVICES
# - EXTRA_SERVICES
@@ -316,11 +315,6 @@
nil
end
- def inittab_shutdown_configured?
- inittab = SCR.Dir(path(".etc.inittab"))
- inittab.include?("ca")
- end
-
# Read the information about ctrl+alt+del behavior
# See bug 742783 for description
def ReadConsoleShutdown
@@ -487,43 +481,22 @@
# Write the value of ctrl-alt-delete behavior
def write_console_shutdown(ca)
- if Package.Installed("systemd")
- if ca == "reboot"
- SCR.Execute(path(".target.remove"), @ctrl_alt_del_file)
- elsif ca == "halt"
- SCR.Execute(
- path(".target.bash"),
- Builtins.sformat(
- "ln -s -f /usr/lib/systemd/system/poweroff.target %1",
- @ctrl_alt_del_file
- )
- )
- else
- SCR.Execute(
- path(".target.bash"),
- Builtins.sformat("ln -s -f /dev/null %1", @ctrl_alt_del_file)
- )
- end
- return true
- end
-
if ca == "reboot"
- SCR.Write(
- path(".etc.inittab.ca"),
- ":ctrlaltdel:/sbin/shutdown -r -t 4 now"
- )
+ SCR.Execute(path(".target.remove"), @ctrl_alt_del_file)
elsif ca == "halt"
- SCR.Write(
- path(".etc.inittab.ca"),
- ":ctrlaltdel:/sbin/shutdown -h -t 4 now"
+ SCR.Execute(
+ path(".target.bash"),
+ Builtins.sformat(
+ "ln -s -f /usr/lib/systemd/system/poweroff.target %1",
+ @ctrl_alt_del_file
+ )
)
else
- SCR.Write(path(".etc.inittab.ca"), ":ctrlaltdel:/bin/true")
+ SCR.Execute(
+ path(".target.bash"),
+ Builtins.sformat("ln -s -f /dev/null %1", @ctrl_alt_del_file)
+ )
end
- SCR.Write(path(".etc.inittab"), nil)
-
- # re-read the modified inittab (#83480)
- SCR.Execute(path(".target.bash"), "/sbin/telinit q")
true
end
@@ -683,7 +656,7 @@
# Progress stage 1/4
_("Write security settings"),
# Progress stage 2/4
- _("Write inittab settings"),
+ _("Write shutdown settings"),
# Progress stage 3/4
_("Write PAM settings"),
# Progress stage 4/4
@@ -693,7 +666,7 @@
# Progress step 1/5
_("Writing security settings..."),
# Progress step 2/5
- _("Writing inittab settings..."),
+ _("Writing shutdown settings..."),
# Progress step 3/5
_("Writing PAM settings..."),
# Progress step 4/5
@@ -716,7 +689,7 @@
write_to_locations
write_shadow_config
- # Write inittab settings
+ # Write shutdown settings
return false if Abort()
Progress.NextStage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-security-4.3.6/test/security_test.rb
new/yast2-security-4.3.7/test/security_test.rb
--- old/yast2-security-4.3.6/test/security_test.rb 2020-12-14
17:21:01.000000000 +0100
+++ new/yast2-security-4.3.7/test/security_test.rb 2020-12-15
14:43:55.000000000 +0100
@@ -415,106 +415,6 @@
end
end
end
-
- context "when systemd is not installed but inittab exist" do
- before do
- allow(PackageSystem).to receive(:Installed).with("systemd") { false }
- end
-
- context "on a non s390 architecture" do
- before do
- allow(Arch).to receive(:s390) { false }
- allow(::Security::CtrlAltDelConfig).to receive(:inittab?) { true }
- end
-
- context "when no inittab ca entry" do
- it "sets settings for shutdown as 'reboot'" do
- allow(FileUtils).to receive(:Exists).with("/etc/inittab") {
false }
-
- Security.ReadConsoleShutdown
- expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eq("reboot")
- end
- end
-
- context "when inittab ca entry exist" do
- before do
- allow(FileUtils).to receive(:Exists).with("/etc/inittab") { true
}
- end
-
- it "sets settings for shutdown as 'ignore' by default" do
- allow(SCR).to receive(:Read).with(path(".etc.inittab.ca"))
- .and_return("12345:ctrlaltdel:/bin/false")
-
- Security.ReadConsoleShutdown
- expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eq("ignore")
- end
-
- it "sets settings for shutdown as 'halt' if contains 'halt' or '
-h'" do
- allow(SCR).to receive(:Read).with(path(".etc.inittab.ca"))
- .and_return("12345:ctrlaltdel:/sbin/shutdown -h now")
-
- Security.ReadConsoleShutdown
- expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eq("halt")
- end
-
- it "sets settings for shutdown as 'reboot' if contains 'reboot' or
-r" do
- allow(SCR).to receive(:Read).with(path(".etc.inittab.ca"))
- .and_return("12345:ctrlaltdel:/sbin/shutdown -r now")
-
- Security.ReadConsoleShutdown
- expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eq("reboot")
- end
-
- end
- end
-
- context "on a s390 architecture" do
- before do
- allow(Arch).to receive(:s390) { true }
- allow(::Security::CtrlAltDelConfig).to receive(:inittab?) { true }
- end
-
- context "when no inittab ca entry" do
- it "returns 'halt'" do
- allow(FileUtils).to receive(:Exists).with("/etc/inittab") {
false }
-
- Security.ReadConsoleShutdown
- expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eq("halt")
- end
- end
-
- context "when inittab ca entry exist" do
- before do
- allow(FileUtils).to receive(:Exists).with("/etc/inittab") { true
}
- end
-
- it "sets settings for shutdown as 'ignore' by default" do
- allow(SCR).to receive(:Read).with(path(".etc.inittab.ca"))
- .and_return("12345:ctrlaltdel:/bin/echo 'Not implemented'")
-
- Security.ReadConsoleShutdown
- expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eq("ignore")
- end
-
- it "sets settings for shutdown as 'halt' if contains 'halt' or '
-h'" do
- allow(SCR).to receive(:Read).with(path(".etc.inittab.ca"))
- .and_return("12345:/sbin/shutdown -h now")
-
- Security.ReadConsoleShutdown
- expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eq("halt")
- end
-
- it "sets settings for shutdown as 'reboot' if contains 'reboot' or
-r" do
- allow(SCR).to receive(:Read).with(path(".etc.inittab.ca"))
- .and_return("12345:ctrlaltdel:/sbin/shutdown -r now")
-
- Security.ReadConsoleShutdown
- expect(Security.Settings["CONSOLE_SHUTDOWN"]).to eq("reboot")
- end
-
- end
- end
- end
end
describe "#read_pam_settings" do
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives:
https://lists.opensuse.org/archives/list/[email protected]