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)
Apr 21 2024, 7:09 PM
Unknown Object (File)
Dec 20 2023, 8:36 AM
Unknown Object (File)
Dec 13 2023, 9:41 PM
Unknown Object (File)
Nov 6 2023, 7:15 PM
Unknown Object (File)
Oct 24 2023, 9:34 AM
Unknown Object (File)
Jul 25 2023, 1:57 AM
Unknown Object (File)
Jul 4 2023, 1:29 PM
Unknown Object (File)
May 11 2023, 8:14 PM
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.