Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-security for openSUSE:Factory checked in at 2021-03-08 15:15:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-security (Old) and /work/SRC/openSUSE:Factory/.yast2-security.new.2378 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-security" Mon Mar 8 15:15:37 2021 rev:103 rq:876772 version:4.3.15 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-security/yast2-security.changes 2021-03-03 18:33:45.447329004 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-security.new.2378/yast2-security.changes 2021-03-08 15:17:16.697939617 +0100 @@ -1,0 +2,6 @@ +Wed Mar 3 16:09:26 UTC 2021 - David Diaz <dgonza...@suse.com> + +- Make SELinux not configurable when running on WSL (bsc#1182940) +- 4.3.15 + +------------------------------------------------------------------- Old: ---- yast2-security-4.3.14.tar.bz2 New: ---- yast2-security-4.3.15.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-security.spec ++++++ --- /var/tmp/diff_new_pack.HM6nUc/_old 2021-03-08 15:17:17.437940159 +0100 +++ /var/tmp/diff_new_pack.HM6nUc/_new 2021-03-08 15:17:17.437940159 +0100 @@ -17,7 +17,7 @@ Name: yast2-security -Version: 4.3.14 +Version: 4.3.15 Release: 0 Summary: YaST2 - Security Configuration License: GPL-2.0-only ++++++ yast2-security-4.3.14.tar.bz2 -> yast2-security-4.3.15.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.14/package/yast2-security.changes new/yast2-security-4.3.15/package/yast2-security.changes --- old/yast2-security-4.3.14/package/yast2-security.changes 2021-03-03 10:23:14.000000000 +0100 +++ new/yast2-security-4.3.15/package/yast2-security.changes 2021-03-04 16:07:18.000000000 +0100 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Mar 3 16:09:26 UTC 2021 - David Diaz <dgonza...@suse.com> + +- Make SELinux not configurable when running on WSL (bsc#1182940) +- 4.3.15 + +------------------------------------------------------------------- Tue Mar 2 17:47:22 UTC 2021 - David Diaz <dgonza...@suse.com> - Ensure defined SELinux patterns are set (bsc#1182543). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.14/package/yast2-security.spec new/yast2-security-4.3.15/package/yast2-security.spec --- old/yast2-security-4.3.14/package/yast2-security.spec 2021-03-03 10:23:14.000000000 +0100 +++ new/yast2-security-4.3.15/package/yast2-security.spec 2021-03-04 16:07:18.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-security -Version: 4.3.14 +Version: 4.3.15 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.14/src/lib/y2security/selinux.rb new/yast2-security-4.3.15/src/lib/y2security/selinux.rb --- old/yast2-security-4.3.14/src/lib/y2security/selinux.rb 2021-03-03 10:23:14.000000000 +0100 +++ new/yast2-security-4.3.15/src/lib/y2security/selinux.rb 2021-03-04 16:07:18.000000000 +0100 @@ -81,6 +81,7 @@ class Selinux include Yast::Logger + Yast.import "Arch" Yast.import "Bootloader" Yast.import "ProductFeatures" Yast.import "Stage" @@ -221,10 +222,12 @@ # Whether SELinux configuration can be changed # - # @return [Boolean] always true when running in installed system; - # the value of 'configurable' selinux settings in the control file when - # running during installation or false if not present + # @return [Boolean] false if running on Windows Subsystem for Linux (WSL); + # the value of 'configurable' selinux settings in the control file if + # running in initial stage (false if value is not present); + # always true when running in an installed system def configurable? + return false if Yast::Arch.is_wsl return true unless Yast::Stage.initial product_feature_settings[:configurable] || false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.14/test/y2security/selinux_test.rb new/yast2-security-4.3.15/test/y2security/selinux_test.rb --- old/yast2-security-4.3.14/test/y2security/selinux_test.rb 2021-03-03 10:23:14.000000000 +0100 +++ new/yast2-security-4.3.15/test/y2security/selinux_test.rb 2021-03-04 16:07:18.000000000 +0100 @@ -38,6 +38,8 @@ } end + let(:wsl) { false } + let(:selinux_mode) { "enforcing" } let(:selinux_configurable) { false } let(:selinux_patterns) { nil } @@ -57,6 +59,7 @@ before do Yast::ProductFeatures.Import(product_features) + allow(Yast::Arch).to receive(:is_wsl).and_return(wsl) allow(Yast::Stage).to receive(:initial).and_return(installation_mode) allow(Yast::Bootloader).to receive(:kernel_param).with(:common, "security") @@ -552,6 +555,14 @@ end describe "#configurable?" do + context "when running in a WSL environment" do + let(:wsl) { true } + + it "returns false" do + expect(subject.configurable?).to eq(false) + end + end + context "when running in an installed system" do it "returns true" do expect(subject.configurable?).to eq(true)