Bug 187491

Summary: openssh do no write to utmp when audit is not supported by kernel
Product: Red Hat Enterprise Linux 4 Reporter: Sergey Myasnikov <tigra>
Component: opensshAssignee: Tomas Mraz <tmraz>
Status: CLOSED DUPLICATE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-31 11:21:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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 ***