Details
-
Bug
-
Resolution: Fixed
-
Minor
-
Upstream
-
3
-
9223372036854775807
Description
When using 'lfs fid2path' to find all hardlinks of a FID, the links are printed out with newline characters separating them. This is unsafe, since file paths are allowed to contain newline characters as well, which makes fid2path unreliable for non-interactive use (i.e. as part of other tools, without human supervision).
This issue is present in the master branch, so I assume it might affect all current versions.
To mitigate this problem and not break backwards compatibility, perhaps one could add a new command line argument that changes the path separator from '\n' to '\0'? Similar to "find . -print0", for example.
# Suggested usage:
lfs fid2path -0 <FID>
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51626/
Subject:
LU-16605lfs: Add -n option to fid2pathProject: fs/lustre-release
Branch: master
Current Patch Set:
Commit: a1bc7a84ce5b3b649fd590a80645f299205024c2