{"action":"created","comment":{"url":"https://api.github.com/repos/SSSD/sssd/pulls/comments/103662680","pull_request_review_id":24455038,"id":103662680,"diff_hunk":"@@ -0,0 +1,149 @@\n+/*\n+    Authors:\n+        Fabiano Fidêncio <fidencio@redhat.com>\n+\n+    Copyright (C) 2017 Red Hat\n+\n+    This program is free software; you can redistribute it and/or modify\n+    it under the terms of the GNU General Public License as published by\n+    the Free Software Foundation; either version 3 of the License, or\n+    (at your option) any later version.\n+\n+    This program is distributed in the hope that it will be useful,\n+    but WITHOUT ANY WARRANTY; without even the implied warranty of\n+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+    GNU General Public License for more details.\n+\n+    You should have received a copy of the GNU General Public License\n+    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+*/\n+\n+#include \"config.h\"\n+\n+#include <popt.h>\n+#include <stdio.h>\n+#include <ini_configobj.h>\n+\n+#include \"util/util.h\"\n+#include \"confdb/confdb.h\"\n+\n+static errno_t check_socket_activated_responder(const char *responder)\n+{\n+    errno_t ret;\n+    struct ini_cfgfile *file_ctx = NULL;\n+    struct ini_cfgobj *ini_config = NULL;\n+    struct value_obj *vobj = NULL;\n+    const char *services;\n+    const char *str;\n+    TALLOC_CTX *tmp_ctx;\n+\n+    tmp_ctx = talloc_new(NULL);\n+    if (tmp_ctx == NULL) {\n+        return ENOMEM;\n+    }\n+\n+    ret = ini_config_create(&ini_config);\n+    if (ret != 0) {\n+        DEBUG(SSSDBG_CRIT_FAILURE, \"ini_config_create() failed [%d][%s]\\n\",\n+              ret, sss_strerror(ret));\n+        goto done;\n+    }\n+\n+    ret = ini_config_file_open(SSSD_CONFIG_FILE, 0, &file_ctx);\n+    if (ret != 0) {\n+        DEBUG(SSSDBG_CRIT_FAILURE, \"ini_config_file_open() failed [%d][%s]\\n\",\n+              ret, sss_strerror(ret));\n+        goto done;\n+    }\n+\n+    ret = ini_config_parse(file_ctx, INI_STOP_ON_ANY, 0, 0, ini_config);\n+    if (ret != 0) {\n+        DEBUG(SSSDBG_CRIT_FAILURE, \"ini_config_parse() failed [%d][%s]\\n\",\n+               ret, sss_strerror(ret));\n+        goto done;\n+    }\n+\n+    ret = ini_get_config_valueobj(\"sssd\", \"services\", ini_config,\n+                                 INI_GET_FIRST_VALUE, &vobj);","path":"src/tools/sssd_check_socket_activated_responders.c","position":67,"original_position":67,"commit_id":"691648fac2c21124837ba646c8bbe37a5d8cd2a4","original_commit_id":"691648fac2c21124837ba646c8bbe37a5d8cd2a4","user":{"login":"jhrozek","id":715522,"avatar_url":"https://avatars2.githubusercontent.com/u/715522?v=3","gravatar_id":"","url":"https://api.github.com/users/jhrozek","html_url":"https://github.com/jhrozek","followers_url":"https://api.github.com/users/jhrozek/followers","following_url":"https://api.github.com/users/jhrozek/following{/other_user}","gists_url":"https://api.github.com/users/jhrozek/gists{/gist_id}","starred_url":"https://api.github.com/users/jhrozek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhrozek/subscriptions","organizations_url":"https://api.github.com/users/jhrozek/orgs","repos_url":"https://api.github.com/users/jhrozek/repos","events_url":"https://api.github.com/users/jhrozek/events{/privacy}","received_events_url":"https://api.github.com/users/jhrozek/received_events","type":"User","site_admin":false},"body":"Did you test this with no services line at all? (Sorry, I managed to break my test env, so I will only test the patches later..)","created_at":"2017-03-01T11:24:05Z","updated_at":"2017-03-01T11:24:17Z","html_url":"https://github.com/SSSD/sssd/pull/146#discussion_r103662680","pull_request_url":"https://api.github.com/repos/SSSD/sssd/pulls/146","_links":{"self":{"href":"https://api.github.com/repos/SSSD/sssd/pulls/comments/103662680"},"html":{"href":"https://github.com/SSSD/sssd/pull/146#discussion_r103662680"},"pull_request":{"href":"https://api.github.com/repos/SSSD/sssd/pulls/146"}}},"pull_request":{"url":"https://api.github.com/repos/SSSD/sssd/pulls/146","id":104888745,"html_url":"https://github.com/SSSD/sssd/pull/146","diff_url":"https://github.com/SSSD/sssd/pull/146.diff","patch_url":"https://github.com/SSSD/sssd/pull/146.patch","issue_url":"https://api.github.com/repos/SSSD/sssd/issues/146","number":146,"state":"open","locked":false,"title":"Avoid running two instances of the same service","user":{"login":"fidencio","id":112762,"avatar_url":"https://avatars3.githubusercontent.com/u/112762?v=3","gravatar_id":"","url":"https://api.github.com/users/fidencio","html_url":"https://github.com/fidencio","followers_url":"https://api.github.com/users/fidencio/followers","following_url":"https://api.github.com/users/fidencio/following{/other_user}","gists_url":"https://api.github.com/users/fidencio/gists{/gist_id}","starred_url":"https://api.github.com/users/fidencio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fidencio/subscriptions","organizations_url":"https://api.github.com/users/fidencio/orgs","repos_url":"https://api.github.com/users/fidencio/repos","events_url":"https://api.github.com/users/fidencio/events{/privacy}","received_events_url":"https://api.github.com/users/fidencio/received_events","type":"User","site_admin":false},"body":"Those two patches together are responsible for avoiding running two \"instances\" of the same service.\r\n\r\nThe commit message of each patch has quite a lot of explanation.","created_at":"2017-02-06T21:43:45Z","updated_at":"2017-03-01T11:24:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"321692c9c65591af575e5cd23e6a88fa494840bf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/SSSD/sssd/pulls/146/commits","review_comments_url":"https://api.github.com/repos/SSSD/sssd/pulls/146/comments","review_comment_url":"https://api.github.com/repos/SSSD/sssd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SSSD/sssd/issues/146/comments","statuses_url":"https://api.github.com/repos/SSSD/sssd/statuses/691648fac2c21124837ba646c8bbe37a5d8cd2a4","head":{"label":"fidencio:wip/prefer_systemd_to_monitor","ref":"wip/prefer_systemd_to_monitor","sha":"691648fac2c21124837ba646c8bbe37a5d8cd2a4","user":{"login":"fidencio","id":112762,"avatar_url":"https://avatars3.githubusercontent.com/u/112762?v=3","gravatar_id":"","url":"https://api.github.com/users/fidencio","html_url":"https://github.com/fidencio","followers_url":"https://api.github.com/users/fidencio/followers","following_url":"https://api.github.com/users/fidencio/following{/other_user}","gists_url":"https://api.github.com/users/fidencio/gists{/gist_id}","starred_url":"https://api.github.com/users/fidencio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fidencio/subscriptions","organizations_url":"https://api.github.com/users/fidencio/orgs","repos_url":"https://api.github.com/users/fidencio/repos","events_url":"https://api.github.com/users/fidencio/events{/privacy}","received_events_url":"https://api.github.com/users/fidencio/received_events","type":"User","site_admin":false},"repo":{"id":67102888,"name":"sssd","full_name":"fidencio/sssd","owner":{"login":"fidencio","id":112762,"avatar_url":"https://avatars3.githubusercontent.com/u/112762?v=3","gravatar_id":"","url":"https://api.github.com/users/fidencio","html_url":"https://github.com/fidencio","followers_url":"https://api.github.com/users/fidencio/followers","following_url":"https://api.github.com/users/fidencio/following{/other_user}","gists_url":"https://api.github.com/users/fidencio/gists{/gist_id}","starred_url":"https://api.github.com/users/fidencio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fidencio/subscriptions","organizations_url":"https://api.github.com/users/fidencio/orgs","repos_url":"https://api.github.com/users/fidencio/repos","events_url":"https://api.github.com/users/fidencio/events{/privacy}","received_events_url":"https://api.github.com/users/fidencio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fidencio/sssd","description":"A daemon to manage identity, authentication and authorization for centrally-managed systems.","fork":true,"url":"https://api.github.com/repos/fidencio/sssd","forks_url":"https://api.github.com/repos/fidencio/sssd/forks","keys_url":"https://api.github.com/repos/fidencio/sssd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fidencio/sssd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fidencio/sssd/teams","hooks_url":"https://api.github.com/repos/fidencio/sssd/hooks","issue_events_url":"https://api.github.com/repos/fidencio/sssd/issues/events{/number}","events_url":"https://api.github.com/repos/fidencio/sssd/events","assignees_url":"https://api.github.com/repos/fidencio/sssd/assignees{/user}","branches_url":"https://api.github.com/repos/fidencio/sssd/branches{/branch}","tags_url":"https://api.github.com/repos/fidencio/sssd/tags","blobs_url":"https://api.github.com/repos/fidencio/sssd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fidencio/sssd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fidencio/sssd/git/refs{/sha}","trees_url":"https://api.github.com/repos/fidencio/sssd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fidencio/sssd/statuses/{sha}","languages_url":"https://api.github.com/repos/fidencio/sssd/languages","stargazers_url":"https://api.github.com/repos/fidencio/sssd/stargazers","contributors_url":"https://api.github.com/repos/fidencio/sssd/contributors","subscribers_url":"https://api.github.com/repos/fidencio/sssd/subscribers","subscription_url":"https://api.github.com/repos/fidencio/sssd/subscription","commits_url":"https://api.github.com/repos/fidencio/sssd/commits{/sha}","git_commits_url":"https://api.github.com/repos/fidencio/sssd/git/commits{/sha}","comments_url":"https://api.github.com/repos/fidencio/sssd/comments{/number}","issue_comment_url":"https://api.github.com/repos/fidencio/sssd/issues/comments{/number}","contents_url":"https://api.github.com/repos/fidencio/sssd/contents/{+path}","compare_url":"https://api.github.com/repos/fidencio/sssd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fidencio/sssd/merges","archive_url":"https://api.github.com/repos/fidencio/sssd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fidencio/sssd/downloads","issues_url":"https://api.github.com/repos/fidencio/sssd/issues{/number}","pulls_url":"https://api.github.com/repos/fidencio/sssd/pulls{/number}","milestones_url":"https://api.github.com/repos/fidencio/sssd/milestones{/number}","notifications_url":"https://api.github.com/repos/fidencio/sssd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fidencio/sssd/labels{/name}","releases_url":"https://api.github.com/repos/fidencio/sssd/releases{/id}","deployments_url":"https://api.github.com/repos/fidencio/sssd/deployments","created_at":"2016-09-01T06:05:21Z","updated_at":"2016-09-01T06:05:26Z","pushed_at":"2017-03-01T10:10:29Z","git_url":"git://github.com/fidencio/sssd.git","ssh_url":"git@github.com:fidencio/sssd.git","clone_url":"https://github.com/fidencio/sssd.git","svn_url":"https://github.com/fidencio/sssd","homepage":"https://fedorahosted.org/sssd","size":33419,"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":"master"}},"base":{"label":"SSSD:master","ref":"master","sha":"bc07967636135e48252198936ac8975510918e99","user":{"login":"SSSD","id":12898906,"avatar_url":"https://avatars0.githubusercontent.com/u/12898906?v=3","gravatar_id":"","url":"https://api.github.com/users/SSSD","html_url":"https://github.com/SSSD","followers_url":"https://api.github.com/users/SSSD/followers","following_url":"https://api.github.com/users/SSSD/following{/other_user}","gists_url":"https://api.github.com/users/SSSD/gists{/gist_id}","starred_url":"https://api.github.com/users/SSSD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SSSD/subscriptions","organizations_url":"https://api.github.com/users/SSSD/orgs","repos_url":"https://api.github.com/users/SSSD/repos","events_url":"https://api.github.com/users/SSSD/events{/privacy}","received_events_url":"https://api.github.com/users/SSSD/received_events","type":"Organization","site_admin":false},"repo":{"id":37479167,"name":"sssd","full_name":"SSSD/sssd","owner":{"login":"SSSD","id":12898906,"avatar_url":"https://avatars0.githubusercontent.com/u/12898906?v=3","gravatar_id":"","url":"https://api.github.com/users/SSSD","html_url":"https://github.com/SSSD","followers_url":"https://api.github.com/users/SSSD/followers","following_url":"https://api.github.com/users/SSSD/following{/other_user}","gists_url":"https://api.github.com/users/SSSD/gists{/gist_id}","starred_url":"https://api.github.com/users/SSSD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SSSD/subscriptions","organizations_url":"https://api.github.com/users/SSSD/orgs","repos_url":"https://api.github.com/users/SSSD/repos","events_url":"https://api.github.com/users/SSSD/events{/privacy}","received_events_url":"https://api.github.com/users/SSSD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SSSD/sssd","description":"A daemon to manage identity, authentication and authorization for centrally-managed systems.","fork":false,"url":"https://api.github.com/repos/SSSD/sssd","forks_url":"https://api.github.com/repos/SSSD/sssd/forks","keys_url":"https://api.github.com/repos/SSSD/sssd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SSSD/sssd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SSSD/sssd/teams","hooks_url":"https://api.github.com/repos/SSSD/sssd/hooks","issue_events_url":"https://api.github.com/repos/SSSD/sssd/issues/events{/number}","events_url":"https://api.github.com/repos/SSSD/sssd/events","assignees_url":"https://api.github.com/repos/SSSD/sssd/assignees{/user}","branches_url":"https://api.github.com/repos/SSSD/sssd/branches{/branch}","tags_url":"https://api.github.com/repos/SSSD/sssd/tags","blobs_url":"https://api.github.com/repos/SSSD/sssd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SSSD/sssd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SSSD/sssd/git/refs{/sha}","trees_url":"https://api.github.com/repos/SSSD/sssd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SSSD/sssd/statuses/{sha}","languages_url":"https://api.github.com/repos/SSSD/sssd/languages","stargazers_url":"https://api.github.com/repos/SSSD/sssd/stargazers","contributors_url":"https://api.github.com/repos/SSSD/sssd/contributors","subscribers_url":"https://api.github.com/repos/SSSD/sssd/subscribers","subscription_url":"https://api.github.com/repos/SSSD/sssd/subscription","commits_url":"https://api.github.com/repos/SSSD/sssd/commits{/sha}","git_commits_url":"https://api.github.com/repos/SSSD/sssd/git/commits{/sha}","comments_url":"https://api.github.com/repos/SSSD/sssd/comments{/number}","issue_comment_url":"https://api.github.com/repos/SSSD/sssd/issues/comments{/number}","contents_url":"https://api.github.com/repos/SSSD/sssd/contents/{+path}","compare_url":"https://api.github.com/repos/SSSD/sssd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SSSD/sssd/merges","archive_url":"https://api.github.com/repos/SSSD/sssd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SSSD/sssd/downloads","issues_url":"https://api.github.com/repos/SSSD/sssd/issues{/number}","pulls_url":"https://api.github.com/repos/SSSD/sssd/pulls{/number}","milestones_url":"https://api.github.com/repos/SSSD/sssd/milestones{/number}","notifications_url":"https://api.github.com/repos/SSSD/sssd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SSSD/sssd/labels{/name}","releases_url":"https://api.github.com/repos/SSSD/sssd/releases{/id}","deployments_url":"https://api.github.com/repos/SSSD/sssd/deployments","created_at":"2015-06-15T17:09:48Z","updated_at":"2017-01-27T17:16:04Z","pushed_at":"2017-03-01T10:10:30Z","git_url":"git://github.com/SSSD/sssd.git","ssh_url":"git@github.com:SSSD/sssd.git","clone_url":"https://github.com/SSSD/sssd.git","svn_url":"https://github.com/SSSD/sssd","homepage":"https://fedorahosted.org/sssd","size":33512,"stargazers_count":18,"watchers_count":18,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":18,"forks":29,"open_issues":18,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SSSD/sssd/pulls/146"},"html":{"href":"https://github.com/SSSD/sssd/pull/146"},"issue":{"href":"https://api.github.com/repos/SSSD/sssd/issues/146"},"comments":{"href":"https://api.github.com/repos/SSSD/sssd/issues/146/comments"},"review_comments":{"href":"https://api.github.com/repos/SSSD/sssd/pulls/146/comments"},"review_comment":{"href":"https://api.github.com/repos/SSSD/sssd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SSSD/sssd/pulls/146/commits"},"statuses":{"href":"https://api.github.com/repos/SSSD/sssd/statuses/691648fac2c21124837ba646c8bbe37a5d8cd2a4"}}}}
{"actor":{"display_login":"jhrozek"}}