Page MenuHomeFreeBSD

Allow quoted user/group names in exports file
Needs ReviewPublic

Authored by kithrup_mac.com on Nov 18 2015, 6:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 6, 9:24 PM
Unknown Object (File)
Feb 19 2024, 5:38 AM
Unknown Object (File)
Dec 20 2023, 5:55 AM
Unknown Object (File)
Nov 29 2023, 5:54 AM
Unknown Object (File)
Nov 23 2023, 6:57 AM
Unknown Object (File)
Nov 13 2023, 1:45 PM
Unknown Object (File)
Nov 8 2023, 1:44 PM
Unknown Object (File)
Nov 7 2023, 4:23 AM

Details

Reviewers
alfred
dfr
Group Reviewers
Contributor Reviews (src)
Summary

We've run into cases where (usually due to Windows) group names have spaces in them. mountd does not currently allow quoting or escaping of strings; this change adds support (using a strsep-like function) for quoting them. (e.g., -maproot=nobody:"System Daemon")

Test Plan

First with an existing /etc/exports file.
Second with quoting a user and/or group name in the existing /etc/exports file.
Third using a group name with a space (quoting it as necessary). (Requires having such a group, of course. Directory services comes into play here.)

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kithrup_mac.com retitled this revision from to Allow quoted user/group names in exports file.
kithrup_mac.com updated this object.
kithrup_mac.com edited the test plan for this revision. (Show Details)
kithrup_mac.com set the repository for this revision to rS FreeBSD src repository - subversion.
delphij added inline comments.
usr.sbin/mountd/mountd.c
293

Perhaps use a more meaningful name for 'retval' (maybe 'token' or something like that)?

325

We don't issue an error here, but the code could behave mysteriously when a \ is at the end of string and suggests that we may want to tell the user something, like "\ is not balanced at string end". The current code structure doesn't seem to provide a good way of implementing it and we may end up with a refactor eventually.

344

My OCD: Personally I would use '\0' instead of 0 here, they have the same effect but '\0' is a char.

2904

I think we should log the event and return?

3220

I think this is still needed, no? (Otherwise a SIGTERM won't terminate mountd, code around "Expand svc_run() here so that we can call get_exportlist()").

kithrup_mac.com removed rS FreeBSD src repository - subversion as the repository for this revision.

Incorporate some of Xin's feedback.

sys/vm/vm_page.c
2632

Why are there changes to vm system for this patch? Can this please be removed?