HFSDebug Bugfix Release 3.10
I discovered a bug in hfsdebug. It causes hfsdebug to crash while printing Access Control Entry (ACE) details for certain files or folders. For example, consider the standard ~/Library/Preferences/ folder on Leopard.
$ ls -lde ~/Library/Preferences drwx——@ 167 singh staff … /Users/singh/Library/Preferences 0: group:everyone deny delete
This folder has an ACE for the group everyone. In particular, the ACE applies to no specific user (or you could say it applies to the wildcard user). HFSDebug was not dealing with this situation well. See what happens.
$ sudo hfsdebug ~/Library/Preferences/
<Catalog B-Tree node = 15028 (sector 0×49080)>
path = Macintosh HD:/Users/singh/Library/Preferences
# Catalog Folder Record
…
# ACL Entry
ace_applicable = ab cd ef ab cd ef ab cd ef ab cd ef 0 0 0 c
zsh: bus error sudo ./hfsdebug ~/Library/Preferences
I’ve released a bugfix version of HFSDebug to take care of this. The correct behavior should be as follows.
$ sudo hfsdebug ~/Library/Preferences/
<Catalog B-Tree node = 15028 (sector 0×49080)>
path = Macintosh HD:/Users/singh/Library/Preferences
# Catalog Folder Record
…
# ACL Entry
ace_applicable = ab cd ef ab cd ef ab cd ef ab cd ef 0 0 0 c
user = *
group = everyone
gid = 12
ace_flags = 00000000000000000000000000000010 (0×000002)
. KAUTH_ACE_DENY
ace_rights = 00000000000000000000000000010000 (0×000010)
. KAUTH_VNODE_DELETE