build_library: mount ext2 filesystem with ext_attr feature

Mount the ext2 filesystem with the extended attributes feature so that file
capabilities can be used. This will allow us to use file capilities to replace
setuid binaries.

TEST=Build and boot an image.
1) Mount fs as read/write using
2) Run 'sudo getcap /bin/ping' and verify that no output is returned.
3) Run 'sudo setcap cap_net_raw=ep /bin/ping'.
4) Run 'sudo getcap /bin/ping' again and verify that /bin/ping now has the
   cap_net_raw=ep file capability set.

Change-Id: I310d5b64547a3946d852833d87988a10c86bb948
Reviewed-by: Mike Frysinger <>
Reviewed-by: Jorge Lucangeli Obes <>
Commit-Queue: Samuel Tan <>
Tested-by: Samuel Tan <>
1 file changed