opscode/ohai — pull request #386 by juliandunn (2014-08-14 19:16:15+00:00)
Title: getlogin() often lies, especially when run under "su"

Run under "su", Ohai incorrectly returns the calling user as `node['current_user']` because `getlogin()` lies to us.
According to the Ruby documentation, it's safer to use getpwuid().