rootwrap RegExFilter doesn't work if a ',' (comma) is part of regex
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.rootwrap |
New
|
Undecided
|
Unassigned |
Bug Description
If a regex is required to have a comma ',' also, as part of rootwrap regex filter (for ex. [0-9-,]*) then it doesn't work. It seems oslo-rootwrap code parses a comma as a parameter separator. Using a '\' as escape doesn't work either....
ubuntu@u1604:~$ cat /etc/taas/
[Filters]
i40e_sysfs_command: RegExpFilter, i40e_sysfs_command, root, i40e_sysfs_command, (?i)(add|rem), [0-9-,]*, (\/home\
ubuntu@u1604:~$ i40e.wrap i40e_sysfs_command add 0-4095 /home/ubuntu/
+ sudo /usr/local/
/usr/local/
If comma is removed (for ex. [0-9-]*), then it works fine:-
ubuntu@u1604:~$ cat /etc/taas/
[Filters]
i40e_sysfs_command: RegExpFilter, i40e_sysfs_command, root, i40e_sysfs_command, (?i)(add|rem), [0-9-]*, (\/home\
ubuntu@u1604:~$ i40e.wrap i40e_sysfs_command add 0-4095 /home/ubuntu/
+ sudo /usr/local/
description: | updated |