Hello community,

here is the log from the commit of package python-oslo.rootwrap for 
openSUSE:Factory checked in at 2016-11-15 18:01:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.rootwrap (Old)
 and      /work/SRC/openSUSE:Factory/.python-oslo.rootwrap.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-oslo.rootwrap"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-oslo.rootwrap/python-oslo.rootwrap.changes    
    2016-09-30 15:30:24.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-oslo.rootwrap.new/python-oslo.rootwrap.changes
   2016-11-15 18:01:29.000000000 +0100
@@ -1,0 +2,11 @@
+Mon Nov 14 18:09:45 UTC 2016 - [email protected]
+update to version 5.1.1
+  * Update .gitreview for stable/newton
+  * Fix running unknown commands in daemon mode
+
+-------------------------------------------------------------------
+Fri Oct 14 14:03:08 UTC 2016 - [email protected]
+
+- switch to stable/newton tarball in _service
+
+-------------------------------------------------------------------

Old:
----
  oslo.rootwrap-5.1.0.tar.gz

New:
----
  oslo.rootwrap-5.1.1.tar.gz

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

Other differences:
------------------
++++++ python-oslo.rootwrap.spec ++++++
--- /var/tmp/diff_new_pack.Pw36ae/_old  2016-11-15 18:01:30.000000000 +0100
+++ /var/tmp/diff_new_pack.Pw36ae/_new  2016-11-15 18:01:30.000000000 +0100
@@ -18,7 +18,7 @@
 
 %global sname oslo.rootwrap
 Name:           python-oslo.rootwrap
-Version:        5.1.0
+Version:        5.1.1
 Release:        0
 Summary:        Filtering shell commands to run as root from OpenStack services
 License:        Apache-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.Pw36ae/_old  2016-11-15 18:01:30.000000000 +0100
+++ /var/tmp/diff_new_pack.Pw36ae/_new  2016-11-15 18:01:30.000000000 +0100
@@ -1,8 +1,8 @@
 <services>
   <service mode="disabled" name="renderspec">
-    <param 
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/master/openstack/oslo.rootwrap/oslo.rootwrap.spec.j2</param>
+    <param 
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/newton/openstack/oslo.rootwrap/oslo.rootwrap.spec.j2</param>
     <param name="output-name">python-oslo.rootwrap.spec</param>
-    <param 
name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/global-requirements.txt</param>
+    <param 
name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/newton/global-requirements.txt</param>
   </service>
   <service mode="disabled" name="download_files">
     <param name="changesgenerate">enable</param>
@@ -10,4 +10,5 @@
   <service name="refresh_patches" mode="disabled">
     <param name="changesgenerate">enable</param>
   </service>
+  <service name="format_spec_file" mode="disabled"/>
 </services>

++++++ oslo.rootwrap-5.1.0.tar.gz -> oslo.rootwrap-5.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.rootwrap-5.1.0/AUTHORS 
new/oslo.rootwrap-5.1.1/AUTHORS
--- old/oslo.rootwrap-5.1.0/AUTHORS     2016-08-10 14:21:32.000000000 +0200
+++ new/oslo.rootwrap-5.1.1/AUTHORS     2016-11-04 06:52:03.000000000 +0100
@@ -28,6 +28,7 @@
 Stanislav Kudriashev <[email protected]>
 Steve Martinelli <[email protected]>
 Thierry Carrez <[email protected]>
+Thomas Bechtold <[email protected]>
 Tomoki Sekiyama <[email protected]>
 Victor Stinner <[email protected]>
 Yatin Kumbhare <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.rootwrap-5.1.0/ChangeLog 
new/oslo.rootwrap-5.1.1/ChangeLog
--- old/oslo.rootwrap-5.1.0/ChangeLog   2016-08-10 14:21:32.000000000 +0200
+++ new/oslo.rootwrap-5.1.1/ChangeLog   2016-11-04 06:52:03.000000000 +0100
@@ -1,6 +1,12 @@
 CHANGES
 =======
 
+5.1.1
+-----
+
+* Fix running unknown commands in daemon mode
+* Update .gitreview for stable/newton
+
 5.1.0
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.rootwrap-5.1.0/PKG-INFO 
new/oslo.rootwrap-5.1.1/PKG-INFO
--- old/oslo.rootwrap-5.1.0/PKG-INFO    2016-08-10 14:21:32.000000000 +0200
+++ new/oslo.rootwrap-5.1.1/PKG-INFO    2016-11-04 06:52:03.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: oslo.rootwrap
-Version: 5.1.0
+Version: 5.1.1
 Summary: Oslo Rootwrap
 Home-page: https://launchpad.net/oslo
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.rootwrap-5.1.0/oslo.rootwrap.egg-info/PKG-INFO 
new/oslo.rootwrap-5.1.1/oslo.rootwrap.egg-info/PKG-INFO
--- old/oslo.rootwrap-5.1.0/oslo.rootwrap.egg-info/PKG-INFO     2016-08-10 
14:21:32.000000000 +0200
+++ new/oslo.rootwrap-5.1.1/oslo.rootwrap.egg-info/PKG-INFO     2016-11-04 
06:52:03.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: oslo.rootwrap
-Version: 5.1.0
+Version: 5.1.1
 Summary: Oslo Rootwrap
 Home-page: https://launchpad.net/oslo
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.rootwrap-5.1.0/oslo.rootwrap.egg-info/pbr.json 
new/oslo.rootwrap-5.1.1/oslo.rootwrap.egg-info/pbr.json
--- old/oslo.rootwrap-5.1.0/oslo.rootwrap.egg-info/pbr.json     2016-08-10 
14:21:32.000000000 +0200
+++ new/oslo.rootwrap-5.1.1/oslo.rootwrap.egg-info/pbr.json     2016-11-04 
06:52:03.000000000 +0100
@@ -1 +1 @@
-{"is_release": true, "git_version": "a46b731"}
\ No newline at end of file
+{"git_version": "36e9592", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.rootwrap-5.1.0/oslo_rootwrap/daemon.py 
new/oslo.rootwrap-5.1.1/oslo_rootwrap/daemon.py
--- old/oslo.rootwrap-5.1.0/oslo_rootwrap/daemon.py     2016-08-10 
14:17:08.000000000 +0200
+++ new/oslo.rootwrap-5.1.1/oslo_rootwrap/daemon.py     2016-11-04 
06:50:51.000000000 +0100
@@ -27,6 +27,7 @@
 import tempfile
 import threading
 
+from oslo_rootwrap import cmd
 from oslo_rootwrap import jsonrpc
 from oslo_rootwrap import subprocess
 from oslo_rootwrap import wrapper
@@ -45,14 +46,25 @@
         self.filters = filters
 
     def run_one_command(self, userargs, stdin=None):
-        obj = wrapper.start_subprocess(
-            self.filters, userargs,
-            exec_dirs=self.config.exec_dirs,
-            log=self.config.use_syslog,
-            close_fds=True,
-            stdin=subprocess.PIPE,
-            stdout=subprocess.PIPE,
-            stderr=subprocess.PIPE)
+        try:
+            obj = wrapper.start_subprocess(
+                self.filters, userargs,
+                exec_dirs=self.config.exec_dirs,
+                log=self.config.use_syslog,
+                close_fds=True,
+                stdin=subprocess.PIPE,
+                stdout=subprocess.PIPE,
+                stderr=subprocess.PIPE)
+        except wrapper.FilterMatchNotExecutable:
+            LOG.warning("Executable not found for: %s",
+                        ' '.join(userargs))
+            return cmd.RC_NOEXECFOUND, "", ""
+
+        except wrapper.NoFilterMatched:
+            LOG.warning("Unauthorized command: %s (no filter matched)",
+                        ' '.join(userargs))
+            return cmd.RC_UNAUTHORIZED, "", ""
+
         if six.PY3 and stdin is not None:
             stdin = os.fsencode(stdin)
         out, err = obj.communicate(stdin)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.rootwrap-5.1.0/oslo_rootwrap/tests/test_functional.py 
new/oslo.rootwrap-5.1.1/oslo_rootwrap/tests/test_functional.py
--- old/oslo.rootwrap-5.1.0/oslo_rootwrap/tests/test_functional.py      
2016-08-10 14:17:08.000000000 +0200
+++ new/oslo.rootwrap-5.1.1/oslo_rootwrap/tests/test_functional.py      
2016-11-04 06:50:51.000000000 +0100
@@ -34,9 +34,9 @@
 from testtools import content
 
 from oslo_rootwrap import client
+from oslo_rootwrap import cmd
 from oslo_rootwrap import subprocess
 from oslo_rootwrap.tests import run_daemon
-from oslo_rootwrap import wrapper
 
 
 class _FunctionalBase(object):
@@ -57,6 +57,7 @@
 cat: CommandFilter, /bin/cat, root
 sh: CommandFilter, /bin/sh, root
 id: CommandFilter, /usr/bin/id, nobody
+unknown_cmd: CommandFilter, /unknown/unknown_cmd, root
 """)
 
     def _test_run_once(self, expect_byte=True):
@@ -83,6 +84,14 @@
         self.assertEqual(expect_out, out)
         self.assertEqual(expect_err, err)
 
+    def test_run_command_not_found(self):
+        code, out, err = self.execute(['unknown_cmd'])
+        self.assertEqual(cmd.RC_NOEXECFOUND, code)
+
+    def test_run_unauthorized_command(self):
+        code, out, err = self.execute(['unauthorized_cmd'])
+        self.assertEqual(cmd.RC_UNAUTHORIZED, code)
+
     def test_run_as(self):
         if os.getuid() != 0:
             self.skip('Test requires root (for setuid)')
@@ -183,9 +192,6 @@
     def test_run_with_stdin(self):
         self._test_run_with_stdin(expect_byte=False)
 
-    def test_error_propagation(self):
-        self.assertRaises(wrapper.NoFilterMatched, self.execute, ['other'])
-
     def test_daemon_ressurection(self):
         # Let the client start a daemon
         self.execute(['cat'])


Reply via email to