From patchwork Tue Dec 18 01:02:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1014907 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43Jfrk5C02z9s6w for ; Tue, 18 Dec 2018 12:02:45 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 551ED3E6EA7 for ; Tue, 18 Dec 2018 02:02:43 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) by picard.linux.it (Postfix) with ESMTP id 937EC3E6E73 for ; Tue, 18 Dec 2018 02:02:33 +0100 (CET) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 1421160076C for ; Tue, 18 Dec 2018 02:02:31 +0100 (CET) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 63FFCB072; Tue, 18 Dec 2018 01:02:30 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 18 Dec 2018 02:02:14 +0100 Message-Id: <20181218010220.2446-1-pvorel@suse.cz> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-5.smtp.seeweb.it Cc: Petr Cervinka , Marcus Meissner , Weihua Du Subject: [LTP] [PATCH v3 0/6] DHCP tests and AppArmor/SELinux improvements X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Hi, another version of DHCP tests and AppArmor/SELinux improvements. Changes v2->v3: * Remove TST_SECURITY_WARN and try to detect affected test automatically via grepping current policy with $TST_NEEDS_CMDS. There is still printed warning on enforced AppArmor/SELinux even no policy is found. Suggested by Alexey Kodanev. * Warning is printed only on TFAIL. Suggested by Alexey Kodanev. * Root check in tst_test.sh is moved to _tst_require_root() * Add dhcpd and dhclient path fixes. Petr Vorel (6): net/dhcp: Rename setup & cleanup functions shell: Add tst_security.sh helper net/dhcp: Use for allowed by AppArmor and SELinux net/dhcp: Check also default dhclient lease file path net/dhcp: Move print_dhcp_log() into dhcp library ver_linux: Print AppArmor and SELinux status testcases/lib/tst_security.sh | 124 ++++++++++++++++++++++++ testcases/lib/tst_test.sh | 17 +++- testcases/network/dhcp/dhcp_lib.sh | 24 ++++- testcases/network/dhcp/dhcpd_tests.sh | 19 ++-- testcases/network/dhcp/dnsmasq_tests.sh | 17 ++-- ver_linux | 46 ++++++++- 6 files changed, 219 insertions(+), 28 deletions(-) create mode 100644 testcases/lib/tst_security.sh