From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752161AbcFNJqq (ORCPT ); Tue, 14 Jun 2016 05:46:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55636 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750901AbcFNJqo (ORCPT ); Tue, 14 Jun 2016 05:46:44 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <1457648428-34445-1-git-send-email-gwendal@chromium.org> To: Gwendal Grignou Cc: dhowells@redhat.com, james.l.morris@oracle.com, serge@hallyn.com, keyrings@vger.kernel.org, Linux Kernel , linux-security-module@vger.kernel.org, "Theodore Ts'o" Subject: Re: [PATCH] keyrings: Allow searching the user session keyring MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18827.1465897601.1@warthog.procyon.org.uk> Date: Tue, 14 Jun 2016 10:46:41 +0100 Message-ID: <18828.1465897601@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 14 Jun 2016 09:46:43 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Gwendal Grignou wrote: > Currently, if a session keyring exists, we are not searching in the > user session or user keyrings. That is correct. New session keyrings are given a link to the user session if created by pam_keyinit. If you don't want to search the user keyring, you can just unlink it from your session keyring. The user-session keyring is a fallback keyring in case there's no session keyring. It seemed to make things easier at the time, but it shouldn't really exist and I would deprecate it and remove it if I could - especially now that persistent keyrings exist. The uid 0 user-session keyring is a potential security hole because it allows implicit sharing of authentication data between daemon processes. David