chiark / gitweb /
audit: since nspawn now sets CAP_AUDIT_CONTROL for containers we cannot user this...
authorLennart Poettering <lennart@poettering.net>
Mon, 15 Apr 2013 19:55:12 +0000 (21:55 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 15 Apr 2013 19:59:04 +0000 (21:59 +0200)
commit9a3ef988b8442360500e7df4db3ff27d2f13de10
tree29712050075a0c7ba805a8be01ccda3a6634c5be
parent7a9ec5c9027d919839ab6e286ede753caa164241
audit: since nspawn now sets CAP_AUDIT_CONTROL for containers we cannot user this anymore to skip audit session ID retrieval

As audit is still broken in containers we need a reliable way how we can
determine whether the audit data we read from 7proc is actually useful.
Previously we used CAP_AUDIT_CONTROL for this, since nspawn removed that
from the nspawn container. This has changed a while back however, which
means we used audit data of host system in the container.

This adds an explicit container check to the audit calls, so that all
audit data is turned off in containers.

This should fix session creation with pam_systemd/logind in nspawn containers.
src/shared/audit.c