Skip to content

Do not follow symlinks from michealcadilhac

Anthropy requested to merge github/fork/michaelcadilhac/symlink-modifier into master

This is implemented by:

  1. Never following symlinks with stat, open, ...
  2. When seaf_util_open is called on a symlink, a temporary file in memory is created with contents the target of the link.
  3. When uploading a symlink, it is modified to look like a regular file, BUT 'modifier' is changed to '@modifier'.
  4. When downloading a file that has a modifier of the form '@...', change its mode to symlink. Next, when the file is created, this mode will be picked up, and a proper symlink will be created.

From the point of view of an unpatched daemon, links will look like regular files in 0644 that contain a path.

Merge request reports

Loading