[前][次][番号順一覧][スレッド一覧]

ruby-changes:42195

From: usa <ko1@a...>
Date: Fri, 25 Mar 2016 17:43:49 +0900 (JST)
Subject: [ruby-changes:42195] usa:r54269 (ruby_2_1): merge revision(s) 54010: [Backport #12154]

usa	2016-03-25 17:43:45 +0900 (Fri, 25 Mar 2016)

  New Revision: 54269

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54269

  Log:
    merge revision(s) 54010: [Backport #12154]
    
    * test/ruby/test_process.rb (test_execopts_gid): Skip a test
      that is known to fail on AIX. AIX allows setgid to
      a supplementary group, but Ruby does not allow the "-e"
      option when setgid'ed, so the test does not work as intended.

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/test/ruby/test_process.rb
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 54268)
+++ ruby_2_1/ChangeLog	(revision 54269)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Fri Mar 25 17:42:34 2016  Rei Odaira  <Rei.Odaira@g...>
+
+	* test/ruby/test_process.rb (test_execopts_gid): Skip a test
+	  that is known to fail on AIX. AIX allows setgid to
+	  a supplementary group, but Ruby does not allow the "-e"
+	  option when setgid'ed, so the test does not work as intended.
+
 Fri Mar 25 17:36:24 2016  Rei Odaira  <Rei.Odaira@g...>
 
 	* test/rinda/test_rinda.rb (test_make_socket_ipv4_multicast):
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 54268)
+++ ruby_2_1/version.h	(revision 54269)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.9"
 #define RUBY_RELEASE_DATE "2016-03-25"
-#define RUBY_PATCHLEVEL 466
+#define RUBY_PATCHLEVEL 467
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_1/test/ruby/test_process.rb
===================================================================
--- ruby_2_1/test/ruby/test_process.rb	(revision 54268)
+++ ruby_2_1/test/ruby/test_process.rb	(revision 54269)
@@ -1644,7 +1644,15 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/ruby/test_process.rb#L1644
       assert_nothing_raised(feature6975) do
         begin
           g = IO.popen([RUBY, "-e", "print Process.gid", gid: group], &:read)
-          assert_equal(gid, g, feature6975)
+          # AIX allows a non-root process to setgid to its supplementary group,
+          # while other UNIXes do not. (This might be AIX's violation of the POSIX standard.)
+          # However, Ruby does not allow a setgid'ed Ruby process to use the -e option.
+          # As a result, the Ruby process invoked by "IO.popen([RUBY, "-e", ..." above fails
+          # with a message like "no -e allowed while running setgid (SecurityError)" to stderr,
+          # the exis status is set to 1, and the variable "g" is set to an empty string.
+          # To conclude, on AIX, if the "gid" variable is a supplementary group,
+          # the assert_equal next can fail, so skip it.
+          assert_equal(gid, g, feature6975) unless $?.exitstatus == 1 && /aix/ =~ RUBY_PLATFORM && gid != Process.gid
         rescue Errno::EPERM, NotImplementedError
         end
       end

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r54010


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]