Skip to content

Conversation

@alfrunes
Copy link
Contributor

No description provided.

The naming is confusing (it's not trying to follow chroot semantics it
just disallow certain path prefixes), and it will be replaced by the
"Chroot" option in root of the config object.

Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
@alfrunes alfrunes requested a review from kjaskiewiczz October 25, 2023 14:12
@kjaskiewiczz
Copy link
Contributor

kjaskiewiczz commented Oct 26, 2023

Just to double check - the idea presented in the ALV-175 is that the nt-connect will automatically add CONNECT_CHROOT value as a prefix to all the downloads and uploads, right?
I tested it on my raspberry pi and it was not working; did you test it?

@kjaskiewiczz
Copy link
Contributor

also, if the file already exists, I'm getting Error uploading file to device. lstat /host/alvaldi.txt: no such file or directory error message

@alfrunes
Copy link
Contributor Author

also, if the file already exists, I'm getting Error uploading file to device. lstat /host/alvaldi.txt: no such file or directory error message

The implementation is definitely broken. It's only evaluating the constraint without applying the actual chroot local path.

@alfrunes
Copy link
Contributor Author

@kjaskiewiczz I updated the implementation and refactored the path expansions to session/model/filetransfer.go.

Changelog: Title
Ticket: ALV-175
Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
This causes the application to panic every time the connection is
closed.

Changelog: None
Ticket: None
Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
Copy link
Contributor

@kjaskiewiczz kjaskiewiczz left a comment

Choose a reason for hiding this comment

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

looks good;
I also tested it with my edge device (raspberry pi4) on staging and it was working as expected

@alfrunes alfrunes merged commit 67c6618 into NorthernTechHQ:main Oct 30, 2023
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.

2 participants