Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

sudo offers updated binaries for OS X 10.5 and up so you don't have to wait for Apple: http://www.sudo.ws/sudo/download.html#binary

If you don't trust the binaries, I found it easy to update the vulnerable sudo v1.7.0 on my OS X 10.6 machine by building from source and overwriting the one supplied by Apple:

0) Backup /usr/bin/sudo (temporarily; you'll want to delete the old sudo after verifying the new one works), and backup /etc/sudoers just to be safe

1) Download the source for sudo v1.7.10p7 linked on sudo's homepage: http://www.sudo.ws

2) Untar, ungzip, go to resulting source directory

3) Run configure, telling it to overwrite the vulnerable sudo

    configure --prefix=/usr/bin
4) Compile

    make
5) Install

    sudo make install
6) Delete the old sudo you backed up in (0)

See also the sudo installation notes here: http://www.sudo.ws/sudo/install.html



If you use `configure --prefix=/usr/bin`, you'll end up with sudo installed in /usr/bin/bin/sudo. Instead, try

   ./configure --prefix=/usr
to use the /usr hierarchy (/usr/bin, /usr/sbin, /usr/share, etc...) instead of the /usr/local hierarchy.

Also, if you're able to run an executable in the current directory without specifying its location, as in configure instead of ./configure, then you have . (pwd) in your $PATH, which isn't recommended because a malicious executable might be in the directory you're in, and it might be named something like ls. Just listing the directory could have you owned.


You're absolutely right on all counts. You caught me writing that sloppily from memory. Thank you for the corrections!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: