Sys::Hostname fails under Solaris 2.5 when setuid
encountered a problem when using the Sys::Hostname under Solaris 2.5.1 in
setuid scripts. The problem is due to Solaris' having removed gethostname from
the list of syscalls. gethostname is now a libc compatability function using
the 'sysinfo' syscall. As the environment I'm using this in requires setuid
execution, the other methods (calling `hostname or `uname -n`) are
inapplicable.
I also noticed that Sys::Hostname requires syscall.ph whereas I find only
sys/syscall.ph. The perl headers were created with the standard:
cd /usr/include; h2ph * sys/*
I've added in the following code to make Hostname.pm work on Solaris. Would it
be possible to integrate this into future releases?
p5p-msgid:
199708201240.OAA04243@goblin.renault.fr