core icon indicating copy to clipboard operation
core copied to clipboard

ENT-12033: Made multiple changed to increase robustness of remote file copying

Open larsewi opened this issue 1 year ago • 2 comments

Initially I was trying to reproduce a bug reported in ENT-12033. However, I was not able to reproduce it. While statically analyzing the code, I made some changes to make it more robust.

  • Added doc string to CopyRegularFileNet
  • Added assert to check return code of snprintf
  • Fixed typo in comment for CopyRegularFileNet
  • Removed check for filename too long
  • Removed unnecessary assignment of NULL-byte to buffer
  • Check return code of sscanf
  • Added sanity check in CopyRegularFileNet
  • Allocate receive buffer on stack instead of heap
  • cf-serverd now stats file every read on network transition

larsewi avatar Oct 21 '24 14:10 larsewi

@cf-bottom Jenkins please :)

larsewi avatar Oct 24 '24 15:10 larsewi

Alright, I triggered a build:

Build Status

Jenkins: https://ci.cfengine.com/job/pr-pipeline/11318/

Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-11318/

cf-bottom avatar Oct 24 '24 15:10 cf-bottom