Red Hat Bugzilla – Bug 193710
[PATCH] audit patch for openssh missing #include "loginrec.h" in auth.c
Last modified: 2007-11-30 17:07:25 EST
Description of problem:
The audit patch in recent RHEL4 OpenSSH needs to add:
to auth.c, so that it can pick up the prototype for linux_audit_record_event().
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. rebuild openssh RPM from .src.rpm downloaded via RHN
The following warning is seen during build:
gcc -O2 -g -pipe -m64 -fpie -I/usr/include/gssapi -Wall
-Wpointer-arith-Wno-uninitialized -I. -I. -I/usr/include/gssapi
-DSSH_RAND_HELPER=\"/usr/libexec/openssh/ssh-rand-helper\" -DHAVE_CONFIG_H -c auth.c
auth.c: In function `auth_log':
auth.c:248: warning: implicit declaration of function `linux_audit_record_event'
The audit patch should not introduce new compiler warnings to the build.
Additionally, missing prototypes are dangerous especially on 64-bit systems like
x86_64, where pointer types and int are different length, and the calling
function(int x, void *y)
function(int x, int y)
differs. (Getting the wrong calling convention due to a missing prototype may
cause a crash)
Attached to this bugzilla entry is a patch that fixes the problem by including
the header with the prototype for linux_audit_record_event().
Created attachment 130305 [details]
[PATCH] add #include "loginrec.h" to auth.c
The function is assumed vararg without a prototype so the problem is not so
serious. We will consider this for future errata.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Fixed in openssh-3.9p1-8.RHEL4.18
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.