mark mark
mark commented on pull request ungleich-public/cdist#347 2022-08-31 10:39:54 +00:00
make install-user doesn't transfer execute permissions

Seems to have created it twice :(

mark created pull request ungleich-public/cdist#347 2022-08-26 09:18:21 +00:00
make install-user doesn't transfer execute permissions
mark created pull request ungleich-public/cdist#346 2022-08-26 09:11:36 +00:00
make install-user doesn't transfer execute permissions
mark created pull request ungleich-public/cdist#345 2022-08-25 05:54:48 +00:00
WIP: Initialise options variable to avoid unset variable expansion
mark commented on pull request ungleich-public/cdist#331 2022-04-10 17:29:27 +00:00
Make file attribute changes more atomic

Sorry for the late response.

I think any security concerns are related to the temporary filename that is going to be used would already exist on the target (like Nico's example of creating a…

mark commented on pull request ungleich-public/cdist#331 2022-04-10 08:05:24 +00:00
Make file attribute changes more atomic

Are there any changes you want me to make or test for this pull request? Assuming it is acceptable security wise?

Regards,

Mark

mark commented on pull request ungleich-public/cdist#331 2022-04-07 09:19:53 +00:00
Make file attribute changes more atomic

Hi Nico,

Let's say we __file /some/dir/foo and a user has write access to /some/dir and the user can run ps on the target system.

Thus the user (=attacker) knows our suffix by…

mark commented on pull request ungleich-public/cdist#331 2022-04-07 07:14:06 +00:00
Make file attribute changes more atomic

Hi Steven,

True. But in this case there's just no other way. The only alternative would be to execute code in gencode-* instead of code-* which would be even worse.

Completely agree,…

mark commented on pull request ungleich-public/cdist#331 2022-04-07 04:14:06 +00:00
Make file attribute changes more atomic

Hi Steven,

Why unclean? Something like this would be pretty ok I think:

Because gencode-local now generates code that runs commands on the target, which should be done by gencode-remote.

mark commented on pull request ungleich-public/cdist#331 2022-04-06 17:29:24 +00:00
Make file attribute changes more atomic

Hi Steven,

We could off course check ourself if the assumed upload destination already exists and error out before uploading. Then I'd say we're about as safe (or unsafe) as we were…

mark commented on pull request ungleich-public/cdist#331 2022-04-06 14:52:41 +00:00
Make file attribute changes more atomic

Hi Steven,

Tried the changes with __cdist_object_marker, and that seems to work fine! I guess it is a bit less secure then running mktemp on the destination as this way you assume there is no…

mark commented on pull request ungleich-public/cdist#331 2022-04-06 13:45:32 +00:00
Make file attribute changes more atomic

Hi Nico,

That sounds like a good solution. Would maken for a nice fix for this problem, and also the possibility to clean up the __file type, moving the mv from gencode-local to gencode-remote. …

mark commented on pull request ungleich-public/cdist#331 2022-04-06 10:22:35 +00:00
Make file attribute changes more atomic

Hi Nico,

Did a quick test, but when executing the output from gencode-remote I get:

code-remote:stderr
------------------
cat: /var/lib/cdist/object/__file/usr/local/bin/geofilter/.cdi…
mark commented on pull request ungleich-public/cdist#331 2022-04-06 09:23:53 +00:00
Make file attribute changes more atomic

Hi Nico,

Writing the filename to some place that is also accessable for the remote side would be a great way out of this!

But from what I understood of the documentation is that the code…

mark commented on pull request ungleich-public/cdist#331 2022-04-06 05:04:03 +00:00
Make file attribute changes more atomic

Hi Nico,

As far as I know I don't have any specific changes active regadring the use of control sockets on the cdist server. I will look into that to see if there is something wrong there,…

mark commented on pull request ungleich-public/cdist#331 2022-04-03 10:44:55 +00:00
Make file attribute changes more atomic

Hi Nico,

No problem, I'll describe the case in more detail. I ran into this issue recently when deploying an filter script which is used to geoblock ssh sessions through hosts.allow.

For…

mark created pull request ungleich-public/cdist#331 2022-04-03 09:20:25 +00:00
Make file attribute changes more atomic
mark created pull request ungleich-public/cdist#330 2022-03-08 11:08:57 +00:00
Added rm of tmpfile.