2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-02 15:36:05 +00:00
Files
confluent/confluent_server
Markus Hilger ce870f4c30 Ask whether a download target can be written, not read
A path a caller wants confluent to save something into was being run through
the check meant for a file confluent is asked to read.  That check forks, drops
to the calling user and asks os.access for R_OK, which is false for every file
that does not exist yet, so nodesupport servicedata and save_licenses could
only be given a path that was already there.  Handed a name to create, they
refused, and refused in a way no caller was looking for, so the command printed
nothing and exited zero.

The previous commit worked around it by skipping the check for a download
target, which fixed the symptom by removing the guard rather than by asking the
right question.  Ask the right question instead: whether the user could have
created the file in that directory themselves.  A path that is already a
directory is a destination directory, anything else names the file, which is
the same rule the code that goes on to write the file follows.

So a caller can still only make confluent write where they could have written,
and this now also catches an unwritable destination at the point the request is
made rather than several layers further in.
2026-08-14 21:26:29 +02:00
..
2026-07-15 03:26:02 +02:00
2026-03-20 10:12:45 -04:00
2019-08-20 08:59:01 -04:00
2026-07-15 05:55:48 +02:00
2026-08-10 05:32:00 +02:00
2024-06-05 08:39:37 -04:00
2018-11-14 14:55:26 -05:00