From: [EMAIL PROTECTED]
Operating system: FreeBSD
PHP version: 4.1.2
PHP Bug Type: Scripting Engine problem
Bug description: posix bug
there is a problem in the file ext/posix/posix.c in function posix_uname,
if i read the documentation about this function i can get some
informations of the utsname struct. Well under linux you can use a machine
domain name, (not yet implemented in FreeBSD). well the 'domainname' are
not implemented on php but it's writed on the docs :
/* {{{ proto array posix_uname(void)
Get system name (POSIX.1, 4.4.1) */
PHP_FUNCTION(posix_uname)
{
struct utsname u;
uname(u);
if (array_init(return_value) == FAILURE) {
RETURN_FALSE;
}
add_assoc_string(return_value, sysname, u.sysname, 1);
add_assoc_string(return_value, nodename, u.nodename, 1);
add_assoc_string(return_value, release, u.release, 1);
add_assoc_string(return_value, version, u.version, 1);
add_assoc_string(return_value, machine, u.machine, 1);
}
/* }}} */
i'v fix it :
/* {{{ proto array posix_uname(void)
Get system name (POSIX.1, 4.4.1) */
PHP_FUNCTION(posix_uname)
{
struct utsname u;
uname(u);
if (array_init(return_value) == FAILURE) {
RETURN_FALSE;
}
add_assoc_string(return_value, sysname, u.sysname, 1);
add_assoc_string(return_value, nodename, u.nodename, 1);
add_assoc_string(return_value, release, u.release, 1);
add_assoc_string(return_value, version, u.version, 1);
add_assoc_string(return_value, machine, u.machine, 1);
#ifdef __USE_GNU
add_assoc_string(return_value, domainname, u.domainname, 1);
#endif
}
/* }}} */
if you don't want to correct it, please delete the wrong information in
the documentations.
Regards,
Vergoz Michael
SYSDOOR
--
Edit bug report at http://bugs.php.net/?id=16051edit=1
--
Fixed in CVS:http://bugs.php.net/fix.php?id=16051r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16051r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16051r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16051r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16051r=support
Expected behavior: http://bugs.php.net/fix.php?id=16051r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16051r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16051r=submittedtwice