From mboxrd@z Thu Jan 1 00:00:00 1970 From: bill4carson Subject: Question about inode and dentry Date: Fri, 01 Nov 2013 15:24:09 +0800 Message-ID: <52735719.1070408@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE To: linux-fsdevel@vger.kernel.org Return-path: Received: from mail-pb0-f44.google.com ([209.85.160.44]:59067 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750834Ab3KAHXs (ORCPT ); Fri, 1 Nov 2013 03:23:48 -0400 Received: by mail-pb0-f44.google.com with SMTP id rp16so3916595pbb.17 for ; Fri, 01 Nov 2013 00:23:48 -0700 (PDT) Received: from [128.224.162.161] ([1.202.252.122]) by mx.google.com with ESMTPSA id x8sm8890532pbf.0.2013.11.01.00.23.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Nov 2013 00:23:47 -0700 (PDT) Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi, all Really new to fs area ;) I'm trying to port Umbrella project based on l= inux-2.6.11, which implementing Process-Based Access Control (PBAC) to linux-2.6.34. The key of Umbrella project is to restrict process access from some dir= ectory/files, these restriction can be fetched from /proc/umbrella. First the directo= ry/file path is parsed from struct dentry, then every inode operation finally has to be= checked against the restrictions with current accessed path involved. This basically ho= w it works. In linux-2.6.11, struct dentry is used by nd->dentry. int permission(struct inode *inode, int mask, struct nameidata *nd) -> security_inode_permission -> security_ops->inode_permission But in linux-2.6.34, struct nameidata is not used any more, how can I g= et proper struct dentry from inode? int inode_permission(struct inode *inode, int mask) -> security_inode_permission -> security_ops->inode_permission Thanks in advance. --=20 =E5=85=AB=E7=99=BE=E9=87=8C=E7=A7=A6=E5=B7=9D=E5=B0=98=E5=9C=9F=E9=A3=9E= =E6=89=AC,=E4=B8=89=E5=8D=83=E4=B8=87=E8=80=81=E9=99=95=E9=BD=90=E5=90=BC= =E7=A7=A6=E8=85=94=E3=80=82 --bill -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html