1
1
mirror of https://github.com/containers/udica synced 2024-09-21 09:41:35 +02:00

Fix parsing Mountpoints in docker inspect JSON file

There was a bug that udica generate always read/write allow rules for
mountpoints specified in docker JSON file, even though mountpoint was
mounted in read only mode.
This commit is contained in:
Lukas Vrabec 2019-02-17 22:44:10 +01:00
parent 241d846765
commit f069dea86a
No known key found for this signature in database
GPG Key ID: 47201AC42F29CE06

View File

@ -21,9 +21,9 @@ def parse_inspect(data):
if 'container=podman' not in json_rep[0]['Config']['Env']:
for item in json_rep[0]['Mounts']:
item['source'] = item['Source']
if 'RW' in item:
if item['Mode'] == 'rw':
item['options'] = 'rw'
if 'RO' in item:
if item['Mode'] == 'ro':
item['options'] = 'ro'
temp_ports = []