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=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED 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 D6A36C169C4 for ; Thu, 31 Jan 2019 07:53:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B207A20870 for ; Thu, 31 Jan 2019 07:53:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B7RlfBHR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726316AbfAaHxo (ORCPT ); Thu, 31 Jan 2019 02:53:44 -0500 Received: from mail-ed1-f42.google.com ([209.85.208.42]:38655 "EHLO mail-ed1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726233AbfAaHxo (ORCPT ); Thu, 31 Jan 2019 02:53:44 -0500 Received: by mail-ed1-f42.google.com with SMTP id h50so1788472ede.5 for ; Wed, 30 Jan 2019 23:53:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=TAG6s/EXtE+p12UTdxKqUrn0sxr60S17nnaY2y5VT6Q=; b=B7RlfBHRj9E04mOCUXAUxY/UJQPgf2URS15zId70BGdX2UCeKrkffyobywjPhMKPut VKJQIaWzrclA4j9Ci9erXZNhUnwuUjj411q+izm+H+6E8jQphnXhf26nu1y/9SAsm/GB vAhqS9eLl6iEr5pSAPaJSczy+Ref5MB9M9uozCFpsbq5FUGVUx/ukwRJ7FxT0d/U1JhC 95c48jTtyiE1k2AUWR+vslBZ0o6q+Qa+Bi/qidv9pggcL3uE8mvldrDcayDnf3MhKC4x v2Ly2srvJ5s4mJXLZyCGfg5Q+BOMabH3GMEPzhR4v4PSvGYbl9U0RGpdgRDUwUxp6F6a CgOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=TAG6s/EXtE+p12UTdxKqUrn0sxr60S17nnaY2y5VT6Q=; b=r+dV7j8oPWeYRoPiBcwfZ3+iOSBhyghyuPuXNyAzdnqb2VAQwWDjbuqYubWuFETYC9 ae906Uwut++LnQ/MneFOLlh28H6FlRC9Uo3s0czHuAR+/xNHn2cOKg9Xn1kNtFrn7No+ Cgz6cYC+KDMZw5STMhtopgkzpg1Yv9/2nMkLiCmK0YvAQHfGHUcGVQKnX7SF9/Kupkmk ffgnUHYdDnBdfwIOBzwl/cgv89F2wTdt/Sk1HlRguAwBAP+ivv9Irjuml5MQJE37NVuZ ayksFl/5hbYunX8CRQEFi81QxbI7J9eveCXhRPGhEuvYk5MJNdA82bBvWjg0KIdJmBIO b7aw== X-Gm-Message-State: AJcUukexSoVLCpV4QBPtEBHEGQ6AUJg+vVOrtSYiSihTyj/26hoCeDQc 7NAwfGZMVlWeR9WS4g84e0vMqwst X-Google-Smtp-Source: ALg8bN7tDylS/MrfzvEjgCxcA7rRKK95Ro/M+ER7alWzMt9v6BXPaE80MZ+8bwi9DVglwx1kx7hqrg== X-Received: by 2002:a50:ae01:: with SMTP id c1mr34204951edd.12.1548921222213; Wed, 30 Jan 2019 23:53:42 -0800 (PST) Received: from brutus ([2001:985:d55d::438]) by smtp.gmail.com with ESMTPSA id p21sm1043154edr.67.2019.01.30.23.53.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jan 2019 23:53:41 -0800 (PST) From: Dominick Grift To: Chris PeBenito Cc: Russell Coker , "selinux-refpolicy\@vger.kernel.org" Subject: Re: strange systemd audit message References: <2405565.z5mHNXCWPO@liv> <944e7a06-9372-f403-06ed-d0508102873e@ieee.org> Date: Thu, 31 Jan 2019 08:53:40 +0100 In-Reply-To: <944e7a06-9372-f403-06ed-d0508102873e@ieee.org> (Chris PeBenito's message of "Wed, 30 Jan 2019 18:42:30 -0500") Message-ID: <875zu56z5n.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org Chris PeBenito writes: > On 1/30/19 8:02 AM, Russell Coker wrote: >> I'm seeing the following every time I login as sysadm_r, whether it's via / >> bin/login or sshd. But the login works correctly anyway. Any suggestions for >> what I should investigate? >> >> type=PROCTITLE msg=audit(30/01/19 23:58:01.196:1595535) : proctitle=(systemd) >> type=SYSCALL msg=audit(30/01/19 23:58:01.196:1595535) : arch=x86_64 >> syscall=execve success=no exit=EACCES(Permission denied) a0=0x55f2c3008780 >> a1=0x55f2c2fbe740 a2=0x55f2c302f1e0 a3=0x55f2c2e06010 items=0 ppid=1 pid=19802 >> auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root >> fsgid=root tty=(none) ses=189 comm=(systemd) exe=/lib/systemd/systemd >> subj=system_u:system_r:init_t:s0 key=(null) >> type=AVC msg=audit(30/01/19 23:58:01.196:1595535) : avc: denied { transition >> } for pid=19802 comm=(systemd) path=/lib/systemd/systemd dev="dm-0" >> ino=3069920 scontext=system_u:system_r:init_t:s0 >> tcontext=root:sysadm_r:sysadm_t:s0 tclass=process permissive=0 > > I never login directly as sysadm, but now that I try, I see it too. > I'm unaware of why this is happening; I'd have to look at the code to > try to figure it out. I think its the systemd --user instance spawned by systemd --system on behalf of root. Basically systemd --system pam code reads /etc/pam.d/systemd-user which calls pam_selinux and then ends up interpretting either failsafe_context or default_contexts Just a guess though. Baasically it boils down to not having support for systemd --user functionality in the policy. -- Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Dominick Grift