[Opendnssec-user] svn r6114

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Wed Feb 1 16:21:10 UTC 2012


Hi Matthijs,

To avoid symlink problems you should imho rather use something like mkstemp.

And I'm just curious if there is a reason why you don't
--- a/signer/src/adapter/adfile.c
+++ b/signer/src/adapter/adfile.c
@@ -382,7 +382,8 @@ adfile_write(void* zone, const char* filename)
         status = ODS_STATUS_FOPEN_ERR;
     }
     if (status == ODS_STATUS_OK) {
-        (void)rename((const char*) tmpname, filename);
+        if (rename((const char*) tmpname, filename) < 0)
+		status = ODS_STATUS_RENAME_ERR;
     }
     free(tmpname);
     /* [end] write zone */


cheers,



More information about the Opendnssec-user mailing list