ruby-changes:50217
From: nobu <ko1@a...>
Date: Sat, 10 Feb 2018 00:21:24 +0900 (JST)
Subject: [ruby-changes:50217] nobu:r62335 (trunk): mjit.c: set umask
nobu 2018-02-10 00:21:19 +0900 (Sat, 10 Feb 2018) New Revision: 62335 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62335 Log: mjit.c: set umask * mjit.c (start_process): set umask so other users cannot access generated files. Modified files: trunk/mjit.c Index: mjit.c =================================================================== --- mjit.c (revision 62334) +++ mjit.c (revision 62335) @@ -336,6 +336,7 @@ start_process(const char *path, char *co https://github.com/ruby/ruby/blob/trunk/mjit.c#L336 int dev_null = rb_cloexec_open(ruby_null_device, O_WRONLY, 0); if ((pid = vfork()) == 0) { + umask(0077); if (mjit_opts.verbose == 0) { /* CC can be started in a thread using a file which has been already removed while MJIT is finishing. Discard the -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/