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
F105092991: D4201.diff
Thu, Dec 12, 8:14 AM
Unknown Object (File)
Wed, Dec 4, 11:42 PM
Unknown Object (File)
Mon, Dec 2, 2:46 AM
Unknown Object (File)
Thu, Nov 28, 3:54 PM
Unknown Object (File)
Fri, Nov 22, 3:03 AM
Unknown Object (File)
Mon, Nov 18, 9:27 AM
Unknown Object (File)
Sun, Nov 17, 5:59 AM
Unknown Object (File)
Wed, Nov 13, 3:07 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

Repository
rS FreeBSD src repository - subversion
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 ↗(On Diff #10405)

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