From owner-freebsd-fs@FreeBSD.ORG Mon Oct 29 20:37:14 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8DF9824D for ; Mon, 29 Oct 2012 20:37:14 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 319B68FC19 for ; Mon, 29 Oct 2012 20:37:13 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id l1so2231949vba.13 for ; Mon, 29 Oct 2012 13:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=tVX7b5Nh8o1yKoN6yZh0aGUehQ2Au0sglsfxI5Zh4Wo=; b=AYoga3FH24d3L3cMYInvvdyAHU9yULiXXuB0uSEmK2szbDCZsWQKFp+FfpvL8z1RtD 7f1Sqg9IZN46M+Y+cQq2Cf3+YT7AIcwhigdZIM2oDyF314HsB5vrIL6G3W24nS2guEw1 9tBuPm+vazludJ/VGjZl1Ie5i24+EmB/hZeeVGFbxfvJffXQ/z6OhhTobTZn9OhLcj6i PWBxOrgbfeewMQpx27n7NDCkTWthX3eC27KOizBYkwqBKrKtfVLv8IcuGd8ZghVbB85+ nmHEF3MCS0VMLxruF+ReNNArme7Ei9fgyXI7V0jtfmI81g3oz2cDrRodQ/uQLtvb5sCk gS9w== MIME-Version: 1.0 Received: by 10.221.2.10 with SMTP id ns10mr10490174vcb.25.1351543033198; Mon, 29 Oct 2012 13:37:13 -0700 (PDT) Received: by 10.58.207.114 with HTTP; Mon, 29 Oct 2012 13:37:13 -0700 (PDT) In-Reply-To: References: Date: Mon, 29 Oct 2012 16:37:13 -0400 Message-ID: Subject: Re: vop setattr and secure levels From: Ryan Stone To: Luca Ferrari Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 20:37:14 -0000 On Mon, Oct 29, 2012 at 9:00 AM, Luca Ferrari wrote: > Hi all, > I'm trying to undertsand the path to some low level file operations, > with particular regard to where and when the secure level is checked. > While digging the code I found that there is an operation in the vop > operation structure that is named vop_setattr which is often referred > to an operation that will be called by a lot of syscalls related to > file system operations. I'd like to understand when and how such > operation is called, since I cannot find any direct reference in, for > instance, the ufs implementation. I suspect it is a general routine > called by the kernel itself somewhere I cannot find. > > I've tried to post the same question on the freebsd forums, but > without any reply, so I believe that this mailing list can give me > some hints. The kernel build process generates some .c and .h files which define VOP_SETATTR, VOP_SETATTR_AP and VOP_SETATTR_APV, which are called from various places in the kernel. These functions are what end up calling vop_setattr.