Skip to content

ENT-14982: Changed cf-net getdir to not copy remote permissions by default - #6514

Open
victormlg wants to merge 3 commits into
cfengine:masterfrom
victormlg:cf-net-harder-sec
Open

victormlg wants to merge 3 commits into
cfengine:masterfrom
victormlg:cf-net-harder-sec

Conversation

@victormlg

Copy link
Copy Markdown
Contributor

No description provided.

@larsewi larsewi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 🚀 please improve / add change log entries

Comment thread cf-net/cf-net.c Resolved
Comment thread cf-net/cf-net.c Resolved
Comment thread cf-net/cf-net.c Resolved
Comment thread cf-net/cf-net.c Resolved
@larsewi larsewi added the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label Nov 20, 2026
MakeParentDirectoryPerms() rejects relative paths, so creating
subdirectories failed.

Changelog: Title
Signed-off-by: Victor Moene <victor.moene@northern.tech>
It was only created as a side effect of downloading a subdirectory, so
files in the remote directory failed.

Changelog: Title
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Files are created 0600 and directories 0700 unless -p/--preserve-perms is given,
so a server can no longer set setuid/setgid bits locally.

Changelog: Files and directories copied by `cf-net getdir` are now created with permissions `0600` / `0700` respectively. Use the `-p` / `--preserve-perms` option to preserve the remote permissions.
Ticket: ENT-14982
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick? Fixes which may need to be cherry-picked to LTS branches

Development

Successfully merging this pull request may close these issues.

2 participants