Perform map chmod *before* chown

After we chown, we potentially are no longer the owner (if we chown'ed
to a different uid then AID_ROOT) and thus can no longer chmod.

If we chmod before we chown, this problem is eliminated.

This fixes uid != AID_ROOT for maps.

Bug: 218408035
Bug: 237716689
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifbbe37d8dceff245d4def950712f1847615d5856
1 file changed
tree: 759f9403de25178612d8e1d497e05e7b8bbc03cf
  1. bpfloader/
  2. libbpf_android/
  3. progs/
  4. Android.bp
  5. NOTICE
  6. OWNERS
  7. OWNERS_bpf
  8. PREUPLOAD.cfg