Skip to content

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

Merged
larsewi merged 3 commits into
cfengine:masterfrom
victormlg:cf-net-harder-sec
Nov 24, 2026
Merged

larsewi merged 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>
@larsewi

larsewi commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

@cf-bottom Jenkins please :)

@cf-bottom

Copy link
Copy Markdown

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>
@victormlg

Copy link
Copy Markdown
Contributor Author

@cf-bottom jenkins, please :)

@cf-bottom

Copy link
Copy Markdown

@larsewi
larsewi merged commit b8bc770 into cfengine:master Nov 24, 2026
46 of 47 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport to 3.27.x failed, manual backport needed: https://github.com/cfengine/core/actions/runs/45363834184

@github-actions

Copy link
Copy Markdown
Contributor

Backport to 3.24.x failed, manual backport needed: https://github.com/cfengine/core/actions/runs/45363834184

@larsewi

larsewi commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@victormlg please backport if it makes sense. Otherwise remove the cherry-pick label

@victormlg victormlg removed the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label Nov 24, 2026
@victormlg

Copy link
Copy Markdown
Contributor Author

cf-net getdir was introduced in 3.28, which is non-LTS. thus no need for backporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants