You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/cloud/docker
Andrew Pashkin e96549c95d Harden matching running containers by "command" in the Docker module
Before this patch:

  - Command was matched if 'Command' field of docker-py
    representation of Docker container ends with 'command' passed
    to Ansible docker module by user.
  - That can give false positives and false negatives.
  - For example:
      a) If 'command' was set up with more than one spaces,
         like 'command=sleep  123', it would be never matched again
         with a container(s) launched by this task.
         Because after launching, command would be normalized and
         appear, in docker-py API call, just as 'sleep 123' - with one
         space. This is false negative case.
      b) If 'entrypoint + command = command', for example
         'sleep + 123 = sleep 123', module would give false positive
         match.

This patch fixes it, by making matching more explicit - against
'Config'->Cmd' field of 'docker inspect' output, provided by docker-py
API and with proper normalization of user input by splitting it to
tokens with 'shlex.split()'.
10 years ago
..
__init__.py added __init__.py to new cloud subcategories so builds work again 11 years ago
docker.py Harden matching running containers by "command" in the Docker module 10 years ago
docker_image.py Set a default value for DEFAULT_DOCKER_API_VERSION so we can create the AnsibleModule without docker-py 11 years ago