Re: [Nagios-devel] [PATCH] Fix "permission denied" on rename()

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] [PATCH] Fix "permission denied" on rename()

Post by Guest »

Michael Bunk wrote:
> Hello,
>
> Nagios 3.0RC1 doesn't work on Cygwin. rename() with a new filename, which is
> already held open, results in a "Permission Denied". This situation appears
> with the current code while reaping check results.
>
> Attached patch simply closes the new file just opened with mkstemp() - before
> renaming instead of afterwards. Securitywise this is a bad solution, because
> it opens a race condition, but at least Nagios works.
>
> Please incorporate the bugfix included in the attached patch in a secure form,
> so that Nagios will be usable under Cygwin (if other Cygwin issues are
> resolved as well).
>
> Best regards,
> Michael Bunk
>

Aha! So there are actually people running Nagios under Cygwin. I was
wondering about that... :-) Not the best security-wise, but on Windows
there are worse things. I'll get this patch into CVS shortly...



Ethan Galstad
Nagios Developer
___
Email: [email protected]
Web: www.nagios.org





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked