tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Common chmod and chown routines
On Sun, Apr 19, 2009 at 01:35:49AM +0300, Elad Efrat wrote:
> I would like to remove a little bit of duplicated code across our
> file-system implementations by introducing two new functions:
> common_chmod() and common_chown().
>
> As the names imply, they will contain the common code found in the
> file-system specific chmod and chown implementations. Calling the
> common code a "policy", this policy is outlined in a comment above
> each of the functions.
>
> Notes:
> - The changes affect ufs, ext2fs, ptyfs, tmpfs, and udf.
>
> - The original chmod policy for ptyfs lacked common tests
> wrt/sticky and sgit bits. What I suggest is, if the (or "a")
> file-system ignores these bits, to remove them on entry to the
> file-system specific implementation before proceeding.
>
> Diff attached, please review. :)
- they belong in genfs.
- please call them something like genfs_can_chown, genfs_can_chmod.
- please put "vnode_t *vp" first and give to both functions.
Thanks.
Home |
Main Index |
Thread Index |
Old Index