Fix issue #1200: Restore ACL functionality

Uses os_* functions to restore ACL functionality, addresses #1200 
`int32_t` is used above so it should be used here, too.