Currently mountd will print error message "symbolic link in export path or statfs failed" in case some path component in an exports line fails validation. This revision improves the error message by giving more information about the precise error as well as the path component that caused the issue.
Details
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Made a couple of inline suggestions, but the code does
look correct to me.
I assume you do not have src commit bit, given your login name?
If that is the case..mav@ are you going to commit this or should I?
(I think it can qualify as a bug fix and go into main during code slush.
Do you guys agree?)
usr.sbin/mountd/mountd.c | ||
---|---|---|
1640–1641 | Minor nit. Although not needed for correctness, But I'll leave this change up to you. | |
3829 | I'd update this comment to accurately note what this |
usr.sbin/mountd/mountd.c | ||
---|---|---|
3857 | Since statfs() is really a separate operation from Just a suggestion. |
Moved statfs check to different function. Updated comments. Initialized err_msg to NULL on each loop iteration.
Except for the minor nit that "ret" no longer
does anything and can be removed, it
looks fine to me now.
Can you commit it or do you want me to do so?
(If I do it, I'll put a submitted by on it.)
If I'm committing it, I'll delete "ret".
Thanks for the patch, rick
usr.sbin/mountd/mountd.c | ||
---|---|---|
3833–3834 | You could get rid of "ret", since it no longer |
After some discussion with Mav, I switched to initializing err_msg to NULL and resetting it after free() if we encounter an error. Removed now-unused variable.
Thanks for the feedback Rick. I unfortunately don't have commit rights and someone else will have to do that for me.
The "int ret = 1;" appears to still be in the patch.
I suspect that is just uploading the wrong version.
Trivial to fix during commit.
So mav@, do you want to commit it or shall I?
(Also, if you have any comments w.r.t. the current
version, please do so.)
Looks fine to me. I'll wait to hear from mav@
w.r.t. which one of us will commit it.
Again, thanks for the patch, rick