--- 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