mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Summary: Prevent deletion of wrong iptables rules
Detail: A grep in security_group.py wasn't defined well enough, could potentially delete rules for VMs other than intended BUG-ID: CLOUDSTACK-309 Bugfix-for: master Reviewed-by: Reported-by: Francois Scala Signed-off-by: John Kinsella <jlk@stratosec.co> 1363222521 -0700
This commit is contained in:
parent
381f737e64
commit
1079d63b6f
@ -344,7 +344,7 @@ def post_default_network_rules(vm_name, vm_id, vm_ip, vm_mac, vif, brname, dhcpS
|
||||
def delete_rules_for_vm_in_bridge_firewall_chain(vmName):
|
||||
vm_name = vmName
|
||||
if vm_name.startswith('i-') or vm_name.startswith('r-'):
|
||||
vm_name = '-'.join(vm_name.split('-')[:-1])
|
||||
vm_name = '-'.join(vm_name.split('-')[:-1]) + "-def"
|
||||
|
||||
vmchain = vm_name
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user