[mesa] Ensure files/directories have read permissions

As part of the io2 migration, we must ensure all directories are
explicitly *Opened* instead of using common *Connect* operations, since
the latter does not use any flags/rights. Because of this, when a
directory is connected to like a service, the connection lacks any
rights.

This only works right now as in io1, many operations - like directory
enumeration - were unprivileged. In order to start enforcing the new
io2 rights model, we need to require that callers opening directories
(or other node types) explicitly set the flags/rights they want.

Bug: 376575307
Test: fx test mesa_unit_tests
Change-Id: If56828847fe28f47f4f46b60d304c98b9f918b56
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/mesa/+/1211785
Reviewed-by: Craig Stout <cstout@google.com>
Commit-Queue: Brandon Castellano <bcastell@google.com>
1 file changed