From mboxrd@z Thu Jan 1 00:00:00 1970 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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 051AAC2BA2B for ; Fri, 10 Apr 2020 09:40:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D023E20787 for ; Fri, 10 Apr 2020 09:40:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=coker.com.au header.i=@coker.com.au header.b="gfxyQSBg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726007AbgDJJkU (ORCPT ); Fri, 10 Apr 2020 05:40:20 -0400 Received: from smtp.sws.net.au ([46.4.88.250]:40152 "EHLO smtp.sws.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725861AbgDJJkU (ORCPT ); Fri, 10 Apr 2020 05:40:20 -0400 Received: from liv.localnet (localhost [127.0.0.1]) by smtp.sws.net.au (Postfix) with ESMTP id 49F47EBA1; Fri, 10 Apr 2020 19:40:17 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coker.com.au; s=2008; t=1586511619; bh=+lpCXF8thxO0cETWnMuFMgUBZkPz6fe8zSpBL136xfQ=; l=870; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gfxyQSBgjK8CXM4Br4oNHmFWY+yEMxm4o3I3Vi1sKGf6cJI7TsYzcG6hGjTEoJCCH s+GRJI8bwEIp+pRYbY753LNIc5wN0yrY79rs3zqmWiGDHiOpsx/vOdDHNyk2Qq4qdS Nyfy1+AJDLu5Ay4KMWJvPGDIZ4RF4vxUI/1TOj/E= From: Russell Coker To: Dominick Grift Cc: selinux-refpolicy@vger.kernel.org Subject: Re: another memlockd patch Date: Fri, 10 Apr 2020 19:40:13 +1000 Message-ID: <1765247.TeHuJhGoBa@liv> In-Reply-To: References: <20200410060317.GB35896@xev> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On Friday, 10 April 2020 6:10:57 PM AEST Dominick Grift wrote: > > +allow memlockd_t self:unix_dgram_socket { create connect }; > > the unix dgram socket creating is probably redundant and implied with > logging_send_logs_msg() as journald uses dgram_sendto for logging? You are correct, that is redundant. Chris shall I submit the patch again or would it be easier to just delete that line when you merge? > > +# cache /etc/shadow too > > +auth_read_shadow(memlockd_t) > > Hmm since /etc/shadow is mode 000, how is memlock able to read this > without cap_dac_read_search access. is that implied? /etc/shadow is mode 640 on Debian. On other distributions the choice is either more permissions for memlockd or a configuration that doesn't cache /etc/shadow. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/