search for: attr_cmn_accessmask

Displaying 1 result from an estimated 1 matches for "attr_cmn_accessmask".

2007 Oct 16
1
lchmod for osx (was: Symlinks in OS X (10.4.1))
...mod(const char *path, mode_t mode) { struct attrlist attrList; uint32_t m; /* manpage is wrong! not mode_t, but uint32_t is required */ memset(&attrList, 0, sizeof(attrList)); attrList.bitmapcount = ATTR_BIT_MAP_COUNT; attrList.commonattr = ATTR_CMN_ACCESSMASK; m = mode; return setattrlist(path, &attrList, &m, sizeof(m), FSOPT_NOFOLLOW); } int main(int argc, const char **argv) { struct stat st; const char *file; int perms; file = argv[1]; perms = strtol(argv[2], 0, 0); i...