Summary: | [zfs] incorrect parsing of sharenfs options in zfs (fsshare.c) | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Martin Birgmeier <Martin.Birgmeier> | ||||
Component: | kern | Assignee: | freebsd-fs (Nobody) <fs> | ||||
Status: | Open --- | ||||||
Severity: | Affects Only Me | CC: | Robert.nr1, d8zNeCFG, eborisch+FreeBSD, max | ||||
Priority: | Normal | ||||||
Version: | Unspecified | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Martin Birgmeier
2012-05-20 08:30:01 UTC
Responsible Changed From-To: freebsd-bugs->freebsd-fs Over to maintainer(s). Hi, I just run into this exact bug with: FreeBSD 10.0-RELEASE-p12 FreeBSD 10.0-RELEASE-p12 What is the current status on this, is the "sharenfs" property overall simply not recommended nor used in production? (I also found this bug on the tracker: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=147881) I have read people recommending to just use /etc/exports instead, but most posts a quite old so I'm not sure what's recommended today. Regards, Robert Created attachment 158168 [details]
Patch to support hyphenated host names in sharenfs zfs property.
Simple patch that only ignores leading hyphens in options.
With this change:
'-ro,a-server -alldirs' -> '-ro a-server -alldirs'
instead of (current behavior):
'-ro,a-server -alldirs' -> '-ro a server -alldirs'
Changed by removing '-' from strsep() call, and handling (skipping) hyphen if first character immediately after strsep() call.
All test cases listed immediately prior to the code still work; I'm not aware of any supported forms that are broken by this change.
FreeBSD 11.0-STABLE, and still the same. Will the patch by eborisch be included? If I want to include it, do I have to rebuild the whole kernel, or is it enough to rebuild zfs.ko? Now that this probably starts moving again, may I humbly suggest to use my patch instead for the reasons cited in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=176449#c7 -- Martin batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed. |