{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/comments/102370255","pull_request_review_id":23123380,"id":102370255,"diff_hunk":"@@ -6,13 +6,30 @@ import (\n \t\"encoding/json\"\n \t\"errors\"\n \t\"fmt\"\n+\t\"syscall\"\n \n \t\"github.com/docker/docker/pkg/stringutils\"\n \tspecs \"github.com/opencontainers/runtime-spec/specs-go\"\n \t\"github.com/opencontainers/runtime-tools/generate\"\n \tlibseccomp \"github.com/seccomp/libseccomp-golang\"\n )\n \n+// IsEnabled returns true if seccomp is enabled for the host.\n+func IsEnabled() bool {\n+\t// seccompModeFilter refers to the syscall argument SECCOMP_MODE_FILTER.\n+\tconst seccompModeFilter = uintptr(2)\n+\n+\tvar enabled bool","path":"server/seccomp/seccomp.go","position":17,"original_position":17,"commit_id":"5ba42175bf37f95b956c1f4c983f5face6f48b91","original_commit_id":"5ba42175bf37f95b956c1f4c983f5face6f48b91","user":{"login":"jawnsy","id":52710,"avatar_url":"https://avatars.githubusercontent.com/u/52710?v=3","gravatar_id":"","url":"https://api.github.com/users/jawnsy","html_url":"https://github.com/jawnsy","followers_url":"https://api.github.com/users/jawnsy/followers","following_url":"https://api.github.com/users/jawnsy/following{/other_user}","gists_url":"https://api.github.com/users/jawnsy/gists{/gist_id}","starred_url":"https://api.github.com/users/jawnsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jawnsy/subscriptions","organizations_url":"https://api.github.com/users/jawnsy/orgs","repos_url":"https://api.github.com/users/jawnsy/repos","events_url":"https://api.github.com/users/jawnsy/events{/privacy}","received_events_url":"https://api.github.com/users/jawnsy/received_events","type":"User","site_admin":false},"body":"I'm curious how others feel about this style versus `enabled := false`","created_at":"2017-02-22T02:20:42Z","updated_at":"2017-02-22T02:21:32Z","html_url":"https://github.com/kubernetes-incubator/cri-o/pull/368#discussion_r102370255","pull_request_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/368","_links":{"self":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/comments/102370255"},"html":{"href":"https://github.com/kubernetes-incubator/cri-o/pull/368#discussion_r102370255"},"pull_request":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/368"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/368","id":107316204,"html_url":"https://github.com/kubernetes-incubator/cri-o/pull/368","diff_url":"https://github.com/kubernetes-incubator/cri-o/pull/368.diff","patch_url":"https://github.com/kubernetes-incubator/cri-o/pull/368.patch","issue_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues/368","number":368,"state":"open","locked":false,"title":"Run without seccomp","user":{"login":"apilloud","id":5972627,"avatar_url":"https://avatars.githubusercontent.com/u/5972627?v=3","gravatar_id":"","url":"https://api.github.com/users/apilloud","html_url":"https://github.com/apilloud","followers_url":"https://api.github.com/users/apilloud/followers","following_url":"https://api.github.com/users/apilloud/following{/other_user}","gists_url":"https://api.github.com/users/apilloud/gists{/gist_id}","starred_url":"https://api.github.com/users/apilloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apilloud/subscriptions","organizations_url":"https://api.github.com/users/apilloud/orgs","repos_url":"https://api.github.com/users/apilloud/repos","events_url":"https://api.github.com/users/apilloud/events{/privacy}","received_events_url":"https://api.github.com/users/apilloud/received_events","type":"User","site_admin":false},"body":"This fixes issues running without seccomp compiled in and issues running with seccomp disabled. Before this change, the demo pod in sandbox_config fails to start with runc returning the following error:\r\n`seccomp: config provided but seccomp not supported`","created_at":"2017-02-22T01:24:46Z","updated_at":"2017-02-22T02:21:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"baa167da1938936bdee9508135413a0de12179fa","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/368/commits","review_comments_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/368/comments","review_comment_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues/368/comments","statuses_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/statuses/5ba42175bf37f95b956c1f4c983f5face6f48b91","head":{"label":"apilloud:no_seccomp","ref":"no_seccomp","sha":"5ba42175bf37f95b956c1f4c983f5face6f48b91","user":{"login":"apilloud","id":5972627,"avatar_url":"https://avatars.githubusercontent.com/u/5972627?v=3","gravatar_id":"","url":"https://api.github.com/users/apilloud","html_url":"https://github.com/apilloud","followers_url":"https://api.github.com/users/apilloud/followers","following_url":"https://api.github.com/users/apilloud/following{/other_user}","gists_url":"https://api.github.com/users/apilloud/gists{/gist_id}","starred_url":"https://api.github.com/users/apilloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apilloud/subscriptions","organizations_url":"https://api.github.com/users/apilloud/orgs","repos_url":"https://api.github.com/users/apilloud/repos","events_url":"https://api.github.com/users/apilloud/events{/privacy}","received_events_url":"https://api.github.com/users/apilloud/received_events","type":"User","site_admin":false},"repo":{"id":82697506,"name":"cri-o","full_name":"apilloud/cri-o","owner":{"login":"apilloud","id":5972627,"avatar_url":"https://avatars.githubusercontent.com/u/5972627?v=3","gravatar_id":"","url":"https://api.github.com/users/apilloud","html_url":"https://github.com/apilloud","followers_url":"https://api.github.com/users/apilloud/followers","following_url":"https://api.github.com/users/apilloud/following{/other_user}","gists_url":"https://api.github.com/users/apilloud/gists{/gist_id}","starred_url":"https://api.github.com/users/apilloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apilloud/subscriptions","organizations_url":"https://api.github.com/users/apilloud/orgs","repos_url":"https://api.github.com/users/apilloud/repos","events_url":"https://api.github.com/users/apilloud/events{/privacy}","received_events_url":"https://api.github.com/users/apilloud/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/apilloud/cri-o","description":"Open Container Initiative-based implementation of Kubernetes Container Runtime Interface","fork":true,"url":"https://api.github.com/repos/apilloud/cri-o","forks_url":"https://api.github.com/repos/apilloud/cri-o/forks","keys_url":"https://api.github.com/repos/apilloud/cri-o/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apilloud/cri-o/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apilloud/cri-o/teams","hooks_url":"https://api.github.com/repos/apilloud/cri-o/hooks","issue_events_url":"https://api.github.com/repos/apilloud/cri-o/issues/events{/number}","events_url":"https://api.github.com/repos/apilloud/cri-o/events","assignees_url":"https://api.github.com/repos/apilloud/cri-o/assignees{/user}","branches_url":"https://api.github.com/repos/apilloud/cri-o/branches{/branch}","tags_url":"https://api.github.com/repos/apilloud/cri-o/tags","blobs_url":"https://api.github.com/repos/apilloud/cri-o/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apilloud/cri-o/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apilloud/cri-o/git/refs{/sha}","trees_url":"https://api.github.com/repos/apilloud/cri-o/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apilloud/cri-o/statuses/{sha}","languages_url":"https://api.github.com/repos/apilloud/cri-o/languages","stargazers_url":"https://api.github.com/repos/apilloud/cri-o/stargazers","contributors_url":"https://api.github.com/repos/apilloud/cri-o/contributors","subscribers_url":"https://api.github.com/repos/apilloud/cri-o/subscribers","subscription_url":"https://api.github.com/repos/apilloud/cri-o/subscription","commits_url":"https://api.github.com/repos/apilloud/cri-o/commits{/sha}","git_commits_url":"https://api.github.com/repos/apilloud/cri-o/git/commits{/sha}","comments_url":"https://api.github.com/repos/apilloud/cri-o/comments{/number}","issue_comment_url":"https://api.github.com/repos/apilloud/cri-o/issues/comments{/number}","contents_url":"https://api.github.com/repos/apilloud/cri-o/contents/{+path}","compare_url":"https://api.github.com/repos/apilloud/cri-o/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apilloud/cri-o/merges","archive_url":"https://api.github.com/repos/apilloud/cri-o/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apilloud/cri-o/downloads","issues_url":"https://api.github.com/repos/apilloud/cri-o/issues{/number}","pulls_url":"https://api.github.com/repos/apilloud/cri-o/pulls{/number}","milestones_url":"https://api.github.com/repos/apilloud/cri-o/milestones{/number}","notifications_url":"https://api.github.com/repos/apilloud/cri-o/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apilloud/cri-o/labels{/name}","releases_url":"https://api.github.com/repos/apilloud/cri-o/releases{/id}","deployments_url":"https://api.github.com/repos/apilloud/cri-o/deployments","created_at":"2017-02-21T15:46:15Z","updated_at":"2017-02-21T15:46:18Z","pushed_at":"2017-02-22T01:15:00Z","git_url":"git://github.com/apilloud/cri-o.git","ssh_url":"git@github.com:apilloud/cri-o.git","clone_url":"https://github.com/apilloud/cri-o.git","svn_url":"https://github.com/apilloud/cri-o","homepage":"","size":27141,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"master"}},"base":{"label":"kubernetes-incubator:master","ref":"master","sha":"424fc8d0d6e4ec216a8bdbc4ae70e777c8a0a07f","user":{"login":"kubernetes-incubator","id":20862812,"avatar_url":"https://avatars.githubusercontent.com/u/20862812?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes-incubator","html_url":"https://github.com/kubernetes-incubator","followers_url":"https://api.github.com/users/kubernetes-incubator/followers","following_url":"https://api.github.com/users/kubernetes-incubator/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-incubator/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-incubator/orgs","repos_url":"https://api.github.com/users/kubernetes-incubator/repos","events_url":"https://api.github.com/users/kubernetes-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":67828134,"name":"cri-o","full_name":"kubernetes-incubator/cri-o","owner":{"login":"kubernetes-incubator","id":20862812,"avatar_url":"https://avatars.githubusercontent.com/u/20862812?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes-incubator","html_url":"https://github.com/kubernetes-incubator","followers_url":"https://api.github.com/users/kubernetes-incubator/followers","following_url":"https://api.github.com/users/kubernetes-incubator/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-incubator/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-incubator/orgs","repos_url":"https://api.github.com/users/kubernetes-incubator/repos","events_url":"https://api.github.com/users/kubernetes-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes-incubator/cri-o","description":"Open Container Initiative-based implementation of Kubernetes Container Runtime Interface","fork":false,"url":"https://api.github.com/repos/kubernetes-incubator/cri-o","forks_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/forks","keys_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/teams","hooks_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/hooks","issue_events_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/events","assignees_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/tags","blobs_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/languages","stargazers_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/stargazers","contributors_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/contributors","subscribers_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/subscribers","subscription_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/subscription","commits_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/merges","archive_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/downloads","issues_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/deployments","created_at":"2016-09-09T19:56:31Z","updated_at":"2017-02-17T01:37:16Z","pushed_at":"2017-02-22T01:24:46Z","git_url":"git://github.com/kubernetes-incubator/cri-o.git","ssh_url":"git@github.com:kubernetes-incubator/cri-o.git","clone_url":"https://github.com/kubernetes-incubator/cri-o.git","svn_url":"https://github.com/kubernetes-incubator/cri-o","homepage":"","size":27133,"stargazers_count":348,"watchers_count":348,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":58,"forks":57,"open_issues":58,"watchers":348,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/368"},"html":{"href":"https://github.com/kubernetes-incubator/cri-o/pull/368"},"issue":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues/368"},"comments":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues/368/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/368/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/368/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/statuses/5ba42175bf37f95b956c1f4c983f5face6f48b91"}}}}
{"actor":{"display_login":"jawnsy"}}