Rootwrap pid check raises exception

Bug #926412 reported by Vish Ishaya
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Vish Ishaya

Bug Description

If the second paramater of a rootwrapped command is not an integer and there are exactly two parameters, the rootwrap filter will raise an exception. This breaks later filters that might match.

For example:

$ ./bin/nova-rootwrap cat test
Traceback (most recent call last):
  File "./bin/nova-rootwrap", line 63, in <module>
    filtermatch = wrapper.match_filter(filters, userargs)
  File "/Users/vishvananda/cache/stack/nova/nova/rootwrap/wrapper.py", line 51, in match_filter
    if f.match(userargs):
  File "/Users/vishvananda/cache/stack/nova/nova/rootwrap/filters.py", line 116, in match
    pid = int(args[1])
ValueError: invalid literal for int() with base 10: 'test'

Changed in nova:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Vish Ishaya (vishvananda)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/3778

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/3778
Committed: http://github.com/openstack/nova/commit/4ce6645f08fffa194f76e5d4105bfb77b6c8cd14
Submitter: Jenkins
Branch: master

commit 4ce6645f08fffa194f76e5d4105bfb77b6c8cd14
Author: Vishvananda Ishaya <email address hidden>
Date: Fri Feb 3 15:44:29 2012 -0800

    Makes sure killfilter doesn't raise ValueError

     * Fixes bug 926412
     * Includes failing test

    Change-Id: Ie0105ff777575d6dd794ce5b5e08545fb54ecf8b

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.