Support cross-user lookups

Apps should typically not be able to lookup files from a FUSE daemon
running in another FUSE daemon user.

Unfortunately, some OEMs rely on this behavior for "app cloning"
feature. To maintain support in Android R, we allow app clone pair lookups.

If the system_server determines that two users are an app clone pair,
cross-user lookups will succeed in the respective FUSE daemons.

OEMs should ensure the following:
1. Work profiles should never be paired with any other user
2. Pairings should only involve user 0 and a special user number e.g 999
3. An associated user number MUST never be re-used for a work profile
user within the same boot context

Test: Manual
Bug: 162476851
Bug: 154057120

(cherry-picked from commit 5077a89bf6d76dd1e1283d1380740c1c306bed5c)

Change-Id: If0bdc467999c77a5b6268405bd36f333504b7d6a
Merged-In: If0bdc467999c77a5b6268405bd36f333504b7d6a
4 files changed