Rewrite linprocfs_domtab() as a wrapper around kern_getfsstat(). This
adds missing jail and MAC checks.
Details
- Reviewers
kib - Group Reviewers
Linux Emulation - Commits
- rS281551: Rewrite linprocfs_domtab() as a wrapper around kern_getfsstat(). This
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
It seems reasonable to change the kern_getfsstat() to return the count explicitely, instead of relying on td_retval. I think it was only used by compat32 so far, but new use is ugly without the proper handling of count.
I think the error is ignored to account for possibility that the path doesn't exist. I'd prefer not to touch it for now, this code is a little scary.
As for returning the count from kern_getfsstat() - good point, but I'd rather leave this for later.
I do not like td_retval thing, it is too hackish. IMO this is exactly the right moment to fix it.
I agree that handling namei error (or commenting why error could be ignored) is for the other moment.
Hm, okay. How to return the count, then? Reuse the 'count' argument, or add a new one? Is there a convention that says which argument should it be? The last?
Up to you and a common sense. I would add the last argument like int *count (exact type might need some correction).
sys/kern/vfs_syscalls.c | ||
---|---|---|
634 | There too ? |