<dec f='src/src/sys/miscfs/genfs/genfs.h' l='51' type='int genfs_can_chmod(enum vtype , kauth_cred_t , __uid_t , __gid_t , __mode_t )'/>
<use f='src/src/sys/fs/ptyfs/ptyfs_vnops.c' l='517' u='c' c='ptyfs_chmod'/>
<use f='src/src/sys/fs/tmpfs/tmpfs_subr.c' l='1032' u='c' c='tmpfs_chmod'/>
<def f='src/src/sys/miscfs/genfs/genfs_vnops.c' l='721' ll='751' type='int genfs_can_chmod(enum vtype type, kauth_cred_t cred, __uid_t cur_uid, __gid_t cur_gid, __mode_t new_mode)'/>
<doc f='src/src/sys/miscfs/genfs/genfs_vnops.c' l='705'>/*
 * Common routine to check if chmod() is allowed.
 *
 * Policy:
 *   - You must own the file, and
 *     - You must not set the &quot;sticky&quot; bit (meaningless, see chmod(2))
 *     - You must be a member of the group if you&apos;re trying to set the
 *       SGIDf bit
 *
 * cred - credentials of the invoker
 * vp - vnode of the file-system object
 * cur_uid, cur_gid - current uid/gid of the file-system object
 * new_mode - new mode for the file-system object
 *
 * Returns 0 if the change is allowed, or an error value otherwise.
 */</doc>
<use f='src/src/sys/ufs/ext2fs/ext2fs_vnops.c' l='495' u='c' c='ext2fs_chmod'/>
<use f='src/src/sys/ufs/ext2fs/ext2fs_vnops.c' l='1081' u='c' c='ext2fs_makeinode'/>
<use f='src/src/sys/ufs/lfs/lfs_vnops.c' l='388' u='c' c='lfs_makeinode'/>
<use f='src/src/sys/ufs/lfs/ulfs_vnops.c' l='423' u='c' c='ulfs_chmod'/>
<use f='src/src/sys/ufs/ufs/ufs_vnops.c' l='657' u='c' c='ufs_chmod'/>
<use f='src/src/sys/ufs/ufs/ufs_vnops.c' l='1801' u='c' c='ufs_makeinode'/>
