Skip to content

Conversation

@elezar
Copy link
Member

@elezar elezar commented Sep 17, 2024

This change updates the create-symlinks hook to check whether link paths resolve in the container's filesystem. In addition the executable is updated to return an error if a link could not be created.

@elezar elezar self-assigned this Sep 17, 2024
Comment on lines 224 to 225
resolvedParent, err := tryResolveLink(filepath.Dir(path))
return filepath.Join(resolvedParent, filepath.Base(path)), err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's put an if/else here and return "" if there is an error

Copy link
Contributor

@klueska klueska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few nits, otherwise looks good

This change updates the create-symlinks hook to check whether
link paths resolve in the container's filesystem. In addition
the executable is updated to return an error if a link could
not be created.

Signed-off-by: Evan Lezar <[email protected]>
@elezar elezar force-pushed the check-link-resolution branch from c52d44e to e383b75 Compare September 18, 2024 15:47
@elezar elezar requested a review from klueska September 18, 2024 15:47
@elezar elezar merged commit c490baa into NVIDIA:main Sep 18, 2024
8 checks passed
@elezar elezar deleted the check-link-resolution branch September 18, 2024 20:05
elezar added a commit to elezar/nvidia-container-toolkit that referenced this pull request Sep 20, 2024
This reverts commit c490baa, reversing
changes made to 32486cf.

Signed-off-by: Evan Lezar <[email protected]>
elezar added a commit that referenced this pull request Sep 20, 2024
Revert "Merge pull request #696 from elezar/check-link-resolution"
Alokbpandey pushed a commit to Alokbpandey/nvidia-container-toolkit that referenced this pull request Jul 14, 2025
This reverts commit c490baa, reversing
changes made to 32486cf.

Signed-off-by: Evan Lezar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants