From 233f4fc455d851c91dd2c99f717c20f3c1dcf9f7 Mon Sep 17 00:00:00 2001 From: Paul Calabro Date: Thu, 28 Jan 2016 13:05:10 -0700 Subject: [PATCH] Adding a hyphen in the perms pattern section, since doing something like go=- is a quick way to strip all permissions for non-owners. --- lib/ansible/module_utils/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index c02f25a62a5..8b61da3f457 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -898,7 +898,7 @@ class AnsibleModule(object): def _symbolic_mode_to_octal(self, path_stat, symbolic_mode): new_mode = stat.S_IMODE(path_stat.st_mode) - mode_re = re.compile(r'^(?P[ugoa]+)(?P[-+=])(?P[rwxXst]*|[ugo])$') + mode_re = re.compile(r'^(?P[ugoa]+)(?P[-+=])(?P[rwxXst-]*|[ugo])$') for mode in symbolic_mode.split(','): match = mode_re.match(mode) if match: