Commit Graph

26 Commits (8855b3274c57c9deb089eac8659fc37445a50575)

Author SHA1 Message Date
Sam Doran c694fe6ca4 Change examples syntax on acl module 2016-12-08 11:25:28 -05:00
John R Barker 25b6492d37 Bulk spelling improvement to modules-core (#5225)
* Correct spelling mistakes

* Correct more spelling issues

* merge conflict

* Revert typo in parms
2016-12-08 11:25:20 -05:00
Michael Scherer 441205feed Add acl freebsd (#3656)
* FreeBSD do not support --omit-header and --absolute-names

* The option for following symlink wth getfacl is different on FreeBSD

* ZFS on Freebsd use nfsv4 acls, who use a slightly different syntax

* FreeBSD do not have a --test flag, so always return 'True'

* FreeBSD do not have the --omit-headers options, so we have to filter by ourself

* Mark Freebsd as working for the acl module
2016-12-08 11:24:52 -05:00
Michael Scherer f7b29ba8fd Convert the whole files/ directory to py3 syntax (#3685) 2016-12-08 11:24:29 -05:00
Michael Scherer f423554e20 Testing the module on freebsd fail, since module is not assigned yet 2016-12-08 11:24:28 -05:00
Michael Scherer 98c729bfd7 Fix the argument for acl module (#3653) 2016-12-08 11:24:28 -05:00
Toshio Kuratomi f6aa1ff9a4 Remove duplicate documentation fields 2016-12-08 11:24:01 -05:00
quoing 3ad67d93ea Fix: Default ACL parameters are not correctly handled 2016-12-08 11:23:51 -05:00
Brian Coca f0a3914f7b simplified lowercasing 2016-12-08 11:23:50 -05:00
quoing 3a91853e7e Add "default" entry option back (removed in e95bcae), update will translate entry to standard parameters so compatibility with BDS is kept 2016-12-08 11:23:50 -05:00
Jérémie Astori 6695cc5c21 Fix physical walk on acl module for Linux
`-h` is for BSD [1] while `-P`/`--physical` is for Linux [2].
This commit fixes that option now that acl module is (temporarily)
only supported for Linux.
I will re-add `-h` when fixing BSD support.

[1]: http://www.freebsd.org/cgi/man.cgi?format=html&query=setfacl(1)
[2]: http://linuxcommand.org/man_pages/setfacl1.html
2016-12-08 11:23:33 -05:00
Jérémie Astori 186cc7cb17 Make sure entry is not sent when acl state=query 2016-12-08 11:23:33 -05:00
Jérémie Astori 3568f1cd78 Make sure permission-less entries are accepted when state=absent
Also, remove that try condition as, at that stage, no permissions with
other than 2 or 3 fields are sent to the function.
2016-12-08 11:23:33 -05:00
Jérémie Astori a93445c798 Remove support for `d[efault]:` in entry permissions
It is not documented in [the Ansible doc page][1] nor
[the BSD setfacl man entry][2] (which means it might not be compatible
with BSD) so removing it does not break the API.

On the other hand, it does not conform with POSIX 1003.1e DRAFT
STANDARD 17 according to the [Linux setfacl man entry][3] so safer to
remove.

Finally, the most important reason: in non POSIX 1003.e mode, only ACL
entries without the permissions field are accepted, so having an
optional field here is very much error-prone.

[1]: http://docs.ansible.com/ansible/acl_module.html
[2]: http://www.freebsd.org/cgi/man.cgi?format=html&query=setfacl(1)
[3]: http://linuxcommand.org/man_pages/setfacl1.html
2016-12-08 11:23:33 -05:00
Jérémie Astori 1b34f1a7ac Fix wrong expectation regarding entry format in acl module 2016-12-08 11:23:32 -05:00
Jérémie Astori 6c298e20c0 Fix wrong processing of lines returned by setfacl in test mode 2016-12-08 11:23:32 -05:00
Jérémie Astori 08e8f732c5 Fix minor whitespace issues 2016-12-08 11:23:32 -05:00
Brian Coca a1992ad890 updated encoding comment and expanded authors field 2016-12-08 11:23:31 -05:00
Jérémie Astori 288a9d8500 Set version number in recursive option description 2016-12-08 11:23:30 -05:00
Jérémie Astori 17170992c3 Ensure Python 2.4 compatibility and Linux-restricted support
- Make build_entry compatible with Python 2.4
- Re-add missing warning/comment that was forgotten while refactoring
- Replace `all()` with a good ol' for-loop Python 2.4 compatibility
- Make a condition check more explicit (when `state` is `query`)
- Make sure this module can only be run with on a Linux distribution
- Add a note about Linux-only support in the documentation
- Set the version in which recursive support was added, 2.0
2016-12-08 11:23:30 -05:00
Jérémie Astori edf531efd7 Add recursive support for ACL module (fix #5053, fix #5550, fix #7276) 2016-12-08 11:23:28 -05:00
Greg DeKoenigsberg eb881d7d5d Proper author info for all remaining modules 2016-12-08 11:23:07 -05:00
Brian Coca 47f84190a0 removed always for success, as data wont show on fail 2016-12-08 11:22:44 -05:00
Brian Coca bcd6a6a3d5 draft for documenting module returns 2016-12-08 11:22:44 -05:00
anatoly techtonik 59a700ad17 acl: Fix X support in ACL permissions
If you try to set rwX permissions, ACL fails to set them at all.

Expected:

    $ sudo setfacl -m 'group::rwX' www
    ...
    drwxrwxr-x  2 root root  4096 Nov 10 17:09 www

With Ansible:

    acl: name=/var/www permissions=rwX etype=group state=present
    ...
    drwxrw-r-x  2 root root  4096 Nov 10 17:30 www

x for group is erased. =/
2016-12-08 11:22:36 -05:00
Michael DeHaan 213e518165 file extensions! 2016-12-08 11:22:22 -05:00