Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

run browser as specified user #9

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
## [Unreleased](https://github.com/rubycdp/ferrum/compare/v0.12...main) ##
## [Unreleased](https://github.com/rubycdp/ferrum/compare/v0.13...main) ##

### Added

### Changed

### Fixed

### Removed

## [0.13](https://github.com/rubycdp/ferrum/compare/v0.12...v0.13) - (Nov 12, 2022) ##

### Added

Expand Down
4 changes: 4 additions & 0 deletions lib/ferrum/browser/process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ def start
process_options[:pgroup] = true unless Utils::Platform.windows?
process_options[:out] = process_options[:err] = write_io

user = Etc.getpwnam('freeagent')
process_options[:uid] = user.uid
process_options[:gid] = user.gid

if @command.xvfb?
@xvfb = Xvfb.start(@command.options)
ObjectSpace.define_finalizer(self, self.class.process_killer(@xvfb.pid))
Expand Down