Capture other files in the user's home directory
Such as `.bashrc`, `.bash_aliases`, `.profile`, if these files differ from the `/etc/skel` defaults
This commit is contained in:
parent
e68ec0bffc
commit
a1433d645f
3 changed files with 110 additions and 1 deletions
|
|
@ -819,7 +819,12 @@ def _manifest_from_bundle_dir(
|
|||
group = str(u.get("primary_group") or owner)
|
||||
break
|
||||
|
||||
mode = "0600" if mf.get("reason") == "authorized_keys" else "0644"
|
||||
# Prefer the harvested file mode so we preserve any deliberate
|
||||
# permissions (e.g. 0600 for certain dotfiles). For authorized_keys,
|
||||
# enforce 0600 regardless.
|
||||
mode = mf.get("mode") or "0644"
|
||||
if mf.get("reason") == "authorized_keys":
|
||||
mode = "0600"
|
||||
ssh_files.append(
|
||||
{
|
||||
"dest": dest,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue