+ if (have_effective_cap(CAP_AUDIT_CONTROL) > 0) {
+ /* Only use audit login uid if we are executed with
+ * sufficient capabilities so that pam_loginuid could
+ * do its job. If we are lacking the CAP_AUDIT_CONTROL
+ * capabality we most likely are being run in a
+ * container and /proc/self/loginuid is useless since
+ * it probably contains a uid of the host system. */
+
+ if (read_one_line_file("/proc/self/loginuid", &s) >= 0) {
+ uint32_t u;