HomePhabricator

Detect goofy `sudo -n` output under OSX

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

Provenance
epriestleyAuthored on
epriestleyPushed on Dec 23 2014, 10:45 PM
Reviewer
btrahan
Differential Revision
D11041: Detect goofy `sudo -n` output under OSX
Parents
rPf35a38b086ab: Allow public access to the project edit/history page
Branches
Unknown
Tags
Unknown