Allow mount data to be specified

Add an API, minijail_mount_with_data, that allows the mount data string
to be set.  This is needed for some mounts when entering a user
namespace and specifying uid=, gid=, or similar mount options.

TEST=mount proc with hidepid=2 check mount output to confirm
     security_Minijail0 test case added.

Signed-off-by: Dylan Reid <>
(cherry picked from commit 81e2397c51787ed8682b08e9c732f53cc668401f)

Change-Id: Iee10ead22c7d043afc3955496f7d4c470e31dfa0
Commit-Ready: Dylan Reid <>
Tested-by: Dylan Reid <>
Reviewed-by: Stephen Barber <>
3 files changed