Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2016 12:32:15 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 211406] su -l clears LOGNAME environment variable
Message-ID:  <bug-211406-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211406

            Bug ID: 211406
           Summary: su -l clears LOGNAME environment variable
           Product: Base System
           Version: 10.3-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: d.y.kazarov@mail.ru

Created attachment 173036
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D173036&action=
=3Dedit
Patch for su.c and su.1

POSIX 1003.1 states:
"LOGNAME
    The system shall initialize this variable at the time of login to be the
user's login name. See <pwd.h>. For a value of LOGNAME to be portable across
implementations of POSIX.1-2008, the value should be composed of characters
from the portable filename character set."
(http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html)

"su -l" Simulate a full login. But LOGNAME is unset after "su -l".

samba port depends on this variable during some operations (see
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D175544) but samba's dev=
eloper
refuses to do anything about it (see
https://bugzilla.samba.org/show_bug.cgi?id=3D9592).

IMHO "su -l" shall set this variable  since it's part of POSIX standard.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-211406-8>