Bug 913

Summary: Editing with sudo fails on recent versions of macOS
Product: Sudo Reporter: Dan Villiom Podlaski Christiansen <danchr>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: low    
Priority: low    
Version: 1.8.30   
Hardware: Macintosh   
OS: MacOS X   
Attachments: A quick attempt at fixing this
The same quick attempt at fixing this, but marked as a patch

Description Dan Villiom Podlaski Christiansen 2020-01-16 10:43:34 MST
Created attachment 537 [details]
A quick attempt at fixing this

Recent versions of macOS — from Catalina, at least — mount the root file system as read-only. This breaks both 'sudo -e' and 'sudoedit':

$ sudo -e /etc/hosts
sudo: /etc/hosts: Read-only file system

I've attached a small patch that fixes this on my Mac.
Comment 1 Dan Villiom Podlaski Christiansen 2020-01-16 10:44:12 MST
Created attachment 538 [details]
The same quick attempt at fixing this, but marked as a patch
Comment 2 Todd C. Miller 2020-01-16 10:48:37 MST
Thanks, that fix looks good.
Comment 3 Todd C. Miller 2020-06-19 06:14:02 MDT
The fixed was included in Sudo 1.8.31