Skip to content

Commit

Permalink
feat: set permissions for suid sandbox helper
Browse files Browse the repository at this point in the history
  • Loading branch information
nornagon committed Mar 7, 2019
1 parent 3cfed02 commit f80b917
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ class RedhatInstaller extends common.ElectronInstaller {
get specPath () {
return path.join(this.stagingDir, 'SPECS', `${this.options.name}.spec`)
}

/**
* Copy the application into the package.
*/
async copyApplication () {
await super.copyApplication()

// The sandbox helper executable must have the setuid (+s / 0o4000) bit set.
const sandboxHelperPath = path.join(this.stagingDir, 'chrome-sandbox')
if (await fs.exists(sandboxHelperPath))
await fs.chmod(sandboxHelperPath, 0o4755)
}

/**
* Creates macros file used by `rpmbuild`.
Expand Down

0 comments on commit f80b917

Please sign in to comment.