Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5639C43387 for ; Thu, 10 Jan 2019 00:37:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BAEBF214C6 for ; Thu, 10 Jan 2019 00:37:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="Zo4nvzuB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726536AbfAJAhM (ORCPT ); Wed, 9 Jan 2019 19:37:12 -0500 Received: from mail-qt1-f172.google.com ([209.85.160.172]:37706 "EHLO mail-qt1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726286AbfAJAhM (ORCPT ); Wed, 9 Jan 2019 19:37:12 -0500 Received: by mail-qt1-f172.google.com with SMTP id t33so10554623qtt.4 for ; Wed, 09 Jan 2019 16:37:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=FexdemW6w/ckvCXdggxPdsoFKXU+MeEOg72rIeHie10=; b=Zo4nvzuBqjgeNE3eqfajizzbJFkxHodxeksijErgeWT0WbIAyIgzJs/w1ggg+I+/mR WZI04CBSb25TQuz7n9AsEIcfVZO2nzW3UPLpAK+j90Z8kIk2C3Qk4jG04MV7c071NEzo EiUdmx+cyf8i2SgnS5vm3vMtL4uBr5MuncXiU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FexdemW6w/ckvCXdggxPdsoFKXU+MeEOg72rIeHie10=; b=kGnzsr8DDGL9lLQk9aiaSFpFL9d5O73KnZYwnZClm41c14puEPYaVedyazPcrsf/+h s3X6TTy68S1AmCXk2aN5KpuBDrO01xXYQNKt46Fno2DEwAw16xZ4cSYu/p8bk9HFvDJW gm9BQfluLwvFsjCagxcHgqjEho2XbjkwMknMHR5FHUGZT066HtUxbh4P82OVG9PgZSyY +sbfNhTV2POT2wCPsni0n4d9rEzI27dNtEFcE36e/bt3Lhm5v9yl+ccHWT8tBjq/dKE8 RDpU5syAapYCTlC73ecOwRFoJXv4+ndLOdVnFCHRQJAiAYDbm1ZpVgPndp/G8vwSJxLG Navg== X-Gm-Message-State: AJcUuke9qLgFUpA6wepGCIXrwxkdB4ukZ5C8OjFJhlb7vrANxVN4KVrU GVyAqNpyKcdQ0Ijax3Y7mpyhTjRW3jU= X-Google-Smtp-Source: ALg8bN78gJlDS8pl+yYDjisMJimul6O+v2/4SARaJFi6WEFFfjl1jghRhCRIFOgUlrh0fqcN8t+l3g== X-Received: by 2002:ac8:2d53:: with SMTP id o19mr7354527qta.21.1547080630987; Wed, 09 Jan 2019 16:37:10 -0800 (PST) Received: from [192.168.1.190] (pool-108-15-23-247.bltmmd.fios.verizon.net. [108.15.23.247]) by smtp.gmail.com with ESMTPSA id x57sm42258610qtx.96.2019.01.09.16.37.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 16:37:10 -0800 (PST) Subject: Re: [PATCH] logging To: Russell Coker , selinux-refpolicy@vger.kernel.org References: <20190108085527.GA28836@xev> From: Chris PeBenito Message-ID: Date: Wed, 9 Jan 2019 19:25:07 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20190108085527.GA28836@xev> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 1/8/19 3:55 AM, Russell Coker wrote: > Prosody and ntpd don't just need append access to their log files. > > Index: refpolicy-2.20180701/policy/modules/services/jabber.te > =================================================================== > --- refpolicy-2.20180701.orig/policy/modules/services/jabber.te > +++ refpolicy-2.20180701/policy/modules/services/jabber.te > @@ -80,9 +80,8 @@ allow jabberd_t self:netlink_route_socke > manage_files_pattern(jabberd_t, jabberd_lock_t, jabberd_lock_t) > > allow jabberd_t jabberd_log_t:dir setattr_dir_perms; > -append_files_pattern(jabberd_t, jabberd_log_t, jabberd_log_t) > -create_files_pattern(jabberd_t, jabberd_log_t, jabberd_log_t) > -setattr_files_pattern(jabberd_t, jabberd_log_t, jabberd_log_t) > +manage_files_pattern(jabberd_t, jabberd_log_t, jabberd_log_t) > + > logging_log_filetrans(jabberd_t, jabberd_log_t, { file dir }) > > manage_files_pattern(jabberd_domain, jabberd_spool_t, jabberd_spool_t) > Index: refpolicy-2.20180701/policy/modules/services/ntp.te > =================================================================== > --- refpolicy-2.20180701.orig/policy/modules/services/ntp.te > +++ refpolicy-2.20180701/policy/modules/services/ntp.te > @@ -73,9 +73,8 @@ read_lnk_files_pattern(ntpd_t, ntpd_key_ > allow ntpd_t ntpd_lock_t:file rw_file_perms; > > allow ntpd_t ntpd_log_t:dir setattr_dir_perms; > -append_files_pattern(ntpd_t, ntpd_log_t, ntpd_log_t) > -create_files_pattern(ntpd_t, ntpd_log_t, ntpd_log_t) > -setattr_files_pattern(ntpd_t, ntpd_log_t, ntpd_log_t) > +manage_dirs_pattern(ntpd_t, ntpd_log_t, ntpd_log_t) > +manage_files_pattern(ntpd_t, ntpd_log_t, ntpd_log_t) > logging_log_filetrans(ntpd_t, ntpd_log_t, { file dir }) > > manage_files_pattern(ntpd_t, ntpd_pid_t, ntpd_pid_t) Merged. -- Chris PeBenito