{"action":"opened","number":33172,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/33172","id":69672753,"html_url":"https://github.com/saltstack/salt/pull/33172","diff_url":"https://github.com/saltstack/salt/pull/33172.diff","patch_url":"https://github.com/saltstack/salt/pull/33172.patch","issue_url":"https://api.github.com/repos/saltstack/salt/issues/33172","number":33172,"state":"open","locked":false,"title":"linux_acl: Allow '-' as a separation character in ACL permissions. Fi…","user":{"login":"Kurocon","id":1193988,"avatar_url":"https://avatars.githubusercontent.com/u/1193988?v=3","gravatar_id":"","url":"https://api.github.com/users/Kurocon","html_url":"https://github.com/Kurocon","followers_url":"https://api.github.com/users/Kurocon/followers","following_url":"https://api.github.com/users/Kurocon/following{/other_user}","gists_url":"https://api.github.com/users/Kurocon/gists{/gist_id}","starred_url":"https://api.github.com/users/Kurocon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kurocon/subscriptions","organizations_url":"https://api.github.com/users/Kurocon/orgs","repos_url":"https://api.github.com/users/Kurocon/repos","events_url":"https://api.github.com/users/Kurocon/events{/privacy}","received_events_url":"https://api.github.com/users/Kurocon/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\nAllow '-' as a separation character in ACL permissions.  \r\n\r\nThis allows using acl states with things like '- perms: r-x' or '- perms: r--', which also works when manually setting ACL's using setfacl.\r\n\r\n### What issues does this PR fix or reference?\r\nFixes #31270\r\n\r\n### Previous Behavior\r\nACL states defined as follows would fail with the error below. One would have to remove the '-' from the state for it to work correctly:\r\n\r\nState:\r\n```\r\n/tmp/testdir/:\r\n  acl.present:\r\n    - acl_type: user\r\n    - acl_name: root\r\n    - perms: r-x\r\n```\r\n\r\nError:\r\n```\r\n     Comment: An exception occurred in this state: Traceback (most recent call last):\r\n                File \"/usr/lib/python2.7/dist-packages/salt/state.py\", line 1624, in call\r\n                  **cdata['kwargs'])\r\n                File \"/usr/lib/python2.7/dist-packages/salt/loader.py\", line 1491, in wrapper\r\n                  return f(*args, **kwargs)\r\n                File \"/usr/lib/python2.7/dist-packages/salt/states/linux_acl.py\", line 77, in present\r\n                  if user[acl_name]['octal'] == sum([_octal.get(i, i) for i in perms]):\r\n              TypeError: unsupported operand type(s) for +: 'int' and 'str'\r\n```\r\n\r\n### New Behavior\r\nThe above ACL state works as expected, giving read and execute permissions on `/tmp/testdir/` to the user root.\r\n\r\n### Tests written?\r\nNo\r\n","created_at":"2016-05-11T13:34:45Z","updated_at":"2016-05-11T13:34:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/saltstack/salt/pulls/33172/commits","review_comments_url":"https://api.github.com/repos/saltstack/salt/pulls/33172/comments","review_comment_url":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/33172/comments","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/a5675cfca52e877a39a60160f4cd5e9773215948","head":{"label":"Kurocon:bugfix-31270","ref":"bugfix-31270","sha":"a5675cfca52e877a39a60160f4cd5e9773215948","user":{"login":"Kurocon","id":1193988,"avatar_url":"https://avatars.githubusercontent.com/u/1193988?v=3","gravatar_id":"","url":"https://api.github.com/users/Kurocon","html_url":"https://github.com/Kurocon","followers_url":"https://api.github.com/users/Kurocon/followers","following_url":"https://api.github.com/users/Kurocon/following{/other_user}","gists_url":"https://api.github.com/users/Kurocon/gists{/gist_id}","starred_url":"https://api.github.com/users/Kurocon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kurocon/subscriptions","organizations_url":"https://api.github.com/users/Kurocon/orgs","repos_url":"https://api.github.com/users/Kurocon/repos","events_url":"https://api.github.com/users/Kurocon/events{/privacy}","received_events_url":"https://api.github.com/users/Kurocon/received_events","type":"User","site_admin":false},"repo":{"id":58546917,"name":"salt","full_name":"Kurocon/salt","owner":{"login":"Kurocon","id":1193988,"avatar_url":"https://avatars.githubusercontent.com/u/1193988?v=3","gravatar_id":"","url":"https://api.github.com/users/Kurocon","html_url":"https://github.com/Kurocon","followers_url":"https://api.github.com/users/Kurocon/followers","following_url":"https://api.github.com/users/Kurocon/following{/other_user}","gists_url":"https://api.github.com/users/Kurocon/gists{/gist_id}","starred_url":"https://api.github.com/users/Kurocon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kurocon/subscriptions","organizations_url":"https://api.github.com/users/Kurocon/orgs","repos_url":"https://api.github.com/users/Kurocon/repos","events_url":"https://api.github.com/users/Kurocon/events{/privacy}","received_events_url":"https://api.github.com/users/Kurocon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Kurocon/salt","description":"Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt Open software package repository here: ","fork":true,"url":"https://api.github.com/repos/Kurocon/salt","forks_url":"https://api.github.com/repos/Kurocon/salt/forks","keys_url":"https://api.github.com/repos/Kurocon/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kurocon/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kurocon/salt/teams","hooks_url":"https://api.github.com/repos/Kurocon/salt/hooks","issue_events_url":"https://api.github.com/repos/Kurocon/salt/issues/events{/number}","events_url":"https://api.github.com/repos/Kurocon/salt/events","assignees_url":"https://api.github.com/repos/Kurocon/salt/assignees{/user}","branches_url":"https://api.github.com/repos/Kurocon/salt/branches{/branch}","tags_url":"https://api.github.com/repos/Kurocon/salt/tags","blobs_url":"https://api.github.com/repos/Kurocon/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kurocon/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kurocon/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kurocon/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kurocon/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/Kurocon/salt/languages","stargazers_url":"https://api.github.com/repos/Kurocon/salt/stargazers","contributors_url":"https://api.github.com/repos/Kurocon/salt/contributors","subscribers_url":"https://api.github.com/repos/Kurocon/salt/subscribers","subscription_url":"https://api.github.com/repos/Kurocon/salt/subscription","commits_url":"https://api.github.com/repos/Kurocon/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kurocon/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kurocon/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kurocon/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kurocon/salt/contents/{+path}","compare_url":"https://api.github.com/repos/Kurocon/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kurocon/salt/merges","archive_url":"https://api.github.com/repos/Kurocon/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kurocon/salt/downloads","issues_url":"https://api.github.com/repos/Kurocon/salt/issues{/number}","pulls_url":"https://api.github.com/repos/Kurocon/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/Kurocon/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/Kurocon/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kurocon/salt/labels{/name}","releases_url":"https://api.github.com/repos/Kurocon/salt/releases{/id}","deployments_url":"https://api.github.com/repos/Kurocon/salt/deployments","created_at":"2016-05-11T13:23:23Z","updated_at":"2016-05-11T13:23:37Z","pushed_at":"2016-05-11T13:30:16Z","git_url":"git://github.com/Kurocon/salt.git","ssh_url":"git@github.com:Kurocon/salt.git","clone_url":"https://github.com/Kurocon/salt.git","svn_url":"https://github.com/Kurocon/salt","homepage":"https://repo.saltstack.com/","size":159288,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"saltstack:develop","ref":"develop","sha":"a599be97777829a1a6d046808cf6bad3c239a9fb","user":{"login":"saltstack","id":1147473,"avatar_url":"https://avatars.githubusercontent.com/u/1147473?v=3","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"repo":{"id":1390248,"name":"salt","full_name":"saltstack/salt","owner":{"login":"saltstack","id":1147473,"avatar_url":"https://avatars.githubusercontent.com/u/1147473?v=3","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/saltstack/salt","description":"Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt Open software package repository here: ","fork":false,"url":"https://api.github.com/repos/saltstack/salt","forks_url":"https://api.github.com/repos/saltstack/salt/forks","keys_url":"https://api.github.com/repos/saltstack/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saltstack/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saltstack/salt/teams","hooks_url":"https://api.github.com/repos/saltstack/salt/hooks","issue_events_url":"https://api.github.com/repos/saltstack/salt/issues/events{/number}","events_url":"https://api.github.com/repos/saltstack/salt/events","assignees_url":"https://api.github.com/repos/saltstack/salt/assignees{/user}","branches_url":"https://api.github.com/repos/saltstack/salt/branches{/branch}","tags_url":"https://api.github.com/repos/saltstack/salt/tags","blobs_url":"https://api.github.com/repos/saltstack/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saltstack/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saltstack/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/saltstack/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/saltstack/salt/languages","stargazers_url":"https://api.github.com/repos/saltstack/salt/stargazers","contributors_url":"https://api.github.com/repos/saltstack/salt/contributors","subscribers_url":"https://api.github.com/repos/saltstack/salt/subscribers","subscription_url":"https://api.github.com/repos/saltstack/salt/subscription","commits_url":"https://api.github.com/repos/saltstack/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/saltstack/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/saltstack/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/saltstack/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/saltstack/salt/contents/{+path}","compare_url":"https://api.github.com/repos/saltstack/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saltstack/salt/merges","archive_url":"https://api.github.com/repos/saltstack/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saltstack/salt/downloads","issues_url":"https://api.github.com/repos/saltstack/salt/issues{/number}","pulls_url":"https://api.github.com/repos/saltstack/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/saltstack/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/saltstack/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saltstack/salt/labels{/name}","releases_url":"https://api.github.com/repos/saltstack/salt/releases{/id}","deployments_url":"https://api.github.com/repos/saltstack/salt/deployments","created_at":"2011-02-20T20:16:56Z","updated_at":"2016-05-11T10:34:59Z","pushed_at":"2016-05-11T12:16:15Z","git_url":"git://github.com/saltstack/salt.git","ssh_url":"git@github.com:saltstack/salt.git","clone_url":"https://github.com/saltstack/salt.git","svn_url":"https://github.com/saltstack/salt","homepage":"https://repo.saltstack.com/","size":226225,"stargazers_count":6513,"watchers_count":6513,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2883,"mirror_url":null,"open_issues_count":3548,"forks":2883,"open_issues":3548,"watchers":6513,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/saltstack/salt/pulls/33172"},"html":{"href":"https://github.com/saltstack/salt/pull/33172"},"issue":{"href":"https://api.github.com/repos/saltstack/salt/issues/33172"},"comments":{"href":"https://api.github.com/repos/saltstack/salt/issues/33172/comments"},"review_comments":{"href":"https://api.github.com/repos/saltstack/salt/pulls/33172/comments"},"review_comment":{"href":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/saltstack/salt/pulls/33172/commits"},"statuses":{"href":"https://api.github.com/repos/saltstack/salt/statuses/a5675cfca52e877a39a60160f4cd5e9773215948"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}