Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751565AbdGZSbz (ORCPT ); Wed, 26 Jul 2017 14:31:55 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38137 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952AbdGZSbx (ORCPT ); Wed, 26 Jul 2017 14:31:53 -0400 From: Stefan Berger To: linux-security-module@vger.kernel.org, jmorris@namei.org Cc: linux-kernel@vger.kernel.org, serge@hallyn.com, Stefan Berger Subject: [PATCH] security: fix description of values returned by cap_inode_need_killpriv Date: Wed, 26 Jul 2017 14:31:08 -0400 X-Mailer: git-send-email 2.5.5 X-TM-AS-GCONF: 00 x-cbid: 17072618-0012-0000-0000-000014BDDF1F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007430; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00893268; UDB=6.00446559; IPR=6.00673432; BA=6.00005492; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016391; XFM=3.00000015; UTC=2017-07-26 18:31:52 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17072618-0013-0000-0000-00004EC8EB40 Message-Id: <1501093868-30838-1-git-send-email-stefanb@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-26_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707260267 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 871 Lines: 24 cap_inode_need_killpriv returns 1 if security.capability exists, 0 otherwise. Fix the description of the return value to reflect this. Signed-off-by: Stefan Berger --- security/commoncap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/security/commoncap.c b/security/commoncap.c index 7abebd7..92931f8 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -302,8 +302,7 @@ static inline void bprm_clear_caps(struct linux_binprm *bprm) * affects the security markings on that inode, and if it is, should * inode_killpriv() be invoked or the change rejected? * - * Returns 0 if granted; +ve if granted, but inode_killpriv() is required; and - * -ve to deny the change. + * Returns 1 if security.capability has a value, 0 otherwise. */ int cap_inode_need_killpriv(struct dentry *dentry) { -- 2.7.4