Hello list, I'm not entirely convinced it is worth mentioning this issue, but we came across something peculiar with symlink resolve.
In our code, we will eventually call "mount(2)" to trigger a mount: printf("Used path is '%s'\n", dir); rv = mount(fstype, dir, 0, &mnt_args); and in our vfs_mount() handler, print out: zfs_vfs_mount(struct mount *vfsp, vnode_t *mvp /*devvp*/, user_addr_t data, vfs_context_t context) { printf("mount toname is '%s'\n", vfs_statfs(vfsp)->f_mntonname); and this situation happens: Used path is '/var/tmp/child_dir' mount toname is 'private/var/tmp/child_dir' So, somewhere internally it attempts to resolve symlinks before calling VFS_MOUNT, possibly the NDINIT/namei calls done in __mac_mount(). But in doing so, drops the leading slash in "/private". Unfortunately, I am not allowed to call NDINIT/namei so I can't confirm it. Interestingly, both mount(8) and "diskutil mount" call realpath() before mount(2) so they never have the issue, and we will follow their lead. But something under the hood here isn't quite right. But we will move forward and not look back :) Lund -- Jorgen Lundman | <lund...@lundman.net> Unix Administrator | +81 (0)90-5578-8500 (work) Shibuya-ku, Tokyo | +81 (0)80-2090-5800 (cell) Japan | +81 (0)3 -3375-1767 (home) _______________________________________________ Do not post admin requests to the list. They will be ignored. Filesystem-dev mailing list (Filesystem-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/filesystem-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com