Package: libsys-hostname-long-perl
Version: 1.4-2
Severity: normal
Tags: patch
User: base-pas...@packages.debian.org
Usertags: shell-fallout

In base-passwd 3.5.30, I changed nobody's shell to /usr/sbin/nologin (a
change that I really should have made about ten years ago).  This has
unfortunately had a bit of collateral damage:

  # perl -le 'use Sys::Hostname::Long; print hostname_long'
  This account is currently not available.

Note that this only fails when run as root.

  * Use "su -s /bin/sh nobody" to cope with the change of nobody's shell in
    base-passwd 3.5.30.

--- libsys-hostname-long-perl-1.4.orig/lib/Sys/Hostname/Long.pm
+++ libsys-hostname-long-perl-1.4/lib/Sys/Hostname/Long.pm
@@ -75,7 +75,7 @@
                        # Skip for Solaris, and only run as non-root
                        my $tmp;
                        if ($< == 0) {
-                               $tmp = `su nobody -c "hostname --fqdn"`;
+                               $tmp = `su -s /bin/sh nobody -c "hostname 
--fqdn"`;
                        } else {
                                $tmp = `hostname --fqdn`;
                        }

Sorry,

-- 
Colin Watson                                       [cjwat...@debian.org]


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to