{"action":"created","comment":{"url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments/342461733","pull_request_review_id":311603743,"id":342461733,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0MjQ2MTczMw==","diff_hunk":"@@ -330,6 +330,42 @@ account    required     pam_succeed_if.so user ingroup %s\"\"\" % m.get_admin_group\n                                     \"couldn't parse login input: Malformed input\",\n                                     \"couldn't parse login input: Authentication failed\")\n \n+    @skipImage(\"No SELinux\", \"debian-stable\", \"debian-testing\", \"ubuntu-stable\", \"ubuntu-1804\")\n+    @skipImage(\"Only supported for Fedora >= 30\", \"fedora-atomic\")\n+    def testSELinuxRestrictedUser(self):\n+        m = self.machine\n+        b = self.browser\n+\n+        # non-admin user_u\n+        m.execute(\"useradd unpriv; echo 'unpriv:foobar' | chpasswd; semanage login -a -s user_u unpriv\")\n+        m.start_cockpit()\n+        b.login_and_go(\"/system\", user=\"unpriv\")\n+        # not an admin\n+        b.wait_not_present(\"#shutdown-group button:not(.disabled)\")","path":"test/verify/check-login","position":15,"original_position":15,"commit_id":"9c53e05720f4db80461873f4ef1cede5b03432bb","original_commit_id":"9c53e05720f4db80461873f4ef1cede5b03432bb","user":{"login":"martinpitt","id":200109,"node_id":"MDQ6VXNlcjIwMDEwOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/200109?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpitt","html_url":"https://github.com/martinpitt","followers_url":"https://api.github.com/users/martinpitt/followers","following_url":"https://api.github.com/users/martinpitt/following{/other_user}","gists_url":"https://api.github.com/users/martinpitt/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpitt/subscriptions","organizations_url":"https://api.github.com/users/martinpitt/orgs","repos_url":"https://api.github.com/users/martinpitt/repos","events_url":"https://api.github.com/users/martinpitt/events{/privacy}","received_events_url":"https://api.github.com/users/martinpitt/received_events","type":"User","site_admin":false},"body":"Good point! This is jquery, so it's always present, but indeed we may soon change the page to start with `disabled` and enable it when there's enough privilege (issue #12242). So this should indeed first wait for the buttons to be present and at least one disabled, and *then* ensure that no button is enabled.","created_at":"2019-11-05T09:38:41Z","updated_at":"2019-11-05T09:38:41Z","html_url":"https://github.com/cockpit-project/cockpit/pull/13085#discussion_r342461733","pull_request_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/13085","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments/342461733"},"html":{"href":"https://github.com/cockpit-project/cockpit/pull/13085#discussion_r342461733"},"pull_request":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/13085"}},"in_reply_to_id":342451921},"pull_request":{"url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/13085","id":336180390,"node_id":"MDExOlB1bGxSZXF1ZXN0MzM2MTgwMzkw","html_url":"https://github.com/cockpit-project/cockpit/pull/13085","diff_url":"https://github.com/cockpit-project/cockpit/pull/13085.diff","patch_url":"https://github.com/cockpit-project/cockpit/pull/13085.patch","issue_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/13085","number":13085,"state":"open","locked":false,"title":"test: Check cockpit login with SELinux restricted user","user":{"login":"martinpitt","id":200109,"node_id":"MDQ6VXNlcjIwMDEwOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/200109?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpitt","html_url":"https://github.com/martinpitt","followers_url":"https://api.github.com/users/martinpitt/followers","following_url":"https://api.github.com/users/martinpitt/following{/other_user}","gists_url":"https://api.github.com/users/martinpitt/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpitt/subscriptions","organizations_url":"https://api.github.com/users/martinpitt/orgs","repos_url":"https://api.github.com/users/martinpitt/repos","events_url":"https://api.github.com/users/martinpitt/events{/privacy}","received_events_url":"https://api.github.com/users/martinpitt/received_events","type":"User","site_admin":false},"body":"Check that users with a SELinux role other than unconfined_u (in\r\nparticular, user_u and sysadm_u) can log into Cockpit. This validates\r\nthe various bug dependencies of\r\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1727382\r\nand ensures that they stay fixed in the future.","created_at":"2019-11-04T09:25:45Z","updated_at":"2019-11-05T09:38:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b083e1ad4b17eb8a251c78d3bb634b7dc30f36d4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/13085/commits","review_comments_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/13085/comments","review_comment_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/13085/comments","statuses_url":"https://api.github.com/repos/cockpit-project/cockpit/statuses/9c53e05720f4db80461873f4ef1cede5b03432bb","head":{"label":"martinpitt:test-selinux-confined-users","ref":"test-selinux-confined-users","sha":"9c53e05720f4db80461873f4ef1cede5b03432bb","user":{"login":"martinpitt","id":200109,"node_id":"MDQ6VXNlcjIwMDEwOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/200109?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpitt","html_url":"https://github.com/martinpitt","followers_url":"https://api.github.com/users/martinpitt/followers","following_url":"https://api.github.com/users/martinpitt/following{/other_user}","gists_url":"https://api.github.com/users/martinpitt/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpitt/subscriptions","organizations_url":"https://api.github.com/users/martinpitt/orgs","repos_url":"https://api.github.com/users/martinpitt/repos","events_url":"https://api.github.com/users/martinpitt/events{/privacy}","received_events_url":"https://api.github.com/users/martinpitt/received_events","type":"User","site_admin":false},"repo":{"id":77914361,"node_id":"MDEwOlJlcG9zaXRvcnk3NzkxNDM2MQ==","name":"cockpit","full_name":"martinpitt/cockpit","private":false,"owner":{"login":"martinpitt","id":200109,"node_id":"MDQ6VXNlcjIwMDEwOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/200109?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpitt","html_url":"https://github.com/martinpitt","followers_url":"https://api.github.com/users/martinpitt/followers","following_url":"https://api.github.com/users/martinpitt/following{/other_user}","gists_url":"https://api.github.com/users/martinpitt/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpitt/subscriptions","organizations_url":"https://api.github.com/users/martinpitt/orgs","repos_url":"https://api.github.com/users/martinpitt/repos","events_url":"https://api.github.com/users/martinpitt/events{/privacy}","received_events_url":"https://api.github.com/users/martinpitt/received_events","type":"User","site_admin":false},"html_url":"https://github.com/martinpitt/cockpit","description":"Cockpit, an admin interface for Linux servers","fork":true,"url":"https://api.github.com/repos/martinpitt/cockpit","forks_url":"https://api.github.com/repos/martinpitt/cockpit/forks","keys_url":"https://api.github.com/repos/martinpitt/cockpit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martinpitt/cockpit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martinpitt/cockpit/teams","hooks_url":"https://api.github.com/repos/martinpitt/cockpit/hooks","issue_events_url":"https://api.github.com/repos/martinpitt/cockpit/issues/events{/number}","events_url":"https://api.github.com/repos/martinpitt/cockpit/events","assignees_url":"https://api.github.com/repos/martinpitt/cockpit/assignees{/user}","branches_url":"https://api.github.com/repos/martinpitt/cockpit/branches{/branch}","tags_url":"https://api.github.com/repos/martinpitt/cockpit/tags","blobs_url":"https://api.github.com/repos/martinpitt/cockpit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martinpitt/cockpit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martinpitt/cockpit/git/refs{/sha}","trees_url":"https://api.github.com/repos/martinpitt/cockpit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martinpitt/cockpit/statuses/{sha}","languages_url":"https://api.github.com/repos/martinpitt/cockpit/languages","stargazers_url":"https://api.github.com/repos/martinpitt/cockpit/stargazers","contributors_url":"https://api.github.com/repos/martinpitt/cockpit/contributors","subscribers_url":"https://api.github.com/repos/martinpitt/cockpit/subscribers","subscription_url":"https://api.github.com/repos/martinpitt/cockpit/subscription","commits_url":"https://api.github.com/repos/martinpitt/cockpit/commits{/sha}","git_commits_url":"https://api.github.com/repos/martinpitt/cockpit/git/commits{/sha}","comments_url":"https://api.github.com/repos/martinpitt/cockpit/comments{/number}","issue_comment_url":"https://api.github.com/repos/martinpitt/cockpit/issues/comments{/number}","contents_url":"https://api.github.com/repos/martinpitt/cockpit/contents/{+path}","compare_url":"https://api.github.com/repos/martinpitt/cockpit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martinpitt/cockpit/merges","archive_url":"https://api.github.com/repos/martinpitt/cockpit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martinpitt/cockpit/downloads","issues_url":"https://api.github.com/repos/martinpitt/cockpit/issues{/number}","pulls_url":"https://api.github.com/repos/martinpitt/cockpit/pulls{/number}","milestones_url":"https://api.github.com/repos/martinpitt/cockpit/milestones{/number}","notifications_url":"https://api.github.com/repos/martinpitt/cockpit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martinpitt/cockpit/labels{/name}","releases_url":"https://api.github.com/repos/martinpitt/cockpit/releases{/id}","deployments_url":"https://api.github.com/repos/martinpitt/cockpit/deployments","created_at":"2017-01-03T12:16:26Z","updated_at":"2019-08-27T08:59:38Z","pushed_at":"2019-11-05T09:32:23Z","git_url":"git://github.com/martinpitt/cockpit.git","ssh_url":"git@github.com:martinpitt/cockpit.git","clone_url":"https://github.com/martinpitt/cockpit.git","svn_url":"https://github.com/martinpitt/cockpit","homepage":"http://www.cockpit-project.org/","size":73153,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1","node_id":"MDc6TGljZW5zZTEx"},"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"cockpit-project:master","ref":"master","sha":"e0f0c87f83510afdb9553390935d94b50a7ef497","user":{"login":"cockpit-project","id":5765104,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3NjUxMDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5765104?v=4","gravatar_id":"","url":"https://api.github.com/users/cockpit-project","html_url":"https://github.com/cockpit-project","followers_url":"https://api.github.com/users/cockpit-project/followers","following_url":"https://api.github.com/users/cockpit-project/following{/other_user}","gists_url":"https://api.github.com/users/cockpit-project/gists{/gist_id}","starred_url":"https://api.github.com/users/cockpit-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockpit-project/subscriptions","organizations_url":"https://api.github.com/users/cockpit-project/orgs","repos_url":"https://api.github.com/users/cockpit-project/repos","events_url":"https://api.github.com/users/cockpit-project/events{/privacy}","received_events_url":"https://api.github.com/users/cockpit-project/received_events","type":"Organization","site_admin":false},"repo":{"id":14049216,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA0OTIxNg==","name":"cockpit","full_name":"cockpit-project/cockpit","private":false,"owner":{"login":"cockpit-project","id":5765104,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3NjUxMDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5765104?v=4","gravatar_id":"","url":"https://api.github.com/users/cockpit-project","html_url":"https://github.com/cockpit-project","followers_url":"https://api.github.com/users/cockpit-project/followers","following_url":"https://api.github.com/users/cockpit-project/following{/other_user}","gists_url":"https://api.github.com/users/cockpit-project/gists{/gist_id}","starred_url":"https://api.github.com/users/cockpit-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockpit-project/subscriptions","organizations_url":"https://api.github.com/users/cockpit-project/orgs","repos_url":"https://api.github.com/users/cockpit-project/repos","events_url":"https://api.github.com/users/cockpit-project/events{/privacy}","received_events_url":"https://api.github.com/users/cockpit-project/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cockpit-project/cockpit","description":"There's code a goin' on","fork":false,"url":"https://api.github.com/repos/cockpit-project/cockpit","forks_url":"https://api.github.com/repos/cockpit-project/cockpit/forks","keys_url":"https://api.github.com/repos/cockpit-project/cockpit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cockpit-project/cockpit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cockpit-project/cockpit/teams","hooks_url":"https://api.github.com/repos/cockpit-project/cockpit/hooks","issue_events_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/events{/number}","events_url":"https://api.github.com/repos/cockpit-project/cockpit/events","assignees_url":"https://api.github.com/repos/cockpit-project/cockpit/assignees{/user}","branches_url":"https://api.github.com/repos/cockpit-project/cockpit/branches{/branch}","tags_url":"https://api.github.com/repos/cockpit-project/cockpit/tags","blobs_url":"https://api.github.com/repos/cockpit-project/cockpit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cockpit-project/cockpit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cockpit-project/cockpit/git/refs{/sha}","trees_url":"https://api.github.com/repos/cockpit-project/cockpit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cockpit-project/cockpit/statuses/{sha}","languages_url":"https://api.github.com/repos/cockpit-project/cockpit/languages","stargazers_url":"https://api.github.com/repos/cockpit-project/cockpit/stargazers","contributors_url":"https://api.github.com/repos/cockpit-project/cockpit/contributors","subscribers_url":"https://api.github.com/repos/cockpit-project/cockpit/subscribers","subscription_url":"https://api.github.com/repos/cockpit-project/cockpit/subscription","commits_url":"https://api.github.com/repos/cockpit-project/cockpit/commits{/sha}","git_commits_url":"https://api.github.com/repos/cockpit-project/cockpit/git/commits{/sha}","comments_url":"https://api.github.com/repos/cockpit-project/cockpit/comments{/number}","issue_comment_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/comments{/number}","contents_url":"https://api.github.com/repos/cockpit-project/cockpit/contents/{+path}","compare_url":"https://api.github.com/repos/cockpit-project/cockpit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cockpit-project/cockpit/merges","archive_url":"https://api.github.com/repos/cockpit-project/cockpit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cockpit-project/cockpit/downloads","issues_url":"https://api.github.com/repos/cockpit-project/cockpit/issues{/number}","pulls_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls{/number}","milestones_url":"https://api.github.com/repos/cockpit-project/cockpit/milestones{/number}","notifications_url":"https://api.github.com/repos/cockpit-project/cockpit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cockpit-project/cockpit/labels{/name}","releases_url":"https://api.github.com/repos/cockpit-project/cockpit/releases{/id}","deployments_url":"https://api.github.com/repos/cockpit-project/cockpit/deployments","created_at":"2013-11-01T17:36:46Z","updated_at":"2019-11-05T06:07:35Z","pushed_at":"2019-11-05T09:32:35Z","git_url":"git://github.com/cockpit-project/cockpit.git","ssh_url":"git@github.com:cockpit-project/cockpit.git","clone_url":"https://github.com/cockpit-project/cockpit.git","svn_url":"https://github.com/cockpit-project/cockpit","homepage":"http://www.cockpit-project.org/","size":74489,"stargazers_count":4399,"watchers_count":4399,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":593,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":379,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1","node_id":"MDc6TGljZW5zZTEx"},"forks":593,"open_issues":379,"watchers":4399,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/13085"},"html":{"href":"https://github.com/cockpit-project/cockpit/pull/13085"},"issue":{"href":"https://api.github.com/repos/cockpit-project/cockpit/issues/13085"},"comments":{"href":"https://api.github.com/repos/cockpit-project/cockpit/issues/13085/comments"},"review_comments":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/13085/comments"},"review_comment":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/13085/commits"},"statuses":{"href":"https://api.github.com/repos/cockpit-project/cockpit/statuses/9c53e05720f4db80461873f4ef1cede5b03432bb"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"martinpitt"}}