Project

General

Profile

Actions

Bug #15429

closed

Fix test failure if ENV["USER"] doesn't match Process.euid

Added by jeremyevans0 (Jeremy Evans) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.0dev (2018-12-17 trunk 66427) [x86_64-openbsd]
[ruby-core:90593]

Description

When dropping privileges to run tests, ENV["USER"] could be set
to a user that doesn't match Process.euid, which causes
test_seteuid_name to fail with Errno::EPERM.

Attached is a patch that fixes this issue by trying to get the
name for the current euid, and only fallback to ENV["USER"] if
that doesn't work.


Files

Updated by normalperson (Eric Wong) over 5 years ago

  • Status changed from Open to Closed

Thanks. r66428

Oops, forgot to edit commit message before committing :x

Actions

Also available in: Atom PDF

Like0
Like0