Bug 16015

Summary: --enable-libaudit uses CAP_AUDIT_WRITE without checking for it
Product: dbus Reporter: jay weinstein <jpweins>
Component: coreAssignee: D-Bus Maintainers <dbus>
Status: RESOLVED WONTFIX QA Contact: D-Bus Maintainers <dbus>
Severity: minor    
Priority: low CC: chengwei.yang.cn, msniko14, stian
Version: 1.5Keywords: love
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description jay weinstein 2008-05-19 10:06:12 UTC
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -fPIC -DHAVE_LIBAUDIT=1 -DDBUS_COMPILATION -DDBUS_MACHINE_UUID_FILE=\"/usr/local/var/lib/dbus/machine-id\" -DDBUS_SYSTEM_CONFIG_FILE=\"/usr/local/etc/dbus-1/system.conf\" -DDBUS_SESSION_CONFIG_FILE=\"/usr/local/etc/dbus-1/session.conf\" -ffunction-sections -fdata-sections -g -O2 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wdeclaration-after-statement -fno-common -MT dbus-sysdeps-util-unix.lo -MD -MP -MF .deps/dbus-sysdeps-util-unix.Tpo -c dbus-sysdeps-util-unix.c  -fPIC -DPIC -o .libs/dbus-sysdeps-util-unix.o
dbus-sysdeps-util-unix.c: In function ‘_dbus_change_to_daemon_user’:
dbus-sysdeps-util-unix.c:343: error: ‘CAP_AUDIT_WRITE’ undeclared (first use in this function)
dbus-sysdeps-util-unix.c:343: error: (Each undeclared identifier is reported only once
dbus-sysdeps-util-unix.c:343: error: for each function it appears in.)
dbus-sysdeps-util-unix.c:344: warning: initialization makes integer from pointer without a cast

Intel Xeon CPU 2.66GHZ 

Suse

gcc version 4.1.0 (SUSE Linux)

2.6.16.21-0.8-smp #1 SMP x86_64 GNU/Linux

config.log attached
Comment 1 Stian Skjelstad 2009-01-29 06:42:01 UTC
Attachment has gone missing. Which version of kernel-headers are you using? (If this still is an issue)
Comment 2 Simon McVittie 2011-01-19 07:08:19 UTC
CAP_AUDIT_WRITE is indeed used without a guard other than HAVE_LIBAUDIT. libaudit support is auto-detected.

I'd personally be inclined to make configure.in bail out if you enable libaudit support and your kernel headers are too old for CAP_AUDIT_WRITE.

This can be worked around with "./configure --disable-libaudit" so I'm reducing the priority/severity.
Comment 3 Simon McVittie 2015-02-19 11:40:32 UTC
       CAP_AUDIT_WRITE (since Linux 2.6.11)

I don't think we (should) support Linux systems that old any more.

Workaround, if you are using outdated kernel headers: --disable-libaudit.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.