ruby-changes:53328
From: nobu <ko1@a...>
Date: Mon, 5 Nov 2018 11:25:51 +0900 (JST)
Subject: [ruby-changes:53328] nobu:r65544 (trunk): Create MJIT header with strict permission
nobu 2018-11-05 11:25:46 +0900 (Mon, 05 Nov 2018) New Revision: 65544 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65544 Log: Create MJIT header with strict permission Modified files: trunk/tool/transform_mjit_header.rb Index: tool/transform_mjit_header.rb =================================================================== --- tool/transform_mjit_header.rb (revision 65543) +++ tool/transform_mjit_header.rb (revision 65544) @@ -148,8 +148,10 @@ module MJITHeader https://github.com/ruby/ruby/blob/trunk/tool/transform_mjit_header.rb#L148 end def self.write(code, out) - FileUtils.mkdir_p(File.dirname(out)) - File.binwrite("#{out}.new", code) + # create with strict permission, then will install proper + # permmsion + FileUtils.mkdir_p(File.dirname(out), mode: 0700) + File.binwrite("#{out}.new", code, perm: 0600) FileUtils.mv("#{out}.new", out) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/