Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-16605

lfs fid2path should allow null byte separated output

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • 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>

       

      Attachments

        Activity

          People

            arshad512 Arshad Hussain
            westersund Simon Westersund
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: