]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Restrict rootwrap find filter for NetAppNFS driver
authorDaniel Gollub <d.gollub@telekom.de>
Wed, 19 Feb 2014 06:37:20 +0000 (07:37 +0100)
committerDaniel Gollub <d.gollub@telekom.de>
Wed, 26 Feb 2014 19:16:48 +0000 (20:16 +0100)
Additional make the name of the filter unique, so it does not override
any other rule. Like the find rule of the GPFS driver.
Rootwrap is making use of plain python ConfigParser which handles INI files
with key=value pair like fashion. Where the key is unique.

Closes-Bug: 1250101

Change-Id: Id2f193485089e12f00008b38fad2b95a09674ff2

etc/cinder/rootwrap.d/volume.filters

index 1b5ed232018096a025afa570f123a782aa023aa1..fe7a28946a2da80176114f20369360c196585bcf 100644 (file)
@@ -65,7 +65,9 @@ du: CommandFilter, du, root
 truncate: CommandFilter, truncate, root
 chmod: CommandFilter, chmod, root
 rm: CommandFilter, rm, root
-find: CommandFilter, find, root
+
+# cinder/volume/drivers/netapp/nfs.py:
+netapp_nfs_find: RegExpFilter, find, root, find, ^[/]*([^/\0]+(/+)?)*$, -maxdepth, \d+, -name, img-cache.*, -amin, \+\d+
 
 # cinder/volume/drivers/glusterfs.py
 chgrp: CommandFilter, chgrp, root