__file: mktemp -u checks for perms #332
Labels
No labels
bugfix
cleanup
discussion
documentation
doing
done
feature
improvement
packaging
Stale
testing
TODO
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ungleich-public/cdist#332
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
introduced with
22039284f5cc @stevenproblem is in
gencode-localwithupload_destination="$(mktemp -u "${destination}.cdist.XXXXXXXXXX")".even if
mktemp -uis dry-run, it checks for perms.so, for example, if you want to set up something in restricted paths, running
mktemp -uin local machine might result in error:Good catch, @ander!
I think we could easily replace
with
But we will need to document the variable in our reference.
The method used for creating the suffix is the same idea as mktemp, just python's way.
I wonder if we will rename the variable beforehand so that it is not internal (
__cdistprefix) anymore.I don't understand how suffix change helps.
mktemp -uwill still check if${destination}is accessible (locally).The mktemp -u should not have been there, updated the comment.
OK, now it makes sense. And maybe it's time to have globally usable randomzied run id, which can be used for variety of things. Starting with temp file suffixes etc. For example
$__run_id? Or per object randomized like$__object_run_id? Or both.For example:
Edit: okay, read in hurry, there's already
__cdist_object_marker, but not very convenient name to use, but I can live with that. It's currently not available in explorer, which we should add, just in case we might need it there.__file: broken on macOS config hosts:
https://github.com/cdist-community/cdist-conf/issues/53
The latest versions of macOS mount / read-only:
@steven @nico
The regressions should be fixed as of
ungleich-public/cdist@6c8c692a22