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 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?

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)

Anything else? (kauth_cred_t last, etc.?)

Thanks,

-e.


Home | Main Index | Thread Index | Old Index