Homec4science

Detect goofy `sudo -n` output under OSX

Authored by epriestley <git@epriestley.com> on Dec 23 2014, 23:45.

Description

Detect goofy sudo -n output under OSX

Summary: See rP2fedb6f941d8. We might need a more general version of this since we do some sudo stuff elsewhere, but at least on my machine sudo -n exits with code 0 when the target user exists but needs a password.

Test Plan:

  • Tried to run daemons as root, with no automatic sudo to root. Got a bad result before (phd believed it had executed the daemons) and a good result afterward (phd recognized that sudo failed).
  • Tried to run daemons from root, as a non-root user. Got a good result in both cases.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: fabe, epriestley

Differential Revision: https://secure.phabricator.com/D11041

Details

Committed
epriestley <git@epriestley.com>Dec 23 2014, 23:45
Pushed
aubortJan 31 2017, 17:16
Parents
rPHf35a38b086ab: Allow public access to the project edit/history page
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHb3394c53d8e9: Detect goofy `sudo -n` output under OSX (authored by epriestley <git@epriestley.com>).Dec 23 2014, 23:45