Hello community,

here is the log from the commit of package yast2-ftp-server for 
openSUSE:Factory checked in at 2018-12-31 09:42:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ftp-server (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-ftp-server.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-ftp-server"

Mon Dec 31 09:42:26 2018 rev:66 rq:655337 version:4.1.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ftp-server/yast2-ftp-server.changes        
2018-09-05 13:48:52.514289820 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-ftp-server.new.28833/yast2-ftp-server.changes 
    2018-12-31 09:42:27.702409580 +0100
@@ -1,0 +2,18 @@
+Wed Dec  5 11:43:58 UTC 2018 - [email protected]
+
+- always use absolute path to binaries (bsc#1118291)
+- escape properly shell arguments (bsc#1118291)
+- 4.1.6
+
+-------------------------------------------------------------------
+Sun Nov 25 03:00:38 UTC 2018 - Stasiek Michalski <[email protected]>
+
+- Provide icon with module (boo#1109310)
+- 4.1.5
+
+-------------------------------------------------------------------
+Tue Oct 16 16:41:44 CEST 2018 - [email protected]
+
+- Added license file to spec.
+
+-------------------------------------------------------------------

Old:
----
  yast2-ftp-server-4.1.4.tar.bz2

New:
----
  yast2-ftp-server-4.1.6.tar.bz2

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

Other differences:
------------------
++++++ yast2-ftp-server.spec ++++++
--- /var/tmp/diff_new_pack.KNcpAH/_old  2018-12-31 09:42:28.078409272 +0100
+++ /var/tmp/diff_new_pack.KNcpAH/_new  2018-12-31 09:42:28.078409272 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ftp-server
-Version:        4.1.4
+Version:        4.1.6
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -66,5 +66,7 @@
 %{yast_schemadir}/autoyast/rnc/ftp-server.rnc
 %{yast_scrconfdir}/*.scr
 %doc %{yast_docdir}
+%license COPYING
+%{yast_icondir}
 
 %changelog

++++++ yast2-ftp-server-4.1.4.tar.bz2 -> yast2-ftp-server-4.1.6.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ftp-server-4.1.4/package/yast2-ftp-server.changes 
new/yast2-ftp-server-4.1.6/package/yast2-ftp-server.changes
--- old/yast2-ftp-server-4.1.4/package/yast2-ftp-server.changes 2018-08-23 
18:02:04.000000000 +0200
+++ new/yast2-ftp-server-4.1.6/package/yast2-ftp-server.changes 2018-12-05 
13:53:29.000000000 +0100
@@ -1,4 +1,22 @@
 -------------------------------------------------------------------
+Wed Dec  5 11:43:58 UTC 2018 - [email protected]
+
+- always use absolute path to binaries (bsc#1118291)
+- escape properly shell arguments (bsc#1118291)
+- 4.1.6
+
+-------------------------------------------------------------------
+Sun Nov 25 03:00:38 UTC 2018 - Stasiek Michalski <[email protected]>
+
+- Provide icon with module (boo#1109310)
+- 4.1.5
+
+-------------------------------------------------------------------
+Tue Oct 16 16:41:44 CEST 2018 - [email protected]
+
+- Added license file to spec.
+
+-------------------------------------------------------------------
 Wed Aug 22 16:01:22 UTC 2018 - [email protected]
 
 - Update calls to YaST2 systemd classes (related to fate#319428)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ftp-server-4.1.4/package/yast2-ftp-server.spec 
new/yast2-ftp-server-4.1.6/package/yast2-ftp-server.spec
--- old/yast2-ftp-server-4.1.4/package/yast2-ftp-server.spec    2018-08-23 
18:02:04.000000000 +0200
+++ new/yast2-ftp-server-4.1.6/package/yast2-ftp-server.spec    2018-12-05 
13:53:29.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ftp-server
-Version:        4.1.4
+Version:        4.1.6
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -66,5 +66,7 @@
 %{yast_schemadir}/autoyast/rnc/ftp-server.rnc
 %{yast_scrconfdir}/*.scr
 %doc %{yast_docdir}
+%license COPYING
+%{yast_icondir}
 
 %changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ftp-server-4.1.4/src/icons/hicolor/scalable/apps/yast-ftp-server.svg 
new/yast2-ftp-server-4.1.6/src/icons/hicolor/scalable/apps/yast-ftp-server.svg
--- 
old/yast2-ftp-server-4.1.4/src/icons/hicolor/scalable/apps/yast-ftp-server.svg  
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-ftp-server-4.1.6/src/icons/hicolor/scalable/apps/yast-ftp-server.svg  
    2018-12-05 13:53:29.000000000 +0100
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="128" height="128" version="1.1" viewBox="0 0 128 128.00001" 
xmlns="http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink";>
+<defs>
+<linearGradient id="a">
+<stop stop-color="#deddda" offset="0"/>
+<stop stop-color="#f6f5f4" offset="1"/>
+</linearGradient>
+<linearGradient id="g" x1="4.0976" x2="4.0026" y1="25.888" y2="1.8906" 
gradientTransform="scale(4)" gradientUnits="userSpaceOnUse" xlink:href="#a"/>
+<linearGradient id="f" x1="2" x2="30" y1="14" y2="14" 
gradientTransform="scale(4)" gradientUnits="userSpaceOnUse">
+<stop stop-color="#c0bfbc" offset="0"/>
+<stop stop-color="#deddda" offset=".035714"/>
+<stop stop-color="#c0bfbc" offset=".071429"/>
+<stop stop-color="#c0bfbc" offset=".92857"/>
+<stop stop-color="#deddda" offset=".96429"/>
+<stop stop-color="#c0bfbc" offset="1"/>
+</linearGradient>
+<linearGradient id="e" x1="3" x2="29" y1="14" y2="14" 
gradientTransform="scale(4)" gradientUnits="userSpaceOnUse" xlink:href="#a"/>
+<linearGradient id="d" x1="11" x2="20" y1="6" y2="6" 
gradientTransform="scale(4)" gradientUnits="userSpaceOnUse">
+<stop stop-color="#c0bfbc" offset="0"/>
+<stop stop-color="#deddda" offset="1"/>
+</linearGradient>
+<linearGradient id="c" x1="11" x2="20" y1="13" y2="13" 
gradientTransform="scale(4)" gradientUnits="userSpaceOnUse">
+<stop stop-color="#c0bfbc" offset="0"/>
+<stop stop-color="#deddda" offset="1"/>
+</linearGradient>
+<linearGradient id="b" x1="11" x2="20" y1="20" y2="20" 
gradientTransform="scale(4)" gradientUnits="userSpaceOnUse">
+<stop stop-color="#c0bfbc" offset="0"/>
+<stop stop-color="#deddda" offset="1"/>
+</linearGradient>
+</defs>
+<rect x="8" y="4" width="112" height="104" ry="8" fill="url(#f)"/>
+<rect x="8" y="4" width="112" height="96" ry="8" fill="url(#e)"/>
+<rect x="12" y="8" width="104" height="88" ry="8" fill="#c0bfbc"/>
+<rect x="16" y="20" width="96" height="64" ry="0" fill="#c0bfbc"/>
+<path d="m20 12c-2.216 0-4.086 1.7857-4 4v20h96v-20c0-2.216-1.784-4-4-4zm-4 
28v24h96v-24zm0 28v20c0 2.216 1.784 4 4 4h88c2.216 0 4-1.784 4-4v-20z" 
fill="url(#g)"/>
+<rect x="44" y="16" width="36" height="12" ry="4" fill="#9a9996"/>
+<rect x="44" y="20" width="36" height="8" ry="4" fill="url(#d)"/>
+<rect x="44" y="44" width="36" height="12" ry="4" fill="#9a9996"/>
+<rect x="44" y="48" width="36" height="8" ry="4" fill="url(#c)"/>
+<rect x="44" y="72" width="36" height="12" ry="4" fill="#9a9996"/>
+<rect x="44" y="76" width="36" height="8" ry="4" fill="url(#b)"/>
+<rect x="60" y="104" width="8" height="12" fill="#f6d32d"/>
+<rect x="20" y="116" width="88" height="8" fill="#f6d32d"/>
+<rect x="20" y="120" width="88" height="4" fill="#e5a50a"/>
+</svg>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ftp-server-4.1.4/src/icons/hicolor/symbolic/apps/yast-ftp-server-symbolic.svg
 
new/yast2-ftp-server-4.1.6/src/icons/hicolor/symbolic/apps/yast-ftp-server-symbolic.svg
--- 
old/yast2-ftp-server-4.1.4/src/icons/hicolor/symbolic/apps/yast-ftp-server-symbolic.svg
     1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-ftp-server-4.1.6/src/icons/hicolor/symbolic/apps/yast-ftp-server-symbolic.svg
     2018-12-05 13:53:29.000000000 +0100
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg"; width="16" height="16">
+  <path d="M 4 0 C 2.892 0 2 0.892 2 2 L 2 11 C 2 12.108 2.892 13 4 13 L 7 13 
L 7 15 L 3 15 L 3 16 L 10 16 L 10 15 L 9.2910156 15 L 9.2910156 13 L 10 13 L 10 
11 L 4 11 L 4 7 L 12 7 L 12 10 L 14 10 L 14 2 C 14 0.892 13.108 0 12 0 L 4 0 z 
M 4 2 L 12 2 L 12 5.7109375 L 4 5.7109375 L 4 2 z M 6.5 3 C 6.223 3 6 3.223 6 
3.5 C 6 3.777 6.223 4 6.5 4 L 9.5 4 C 9.777 4 10 3.777 10 3.5 C 10 3.223 9.777 
3 9.5 3 L 6.5 3 z M 6.5 8 C 6.223 8 6 8.223 6 8.5 C 6 8.777 6.223 9 6.5 9 L 9.5 
9 C 9.777 9 10 8.777 10 8.5 C 10 8.223 9.777 8 9.5 8 L 6.5 8 z M 11 11 L 11 16 
L 16 16 L 16 11 L 11 11 z M 12 12 L 13 12 L 13 13 L 14 13 L 14 12 L 15 12 L 15 
14 L 14 14 L 14 15 L 13 15 L 13 14 L 12 14 L 12 12 z " fill="#c0bfbc" />
+</svg>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ftp-server-4.1.4/src/modules/FtpServer.rb 
new/yast2-ftp-server-4.1.6/src/modules/FtpServer.rb
--- old/yast2-ftp-server-4.1.4/src/modules/FtpServer.rb 2018-08-23 
18:02:04.000000000 +0200
+++ new/yast2-ftp-server-4.1.6/src/modules/FtpServer.rb 2018-12-05 
13:53:29.000000000 +0100
@@ -3,6 +3,8 @@
 require "yast"
 require "yast2/system_service"
 require "y2firewall/firewalld"
+require "shellwords"
+require "fileutils"
 
 module Yast
   # Configure vsftpd: https://security.appspot.com/vsftpd.html
@@ -193,7 +195,7 @@
       result = false
       command = ""
       if @anon_homedir != ""
-        command = Ops.add(Ops.add("ls -l ", @anon_homedir), " | grep upload")
+        command = "/usr/bin/ls -l #{@anon_homedir.shellescape} | /usr/bin/grep 
upload"
       end
       if command != ""
         options = Convert.to_map(
@@ -273,10 +275,7 @@
       end
 
       if @anon_homedir != "" && @pure_ftp_allowed_permissios_upload != -1
-        command = Ops.add(
-          Ops.add(Ops.add("ls -l ", directory), " | grep "),
-          upload_dir
-        )
+        command = "/usr/bin/ls -l #{directory.shellescape} | /usr/bin/grep 
#{upload_dir.shellescape}"
       end
       if command != ""
         options = Convert.to_map(
@@ -494,8 +493,6 @@
     # It is necessary if user want to allow uploading for anonymous
     # @return [Boolean] result of function (true/false)
     def WriteUpload
-      result = true
-      command = ""
       upload = ""
       authentication = Builtins.tointeger(Ops.get(@EDIT_SETTINGS, 
"AnonAuthen"))
       if authentication != 1 && @create_upload_dir && @upload_good_permission
@@ -512,73 +509,31 @@
             "/upload"
           end
         end
-        command = "dir=`ls "
-        command = Ops.add(command, @anon_homedir)
-        command = Ops.add(
-          command,
-          " | grep upload`; if [ -z $dir ]; then mkdir "
-        )
-        command = Ops.add(
-          Ops.add(Ops.add(command, @anon_homedir), upload),
-          "; chown "
-        )
 
         if Ops.get(@EDIT_SETTINGS, "GuestUser") != ""
-          command = Ops.add(
-            Ops.add(Ops.add(command, Ops.get(@EDIT_SETTINGS, "GuestUser")), 
":"),
-            Ops.get(@EDIT_SETTINGS, "GuestUser")
-          )
+          user = @EDIT_SETTINGS["GuestUser"]
         elsif Ops.get(@EDIT_SETTINGS, "FTPUser") != ""
-          command = Ops.add(
-            Ops.add(Ops.add(command, Ops.get(@EDIT_SETTINGS, "FTPUser")), ":"),
-            Ops.get(@EDIT_SETTINGS, "FTPUser")
-          )
+          user = @EDIT_SETTINGS["FTPUser"]
         end
 
-        command = Ops.add(
-          Ops.add(Ops.add(Ops.add(command, " "), @anon_homedir), upload),
-          "; chmod 766 "
-        )
-        command = Ops.add(
-          Ops.add(
-            Ops.add(
-              Ops.add(
-                Ops.add(Ops.add(command, @anon_homedir), upload),
-                "; else chmod 766 "
-              ),
-              @anon_homedir
-            ),
-            upload
-          ),
-          "; fi"
-        )
-        # "dir=`ls /srv/ftp/ | grep upload`; if [ -z $dir ]; then echo $dir; 
mkdir /srv/ftp/upload;
-        #  chown ftp:ftp /srv/ftp/upload/; chmod 755 /srv/ftp/upload; else 
chmod 766 /srv/ftp/upload/; fi"
-        Builtins.y2milestone(
-          "[ftp-server] (WriteUpload) bash command for creating upload dir : 
%1",
-          command
-        )
-        options = Convert.to_map(
-          SCR.Execute(path(".target.bash_output"), command)
-        )
-        result = if Ops.get(options, "exit").zero?
-          true
-        else
-          false
+        dir = @anon_homedir + upload
+
+        if !File.exist?(dir)
+          FileUtils.mkdir(dir)
+          FileUtils.chown(user, user, dir) if user
         end
-      else
-        result = true
+
+        FileUtils.chmod(0o766, dir)
       end
       # restart/reaload daemons...
       Service.restart("vsftpd") if Service.active?("vsftpd")
 
       # update permissions for home directory if upload is enabled...
       if @pure_ftp_allowed_permissios_upload != -1 && @change_permissions
-        command = Ops.add("chmod 755 ", @anon_homedir)
-        SCR.Execute(path(".target.bash_output"), command)
+        FileUtils.chmod(0o755, @anon_homedir)
       end
 
-      result
+      true
     end
 
     # read value from  PURE_EDIT_SETTINGS


Reply via email to