Exemplo n.º 1
0
__u32
gr_acl_handle_chmod(const struct dentry *dentry, const struct vfsmount *mnt,
		    mode_t mode)
{
	if (unlikely((mode != (mode_t)-1) && (mode & (S_ISUID | S_ISGID)))) {
		return generic_fs_handler(dentry, mnt, GR_WRITE | GR_SETID,
				   GR_CHMOD_ACL_MSG);
	} else {
		return generic_fs_handler(dentry, mnt, GR_WRITE, GR_CHMOD_ACL_MSG);
	}
}
Exemplo n.º 2
0
__u32
gr_acl_handle_chmod(const struct dentry *dentry, const struct vfsmount *mnt,
		     umode_t *modeptr)
{
	umode_t mode;
	struct inode *inode = d_backing_inode(dentry);

	*modeptr &= ~gr_acl_umask();
	mode = *modeptr;

	if (unlikely(inode && S_ISSOCK(inode->i_mode)))
		return 1;

	if (unlikely(!d_is_dir(dentry) &&
		     ((mode & S_ISUID) || ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP))))) {
		return generic_fs_handler(dentry, mnt, GR_WRITE | GR_SETID,
				   GR_CHMOD_ACL_MSG);
	} else {
		return generic_fs_handler(dentry, mnt, GR_WRITE, GR_CHMOD_ACL_MSG);
	}
}
Exemplo n.º 3
0
__u32
gr_acl_handle_unix(const struct dentry *dentry, const struct vfsmount *mnt)
{
	return generic_fs_handler(dentry, mnt, GR_READ | GR_WRITE,
			   GR_UNIXCONNECT_ACL_MSG);
}
Exemplo n.º 4
0
__u32
gr_acl_handle_execve(const struct dentry *dentry, const struct vfsmount *mnt)
{
	return generic_fs_handler(dentry, mnt, GR_EXEC, GR_EXEC_ACL_MSG);
}
Exemplo n.º 5
0
__u32
gr_acl_handle_chown(const struct dentry *dentry, const struct vfsmount *mnt)
{
	return generic_fs_handler(dentry, mnt, GR_WRITE, GR_CHOWN_ACL_MSG);
}
Exemplo n.º 6
0
__u32
gr_acl_handle_utime(const struct dentry *dentry, const struct vfsmount *mnt)
{
	return generic_fs_handler(dentry, mnt, GR_WRITE, GR_ATIME_ACL_MSG);
}
Exemplo n.º 7
0
__u32
gr_acl_handle_truncate(const struct dentry *dentry, const struct vfsmount *mnt)
{
	return generic_fs_handler(dentry, mnt, GR_WRITE, GR_TRUNCATE_ACL_MSG);
}
Exemplo n.º 8
0
__u32
gr_acl_handle_unlink(const struct dentry *dentry, const struct vfsmount *mnt)
{
	return generic_fs_handler(dentry, mnt, GR_WRITE | GR_DELETE , GR_UNLINK_ACL_MSG);
}
Exemplo n.º 9
0
__u32
gr_acl_handle_rmdir(const struct dentry * dentry, const struct vfsmount * mnt)
{
	return generic_fs_handler(dentry, mnt, GR_WRITE | GR_DELETE , GR_RMDIR_ACL_MSG);
}
Exemplo n.º 10
0
__u32
gr_acl_handle_removexattr(const struct dentry *dentry, const struct vfsmount *mnt)
{
	return generic_fs_handler(dentry, mnt, GR_WRITE, GR_REMOVEXATTR_ACL_MSG);
}