[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ossec-dev] [Bug 89] search fails in ossec-wui-0.2
http://www.ossec.net/bugs/show_bug.cgi?id=89
------- Comment #1 from brownoxford@xxxxxxxxx 2007-10-11 11:25 -------
Is there any reason that a solution involving uniqid() cannot be used in all
cases? I believe that calling this function with no arguments is only valid in
PHP5 and above... the function manual page for uniqid() suggests the following:
md5(uniqid(rand(), true))
See: http://us.php.net/manual/en/function.uniqid.php
posix_getpid() is also used in two places to generate temporary filenames:
$new_file = "./tmp/file-tmp.".posix_getpid().$curr_time.".php";
$fp = fopen($new_file, "w");
if($fp === false)
{
gzclose($fp_gz);
continue;
}
Could tempname() or tmpfile() be used instead here? The actual name of the file
appears to be unimportant, and these might result in less coding:
if( ( $new_file = tmpfile( ) ) === false ) {
gzclose( $fp_gz );
continue;
}
Using tmpfile( ) also means that the created fill will automatically be removed
when the returned handle is closed using fclose( ), or when the script ends.
See: http://us.php.net/manual/en/function.tmpfile.php
--
Configure bugmail: http://www.ossec.net/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
OSSEC home |
Main Index |
Thread Index
OSSEC project: www.ossec.net.
Mailling list information: http://www.ossec.net/en/mailing_lists.html.