diff options
Diffstat (limited to 'app-admin/tripwire/files/tripwire-mkstemp.patch')
-rw-r--r-- | app-admin/tripwire/files/tripwire-mkstemp.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app-admin/tripwire/files/tripwire-mkstemp.patch b/app-admin/tripwire/files/tripwire-mkstemp.patch new file mode 100644 index 000000000000..daeae8cc33a5 --- /dev/null +++ b/app-admin/tripwire/files/tripwire-mkstemp.patch @@ -0,0 +1,30 @@ +--- tripwire-2.3.1-2/src/core/unix/unixfsservices.cpp.mkstemp 2001-02-24 14:02:12.000000000 -0500 ++++ tripwire-2.3.1-2/src/core/unix/unixfsservices.cpp 2003-01-04 12:54:33.000000000 -0500 +@@ -243,6 +243,7 @@ + { + char* pchTempFileName; + char szTemplate[MAXPATHLEN]; ++ int fd; + + #ifdef _UNICODE + // convert template from wide character to multi-byte string +@@ -253,13 +254,12 @@ + strcpy( szTemplate, strName.c_str() ); + #endif + +- // create temp filename +- pchTempFileName = mktemp( szTemplate ); +- +- //check to see if mktemp failed +- if ( pchTempFileName == NULL || strlen(pchTempFileName) == 0) { +- throw eFSServicesGeneric( strName ); +- } ++ // create temp filename and check to see if mkstemp failed ++ if ((fd = mkstemp( szTemplate )) == -1) ++ throw eFSServicesGeneric( strName ); ++ else ++ close(fd); ++ pchTempFileName = szTemplate; + + // change name so that it has the XXXXXX part filled in + #ifdef _UNICODE |