----- Julian Mehnle via RT <bug-Sys-Hostname-Long@rt.cpan.org> wrote:
Show quoted text> Fri Jun 16 06:01:07 2006: Request 19932 was acted upon.
> Transaction: Ticket created by JMEHNLE
> Queue: Sys-Hostname-Long
> Subject: Should not be calling `su` (fails under fakeroot)
> Broken in: 1.3, 1.4
> Severity: Important
> Owner: Nobody
> Requestors: JMEHNLE@cpan.org
> Status: new
> Ticket <URL:
http://rt.cpan.org/Ticket/Display.html?id=19932 >
>
>
> When $< (UID) is 0, Sys::Hostname::Long does `su nobody -c "hostname
> --
> fqdn"`. Under fakeroot however (e.g. when building and testing
> packages), this makes `su` ask for a password because the process
> isn't
> _really_ running as root.
Ok I will review that.
Show quoted text> Sys::Hostname::Long shouldn't be calling `su` in the first place!
In an ideal world yes :-) But there are some operating systems out there wich just won't return unless we call "hostname" and if we don't change the user first, then in some operating systems it changes the hostname to "--fqdn".
I do believe we could improve it, do more host type specific testing, and rely less on falling back to a sys call (which I really don't like either).
Ta
Scott