Hello community,

here is the log from the commit of package yast2-security for openSUSE:Factory 
checked in at 2019-09-23 13:14:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-security (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-security.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-security"

Mon Sep 23 13:14:51 2019 rev:84 rq:728474 version:4.2.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-security/yast2-security.changes    
2019-08-27 10:15:53.291961538 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-security.new.7948/yast2-security.changes  
2019-09-23 13:14:52.509132338 +0200
@@ -1,0 +2,7 @@
+Thu Sep  5 10:22:29 CEST 2019 - [email protected]
+
+- AY: Supporting user defined permission files like
+  "/etc/permissions.ultra". (bsc#1147173)
+- 4.2.2
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-security.spec ++++++
--- /var/tmp/diff_new_pack.XsRUwb/_old  2019-09-23 13:14:53.745132117 +0200
+++ /var/tmp/diff_new_pack.XsRUwb/_new  2019-09-23 13:14:53.781132110 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-security
-Version:        4.2.1
+Version:        4.2.2
 Release:        0
 Summary:        YaST2 - Security Configuration
 License:        GPL-2.0-only

++++++ yast2-security-4.2.1.tar.bz2 -> yast2-security-4.2.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-security-4.2.1/package/yast2-security.changes 
new/yast2-security-4.2.2/package/yast2-security.changes
--- old/yast2-security-4.2.1/package/yast2-security.changes     2019-08-22 
17:00:57.000000000 +0200
+++ new/yast2-security-4.2.2/package/yast2-security.changes     2019-09-05 
13:09:00.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Thu Sep  5 10:22:29 CEST 2019 - [email protected]
+
+- AY: Supporting user defined permission files like
+  "/etc/permissions.ultra". (bsc#1147173)
+- 4.2.2
+
+-------------------------------------------------------------------
 Thu Aug 22 15:52:45 CEST 2019 - [email protected]
 
 - Using rb_default_ruby_abi tag in the spec file in order to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-security-4.2.1/package/yast2-security.spec 
new/yast2-security-4.2.2/package/yast2-security.spec
--- old/yast2-security-4.2.1/package/yast2-security.spec        2019-08-22 
17:00:57.000000000 +0200
+++ new/yast2-security-4.2.2/package/yast2-security.spec        2019-09-05 
13:09:00.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-security
-Version:        4.2.1
+Version:        4.2.2
 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.1/src/modules/Security.rb 
new/yast2-security-4.2.2/src/modules/Security.rb
--- old/yast2-security-4.2.1/src/modules/Security.rb    2019-08-22 
17:00:57.000000000 +0200
+++ new/yast2-security-4.2.2/src/modules/Security.rb    2019-09-05 
13:09:00.000000000 +0200
@@ -395,21 +395,18 @@
     end
 
     def read_permissions
-      perm = case @Settings["PERMISSION_SECURITY"].to_s
-              when /easy/
-                "easy"
-              when /paranoid/
-                "paranoid"
-              else
-                "secure"
-              end
+      # Removing "local" from the string
+      permissions = @Settings["PERMISSION_SECURITY"].to_s.split(" ")
+      @Settings["PERMISSION_SECURITY"] = permissions.delete_if {|p|
+        p == "local" }.join(" ")
 
-      @Settings["PERMISSION_SECURITY"] = perm
+      # default value
+      @Settings["PERMISSION_SECURITY"] = "secure" if 
@Settings["PERMISSION_SECURITY"].empty?
 
-      log.debug "PERMISSION SECURITY (after #{__callee__}): " \
+      log.debug "PERMISSION_SECURITY (after #{__callee__}): " \
         "#{@Settings['PERMISSION_SECURITY']}"
 
-      perm
+      @Settings['PERMISSION_SECURITY']
     end
 
     def read_polkit_settings
@@ -672,7 +669,9 @@
       # Write security settings
       return false if Abort()
       Progress.NextStage
-      @Settings["PERMISSION_SECURITY"] << " local"
+      if !@Settings["PERMISSION_SECURITY"].include?("local")
+        @Settings["PERMISSION_SECURITY"] << " local"
+      end
       write_to_locations
 
       # Write inittab settings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-security-4.2.1/test/security_test.rb 
new/yast2-security-4.2.2/test/security_test.rb
--- old/yast2-security-4.2.1/test/security_test.rb      2019-08-22 
17:00:57.000000000 +0200
+++ new/yast2-security-4.2.2/test/security_test.rb      2019-09-05 
13:09:00.000000000 +0200
@@ -477,16 +477,23 @@
 
     describe "#read_permissions" do
 
-      context "depending on current persission" do
+      context "depending on current permission" do
         it "sets security permission to 'easy' if contains easy" do
-          Security.Settings["PERMISSION_SECURITY"] = "it_is_easy_to_test"
+          Security.Settings["PERMISSION_SECURITY"] = "easy local"
 
           expect(Security.read_permissions).to eql("easy")
           expect(Security.Settings["PERMISSION_SECURITY"]).to eql("easy")
         end
 
-        it "sets security permission to 'paranoid' if contains paranoid" do
-          Security.Settings["PERMISSION_SECURITY"] = "paranoid_permission"
+        it "sets user defined security permission" do
+          Security.Settings["PERMISSION_SECURITY"] = "local user_defined "
+
+          expect(Security.read_permissions).to eql("user_defined")
+          expect(Security.Settings["PERMISSION_SECURITY"]).to 
eql("user_defined")
+        end
+
+        it "removes local permission" do
+          Security.Settings["PERMISSION_SECURITY"] = "paranoid local"
 
           expect(Security.read_permissions).to eql("paranoid")
           expect(Security.Settings["PERMISSION_SECURITY"]).to eql("paranoid")


Reply via email to