[ruby-core:90594] [Ruby trunk Bug#15429][Closed] Fix test failure if ENV["USER"] doesn't match Process.euid

From: normalperson@...
Date: 2018-12-17 23:06:15 UTC
List: ruby-core #90594
Issue #15429 has been updated by normalperson (Eric Wong).

Status changed from Open to Closed

Thanks. r66428

Oops, forgot to edit commit message before committing :x


----------------------------------------
Bug #15429: Fix test failure if ENV["USER"] doesn't match Process.euid
https://bugs.ruby-lang.org/issues/15429#change-75746

* Author: jeremyevans0 (Jeremy Evans)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0dev (2018-12-17 trunk 66427) [x86_64-openbsd]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
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--------------------------------
0001-Fix-test-failure-if-ENV-USER-doesn-t-match-Process.e.patch (1 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next