MCPcopy Create free account
hub / github.com/F-Stack/f-stack / prison_add_vfs

Function prison_add_vfs

freebsd/kern/kern_jail.c:4179–4195  ·  view source on GitHub ↗

* The VFS system will register jail-aware filesystems here. They each get * a parameter allow.mount.xxxfs and a flag to check when a jailed user * attempts to mount. */

Source from the content-addressed store, hash-verified

4177 * attempts to mount.
4178 */
4179void
4180prison_add_vfs(struct vfsconf *vfsp)
4181{
4182#ifdef NO_SYSCTL_DESCR
4183
4184 vfsp->vfc_prison_flag = prison_add_allow("mount", vfsp->vfc_name,
4185 NULL, NULL);
4186#else
4187 char *descr;
4188
4189 (void)asprintf(&descr, M_TEMP, "Jail may mount the %s file system",
4190 vfsp->vfc_name);
4191 vfsp->vfc_prison_flag = prison_add_allow("mount", vfsp->vfc_name,
4192 NULL, descr);
4193 free(descr, M_TEMP);
4194#endif
4195}
4196
4197#ifdef RACCT
4198void

Callers 1

vfs_registerFunction · 0.85

Calls 3

prison_add_allowFunction · 0.85
asprintfFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected