Page MenuHomeFreeBSD

Try to canonicalize the first argument to mount(8)
AbandonedPublic

Authored by trasz on Oct 26 2020, 11:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Feb 21, 4:18 AM
Unknown Object (File)
Fri, Feb 7, 8:25 PM
Unknown Object (File)
Jan 16 2025, 7:44 PM
Unknown Object (File)
Jan 9 2025, 9:09 PM
Unknown Object (File)
Dec 12 2024, 7:39 PM
Unknown Object (File)
Oct 4 2024, 6:41 AM
Unknown Object (File)
Oct 1 2024, 1:28 PM
Unknown Object (File)
Sep 13 2024, 5:19 AM
Subscribers

Details

Reviewers
kib
Summary

Try to realpath(3) the 'special' argument to mount(8), falling over
to the previous behaviour if it fails.

This is something mount_nullfs(8) does, but to me it looks like a good
idea in general.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34396
Build 31503: arc lint + arc unit

Event Timeline

This is a non-starter imo. For example tmpfs does not do anything with dev and you are expected to pass "tmpfs" as the argument. However, at some point the argument may become meaningful. But then it will be susceptible to getting clobbered if the passed value happens to match a file in cwd.

All pseudo fs do not do anything with from/source.
For real filesystems, resolving source is actually useful for users, I believe, but it would be a user-visible change. In fact, I sometimes want the behavior that your patch introduces.

Might be, add a flag to mount(8) to request resolution of source.