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 2023-02-25 19:54:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-security (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-security.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-security"

Sat Feb 25 19:54:29 2023 rev:121 rq:1067360 version:4.5.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-security/yast2-security.changes    
2023-01-14 00:02:29.109454870 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-security.new.31432/yast2-security.changes 
2023-02-25 19:54:30.339042483 +0100
@@ -1,0 +2,8 @@
+Wed Feb 22 17:28:54 UTC 2023 - Michal Filka <mfi...@suse.com>
+
+- bsc#1208492
+  - do not store empty values in CFA login.defs empty value to
+    avoid crash when parsing according to login.defs lens
+- 4.5.6
+
+-------------------------------------------------------------------

Old:
----
  yast2-security-4.5.5.tar.bz2

New:
----
  yast2-security-4.5.6.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-security.spec ++++++
--- /var/tmp/diff_new_pack.BLfeXx/_old  2023-02-25 19:54:30.931046131 +0100
+++ /var/tmp/diff_new_pack.BLfeXx/_new  2023-02-25 19:54:30.935046155 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-security
-Version:        4.5.5
+Version:        4.5.6
 Release:        0
 Group:          System/YaST
 License:        GPL-2.0-only

++++++ yast2-security-4.5.5.tar.bz2 -> yast2-security-4.5.6.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-security-4.5.5/package/yast2-security.changes 
new/yast2-security-4.5.6/package/yast2-security.changes
--- old/yast2-security-4.5.5/package/yast2-security.changes     2022-12-30 
11:19:00.000000000 +0100
+++ new/yast2-security-4.5.6/package/yast2-security.changes     2023-02-23 
11:33:40.000000000 +0100
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Wed Feb 22 17:28:54 UTC 2023 - Michal Filka <mfi...@suse.com>
+
+- bsc#1208492
+  - do not store empty values in CFA login.defs empty value to
+    avoid crash when parsing according to login.defs lens
+- 4.5.6
+
+-------------------------------------------------------------------
 Tue Dec 20 10:21:49 UTC 2022 - Imobach Gonzalez Sosa <igonzalezs...@suse.com>
 
 - AutoYaST: export security policy settings (related to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-security-4.5.5/package/yast2-security.spec 
new/yast2-security-4.5.6/package/yast2-security.spec
--- old/yast2-security-4.5.5/package/yast2-security.spec        2022-12-30 
11:19:00.000000000 +0100
+++ new/yast2-security-4.5.6/package/yast2-security.spec        2023-02-23 
11:33:40.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-security
-Version:        4.5.5
+Version:        4.5.6
 Release:        0
 Group:          System/YaST
 License:        GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-security-4.5.5/src/modules/Security.rb 
new/yast2-security-4.5.6/src/modules/Security.rb
--- old/yast2-security-4.5.5/src/modules/Security.rb    2022-12-30 
11:19:00.000000000 +0100
+++ new/yast2-security-4.5.6/src/modules/Security.rb    2023-02-23 
11:33:40.000000000 +0100
@@ -554,6 +554,11 @@
     # Write login.defs configuration
     def write_shadow_config
       SHADOW_ATTRS.each do |attr|
+        # bsc#1208492 shadow config uses login.defs attr formatting
+        # like <Key><space>*<Value>, so empty value is not supported
+        # and moreover can cause crash in login.defs lens
+        next if @Settings[attr].nil? || @Settings[attr].empty?
+
         shadow_config.public_send("#{attr.to_s.downcase}=", @Settings[attr])
       end
       encr = @Settings.fetch("PASSWD_ENCRYPTION", default_encrypt_method)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-security-4.5.5/test/security_test.rb 
new/yast2-security-4.5.6/test/security_test.rb
--- old/yast2-security-4.5.5/test/security_test.rb      2022-12-30 
11:19:00.000000000 +0100
+++ new/yast2-security-4.5.6/test/security_test.rb      2023-02-23 
11:33:40.000000000 +0100
@@ -240,6 +240,15 @@
         expect(shadow_config).to receive(:save)
         Security.write_shadow_config
       end
+
+      it "doesn't allow empty value to enter into model for an attribute" do
+        Security.Settings["USERADD_CMD"] = ""
+
+        expect(shadow_config).not_to receive(:useradd_cmd=)
+        expect(shadow_config).to receive(:save)
+
+        Security.write_shadow_config
+      end
     end
 
     describe "#write_lsm_config" do

Reply via email to