overlayfs: Mount overlay with context= fs_options if original mount has it
Say we have mount configurations as follows: mount <dev> /mnt_point -t ext4 -o ro,context=<se_file_context> mount overlay /mnt_point2 -t overlay -o lowerdir=/mnt_point,upperdir=... Overlayfs driver doesn't forward the overridden file context from /mnt_point to /mnt_point2, thus the same file (same inode) would have different file context when accessed via /mnt_point and /mnt_point2. This change makes adb remount to mount filesystem overlays with context= option if the overlaid mountpoint has it too. This makes the files under context= mountpoint to retain the same file context after remount. Also run clang-format on the whole file to fix some formatting issues. Bug: 243501054 Test: adb remount && check file context with "ls -Z" Change-Id: Ie4815604c56f1ce81b755cd0569b6577bd5f575f
Loading
Please register or sign in to comment