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: #include "loginrec.h" to auth.c, so that it can pick up the prototype for linux_audit_record_event(). Version-Release number of selected component (if applicable): openssh-3.9p1-8.RHEL4.12 How reproducible: always Steps to Reproduce: 1. rebuild openssh RPM from .src.rpm downloaded via RHN Actual results: 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 -DSSHDIR=\"/etc/ssh\" -D_PATH_SSH_PROGRAM=\"/usr/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/libexec/openssh/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/libexec/openssh/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/libexec/openssh/ssh-keysign\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty/sshd\" -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' Expected results: 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 convention for: function(int x, void *y) and function(int x, int y) differs. (Getting the wrong calling convention due to a missing prototype may cause a crash) Additional info: 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 release.
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. http://rhn.redhat.com/errata/RHSA-2007-0257.html