Is it possible to extend Drupal's user_access() function to provide a more complex logic for permissions This question is specific to Drupal 7, and I'm pretty sure that I already know the answer to this, namely that I won't be able to do what I want, but I thought I'd pose it to you Drupal experts.

Is it possible to extend Drupal's user_access() function to provide a more complex logic for permissions? I know it is possible to create an access callback function that provides more complex logic, but I want it so that every function that calls the user_access() function will implement this new logic for determining permissions.

So, how do you extend Drupal's user_access() function to run your own functions too to check access?
Looking at the code there's simply no way to do this without directly hacking the user_access() function. 

There are no hooks invoked and the logic is completely self-contained, aside from one call user_role_permissions(). That function just runs a database query though so there's no scope to intercept the process there.

Obviously you could write your own access function and call it from your own code, but there are 152 calls to user_access() in core files (and countless others in contributed modules) which won't be able to take advantage of it unfortunately.