Is there a way to hook rebuild permissions? I'm working on a module that works with nodeaccess_userreference, I have to add some actions to the rebuild permissions function of the core.
Is it possibile?
For Drupal 7, the submit handler for admin/reports/status/rebuild is node_configure_rebuild_confirm_submit, which calls node_access_rebuild.  Just note that node_access_rebuild can take a while (and why it support batch mode).