Bug 187491 - openssh do no write to utmp when audit is not supported by kernel
Summary: openssh do no write to utmp when audit is not supported by kernel
Keywords:
Status: CLOSED DUPLICATE of bug 182930
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: openssh
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Tomas Mraz
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-31 11:08 UTC by Sergey Myasnikov
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-31 11:21:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sergey Myasnikov 2006-03-31 11:08:15 UTC
Description of problem:
On rhel4-u3 openssh does not write to utmp session data if a kernel does not 
support audit.


Version-Release number of selected component (if applicable):
openssh-3.9p1 (that which comes with RHEL AS4 u3)


How reproducible:


Steps to Reproduce:
1. Boot into a kernel with no audit (audit=0 in kernel cmd line is supposed to 
be enough)
2. Connect to the host via ssh
3. Run who
  
Actual results:
No data is written to utmp.log.  'who' shows no logins via ssh

Expected results:
'who' must show the session.

Additional info:
This happens due to the bug in openssh-3.9p1-audit.patch.  The 3rd hunk 
contains a bug:
@@ -415,6 +422,10 @@
  
        /* set the timestamp */
        login_set_current_time(li);
+#ifdef HAVE_LINUX_AUDIT
+       if (linux_audit_write_entry(li) == 0)
+               return 0;
+#endif
 #ifdef USE_LOGIN
        syslogin_write_entry(li);
 #endif

This should be rewritten without 'if' and 'return 0'

Comment 1 Tomas Mraz 2006-03-31 11:21:40 UTC

*** This bug has been marked as a duplicate of 182930 ***


Note You need to log in before you can comment on or make changes to this bug.