[Bug 1140837] [NEW] Identification of user by getlogin not 100% reliable

Jay Lawrence jay at patientway.com
Sat Mar 2 22:42:54 UTC 2013


Public bug reported:


Running dupload from a background service (Jenkins in my case) seems to impact the functioning of getlogin resulting in dupload halting with the following error

dupload fatal error: Who am I? (can't get user identity)
 at /usr/bin/dupload line 87

The fix to this really straight forward. Line 28 or so amend to:

my $user = getlogin() || getpwuid($<) || $ENV{LOGNAME} || $ENV{USER};

Reference to this being the recommended practice includes:

http://perldoc.perl.org/functions/getlogin.html

** Affects: dupload (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dupload in Ubuntu.
https://bugs.launchpad.net/bugs/1140837

Title:
  Identification of user by getlogin not 100% reliable

Status in “dupload” package in Ubuntu:
  New

Bug description:
  
  Running dupload from a background service (Jenkins in my case) seems to impact the functioning of getlogin resulting in dupload halting with the following error

  dupload fatal error: Who am I? (can't get user identity)
   at /usr/bin/dupload line 87

  The fix to this really straight forward. Line 28 or so amend to:

  my $user = getlogin() || getpwuid($<) || $ENV{LOGNAME} || $ENV{USER};

  Reference to this being the recommended practice includes:

  http://perldoc.perl.org/functions/getlogin.html

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dupload/+bug/1140837/+subscriptions




More information about the foundations-bugs mailing list