{"action":"created","comment":{"url":"https://api.github.com/repos/PBSPro/pbspro/pulls/comments/239551769","pull_request_review_id":182368581,"id":239551769,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTU1MTc2OQ==","diff_hunk":"@@ -700,13 +700,37 @@ query_server_dyn_res(server_info *sinfo)\n \tchar\t\t\t  cmd_line[512];\n #endif\n \n-\tfor (i = 0; i < MAX_SERVER_DYN_RES && conf.dynamic_res[i].res != NULL; i ++) {\n+\tfor (i = 0; i < MAX_SERVER_DYN_RES && conf.dynamic_res[i].res != NULL; i++) {","path":"src/scheduler/server_info.c","position":5,"original_position":5,"commit_id":"eb10d867bc2d85b6503716e41b80dd9d9d6c9c1c","original_commit_id":"eb10d867bc2d85b6503716e41b80dd9d9d6c9c1c","user":{"login":"mike0042","id":2702535,"node_id":"MDQ6VXNlcjI3MDI1MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/2702535?v=4","gravatar_id":"","url":"https://api.github.com/users/mike0042","html_url":"https://github.com/mike0042","followers_url":"https://api.github.com/users/mike0042/followers","following_url":"https://api.github.com/users/mike0042/following{/other_user}","gists_url":"https://api.github.com/users/mike0042/gists{/gist_id}","starred_url":"https://api.github.com/users/mike0042/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike0042/subscriptions","organizations_url":"https://api.github.com/users/mike0042/orgs","repos_url":"https://api.github.com/users/mike0042/repos","events_url":"https://api.github.com/users/mike0042/events{/privacy}","received_events_url":"https://api.github.com/users/mike0042/received_events","type":"User","site_admin":false},"body":"Please add parenthesis around each conditional.","created_at":"2018-12-06T17:54:51Z","updated_at":"2018-12-06T17:54:52Z","html_url":"https://github.com/PBSPro/pbspro/pull/905#discussion_r239551769","pull_request_url":"https://api.github.com/repos/PBSPro/pbspro/pulls/905","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/PBSPro/pbspro/pulls/comments/239551769"},"html":{"href":"https://github.com/PBSPro/pbspro/pull/905#discussion_r239551769"},"pull_request":{"href":"https://api.github.com/repos/PBSPro/pbspro/pulls/905"}}},"pull_request":{"url":"https://api.github.com/repos/PBSPro/pbspro/pulls/905","id":234828438,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0ODI4NDM4","html_url":"https://github.com/PBSPro/pbspro/pull/905","diff_url":"https://github.com/PBSPro/pbspro/pull/905.diff","patch_url":"https://github.com/PBSPro/pbspro/pull/905.patch","issue_url":"https://api.github.com/repos/PBSPro/pbspro/issues/905","number":905,"state":"open","locked":false,"title":"Scheduler does not check permissions on server_dyn_res script","user":{"login":"arungrover","id":17924134,"node_id":"MDQ6VXNlcjE3OTI0MTM0","avatar_url":"https://avatars0.githubusercontent.com/u/17924134?v=4","gravatar_id":"","url":"https://api.github.com/users/arungrover","html_url":"https://github.com/arungrover","followers_url":"https://api.github.com/users/arungrover/followers","following_url":"https://api.github.com/users/arungrover/following{/other_user}","gists_url":"https://api.github.com/users/arungrover/gists{/gist_id}","starred_url":"https://api.github.com/users/arungrover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arungrover/subscriptions","organizations_url":"https://api.github.com/users/arungrover/orgs","repos_url":"https://api.github.com/users/arungrover/repos","events_url":"https://api.github.com/users/arungrover/events{/privacy}","received_events_url":"https://api.github.com/users/arungrover/received_events","type":"User","site_admin":false},"body":"<!--- Please review your changes in preview mode -->\r\n<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n#### Bug/feature Description\r\nPBS does not check for permissions of server/mom dynamic resource script. There can be a case that the permissions of this file are open for 'write' to others and group.\r\n\r\n#### Affected Platform(s)\r\nAll\r\n\r\n#### Cause / Analysis / Design\r\nNo permission checks were performed.\r\n\r\n\r\n#### Solution Description\r\nAdded permission checks and also added a check that the user owning the script should have a uid <10 or be an admin (on windows)\r\n\r\n#### Testing logs/output\r\n[test_momdynres.txt](https://github.com/PBSPro/pbspro/files/2631339/test_momdynres.txt)\r\n[test_svrdynres.txt](https://github.com/PBSPro/pbspro/files/2631340/test_svrdynres.txt)\r\n[test_smoketest.txt](https://github.com/PBSPro/pbspro/files/2631342/test_smoketest.txt)\r\n\r\n\r\n#### Checklist:\r\n<!--- Use the preview button to see the checkboxes/links properly. -->\r\n<!--- Go over the following points, and put an `x` (without spaces around it) in the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] I have joined the **[pbspro community forum](http://community.pbspro.org/)**.\r\n- [x] My pull request contains a **single, signed** commit. See **[setting up gpg signature](https://pbspro.atlassian.net/wiki/display/DG/Signing+Your+Git+Commits)**.\r\n- [x] My code follows the **[coding style](https://pbspro.atlassian.net/wiki/display/DG/Coding+Standards)** of this project.\r\n- [ ] My change requires project documentation. See **[required documentation checklist](https://pbspro.atlassian.net/wiki/display/DG/Checklist+for+Developing+Features+and+Bug+Fixes)** for details.\r\n   - [ ] I have added documentation in the **[project documentation area](https://pbspro.atlassian.net/wiki/display/PD)**.\r\n- [x] I have added new **PTL test(s) to my commit**. (See **[using PTL for testing](https://pbspro.atlassian.net/wiki/display/DG/Using+PTL+for+Testing)**) *(or)*\r\n   - [ ] I have added  **manual test(s) to this pull request and explained why PTL is not appropriate** for this case.\r\n- [x] All new and existing automated tests have passed. (See **[running automated PTL tests](https://pbspro.atlassian.net/wiki/display/DG/PTL+Quick+Start+Guide)**).\r\n- [x] I have attached **test logs to this pull request** as evidence of testing/verification.\r\n\r\n\r\n__***For further information please visit the [Developer Guide Home](https://pbspro.atlassian.net/wiki/display/DG/Developer+Guide+Home).***__\r\n","created_at":"2018-11-30T00:01:20Z","updated_at":"2018-12-06T17:54:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbf8292d60825b329e1dee5c73754996ecbce50d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PBSPro/pbspro/pulls/905/commits","review_comments_url":"https://api.github.com/repos/PBSPro/pbspro/pulls/905/comments","review_comment_url":"https://api.github.com/repos/PBSPro/pbspro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PBSPro/pbspro/issues/905/comments","statuses_url":"https://api.github.com/repos/PBSPro/pbspro/statuses/eb10d867bc2d85b6503716e41b80dd9d9d6c9c1c","head":{"label":"arungrover:dyn_res_permission","ref":"dyn_res_permission","sha":"eb10d867bc2d85b6503716e41b80dd9d9d6c9c1c","user":{"login":"arungrover","id":17924134,"node_id":"MDQ6VXNlcjE3OTI0MTM0","avatar_url":"https://avatars0.githubusercontent.com/u/17924134?v=4","gravatar_id":"","url":"https://api.github.com/users/arungrover","html_url":"https://github.com/arungrover","followers_url":"https://api.github.com/users/arungrover/followers","following_url":"https://api.github.com/users/arungrover/following{/other_user}","gists_url":"https://api.github.com/users/arungrover/gists{/gist_id}","starred_url":"https://api.github.com/users/arungrover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arungrover/subscriptions","organizations_url":"https://api.github.com/users/arungrover/orgs","repos_url":"https://api.github.com/users/arungrover/repos","events_url":"https://api.github.com/users/arungrover/events{/privacy}","received_events_url":"https://api.github.com/users/arungrover/received_events","type":"User","site_admin":false},"repo":{"id":60597655,"node_id":"MDEwOlJlcG9zaXRvcnk2MDU5NzY1NQ==","name":"pbspro","full_name":"arungrover/pbspro","private":false,"owner":{"login":"arungrover","id":17924134,"node_id":"MDQ6VXNlcjE3OTI0MTM0","avatar_url":"https://avatars0.githubusercontent.com/u/17924134?v=4","gravatar_id":"","url":"https://api.github.com/users/arungrover","html_url":"https://github.com/arungrover","followers_url":"https://api.github.com/users/arungrover/followers","following_url":"https://api.github.com/users/arungrover/following{/other_user}","gists_url":"https://api.github.com/users/arungrover/gists{/gist_id}","starred_url":"https://api.github.com/users/arungrover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arungrover/subscriptions","organizations_url":"https://api.github.com/users/arungrover/orgs","repos_url":"https://api.github.com/users/arungrover/repos","events_url":"https://api.github.com/users/arungrover/events{/privacy}","received_events_url":"https://api.github.com/users/arungrover/received_events","type":"User","site_admin":false},"html_url":"https://github.com/arungrover/pbspro","description":null,"fork":true,"url":"https://api.github.com/repos/arungrover/pbspro","forks_url":"https://api.github.com/repos/arungrover/pbspro/forks","keys_url":"https://api.github.com/repos/arungrover/pbspro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arungrover/pbspro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arungrover/pbspro/teams","hooks_url":"https://api.github.com/repos/arungrover/pbspro/hooks","issue_events_url":"https://api.github.com/repos/arungrover/pbspro/issues/events{/number}","events_url":"https://api.github.com/repos/arungrover/pbspro/events","assignees_url":"https://api.github.com/repos/arungrover/pbspro/assignees{/user}","branches_url":"https://api.github.com/repos/arungrover/pbspro/branches{/branch}","tags_url":"https://api.github.com/repos/arungrover/pbspro/tags","blobs_url":"https://api.github.com/repos/arungrover/pbspro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arungrover/pbspro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arungrover/pbspro/git/refs{/sha}","trees_url":"https://api.github.com/repos/arungrover/pbspro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arungrover/pbspro/statuses/{sha}","languages_url":"https://api.github.com/repos/arungrover/pbspro/languages","stargazers_url":"https://api.github.com/repos/arungrover/pbspro/stargazers","contributors_url":"https://api.github.com/repos/arungrover/pbspro/contributors","subscribers_url":"https://api.github.com/repos/arungrover/pbspro/subscribers","subscription_url":"https://api.github.com/repos/arungrover/pbspro/subscription","commits_url":"https://api.github.com/repos/arungrover/pbspro/commits{/sha}","git_commits_url":"https://api.github.com/repos/arungrover/pbspro/git/commits{/sha}","comments_url":"https://api.github.com/repos/arungrover/pbspro/comments{/number}","issue_comment_url":"https://api.github.com/repos/arungrover/pbspro/issues/comments{/number}","contents_url":"https://api.github.com/repos/arungrover/pbspro/contents/{+path}","compare_url":"https://api.github.com/repos/arungrover/pbspro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arungrover/pbspro/merges","archive_url":"https://api.github.com/repos/arungrover/pbspro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arungrover/pbspro/downloads","issues_url":"https://api.github.com/repos/arungrover/pbspro/issues{/number}","pulls_url":"https://api.github.com/repos/arungrover/pbspro/pulls{/number}","milestones_url":"https://api.github.com/repos/arungrover/pbspro/milestones{/number}","notifications_url":"https://api.github.com/repos/arungrover/pbspro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arungrover/pbspro/labels{/name}","releases_url":"https://api.github.com/repos/arungrover/pbspro/releases{/id}","deployments_url":"https://api.github.com/repos/arungrover/pbspro/deployments","created_at":"2016-06-07T08:51:21Z","updated_at":"2018-12-06T00:33:22Z","pushed_at":"2018-12-06T00:33:15Z","git_url":"git://github.com/arungrover/pbspro.git","ssh_url":"git@github.com:arungrover/pbspro.git","clone_url":"https://github.com/arungrover/pbspro.git","svn_url":"https://github.com/arungrover/pbspro","homepage":null,"size":17025,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"PBSPro:master","ref":"master","sha":"687e7c5a40623b9af7d4a1c4218c959957387ea0","user":{"login":"PBSPro","id":19280436,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjgwNDM2","avatar_url":"https://avatars2.githubusercontent.com/u/19280436?v=4","gravatar_id":"","url":"https://api.github.com/users/PBSPro","html_url":"https://github.com/PBSPro","followers_url":"https://api.github.com/users/PBSPro/followers","following_url":"https://api.github.com/users/PBSPro/following{/other_user}","gists_url":"https://api.github.com/users/PBSPro/gists{/gist_id}","starred_url":"https://api.github.com/users/PBSPro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PBSPro/subscriptions","organizations_url":"https://api.github.com/users/PBSPro/orgs","repos_url":"https://api.github.com/users/PBSPro/repos","events_url":"https://api.github.com/users/PBSPro/events{/privacy}","received_events_url":"https://api.github.com/users/PBSPro/received_events","type":"Organization","site_admin":false},"repo":{"id":59082072,"node_id":"MDEwOlJlcG9zaXRvcnk1OTA4MjA3Mg==","name":"pbspro","full_name":"PBSPro/pbspro","private":false,"owner":{"login":"PBSPro","id":19280436,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjgwNDM2","avatar_url":"https://avatars2.githubusercontent.com/u/19280436?v=4","gravatar_id":"","url":"https://api.github.com/users/PBSPro","html_url":"https://github.com/PBSPro","followers_url":"https://api.github.com/users/PBSPro/followers","following_url":"https://api.github.com/users/PBSPro/following{/other_user}","gists_url":"https://api.github.com/users/PBSPro/gists{/gist_id}","starred_url":"https://api.github.com/users/PBSPro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PBSPro/subscriptions","organizations_url":"https://api.github.com/users/PBSPro/orgs","repos_url":"https://api.github.com/users/PBSPro/repos","events_url":"https://api.github.com/users/PBSPro/events{/privacy}","received_events_url":"https://api.github.com/users/PBSPro/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/PBSPro/pbspro","description":"An HPC workload manager and job scheduler for desktops, clusters, and clouds.","fork":false,"url":"https://api.github.com/repos/PBSPro/pbspro","forks_url":"https://api.github.com/repos/PBSPro/pbspro/forks","keys_url":"https://api.github.com/repos/PBSPro/pbspro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PBSPro/pbspro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PBSPro/pbspro/teams","hooks_url":"https://api.github.com/repos/PBSPro/pbspro/hooks","issue_events_url":"https://api.github.com/repos/PBSPro/pbspro/issues/events{/number}","events_url":"https://api.github.com/repos/PBSPro/pbspro/events","assignees_url":"https://api.github.com/repos/PBSPro/pbspro/assignees{/user}","branches_url":"https://api.github.com/repos/PBSPro/pbspro/branches{/branch}","tags_url":"https://api.github.com/repos/PBSPro/pbspro/tags","blobs_url":"https://api.github.com/repos/PBSPro/pbspro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PBSPro/pbspro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PBSPro/pbspro/git/refs{/sha}","trees_url":"https://api.github.com/repos/PBSPro/pbspro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PBSPro/pbspro/statuses/{sha}","languages_url":"https://api.github.com/repos/PBSPro/pbspro/languages","stargazers_url":"https://api.github.com/repos/PBSPro/pbspro/stargazers","contributors_url":"https://api.github.com/repos/PBSPro/pbspro/contributors","subscribers_url":"https://api.github.com/repos/PBSPro/pbspro/subscribers","subscription_url":"https://api.github.com/repos/PBSPro/pbspro/subscription","commits_url":"https://api.github.com/repos/PBSPro/pbspro/commits{/sha}","git_commits_url":"https://api.github.com/repos/PBSPro/pbspro/git/commits{/sha}","comments_url":"https://api.github.com/repos/PBSPro/pbspro/comments{/number}","issue_comment_url":"https://api.github.com/repos/PBSPro/pbspro/issues/comments{/number}","contents_url":"https://api.github.com/repos/PBSPro/pbspro/contents/{+path}","compare_url":"https://api.github.com/repos/PBSPro/pbspro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PBSPro/pbspro/merges","archive_url":"https://api.github.com/repos/PBSPro/pbspro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PBSPro/pbspro/downloads","issues_url":"https://api.github.com/repos/PBSPro/pbspro/issues{/number}","pulls_url":"https://api.github.com/repos/PBSPro/pbspro/pulls{/number}","milestones_url":"https://api.github.com/repos/PBSPro/pbspro/milestones{/number}","notifications_url":"https://api.github.com/repos/PBSPro/pbspro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PBSPro/pbspro/labels{/name}","releases_url":"https://api.github.com/repos/PBSPro/pbspro/releases{/id}","deployments_url":"https://api.github.com/repos/PBSPro/pbspro/deployments","created_at":"2016-05-18T04:31:29Z","updated_at":"2018-12-06T09:19:08Z","pushed_at":"2018-12-06T12:03:34Z","git_url":"git://github.com/PBSPro/pbspro.git","ssh_url":"git@github.com:PBSPro/pbspro.git","clone_url":"https://github.com/PBSPro/pbspro.git","svn_url":"https://github.com/PBSPro/pbspro","homepage":"www.pbspro.org","size":16794,"stargazers_count":221,"watchers_count":221,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":169,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":169,"open_issues":26,"watchers":221,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PBSPro/pbspro/pulls/905"},"html":{"href":"https://github.com/PBSPro/pbspro/pull/905"},"issue":{"href":"https://api.github.com/repos/PBSPro/pbspro/issues/905"},"comments":{"href":"https://api.github.com/repos/PBSPro/pbspro/issues/905/comments"},"review_comments":{"href":"https://api.github.com/repos/PBSPro/pbspro/pulls/905/comments"},"review_comment":{"href":"https://api.github.com/repos/PBSPro/pbspro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PBSPro/pbspro/pulls/905/commits"},"statuses":{"href":"https://api.github.com/repos/PBSPro/pbspro/statuses/eb10d867bc2d85b6503716e41b80dd9d9d6c9c1c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mike0042"}}