https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112016-05-22T22:55:38ZRuby Issue Tracking SystemRuby master - Feature #12410: Process.uid= validation and castinghttps://bugs.ruby-lang.org/issues/12410?journal_id=588112016-05-22T22:55:38Zdjberg96 (Daniel Berger)
<ul><li><strong>ruby -v</strong> set to <i>ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]</i></li></ul> Ruby master - Feature #12410: Process.uid= validation and castinghttps://bugs.ruby-lang.org/issues/12410?journal_id=639652017-03-29T09:31:53Zmirakui (Issei Naruta)
<ul></ul><p>Wrote a patch for this ticket: <a href="https://github.com/ruby/ruby/pull/1568" class="external">https://github.com/ruby/ruby/pull/1568</a><br>
It validates the argument for <code>Process#.uid=</code> using getpwuid.</p> Ruby master - Feature #12410: Process.uid= validation and castinghttps://bugs.ruby-lang.org/issues/12410?journal_id=639662017-03-29T09:41:07Zsorah (Sorah Fukumori)her@sorah.jp
<ul><li><strong>Tracker</strong> changed from <i>Bug</i> to <i>Feature</i></li></ul><p>Changing this ticket into a feature request because this request wants adding a new behavior into a existing method.</p> Ruby master - Feature #12410: Process.uid= validation and castinghttps://bugs.ruby-lang.org/issues/12410?journal_id=639712017-03-29T10:02:38Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>As follows, it looks because BSD id(1) handles the uid argument as 32bit integer.<br>
(Note that GNU coreutils' id(1) doesn't allow negative argument)</p>
<pre><code class="sh syntaxhl" data-language="sh">% <span class="nb">id</span> <span class="nt">-un</span> <span class="nt">--</span> <span class="nt">-4294967296</span>
root
</code></pre>
<p>Therefore this behavior is considered as unexpected behavior and Ruby shouldn't follow it.</p>