From patchwork Fri Nov 15 15:16:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Mosnacek X-Patchwork-Id: 11246535 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6D9F13B2 for ; Fri, 15 Nov 2019 15:16:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9525D20733 for ; Fri, 15 Nov 2019 15:16:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Q2QFhc8e" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727588AbfKOPQa (ORCPT ); Fri, 15 Nov 2019 10:16:30 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:22123 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727567AbfKOPQa (ORCPT ); Fri, 15 Nov 2019 10:16:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573830989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FnLHKvYQc3vsdYzWgpIIggk89GVKmbUmayNRUHsOcQc=; b=Q2QFhc8exafD+a2RtVXRiEe5hJ/Eix/jEAf4kWDgNZA+pV0Hlr7zftkjBbqh634W7XL2Zd Tr69xxtwAkMG6KVAYQVEfrwVY0YqA0JrNkcQCDHBPz2RS+o46UdHKn0DYcgwqkA17I8uwR E94WUEOGPbYTtoQ8duSfIGC9I2twQJc= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-113-tE7yWCpWMEyPq2crTcjFcQ-1; Fri, 15 Nov 2019 10:16:27 -0500 Received: by mail-wm1-f71.google.com with SMTP id i23so6159149wmb.3 for ; Fri, 15 Nov 2019 07:16:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qWjE/d7z6BwpR4PPpVq9L9bDrB7HwMPHHpXoA1MpMFw=; b=l1tUzZl4o+i4EJfRoFvT7Mr0EefCnQIlBnFYUPqXYJCSietc5Mojef1XwJ4uOzrPtP hSAWfcbpw8mCSOTc+aARQGASdqHuRrBsouYXA+o0+iLlpmNTxUet/LcOpw9IqFoGgS3W iiUnLgsBpkJclqrSP3cJqXBlk7jUaTZZKKFlv7roI5tZYjgJcVupl+ekOmf8e8eQEca9 P82ejYnm3G4C3ELR2FxmB0y3LahVNh6CDg8pOwkg691xJpVJj6JP+Xaq27Mzbq8N4/rG tn+zRNdU+TP8yBPgDgrp4Ixb9b7QdQ4qLd3JoUK5RiGcN9KcMyKRKb1roigAYBJUJy+r Lwhw== X-Gm-Message-State: APjAAAWOtCxgn8XehHpWlfTnZtXFLBWfZMXwdK36tDO6id9t/Zv0SJLP BnKZWdulQg+ApPblg2q2jwEkUWsgxMk8tdlu94xWPYseHgoQ/eXenrZsYOWtlKgPaTuoaZlJGAO KgUSVygjqLZiRNmNmrg== X-Received: by 2002:a1c:7905:: with SMTP id l5mr16097901wme.76.1573830986472; Fri, 15 Nov 2019 07:16:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzbMqgypeVXj7F5mwu3wXRq1mvsmuiErI7Id5RYyFh+L5HbTttKhk/bY4ri9heuvNXjY+Q0Xw== X-Received: by 2002:a1c:7905:: with SMTP id l5mr16097863wme.76.1573830986220; Fri, 15 Nov 2019 07:16:26 -0800 (PST) Received: from localhost.localdomain.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id j63sm10337239wmj.46.2019.11.15.07.16.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2019 07:16:25 -0800 (PST) From: Ondrej Mosnacek To: selinux@vger.kernel.org Subject: [PATCH testsuite v2 1/3] policy: consolidate macros for home dirs access Date: Fri, 15 Nov 2019 16:16:21 +0100 Message-Id: <20191115151623.265770-2-omosnace@redhat.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191115151623.265770-1-omosnace@redhat.com> References: <20191115151623.265770-1-omosnace@redhat.com> MIME-Version: 1.0 X-MC-Unique: tE7yWCpWMEyPq2crTcjFcQ-1 X-Mimecast-Spam-Score: 0 Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org Use userdom_search_generic_user_home_dirs(), which is always defined, and redefine it to match what overlayfs was doing (just in case), Signed-off-by: Ondrej Mosnacek --- policy/test_overlayfs.te | 6 ++---- policy/test_policy.if | 9 +++++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/policy/test_overlayfs.te b/policy/test_overlayfs.te index 6f1756e..f56ef78 100644 --- a/policy/test_overlayfs.te +++ b/policy/test_overlayfs.te @@ -50,8 +50,7 @@ fs_mount_xattr_fs(test_overlay_mounter_t) corecmd_shell_entry_type(test_overlay_mounter_t) corecmd_exec_bin(test_overlay_mounter_t) -userdom_search_admin_dir(test_overlay_mounter_t) -userdom_search_user_home_content(test_overlay_mounter_t) +userdom_search_generic_user_home_dirs(test_overlay_mounter_t) mount_exec(test_overlay_mounter_t) mount_rw_pid_files(test_overlay_mounter_t) @@ -122,8 +121,7 @@ corecmd_exec_bin(test_overlay_client_t) kernel_read_system_state(test_overlay_client_t) kernel_read_proc_symlinks(test_overlay_client_t) -userdom_search_admin_dir(test_overlay_client_t) -userdom_search_user_home_content(test_overlay_client_t) +userdom_search_generic_user_home_dirs(test_overlay_client_t) fs_getattr_xattr_fs(test_overlay_client_t) diff --git a/policy/test_policy.if b/policy/test_policy.if index 5f4000f..40e7499 100644 --- a/policy/test_policy.if +++ b/policy/test_policy.if @@ -61,8 +61,13 @@ interface(`userdom_sysadm_entry_spec_domtrans_to',` ') ') -ifdef(`userdom_search_generic_user_home_dirs', `', ` dnl +ifdef(`userdom_search_admin_dir', ` dnl interface(`userdom_search_generic_user_home_dirs', ` - userdom_search_user_home_dirs($1) + userdom_search_user_home_content($1) + userdom_search_admin_dir($1) +') +', ` dnl +interface(`userdom_search_generic_user_home_dirs', ` + userdom_search_user_home_content($1) ') ') From patchwork Fri Nov 15 15:16:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Mosnacek X-Patchwork-Id: 11246537 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E37AA13BD for ; Fri, 15 Nov 2019 15:16:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0DFB20733 for ; Fri, 15 Nov 2019 15:16:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WByWlTiX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727567AbfKOPQb (ORCPT ); Fri, 15 Nov 2019 10:16:31 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:20270 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727429AbfKOPQa (ORCPT ); Fri, 15 Nov 2019 10:16:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573830989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rJDHnMpLPNBipzjUuMEKojnhSlR5u5vorthOUCcXJDY=; b=WByWlTiXDSmHuR5D+hgJ3Bh+R2DAnaYUFaDrVspk3VhIDVo8LUFn9fjcXPWcvBNmUZsbC2 W6zDJl6C8VKR2F+I3V4tfuHv+LVhIzSNPhdxzaHHqyrxeo4rsmecY9pGU+etcUp0VTD9Ig yG17arDkPK7EilUjMxXLVNiE0d3PUaM= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-161-U855JNJvMWiPwtlbA-sX2Q-1; Fri, 15 Nov 2019 10:16:28 -0500 Received: by mail-wm1-f69.google.com with SMTP id m68so7101213wme.7 for ; Fri, 15 Nov 2019 07:16:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4ABpl1Fm6q8zGwc1QaGo7DyedQRdBuLrLnJ/fam9pfg=; b=EyFd/A1RTUjpWqGiBZd5CIx6uuj+o/UBIayIjlPn7WezifaHpxzW/9OcwHxB/21y+o jBgTowloVLPqie0Y7WvmNxhtINJOALFtdBMaWcRVF9QT5J5u6+RnCYwFNyrNUh2lFDJK lAW8+RqEdvfLlptSpaN+dtLFO3g8mqUitHaSJ2W17QD7eQkIQjM7vDNAniQ86k5gqmHU AxlCrtOwX/9n28t1T+UxXaReBs+0O0ACytorWhmn9LtTrDxPtQyF70Tzlw2ENJSSzjEm IQiasWtzjAxs3fOQ4YB9tFbbE1j+jpPfB5bcXHBOVs9etNaMIA69PPWWICd0L5M9JYKA 3XWg== X-Gm-Message-State: APjAAAVjPwhvDLsujNY7sJztyhnfsQvCMUgTUGz2PgEEwGxF7yWF3hYx b9eBKwCbpKqO+6gSkb1F7sK26NLy6XcrSf2Nj+zgAT+YAfCSc1d2Hyxu1bBmR1CDSaUFPttH8Np RbC8zXW8stMquDnLJIg== X-Received: by 2002:a05:600c:22d1:: with SMTP id 17mr16171374wmg.31.1573830987557; Fri, 15 Nov 2019 07:16:27 -0800 (PST) X-Google-Smtp-Source: APXvYqzI7h2Mb/sEyDaYOsNd3KrlCaVSy+dhXjj/lcQty3xz6ItNZjmwBoFam+fAHfe9R3piSvqoGQ== X-Received: by 2002:a05:600c:22d1:: with SMTP id 17mr16171346wmg.31.1573830987312; Fri, 15 Nov 2019 07:16:27 -0800 (PST) Received: from localhost.localdomain.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id j63sm10337239wmj.46.2019.11.15.07.16.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2019 07:16:26 -0800 (PST) From: Ondrej Mosnacek To: selinux@vger.kernel.org Subject: [PATCH testsuite v2 2/3] policy: add fallbacks for Fedora-specific macros Date: Fri, 15 Nov 2019 16:16:22 +0100 Message-Id: <20191115151623.265770-3-omosnace@redhat.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191115151623.265770-1-omosnace@redhat.com> References: <20191115151623.265770-1-omosnace@redhat.com> MIME-Version: 1.0 X-MC-Unique: U855JNJvMWiPwtlbA-sX2Q-1 X-Mimecast-Spam-Score: 0 Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org dev_rw_infiniband_dev() and mount_rw_pid_files() are not defined in refpolicy. Fall back to dev_rw_generic_files() and mount_rw_runtime_files() if they are not defined. Signed-off-by: Ondrej Mosnacek --- policy/test_policy.if | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/policy/test_policy.if b/policy/test_policy.if index 40e7499..e31345e 100644 --- a/policy/test_policy.if +++ b/policy/test_policy.if @@ -71,3 +71,17 @@ interface(`userdom_search_generic_user_home_dirs', ` userdom_search_user_home_content($1) ') ') + +# Workarounds for refpolicy: + +ifdef(`dev_rw_infiniband_dev', `', ` dnl +interface(`dev_rw_infiniband_dev', ` + dev_rw_generic_files($1) +') +') + +ifdef(`mount_rw_pid_files', `', ` dnl +interface(`mount_rw_pid_files', ` + mount_rw_runtime_files($1) +') +') From patchwork Fri Nov 15 15:16:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Mosnacek X-Patchwork-Id: 11246541 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F2A5A930 for ; Fri, 15 Nov 2019 15:16:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB39A2073A for ; Fri, 15 Nov 2019 15:16:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="H2B7EWgq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727380AbfKOPQd (ORCPT ); Fri, 15 Nov 2019 10:16:33 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:37784 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727429AbfKOPQd (ORCPT ); Fri, 15 Nov 2019 10:16:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573830992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YynLGcwqfrg1zrZcC7yWAsZBhR/R+Oy3X5+AJIk9Z2o=; b=H2B7EWgqasahMjjTNDW+8V2RxWW3wpcf4k2HHJP8yoa9xag6JeldrA21BStCZb8dh8M5Vv r1YS79zFL9lMN1Al+99gkzotqrFN3zjL7EGJlFFm05iPu1V9fKooK2qdJyxTgZDdD/JxZk 3UObbdazMwPeoJudJdbAbLkopfIbmZ8= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-159-ePzVMZO4PuKjs3GfwOBfuw-1; Fri, 15 Nov 2019 10:16:30 -0500 Received: by mail-wm1-f71.google.com with SMTP id i23so6159193wmb.3 for ; Fri, 15 Nov 2019 07:16:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lCsn/X0nmr4hSWIgFPGsvpX5LzN+Uu1MiAqfZRe9+Lg=; b=GZJ4S1M0BbQbIxySrWxUpaq2zrNdMl1MmaXrBSSsPPgViEyE5dtkbXlrWVLGpUCFoI nwlKTKvMvNAyfSiORWJJLa5Q2uUdABwo7NH0joy7qqVVFUuOaTHJKe5WfNoWynOgn4Ja gOcO3esLEl4efyKRZ17kd2F+JCsi6nRXqDM9HVFW5k9m673MDA4mmzTIThWUvEzneWBp onYSbr3cOSghmr7Nx7ypSkV82friO4xD2hbWFUVs+0SJ27UeK9AvWVy6uaJ1DJwhn1PB 6qNIiGe5HlrMamVLSNBS4LDIvLwAC/Ijg+6kSEKYYN4Bptw2ze91oPRc01p0g+hLPGhL po2Q== X-Gm-Message-State: APjAAAXokxxPBt9gQ0qJyQJ8d5u6DAiwvQYax+uliA6FnDOsKXjI3BIj cv6s50hjiWQ8Upzl20yPInl7qHusipKsqrfcfcqKGB7DfLundGe4UBa/J9n0PxLj4TzgD0MH4qi aRbheFDBxlzOhFP6ZfA== X-Received: by 2002:adf:dc0a:: with SMTP id t10mr15314033wri.138.1573830988647; Fri, 15 Nov 2019 07:16:28 -0800 (PST) X-Google-Smtp-Source: APXvYqxagkNvpd25vRjPaSV9iPVc7AowRmEpXppYsLYCgzNN7A5KS85EEaJycCYVIwlWp8mZhnLJ0A== X-Received: by 2002:adf:dc0a:: with SMTP id t10mr15313996wri.138.1573830988375; Fri, 15 Nov 2019 07:16:28 -0800 (PST) Received: from localhost.localdomain.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id j63sm10337239wmj.46.2019.11.15.07.16.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2019 07:16:27 -0800 (PST) From: Ondrej Mosnacek To: selinux@vger.kernel.org Subject: [PATCH testsuite v2 3/3] travis: test building the test policy package Date: Fri, 15 Nov 2019 16:16:23 +0100 Message-Id: <20191115151623.265770-4-omosnace@redhat.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191115151623.265770-1-omosnace@redhat.com> References: <20191115151623.265770-1-omosnace@redhat.com> MIME-Version: 1.0 X-MC-Unique: ePzVMZO4PuKjs3GfwOBfuw-1 X-Mimecast-Spam-Score: 0 Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org Download, build, and install Fedora policy & refpolicy and try building the test policy package against both of them. Signed-off-by: Ondrej Mosnacek --- .travis.yml | 48 ++++++++++++++++++++++++++--- policy/Makefile | 11 ++++--- travis-ci/enable-policy.sh | 10 ++++++ travis-ci/setup-policy-fedora.sh | 33 ++++++++++++++++++++ travis-ci/setup-policy-refpolicy.sh | 19 ++++++++++++ 5 files changed, 113 insertions(+), 8 deletions(-) create mode 100644 travis-ci/enable-policy.sh create mode 100644 travis-ci/setup-policy-fedora.sh create mode 100644 travis-ci/setup-policy-refpolicy.sh diff --git a/.travis.yml b/.travis.yml index fbbe98d..42b2490 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: c -dist: xenial +dist: bionic addons: apt: @@ -8,16 +8,56 @@ addons: - astyle - libselinux1-dev - libsctp-dev + - libaudit-dev + - libcap-dev + - libdbus-glib-1-dev + - xmlto + +cache: + directories: + - selinux-policy + - container-selinux + - refpolicy before_install: + - export LIBRARY_PATH=/usr/local/lib + - export LD_LIBRARY_PATH=/usr/local/lib # FYI: known good with HEAD at 8551fc60fc515cd290ba38ee8c758c1f4df52b56 - git clone https://github.com/perltidy/perltidy.git perltidy - | (cd perltidy && perl Makefile.PL && - make && - sudo make install) + make PREFIX=/usr/local && + sudo make install PREFIX=/usr/local) + # install libbpf from sources + - git clone https://github.com/libbpf/libbpf + - (cd libbpf/src && make PREFIX=/usr/local) + - (cd libbpf/src && sudo make install PREFIX=/usr/local) + # install keyutils from sources + - git clone https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git + - KEYUTILS_OPTS="" + - KEYUTILS_OPTS+="BINDIR=/usr/local/bin SBINDIR=/usr/local/sbin " + - KEYUTILS_OPTS+="LIBDIR=/usr/local/lib USRLIBDIR=/usr/local/lib " + - KEYUTILS_OPTS+="INCLUDEDIR=/usr/local/include " + - KEYUTILS_OPTS+="SHAREDIR=/usr/local/share/keyutils MANDIR=/usr/local/share/man" + - (cd keyutils && make $KEYUTILS_OPTS) + - (cd keyutils && sudo make install $KEYUTILS_OPTS) + # install SELinux userspace from source + - git clone https://github.com/SELinuxProject/selinux + - (cd selinux && sudo make install PREFIX=/usr/local SHLIBDIR=/usr/local/lib) + # install Fedora policy and refpolicy + - bash travis-ci/setup-policy-fedora.sh + - bash travis-ci/setup-policy-refpolicy.sh + # establish a fake "selinuxfs" mount (policy/Makefile just greps for selinuxfs) + - sudo mkdir -p /tmp/fake-selinuxfs + - sudo mount -t tmpfs tmpfs /tmp/fake-selinuxfs + - echo 999 >/tmp/fake-selinuxfs/policyvers script: - tools/check-syntax -f && git diff --exit-code - - make + - | + bash travis-ci/enable-policy.sh targeted && + make PREFIX=/usr/local POLDEV=/usr/share/selinux/targeted + - | + bash travis-ci/enable-policy.sh refpolicy && + make PREFIX=/usr/local POLDEV=/usr/share/selinux/refpolicy diff --git a/policy/Makefile b/policy/Makefile index ff65153..39ae84a 100644 --- a/policy/Makefile +++ b/policy/Makefile @@ -1,8 +1,11 @@ -POLDEV ?= /usr/share/selinux/devel -SEMODULE = /usr/sbin/semodule -CHECKPOLICY = /usr/bin/checkpolicy -CHECKMODULE = /usr/bin/checkmodule +PREFIX ?= /usr +BINDIR ?= $(PREFIX)/bin +SBINDIR ?= $(PREFIX)/sbin +POLDEV ?= $(PREFIX)/share/selinux/devel +SEMODULE = $(SBINDIR)/semodule +CHECKPOLICY = $(BINDIR)/checkpolicy +CHECKMODULE = $(BINDIR)/checkmodule DISTRO=$(shell ../tests/os_detect) diff --git a/travis-ci/enable-policy.sh b/travis-ci/enable-policy.sh new file mode 100644 index 0000000..ae53fbe --- /dev/null +++ b/travis-ci/enable-policy.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e + +# create a dummy /etc/selinux/config +sudo mkdir -p /etc/selinux +sudo tee /etc/selinux/config >/dev/null <