{"action":"created","comment":{"url":"https://api.github.com/repos/neutrinolabs/xrdp/pulls/comments/92670540","pull_request_review_id":13188531,"id":92670540,"diff_hunk":"@@ -0,0 +1,71 @@\n+/**\n+ * xrdp: A Remote Desktop Protocol server.\n+ *\n+ * Copyright (C) Jay Sorg 2004-2013\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+/**\n+ *\n+ * @file xauth.c\n+ * @brief XAUTHORITY handling code\n+ * @author Emmaunel Blindauer\n+ *\n+ */\n+\n+#include <stdio.h>\n+#include \"log.h\"\n+#include \"os_calls.h\"\n+\n+\n+/******************************************************************************/\n+int DEFAULT_CC\n+add_xauth_cookie(int display, const char *file)\n+{\n+    FILE *dp;\n+    char cookie[33];\n+    char char_cookie[16];\n+    char xauth_str[256];\n+    int ret;\n+\n+    g_random(char_cookie, 16);\n+    g_bytes_to_hexstr(char_cookie, 16, cookie, 33);\n+    cookie[32] = '\\0';\n+\n+    if (file == NULL)","path":"sesman/xauth.c","position":46,"original_position":46,"commit_id":"480d6d37b7301f00c09eba9c9e3e9ca6db0fe512","original_commit_id":"480d6d37b7301f00c09eba9c9e3e9ca6db0fe512","user":{"login":"proski","id":1317472,"avatar_url":"https://avatars.githubusercontent.com/u/1317472?v=3","gravatar_id":"","url":"https://api.github.com/users/proski","html_url":"https://github.com/proski","followers_url":"https://api.github.com/users/proski/followers","following_url":"https://api.github.com/users/proski/following{/other_user}","gists_url":"https://api.github.com/users/proski/gists{/gist_id}","starred_url":"https://api.github.com/users/proski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/proski/subscriptions","organizations_url":"https://api.github.com/users/proski/orgs","repos_url":"https://api.github.com/users/proski/repos","events_url":"https://api.github.com/users/proski/events{/privacy}","received_events_url":"https://api.github.com/users/proski/received_events","type":"User","site_admin":false},"body":"This function is never called with `file` being NULL, no need to implement it.","created_at":"2016-12-15T18:32:24Z","updated_at":"2016-12-15T18:40:47Z","html_url":"https://github.com/neutrinolabs/xrdp/pull/545#discussion_r92670540","pull_request_url":"https://api.github.com/repos/neutrinolabs/xrdp/pulls/545","_links":{"self":{"href":"https://api.github.com/repos/neutrinolabs/xrdp/pulls/comments/92670540"},"html":{"href":"https://github.com/neutrinolabs/xrdp/pull/545#discussion_r92670540"},"pull_request":{"href":"https://api.github.com/repos/neutrinolabs/xrdp/pulls/545"}}},"pull_request":{"url":"https://api.github.com/repos/neutrinolabs/xrdp/pulls/545","id":97921223,"html_url":"https://github.com/neutrinolabs/xrdp/pull/545","diff_url":"https://github.com/neutrinolabs/xrdp/pull/545.diff","patch_url":"https://github.com/neutrinolabs/xrdp/pull/545.patch","issue_url":"https://api.github.com/repos/neutrinolabs/xrdp/issues/545","number":545,"state":"open","locked":false,"title":"Fix xauth","user":{"login":"moobyfr","id":628573,"avatar_url":"https://avatars.githubusercontent.com/u/628573?v=3","gravatar_id":"","url":"https://api.github.com/users/moobyfr","html_url":"https://github.com/moobyfr","followers_url":"https://api.github.com/users/moobyfr/followers","following_url":"https://api.github.com/users/moobyfr/following{/other_user}","gists_url":"https://api.github.com/users/moobyfr/gists{/gist_id}","starred_url":"https://api.github.com/users/moobyfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moobyfr/subscriptions","organizations_url":"https://api.github.com/users/moobyfr/orgs","repos_url":"https://api.github.com/users/moobyfr/repos","events_url":"https://api.github.com/users/moobyfr/events{/privacy}","received_events_url":"https://api.github.com/users/moobyfr/received_events","type":"User","site_admin":false},"body":"This pull request fixes #540 . It creates a XAUTHORITY file (`.Xauthority` in the `$HOME` of the user by default, but can be overriden by setting a variable XAUTHORITY in sesman.ini) if it doesn't exist, and add a secret through the `xauth` command. The backend (Xvnc, Xorg or X11rdp) will get as argument the file to share the secret. \r\n","created_at":"2016-12-14T10:06:31Z","updated_at":"2016-12-15T18:40:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc282048cdc635b8a12b14889508e80cf091e0e2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/neutrinolabs/xrdp/pulls/545/commits","review_comments_url":"https://api.github.com/repos/neutrinolabs/xrdp/pulls/545/comments","review_comment_url":"https://api.github.com/repos/neutrinolabs/xrdp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neutrinolabs/xrdp/issues/545/comments","statuses_url":"https://api.github.com/repos/neutrinolabs/xrdp/statuses/480d6d37b7301f00c09eba9c9e3e9ca6db0fe512","head":{"label":"moobyfr:fix-xauth","ref":"fix-xauth","sha":"480d6d37b7301f00c09eba9c9e3e9ca6db0fe512","user":{"login":"moobyfr","id":628573,"avatar_url":"https://avatars.githubusercontent.com/u/628573?v=3","gravatar_id":"","url":"https://api.github.com/users/moobyfr","html_url":"https://github.com/moobyfr","followers_url":"https://api.github.com/users/moobyfr/followers","following_url":"https://api.github.com/users/moobyfr/following{/other_user}","gists_url":"https://api.github.com/users/moobyfr/gists{/gist_id}","starred_url":"https://api.github.com/users/moobyfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moobyfr/subscriptions","organizations_url":"https://api.github.com/users/moobyfr/orgs","repos_url":"https://api.github.com/users/moobyfr/repos","events_url":"https://api.github.com/users/moobyfr/events{/privacy}","received_events_url":"https://api.github.com/users/moobyfr/received_events","type":"User","site_admin":false},"repo":{"id":39616346,"name":"xrdp","full_name":"moobyfr/xrdp","owner":{"login":"moobyfr","id":628573,"avatar_url":"https://avatars.githubusercontent.com/u/628573?v=3","gravatar_id":"","url":"https://api.github.com/users/moobyfr","html_url":"https://github.com/moobyfr","followers_url":"https://api.github.com/users/moobyfr/followers","following_url":"https://api.github.com/users/moobyfr/following{/other_user}","gists_url":"https://api.github.com/users/moobyfr/gists{/gist_id}","starred_url":"https://api.github.com/users/moobyfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moobyfr/subscriptions","organizations_url":"https://api.github.com/users/moobyfr/orgs","repos_url":"https://api.github.com/users/moobyfr/repos","events_url":"https://api.github.com/users/moobyfr/events{/privacy}","received_events_url":"https://api.github.com/users/moobyfr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/moobyfr/xrdp","description":"xrdp: an open source RDP server","fork":true,"url":"https://api.github.com/repos/moobyfr/xrdp","forks_url":"https://api.github.com/repos/moobyfr/xrdp/forks","keys_url":"https://api.github.com/repos/moobyfr/xrdp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moobyfr/xrdp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moobyfr/xrdp/teams","hooks_url":"https://api.github.com/repos/moobyfr/xrdp/hooks","issue_events_url":"https://api.github.com/repos/moobyfr/xrdp/issues/events{/number}","events_url":"https://api.github.com/repos/moobyfr/xrdp/events","assignees_url":"https://api.github.com/repos/moobyfr/xrdp/assignees{/user}","branches_url":"https://api.github.com/repos/moobyfr/xrdp/branches{/branch}","tags_url":"https://api.github.com/repos/moobyfr/xrdp/tags","blobs_url":"https://api.github.com/repos/moobyfr/xrdp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moobyfr/xrdp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moobyfr/xrdp/git/refs{/sha}","trees_url":"https://api.github.com/repos/moobyfr/xrdp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moobyfr/xrdp/statuses/{sha}","languages_url":"https://api.github.com/repos/moobyfr/xrdp/languages","stargazers_url":"https://api.github.com/repos/moobyfr/xrdp/stargazers","contributors_url":"https://api.github.com/repos/moobyfr/xrdp/contributors","subscribers_url":"https://api.github.com/repos/moobyfr/xrdp/subscribers","subscription_url":"https://api.github.com/repos/moobyfr/xrdp/subscription","commits_url":"https://api.github.com/repos/moobyfr/xrdp/commits{/sha}","git_commits_url":"https://api.github.com/repos/moobyfr/xrdp/git/commits{/sha}","comments_url":"https://api.github.com/repos/moobyfr/xrdp/comments{/number}","issue_comment_url":"https://api.github.com/repos/moobyfr/xrdp/issues/comments{/number}","contents_url":"https://api.github.com/repos/moobyfr/xrdp/contents/{+path}","compare_url":"https://api.github.com/repos/moobyfr/xrdp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moobyfr/xrdp/merges","archive_url":"https://api.github.com/repos/moobyfr/xrdp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moobyfr/xrdp/downloads","issues_url":"https://api.github.com/repos/moobyfr/xrdp/issues{/number}","pulls_url":"https://api.github.com/repos/moobyfr/xrdp/pulls{/number}","milestones_url":"https://api.github.com/repos/moobyfr/xrdp/milestones{/number}","notifications_url":"https://api.github.com/repos/moobyfr/xrdp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moobyfr/xrdp/labels{/name}","releases_url":"https://api.github.com/repos/moobyfr/xrdp/releases{/id}","deployments_url":"https://api.github.com/repos/moobyfr/xrdp/deployments","created_at":"2015-07-24T06:47:25Z","updated_at":"2016-12-12T22:42:13Z","pushed_at":"2016-12-15T17:49:19Z","git_url":"git://github.com/moobyfr/xrdp.git","ssh_url":"git@github.com:moobyfr/xrdp.git","clone_url":"https://github.com/moobyfr/xrdp.git","svn_url":"https://github.com/moobyfr/xrdp","homepage":"http://www.xrdp.org/","size":10737,"stargazers_count":0,"watchers_count":0,"language":"C","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":"devel"}},"base":{"label":"neutrinolabs:devel","ref":"devel","sha":"5966de4ee2b8cf14a86b36f47b8015fc17f026ea","user":{"login":"neutrinolabs","id":2615587,"avatar_url":"https://avatars.githubusercontent.com/u/2615587?v=3","gravatar_id":"","url":"https://api.github.com/users/neutrinolabs","html_url":"https://github.com/neutrinolabs","followers_url":"https://api.github.com/users/neutrinolabs/followers","following_url":"https://api.github.com/users/neutrinolabs/following{/other_user}","gists_url":"https://api.github.com/users/neutrinolabs/gists{/gist_id}","starred_url":"https://api.github.com/users/neutrinolabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neutrinolabs/subscriptions","organizations_url":"https://api.github.com/users/neutrinolabs/orgs","repos_url":"https://api.github.com/users/neutrinolabs/repos","events_url":"https://api.github.com/users/neutrinolabs/events{/privacy}","received_events_url":"https://api.github.com/users/neutrinolabs/received_events","type":"Organization","site_admin":false},"repo":{"id":1660127,"name":"xrdp","full_name":"neutrinolabs/xrdp","owner":{"login":"neutrinolabs","id":2615587,"avatar_url":"https://avatars.githubusercontent.com/u/2615587?v=3","gravatar_id":"","url":"https://api.github.com/users/neutrinolabs","html_url":"https://github.com/neutrinolabs","followers_url":"https://api.github.com/users/neutrinolabs/followers","following_url":"https://api.github.com/users/neutrinolabs/following{/other_user}","gists_url":"https://api.github.com/users/neutrinolabs/gists{/gist_id}","starred_url":"https://api.github.com/users/neutrinolabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neutrinolabs/subscriptions","organizations_url":"https://api.github.com/users/neutrinolabs/orgs","repos_url":"https://api.github.com/users/neutrinolabs/repos","events_url":"https://api.github.com/users/neutrinolabs/events{/privacy}","received_events_url":"https://api.github.com/users/neutrinolabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neutrinolabs/xrdp","description":"xrdp: an open source RDP server","fork":false,"url":"https://api.github.com/repos/neutrinolabs/xrdp","forks_url":"https://api.github.com/repos/neutrinolabs/xrdp/forks","keys_url":"https://api.github.com/repos/neutrinolabs/xrdp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neutrinolabs/xrdp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neutrinolabs/xrdp/teams","hooks_url":"https://api.github.com/repos/neutrinolabs/xrdp/hooks","issue_events_url":"https://api.github.com/repos/neutrinolabs/xrdp/issues/events{/number}","events_url":"https://api.github.com/repos/neutrinolabs/xrdp/events","assignees_url":"https://api.github.com/repos/neutrinolabs/xrdp/assignees{/user}","branches_url":"https://api.github.com/repos/neutrinolabs/xrdp/branches{/branch}","tags_url":"https://api.github.com/repos/neutrinolabs/xrdp/tags","blobs_url":"https://api.github.com/repos/neutrinolabs/xrdp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neutrinolabs/xrdp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neutrinolabs/xrdp/git/refs{/sha}","trees_url":"https://api.github.com/repos/neutrinolabs/xrdp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neutrinolabs/xrdp/statuses/{sha}","languages_url":"https://api.github.com/repos/neutrinolabs/xrdp/languages","stargazers_url":"https://api.github.com/repos/neutrinolabs/xrdp/stargazers","contributors_url":"https://api.github.com/repos/neutrinolabs/xrdp/contributors","subscribers_url":"https://api.github.com/repos/neutrinolabs/xrdp/subscribers","subscription_url":"https://api.github.com/repos/neutrinolabs/xrdp/subscription","commits_url":"https://api.github.com/repos/neutrinolabs/xrdp/commits{/sha}","git_commits_url":"https://api.github.com/repos/neutrinolabs/xrdp/git/commits{/sha}","comments_url":"https://api.github.com/repos/neutrinolabs/xrdp/comments{/number}","issue_comment_url":"https://api.github.com/repos/neutrinolabs/xrdp/issues/comments{/number}","contents_url":"https://api.github.com/repos/neutrinolabs/xrdp/contents/{+path}","compare_url":"https://api.github.com/repos/neutrinolabs/xrdp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neutrinolabs/xrdp/merges","archive_url":"https://api.github.com/repos/neutrinolabs/xrdp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neutrinolabs/xrdp/downloads","issues_url":"https://api.github.com/repos/neutrinolabs/xrdp/issues{/number}","pulls_url":"https://api.github.com/repos/neutrinolabs/xrdp/pulls{/number}","milestones_url":"https://api.github.com/repos/neutrinolabs/xrdp/milestones{/number}","notifications_url":"https://api.github.com/repos/neutrinolabs/xrdp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neutrinolabs/xrdp/labels{/name}","releases_url":"https://api.github.com/repos/neutrinolabs/xrdp/releases{/id}","deployments_url":"https://api.github.com/repos/neutrinolabs/xrdp/deployments","created_at":"2011-04-25T14:31:17Z","updated_at":"2016-12-14T23:07:37Z","pushed_at":"2016-12-15T17:49:20Z","git_url":"git://github.com/neutrinolabs/xrdp.git","ssh_url":"git@github.com:neutrinolabs/xrdp.git","clone_url":"https://github.com/neutrinolabs/xrdp.git","svn_url":"https://github.com/neutrinolabs/xrdp","homepage":"http://www.xrdp.org/","size":11619,"stargazers_count":397,"watchers_count":397,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":198,"mirror_url":null,"open_issues_count":151,"forks":198,"open_issues":151,"watchers":397,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/neutrinolabs/xrdp/pulls/545"},"html":{"href":"https://github.com/neutrinolabs/xrdp/pull/545"},"issue":{"href":"https://api.github.com/repos/neutrinolabs/xrdp/issues/545"},"comments":{"href":"https://api.github.com/repos/neutrinolabs/xrdp/issues/545/comments"},"review_comments":{"href":"https://api.github.com/repos/neutrinolabs/xrdp/pulls/545/comments"},"review_comment":{"href":"https://api.github.com/repos/neutrinolabs/xrdp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neutrinolabs/xrdp/pulls/545/commits"},"statuses":{"href":"https://api.github.com/repos/neutrinolabs/xrdp/statuses/480d6d37b7301f00c09eba9c9e3e9ca6db0fe512"}}}}
{"actor":{"display_login":"proski"}}