Thursday, July 30, 2009

In Solaris 10, $EDITOR cannot contain arguments.

Some people got into the habit of setting the UNIX environment variable $EDITOR to a command and its arguments, for example "emacs -nw". This is no longer supported by crontab(1), as of Solaris 10. It doesn't seem to be documented anywhere, but Solaris 9 executed the editor command by running "sh -c", but Solaris 10's crontab command, instead, splits $PATH, joins $EDITOR to it, and runs execve(2) on each in turn until one works. Thus, it will try and run a program named "emacs -nw", not a program named "emacs" with an argument "-nw".

Nice undocumented change, Sun!

Wednesday, July 8, 2009

NFSv4 ACLs and chmod annoyances

The implementation of chmod -R with NFSv4 ACLs is very broken. Particularly when removing them. You can only remove ACL entries recursively if they are present at all levels of the path. If they're not there at any level, chmod will error out as soon as it finds one.

So the only way to reliably remove an ACL entry across a set of files is with find . -exec chmod A-<acl entry> {} \;.