{ "id": "167025", "key": "DAEMON-70", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "12519", "key": "DAEMON", "name": "Appcelerator Daemon" }, "fixVersions": [ { "id": "18407", "description": "", "name": "Appc Daemon 1.0.0", "archived": false, "released": true, "releaseDate": "2017-12-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-05-03T14:44:40.000+0000", "created": "2017-04-10T19:42:32.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-10-26T03:05:02.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "15050", "name": "appcd-core", "description": "Core daemon logic: config, plugin loader, logging, dispatcher" } ], "description": "In Node, you can only change the user id if Node is launched as root. If the user launching the daemon is root, it would be essential that root privileges be dropped as soon as possible during the daemon initialization.\r\n\r\nTo check if the daemon is being run as root, check if {{process.getuid() === 0}}. If the uid is zero, then get the uid/gid from in the config and call {{process.setuid()}} and/or {{process.setgid()}}. If there is no uid/gid in the config or the uid/gid is invalid, then the daemon should fatal error and exit.\r\n\r\nNote that this only applies to macOS and Linux.", "attachment": [], "flagged": false, "summary": "appcd-core: Drop priviledges and set uid/gid if root", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": null, "closedSprints": [ { "id": 882, "state": "closed", "name": "2017 Sprint 09 Tooling", "startDate": "2017-04-23T21:40:51.921Z", "endDate": "2017-05-07T21:40:00.000Z", "completeDate": "2017-05-08T00:27:11.528Z", "originBoardId": 199 } ], "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }