[PATCH] Fix "permission denied" on rename() under Cygwin
Ethan Galstad
nagios at nagios.org
Thu Jan 24 03:57:15 CET 2008
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: nagios at nagios.org
Web: www.nagios.org
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
More information about the Developers
mailing list