tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Common chmod and chown routines
On Tue, Apr 21, 2009 at 01:49:27PM +0300, Elad Efrat wrote:
> On Tue, Apr 21, 2009 at 10:29 AM, Andrew Doran <ad%netbsd.org@localhost>
> wrote:
>
> > - 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.
>
> Is genfs_vnops.c an okay location?
Not ideal, but there is a load of junk in there already so why not.
> Here are the prototypes after the changes you suggest:
>
> int
> genfs_can_chmon(vnode_t *vp, kauth_cred_t cred, uid_t cur_uid,
> gid_t cur_gid, mode_t new_mode)
>
> int
> genfs_can_chown(vnode_t *vp, kauth_cred_t cred, uid_t cur_uid,
> gid_t cur_gid, uid_t new_uid, gid_t new_gid)
Looks good to me.
Home |
Main Index |
Thread Index |
Old Index