Replies: 1 comment 5 replies
-
Hi @birigli, Thanks for reaching out! What you are experiencing sounds very familiar. It may actually already have been fixed in this PR. Could you try running your policy with one of the master nightlies packages? Or maybe you could send a short policy snippet with a reproducer? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
the problem above is only the effect of a strange behaviour. The original file (which is the destination file) gets truncated to 0 byte, and later copied to .cfsaved file, hence it is 0 byte too. However it means the original/destination file is 0 byte length for a while, what can cause further problems when that file is read during that period (which is very short in human terms). I run cf-agent with strace, here is the relevant section (note: the ssh_config was used for demonstration purpose):
I omitted a lot of calls, but the very core regarding the problem, as you can see our file (ssh_config) is opened WRONLY, and then truncated to 0 byte (before it was 3449), after that some checks are done, old .cfsaved removed, a .cfnew file is created and loaded with data, and at last the "copy" of sshd_config to sshd_config.cfsaved (which is obviously ends right after the truncate call).
I attach the full trace.
trace_25_a.txt
Regards,
Balázs Varga
Beta Was this translation helpful? Give feedback.
All reactions