{"action":"created","comment":{"url":"https://api.github.com/repos/snapcore/snap-confine/pulls/comments/90025978","pull_request_review_id":10551467,"id":90025978,"diff_hunk":"@@ -123,11 +53,13 @@ void setup_user_xdg_runtime_dir()\n \t}\n \n \terrno = 0;\n-\tmkpath(xdg_runtime_dir);\n-\n-\t// if successfully created the directory (ie, not EEXIST), then\n-\t// chmod it.\n+\tdebug(\"creating user XDG_RUNTIME_DIR directory: %s\", xdg_runtime_dir);\n+\tif (sc_nonfatal_mkpath(xdg_runtime_dir, 0755) < 0) {\n+\t\tdie(\"cannot create user XDG_RUNTIME_DIR directory: %s\",\n+\t\t    xdg_runtime_dir);\n+\t}\n+\t// if successfully created the directory (ie, not EEXIST), then chmod it.\n \tif (errno == 0 && chmod(xdg_runtime_dir, 0700) != 0) {\n-\t\tdie(\"could not chmod XDG_RUNTIME_DIR\");\n+\t\tdie(\"cannot change permissions of user XDG_RUNTIME_DIR directory to 0700\");","path":"src/user-support.c","position":113,"original_position":113,"commit_id":"f530beda5517a2f3f5a1ca73bbf38a77955ff528","original_commit_id":"e695e60171dad1e5f963057bfadcd9af24b87a6f","user":{"login":"jdstrand","id":1663079,"avatar_url":"https://avatars.githubusercontent.com/u/1663079?v=3","gravatar_id":"","url":"https://api.github.com/users/jdstrand","html_url":"https://github.com/jdstrand","followers_url":"https://api.github.com/users/jdstrand/followers","following_url":"https://api.github.com/users/jdstrand/following{/other_user}","gists_url":"https://api.github.com/users/jdstrand/gists{/gist_id}","starred_url":"https://api.github.com/users/jdstrand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdstrand/subscriptions","organizations_url":"https://api.github.com/users/jdstrand/orgs","repos_url":"https://api.github.com/users/jdstrand/repos","events_url":"https://api.github.com/users/jdstrand/events{/privacy}","received_events_url":"https://api.github.com/users/jdstrand/received_events","type":"User","site_admin":false},"body":"Sounds fine. This is a little trickier than I made out in this comment so best to leave for another PR.","created_at":"2016-11-29T15:03:01Z","updated_at":"2016-11-29T15:03:01Z","html_url":"https://github.com/snapcore/snap-confine/pull/193#discussion_r90025978","pull_request_url":"https://api.github.com/repos/snapcore/snap-confine/pulls/193","_links":{"self":{"href":"https://api.github.com/repos/snapcore/snap-confine/pulls/comments/90025978"},"html":{"href":"https://github.com/snapcore/snap-confine/pull/193#discussion_r90025978"},"pull_request":{"href":"https://api.github.com/repos/snapcore/snap-confine/pulls/193"}}},"pull_request":{"url":"https://api.github.com/repos/snapcore/snap-confine/pulls/193","id":95163248,"html_url":"https://github.com/snapcore/snap-confine/pull/193","diff_url":"https://github.com/snapcore/snap-confine/pull/193.diff","patch_url":"https://github.com/snapcore/snap-confine/pull/193.patch","issue_url":"https://api.github.com/repos/snapcore/snap-confine/issues/193","number":193,"state":"open","locked":false,"title":"Replace mkpath with sc_nonfatal_mkpath","user":{"login":"zyga","id":784262,"avatar_url":"https://avatars.githubusercontent.com/u/784262?v=3","gravatar_id":"","url":"https://api.github.com/users/zyga","html_url":"https://github.com/zyga","followers_url":"https://api.github.com/users/zyga/followers","following_url":"https://api.github.com/users/zyga/following{/other_user}","gists_url":"https://api.github.com/users/zyga/gists{/gist_id}","starred_url":"https://api.github.com/users/zyga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyga/subscriptions","organizations_url":"https://api.github.com/users/zyga/orgs","repos_url":"https://api.github.com/users/zyga/repos","events_url":"https://api.github.com/users/zyga/events{/privacy}","received_events_url":"https://api.github.com/users/zyga/received_events","type":"User","site_admin":false},"body":"This branch fixes a rather confusing error message that is printed by each failure of mkpath (\"cannot create user data directory\") and replaces it with context-aware error message driven by the particular code that used mkpath.\r\n\r\nThis branch is here to aid in discovering which of the mkpath calls fail when testing snapd against master version of snap-confine.\r\n\r\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","created_at":"2016-11-24T11:40:02Z","updated_at":"2016-11-29T15:03:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37514f325e66d0c002fbd2bdeb3a6e0713a85ad9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/snapcore/snap-confine/pulls/193/commits","review_comments_url":"https://api.github.com/repos/snapcore/snap-confine/pulls/193/comments","review_comment_url":"https://api.github.com/repos/snapcore/snap-confine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snapcore/snap-confine/issues/193/comments","statuses_url":"https://api.github.com/repos/snapcore/snap-confine/statuses/f530beda5517a2f3f5a1ca73bbf38a77955ff528","head":{"label":"snapcore:mkpath-util","ref":"mkpath-util","sha":"f530beda5517a2f3f5a1ca73bbf38a77955ff528","user":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"repo":{"id":59485230,"name":"snap-confine","full_name":"snapcore/snap-confine","owner":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snapcore/snap-confine","description":"Runner for snaps","fork":false,"url":"https://api.github.com/repos/snapcore/snap-confine","forks_url":"https://api.github.com/repos/snapcore/snap-confine/forks","keys_url":"https://api.github.com/repos/snapcore/snap-confine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snapcore/snap-confine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snapcore/snap-confine/teams","hooks_url":"https://api.github.com/repos/snapcore/snap-confine/hooks","issue_events_url":"https://api.github.com/repos/snapcore/snap-confine/issues/events{/number}","events_url":"https://api.github.com/repos/snapcore/snap-confine/events","assignees_url":"https://api.github.com/repos/snapcore/snap-confine/assignees{/user}","branches_url":"https://api.github.com/repos/snapcore/snap-confine/branches{/branch}","tags_url":"https://api.github.com/repos/snapcore/snap-confine/tags","blobs_url":"https://api.github.com/repos/snapcore/snap-confine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snapcore/snap-confine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snapcore/snap-confine/git/refs{/sha}","trees_url":"https://api.github.com/repos/snapcore/snap-confine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snapcore/snap-confine/statuses/{sha}","languages_url":"https://api.github.com/repos/snapcore/snap-confine/languages","stargazers_url":"https://api.github.com/repos/snapcore/snap-confine/stargazers","contributors_url":"https://api.github.com/repos/snapcore/snap-confine/contributors","subscribers_url":"https://api.github.com/repos/snapcore/snap-confine/subscribers","subscription_url":"https://api.github.com/repos/snapcore/snap-confine/subscription","commits_url":"https://api.github.com/repos/snapcore/snap-confine/commits{/sha}","git_commits_url":"https://api.github.com/repos/snapcore/snap-confine/git/commits{/sha}","comments_url":"https://api.github.com/repos/snapcore/snap-confine/comments{/number}","issue_comment_url":"https://api.github.com/repos/snapcore/snap-confine/issues/comments{/number}","contents_url":"https://api.github.com/repos/snapcore/snap-confine/contents/{+path}","compare_url":"https://api.github.com/repos/snapcore/snap-confine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snapcore/snap-confine/merges","archive_url":"https://api.github.com/repos/snapcore/snap-confine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snapcore/snap-confine/downloads","issues_url":"https://api.github.com/repos/snapcore/snap-confine/issues{/number}","pulls_url":"https://api.github.com/repos/snapcore/snap-confine/pulls{/number}","milestones_url":"https://api.github.com/repos/snapcore/snap-confine/milestones{/number}","notifications_url":"https://api.github.com/repos/snapcore/snap-confine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snapcore/snap-confine/labels{/name}","releases_url":"https://api.github.com/repos/snapcore/snap-confine/releases{/id}","deployments_url":"https://api.github.com/repos/snapcore/snap-confine/deployments","created_at":"2016-05-23T13:29:44Z","updated_at":"2016-10-31T13:08:01Z","pushed_at":"2016-11-29T13:24:22Z","git_url":"git://github.com/snapcore/snap-confine.git","ssh_url":"git@github.com:snapcore/snap-confine.git","clone_url":"https://github.com/snapcore/snap-confine.git","svn_url":"https://github.com/snapcore/snap-confine","homepage":"","size":1464,"stargazers_count":8,"watchers_count":8,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":10,"forks":19,"open_issues":10,"watchers":8,"default_branch":"master"}},"base":{"label":"snapcore:master","ref":"master","sha":"1daa61876c94dd5dcfbcd1b3463348c677bf8c14","user":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"repo":{"id":59485230,"name":"snap-confine","full_name":"snapcore/snap-confine","owner":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snapcore/snap-confine","description":"Runner for snaps","fork":false,"url":"https://api.github.com/repos/snapcore/snap-confine","forks_url":"https://api.github.com/repos/snapcore/snap-confine/forks","keys_url":"https://api.github.com/repos/snapcore/snap-confine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snapcore/snap-confine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snapcore/snap-confine/teams","hooks_url":"https://api.github.com/repos/snapcore/snap-confine/hooks","issue_events_url":"https://api.github.com/repos/snapcore/snap-confine/issues/events{/number}","events_url":"https://api.github.com/repos/snapcore/snap-confine/events","assignees_url":"https://api.github.com/repos/snapcore/snap-confine/assignees{/user}","branches_url":"https://api.github.com/repos/snapcore/snap-confine/branches{/branch}","tags_url":"https://api.github.com/repos/snapcore/snap-confine/tags","blobs_url":"https://api.github.com/repos/snapcore/snap-confine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snapcore/snap-confine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snapcore/snap-confine/git/refs{/sha}","trees_url":"https://api.github.com/repos/snapcore/snap-confine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snapcore/snap-confine/statuses/{sha}","languages_url":"https://api.github.com/repos/snapcore/snap-confine/languages","stargazers_url":"https://api.github.com/repos/snapcore/snap-confine/stargazers","contributors_url":"https://api.github.com/repos/snapcore/snap-confine/contributors","subscribers_url":"https://api.github.com/repos/snapcore/snap-confine/subscribers","subscription_url":"https://api.github.com/repos/snapcore/snap-confine/subscription","commits_url":"https://api.github.com/repos/snapcore/snap-confine/commits{/sha}","git_commits_url":"https://api.github.com/repos/snapcore/snap-confine/git/commits{/sha}","comments_url":"https://api.github.com/repos/snapcore/snap-confine/comments{/number}","issue_comment_url":"https://api.github.com/repos/snapcore/snap-confine/issues/comments{/number}","contents_url":"https://api.github.com/repos/snapcore/snap-confine/contents/{+path}","compare_url":"https://api.github.com/repos/snapcore/snap-confine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snapcore/snap-confine/merges","archive_url":"https://api.github.com/repos/snapcore/snap-confine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snapcore/snap-confine/downloads","issues_url":"https://api.github.com/repos/snapcore/snap-confine/issues{/number}","pulls_url":"https://api.github.com/repos/snapcore/snap-confine/pulls{/number}","milestones_url":"https://api.github.com/repos/snapcore/snap-confine/milestones{/number}","notifications_url":"https://api.github.com/repos/snapcore/snap-confine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snapcore/snap-confine/labels{/name}","releases_url":"https://api.github.com/repos/snapcore/snap-confine/releases{/id}","deployments_url":"https://api.github.com/repos/snapcore/snap-confine/deployments","created_at":"2016-05-23T13:29:44Z","updated_at":"2016-10-31T13:08:01Z","pushed_at":"2016-11-29T13:24:22Z","git_url":"git://github.com/snapcore/snap-confine.git","ssh_url":"git@github.com:snapcore/snap-confine.git","clone_url":"https://github.com/snapcore/snap-confine.git","svn_url":"https://github.com/snapcore/snap-confine","homepage":"","size":1464,"stargazers_count":8,"watchers_count":8,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":10,"forks":19,"open_issues":10,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snapcore/snap-confine/pulls/193"},"html":{"href":"https://github.com/snapcore/snap-confine/pull/193"},"issue":{"href":"https://api.github.com/repos/snapcore/snap-confine/issues/193"},"comments":{"href":"https://api.github.com/repos/snapcore/snap-confine/issues/193/comments"},"review_comments":{"href":"https://api.github.com/repos/snapcore/snap-confine/pulls/193/comments"},"review_comment":{"href":"https://api.github.com/repos/snapcore/snap-confine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snapcore/snap-confine/pulls/193/commits"},"statuses":{"href":"https://api.github.com/repos/snapcore/snap-confine/statuses/f530beda5517a2f3f5a1ca73bbf38a77955ff528"}}}}
{"actor":{"display_login":"jdstrand"}}