diff options
author | mm <mm@FreeBSD.org> | 2012-01-15 12:08:20 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2012-01-15 12:08:20 +0000 |
commit | 9f44ed5ca827811dd8729bb0ab4397c71161fa9c (patch) | |
tree | 7cb3e09e5396eca584100f0f0377b0dd5a33d1ba /sys/sys | |
parent | 4642718fb42bef8b06538195461ee680c22cd1f9 (diff) | |
download | FreeBSD-src-9f44ed5ca827811dd8729bb0ab4397c71161fa9c.zip FreeBSD-src-9f44ed5ca827811dd8729bb0ab4397c71161fa9c.tar.gz |
Introduce vn_path_to_global_path()
This function updates path string to vnode's full global path and checks
the size of the new path string against the pathlen argument.
In vfs_domount(), sys_unmount() and kern_jail_set() this new function
is used to update the supplied path argument to the respective global path.
Unbreaks jailed zfs(8) with enforce_statfs set to 1.
Reviewed by: kib
MFC after: 1 month
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/vnode.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 7f364ad..c8e2105 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -605,6 +605,8 @@ int vn_fullpath(struct thread *td, struct vnode *vn, int vn_fullpath_global(struct thread *td, struct vnode *vn, char **retbuf, char **freebuf); int vn_commname(struct vnode *vn, char *buf, u_int buflen); +int vn_path_to_global_path(struct thread *td, struct vnode *vp, + char *path, u_int pathlen); int vaccess(enum vtype type, mode_t file_mode, uid_t file_uid, gid_t file_gid, accmode_t accmode, struct ucred *cred, int *privused); |