labgrid-project / labgrid-project/labgrid

`TFTPProviderDriver`'s `stage()` method does not work with tftpd `--secure` flag

Open
#1,487 1 comment 0 reactions 1 assignee View on GitHub

@jluebbe is already working on this.

Since Aug 28, 2024.

Dominant language
Python
Stars
528
Forks
278
Avg merge
2d 19h
Merged PRs (30d)
4

Description

I came across the following issue:

When trying to stage files with the TFTPProviderDriver, it's stage() method symlinks the synced file from the cache dir to the tftp server dir.
Because the file is outside of the tftp server directory, this does not work in combination with the --secure flag of the tftp server. This flag makes the server chroot into it's server directory so any symlinks that point outside of it won't be followed correctly.

This is a problem when trying to use the stage() method in combination with the TFTPProvider external field,
which returns the "externally visible" (relative) path.

I guess a solution can be to remove the --secure flag and use the internal field to resolve to an absolute path of the staged file symlink.

But if I didn't miss anything this renders the external field effectively broken in the TFTPPRoviderDriver when trying to be used in combination with the stage() method.
This also dictates the setup of the tftp server which sometimes is not ideal when used for other purposes as well

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.