ruby-changes:58204
From: Yusuke <ko1@a...>
Date: Thu, 10 Oct 2019 23:24:12 +0900 (JST)
Subject: [ruby-changes:58204] a886d5cb79 (master): test/ruby/test_file_exhaustive.rb: check the owner of the root directory
https://git.ruby-lang.org/ruby.git/commit/?id=a886d5cb79 From a886d5cb79e2440eb6cf422723e08447ee4735db Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Thu, 10 Oct 2019 23:18:44 +0900 Subject: test/ruby/test_file_exhaustive.rb: check the owner of the root directory The root directory may be owned by the current user, for example, in chroot environment. diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index 2a5a860..6b80b82 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -70,7 +70,7 @@ class TestFileExhaustive < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file_exhaustive.rb#L70 def notownedfile return @notownedfile if defined? @notownedfile - if Process.euid != 0 + if Process.euid != File.stat("/").uid @notownedfile = '/' else @notownedfile = nil -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/