Received: by 10.223.185.116 with SMTP id b49csp6473264wrg; Wed, 28 Feb 2018 09:59:45 -0800 (PST) X-Google-Smtp-Source: AH8x225Qae9Qb12lObD0DJZ8U9hFHyqRdZAtWP7iR1qy93dHuJb9JLr4TuSymkDL/HlyXX1JrSEY X-Received: by 10.99.113.75 with SMTP id b11mr15132112pgn.271.1519840785594; Wed, 28 Feb 2018 09:59:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519840785; cv=none; d=google.com; s=arc-20160816; b=nO1tXiQHOb1ZHDvqdA2dB1AqUOKoE7I0tdc9EXMaEKjUIZKqH4De3nt+13B9gxkh6f 8Mj3IHUrXrF5qKHC5rTJxH6cUmPxvZjfCX+Yw4OOhVt6T8+jw3KCZiSwisCog6uBO4Y8 HpNx/zRuqyfzjv7V/Vxg1YGAuc64ry34KY6lL7KlJT4bMhDhlYyBul70ZyBYn6M6CuIM icqs7rAJIBUYiiAKGhjCeBmVuy8VKX2rGJEfYpF9zOd0fsngIy2/fiI+ZbNDxjvxEim7 iz+6+2ycDxnB7QKunsDuck9OYC+tQrad8lomGyFF0ApcgPbLjivuE25dMu6oplUQgpTZ oc6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=gad06u3QBI5b1kqXpbU9uT9d4ljFMmbm7MTmwCuhqfs=; b=QVl+gWkyliINCeu+YvyUvyOXUqiiVrhyyTQGCXWf3BhozHdMG4nR9Nd2HjgzS81U3N pirp+DNMJYc//BoD8oMPNlJYlUOCir2OUrkkys9XefpSLU9Qt2ZMIcApUxFPvZ2BWADc TK/GkHqNGonycFvvk7DlWHZOg6Q5B/w7CDPcaBUkGP3bdNdXOsaYeLlcOGN/ekMI4GjQ f0AxZG35z5+m2OBsV1fyIgR1medkxQ40rP/XIFgnpe4juHc/WoSn+qzZnruIKUsAYdyq x48W6D7HLojbTI+BdhGepcRfIeu+3eNAkOU+xoGUKy6gjqb/HZxvapcUoQLWDSK8aM5O SmPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si1516663plr.440.2018.02.28.09.59.30; Wed, 28 Feb 2018 09:59:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934682AbeB1R5G (ORCPT + 99 others); Wed, 28 Feb 2018 12:57:06 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35472 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934462AbeB1R5A (ORCPT ); Wed, 28 Feb 2018 12:57:00 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1SHu5PF108489 for ; Wed, 28 Feb 2018 12:57:00 -0500 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gdx7ehmek-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 28 Feb 2018 12:56:59 -0500 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 28 Feb 2018 17:56:57 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 28 Feb 2018 17:56:55 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1SHusig53674164; Wed, 28 Feb 2018 17:56:54 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 51E1542042; Wed, 28 Feb 2018 17:49:24 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EBB074203F; Wed, 28 Feb 2018 17:49:21 +0000 (GMT) Received: from swastik.in.ibm.com (unknown [9.195.33.56]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 28 Feb 2018 17:49:21 +0000 (GMT) From: Nayna Jain To: dhowells@redhat.com Cc: keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, Nayna Jain Subject: [PATCH 2/3] keys: export find_keyring_by_name() Date: Wed, 28 Feb 2018 23:25:20 +0530 X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180228175521.10287-1-nayna@linux.vnet.ibm.com> References: <20180228175521.10287-1-nayna@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18022817-0008-0000-0000-000004D61779 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18022817-0009-0000-0000-00001E691867 Message-Id: <20180228175521.10287-2-nayna@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-28_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802280218 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch exports the function find_keyring_by_name() to be used by other subsystems. Signed-off-by: Nayna Jain --- include/linux/key.h | 2 ++ security/keys/internal.h | 2 -- security/keys/keyring.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/key.h b/include/linux/key.h index e58ee10f6e58..c8d332d4103c 100644 --- a/include/linux/key.h +++ b/include/linux/key.h @@ -346,6 +346,8 @@ static inline key_serial_t key_serial(const struct key *key) extern void key_set_timeout(struct key *, unsigned); +extern struct key *find_keyring_by_name(const char *name, bool uid_keyring); + /* * The permissions required on a key that we're looking up. */ diff --git a/security/keys/internal.h b/security/keys/internal.h index 9f8208dc0e55..8aa8d347a1ab 100644 --- a/security/keys/internal.h +++ b/security/keys/internal.h @@ -141,8 +141,6 @@ extern key_ref_t keyring_search_aux(key_ref_t keyring_ref, extern key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx); extern key_ref_t search_process_keyrings(struct keyring_search_context *ctx); -extern struct key *find_keyring_by_name(const char *name, bool uid_keyring); - extern int install_user_keyrings(void); extern int install_thread_keyring_to_cred(struct cred *); extern int install_process_keyring_to_cred(struct cred *); diff --git a/security/keys/keyring.c b/security/keys/keyring.c index d0bccebbd3b5..0fd230534685 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c @@ -1159,6 +1159,7 @@ struct key *find_keyring_by_name(const char *name, bool uid_keyring) read_unlock(&keyring_name_lock); return keyring; } +EXPORT_SYMBOL(find_keyring_by_name); static int keyring_detect_cycle_iterator(const void *object, void *iterator_data) -- 2.13.6