mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
Fix handling of DNS names with '-' in them for sharenfs
An old FreeBSD bugzilla report PR#168158 notes that DNS names with '-'s in them cannot be used for the sharenfs property. This patch fixes the parsing of these DNS names. The only negative affect this patch might have is that, if a user has incorrectly separated options with a '-' the sharenfs setting will no longer work once this patch is applied. Reviewed by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Rick Macklem <[email protected]> Closes #16529
This commit is contained in:
1 parent
ec0209418f
commit
29c9e6c324
1 file changed
+3
-1
@@ -93,7 +93,9 @@ translate_opts(char *oldopts, FILE *out)
|
||||
return (EOF);
|
||||
newopts[0] = '\0';
|
||||
s = oldopts;
|
||||
while ((o = strsep(&s, "-, ")) != NULL) {
|
||||
while ((o = strsep(&s, ", ")) != NULL) {
|
||||
if (o[0] == '-')
|
||||
o++;
|
||||
if (o[0] == '\0')
|
||||
continue;
|
||||
for (i = 0; i < ARRAY_SIZE(known_opts); ++i) {
|
||||
|
||||
Reference in new issue
Block a user