summaryrefslogtreecommitdiff
path: root/tests/fs-tests/utils/Makefile
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-10-10 14:23:18 +0300
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-10-11 10:56:58 +0300
commit17f66065837415e0b1b4d619f12a2219af987c80 (patch)
treefd4270c54ee0a9f0c733d76f38d3d7829de4b40a /tests/fs-tests/utils/Makefile
parent56840a198a70604ece50d9d727cebcc28930ab4c (diff)
mkfs.ubifs: rewrite path checking
We use the 'in_path()' function to check whether the output image is withing the mkfs.ubifs root directory or not. However, this function is not correct and it fails for the following situation, as Marcus Prebble <marcus.prebble@axis.com> reports: 1. We have our root file-system mounted at / and want to build an image out of it. 2. We have tmpfs mounted at /tmp 3. We mount the root file-system under /tmp/newroot 4. We run mkfs.ubifs with -r /tmp/newroot -o /tmp/image And this fails. It fails because 'in_path()' misses this use-case. This patch re-implements the check completely. Now we use 'realpath()' to find canonical paths and just check that the output file is not under the root mkfs.ubifs directory. Reported-by: Marcus Prebble <marcus.prebble@axis.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Tested-by: Marcus Prebble <marcus.prebble@axis.com>
Diffstat (limited to 'tests/fs-tests/utils/Makefile')
0 files changed, 0 insertions, 0 deletions