URL: https://github.com/freeipa/freeipa/pull/693
Author: MartinBasti
 Title: #693: [tests] collect audit.log for easier selinux investigation
Action: opened

PR body:
"""
Audit log contains useful information about selinux issues
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/693/head:pr693
git checkout pr693
From 5da23c9f552ba9b36536a5821d7b5005dd05a5ea Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Wed, 5 Apr 2017 15:11:09 +0200
Subject: [PATCH] [tests] collect audit.log for easier selinux investigation

Audit log contains useful information about selinux issues
---
 ipaplatform/base/paths.py                    | 1 +
 ipatests/pytest_plugins/integration/tasks.py | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/ipaplatform/base/paths.py b/ipaplatform/base/paths.py
index 9cf160f..070d3ff 100644
--- a/ipaplatform/base/paths.py
+++ b/ipaplatform/base/paths.py
@@ -295,6 +295,7 @@ class BasePathNamespace(object):
     SSSD_MC_PASSWD = "/var/lib/sss/mc/passwd"
     SSSD_PUBCONF_KNOWN_HOSTS = "/var/lib/sss/pubconf/known_hosts"
     SSSD_PUBCONF_KRB5_INCLUDE_D_DIR = "/var/lib/sss/pubconf/krb5.include.d/"
+    VAR_LOG_AUDIT = "/var/log/audit/audit.log"
     DIRSRV_LOCK_DIR = "/var/lock/dirsrv"
     VAR_LOG_DIRSRV_INSTANCE_TEMPLATE = "/var/log/dirsrv/slapd-%s"
     SLAPD_INSTANCE_ACCESS_LOG_TEMPLATE = "/var/log/dirsrv/slapd-%s/access"
diff --git a/ipatests/pytest_plugins/integration/tasks.py b/ipatests/pytest_plugins/integration/tasks.py
index 382028a..1705e25 100644
--- a/ipatests/pytest_plugins/integration/tasks.py
+++ b/ipatests/pytest_plugins/integration/tasks.py
@@ -84,6 +84,9 @@ def setup_server_logs_collecting(host):
     # dogtag logs
     host.collect_log(os.path.join(paths.VAR_LOG_PKI_DIR))
 
+    # selinux logs
+    host.collect_log(paths.VAR_LOG_AUDIT)
+
     # SSSD debugging must be set after client is installed (function
     # setup_sssd_debugging)
 
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to