tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Splitting <fs>_access to two internal routines



> Following up on myself:
> 
> Elad Efrat wrote:
> 
>> Are there any objections for such restructuring? if not, I'll follow-up
>> with a diff implementing the changes for review.
> 
> I've attached a diff implementing the proposed changes for ufs_access:
>    - Functions are named ufs_check_{possible,permitted} as we're
>      returning an error code rather than a boolean answer,
> 
>    - The prototypes are:
> 
>       static int
>       ufs_check_possible(struct vnode *vp, struct inode *ip,
>           mode_t mode, kauth_cred_t cred)

it seems that passing the credential to this function contradicts
your purpose.  right?

> 
>       static int
>       ufs_check_permitted(struct vnode *vp, struct inode *ip,
>           mode_t mode, kauth_cred_t cred)
> 
>      Looking at other file-systems, it seems that the prototypes will be
>      similar, except of course for the second argument which will be the
>      internal node type.
> 
> Please have a look -- before I post a diff for all file-systems I'd like
> to make sure that the interfaces are acceptable (even if they're
> private).

of course, you can't do this for some of filesystems.  eg. nfs

while i don't have a strong opinion, i don't see much benefit.

YAMAMOTO Takashi

> 
> Thanks,
> 
> -e.


Home | Main Index | Thread Index | Old Index