Bug 520 - /usr/bin/logname breaks with log_input/log_output functionality
/usr/bin/logname breaks with log_input/log_output functionality
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.7.6
HP Linux
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-31 11:08 MDT by dwelborn
Modified: 2011-10-31 11:27 MDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dwelborn 2011-10-31 11:08:11 MDT
sudo is from sudo-1.7.6p2-0.2.2.1 RPM 
logname is coreutils-6.12-32.24.1 RPM 
RPMS packaged by Novell for SLES11 SP1 x86_64

In testing log_input & log_output, I noticed that (when logging enabled)
I get the following error:

# logname
logname: no login name

It does not matter whether logging is enabled via the Defualt or the Tag_Spec...  if any logging occurs, logname cannot determine the user who logged-in.


(just to be explicit, properly working examples would look like so):

login: operator
password: ********

operator:~$ sudo su 
root:~# logname
operator

root:~# exit
operator:~$ sudo su -
root:~# logname
operator

root:~# exit
operator:~$ sudo logname
operator
Comment 1 Todd C. Miller 2011-10-31 11:12:45 MDT
You need to update to sudo 1.8.3 which has support for updating the utmp file.
Comment 2 dwelborn 2011-10-31 11:17:41 MDT
thanks for the quick response

would the patch used to resolve this in 1.8.x, work in 1.7.x ?
... or is it 1.8 functionality only ?
Comment 3 Todd C. Miller 2011-10-31 11:27:22 MDT
It is 1.8.x functionality only.  The 1.7.x branch only receives bug fixes and I consider utmp handling to be a feature, not a bug fix.  It is not impossible to backport, but it is not entirely trivial either.