## ## Policy for filesystems. ######################################## ## ## ## Transform specified type into a filesystem type. ## ## ## The type of the process performing this action. ## ## # define(`fs_make_fs',` requires_block_template(`$0'_depend) typeattribute $1 fs_type; ') define(`fs_make_fs_depend',` attribute fs_type; ') ######################################## ## ## ## Associate the specified file type to persistent ## filesystems with extended attributes. This ## allows a file of this type to be created on ## a filesystem such as ext3, JFS, and XFS. ## ## ## The type of the to be associated. ## ## # define(`fs_associate',` requires_block_template(`$0'_depend) allow $1 fs_t:filesystem associate; ') define(`fs_associate_depend',` type fs_t; class filesystem associate; ') ######################################## ## ## ## Associate the specified file type to ## filesystems which lack extended attributes ## support. This allows a file of this type ## to be created on a filesystem such as ## FAT32, and NFS. ## ## ## The type of the to be associated. ## ## # define(`fs_associate_noxattr',` requires_block_template(`$0'_depend) allow $1 noxattrfs:filesystem associate; ') define(`fs_associate_noxattr_depend',` attribute noxattrfs; class filesystem associate; ') ######################################## ## ## ## Mount a persistent filesystem which ## has extended attributes, such as ## ext3, JFS, or XFS. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_mount_xattr_fs',` requires_block_template(`$0'_depend) allow $1 fs_t:filesystem mount; ') define(`fs_mount_xattr_fs_depend',` type fs_t; class filesystem mount; ') ######################################## ## ## ## Remount a persistent filesystem which ## has extended attributes, such as ## ext3, JFS, or XFS. This allows ## some mount options to be changed. ## ## ## The type of the domain remounting the filesystem. ## ## # define(`fs_remount_xattr_fs',` requires_block_template(`$0'_depend) allow $1 fs_t:filesystem remount; ') define(`fs_remount_xattr_fs_depend',` type fs_t; class filesystem remount; ') ######################################## ## ## ## Unmount a persistent filesystem which ## has extended attributes, such as ## ext3, JFS, or XFS. ## ## ## The type of the domain unmounting the filesystem. ## ## # define(`fs_unmount_xattr_fs',` requires_block_template(`$0'_depend) allow $1 fs_t:filesystem mount; ') define(`fs_unmount_xattr_fs_depend',` type fs_t; class filesystem unmount; ') ######################################## ## ## ## Get the attributes of a persistent ## filesystem which has extended ## attributes, such as ext3, JFS, or XFS. ## ## ## The type of the domain doing the ## getattr on the filesystem. ## ## # define(`fs_getattr_xattr_fs',` requires_block_template(`$0'_depend) allow $1 fs_t:filesystem getattr; ') define(`fs_getattr_xattr_fs_depend',` type fs_t; class filesystem getattr; ') ######################################## ## ## ## Do not audit attempts to ## get the attributes of a persistent ## filesystem which has extended ## attributes, such as ext3, JFS, or XFS. ## ## ## The type of the domain to not audit. ## ## # define(`fs_ignore_getattr_xattr_fs',` requires_block_template(`$0'_depend) dontaudit $1 fs_t:filesystem getattr; ') define(`fs_ignore_getattr_xattr_fs_depend',` type fs_t; class filesystem getattr; ') ######################################## ## ## ## Allow changing of the label of a ## filesystem with extended attributes ## using the context= mount option. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_relabelfrom_xattr_fs',` requires_block_template(`$0'_depend) allow $1 fs_t:filesystem relabelfrom; ') define(`fs_relabelfrom_xattr_fs_depend',` type fs_t; class filesystem relabelfrom; ') ######################################## ## ## ## Mount an automount pseudo filesystem. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_mount_autofs',` requires_block_template(`$0'_depend) allow $1 autofs_t:filesystem mount; ') define(`fs_mount_autofs_depend',` type autofs_t; class filesystem mount; ') ######################################## ## ## ## Remount an automount pseudo filesystem ## This allows some mount options to be changed. ## ## ## The type of the domain remounting the filesystem. ## ## # define(`fs_remount_autofs',` requires_block_template(`$0'_depend) allow $1 autofs_t:filesystem remount; ') define(`fs_remount_autofs_depend',` type autofs_t; class filesystem remount; ') ######################################## ## ## ## Unmount an automount pseudo filesystem. ## ## ## The type of the domain unmounting the filesystem. ## ## # define(`fs_unmount_autofs',` requires_block_template(`$0'_depend) allow $1 autofs_t:filesystem mount; ') define(`fs_unmount_autofs_depend',` type autofs_t; class filesystem unmount; ') ######################################## ## ## ## Get the attributes of an automount ## pseudo filesystem. ## ## ## The type of the domain doing the ## getattr on the filesystem. ## ## # define(`fs_getattr_autofs',` requires_block_template(`$0'_depend) allow $1 autofs_t:filesystem getattr; ') define(`fs_getattr_autofs_depend',` type autofs_t; class filesystem getattr; ') ######################################## ## ## ## Register an interpreter for new binary ## file types, using the kernel binfmt_misc ## support. A common use for this is to ## register a JVM as an interpreter for ## Java byte code. Registered binaries ## can be directly executed on a command line ## without specifying the interpreter. ## ## ## The type of the domain registering ## the interpreter. ## ## # define(`fs_register_binary_executable_type',` requires_block_template(`$0'_depend) allow $1 binfmt_misc_fs_t:dir { getattr search }; allow $1 binfmt_misc_fs_t:file { getattr ioctl write }; ') define(`fs_register_binary_executable_type_depend',` type binfmt_misc_fs_t; class dir { getattr search }; class file { getattr ioctl write }; ') ######################################## ## ## ## Mount a CIFS or SMB network filesystem. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_mount_cifs',` requires_block_template(`$0'_depend) allow $1 cifs_t:filesystem mount; ') define(`fs_mount_cifs_depend',` type cifs_t; class filesystem mount; ') ######################################## ## ## ## Remount a CIFS or SMB network filesystem. ## This allows some mount options to be changed. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_remount_cifs',` requires_block_template(`$0'_depend) allow $1 cifs_t:filesystem remount; ') define(`fs_remount_cifs_depend',` type cifs_t; class filesystem remount; ') ######################################## ## ## ## Unmount a CIFS or SMB network filesystem. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_unmount_cifs',` requires_block_template(`$0'_depend) allow $1 cifs_t:filesystem mount; ') define(`fs_unmount_cifs_depend',` type cifs_t; class filesystem unmount; ') ######################################## ## ## ## Get the attributes of a CIFS or ## SMB network filesystem. ## ## ## The type of the domain doing the ## getattr on the filesystem. ## ## # define(`fs_getattr_cifs',` requires_block_template(`$0'_depend) allow $1 cifs_t:filesystem getattr; ') define(`fs_getattr_cifs_depend',` type cifs_t; class filesystem getattr; ') ######################################## ## ## ## Execute files on a CIFS or SMB ## network filesystem, in the caller ## domain. ## ## ## The type of the domain executing the files. ## ## # define(`fs_execute_cifs_files',` requires_block_template(`$0'_depend) allow $1 cifs_t:dir r_dir_perms; can_exec($1, cifs_t) ') define(`fs_execute_cifs_files_depend',` type cifs_t; class dir r_dir_perms; class file { getattr read execute execute_no_trans }; ') ######################################## ## ## ## Create, read, write, and delete directories ## on a CIFS or SMB network filesystem. ## ## ## The type of the domain managing the directories. ## ## # define(`fs_manage_cifs_dirs',` requires_block_template(`$0'_depend) allow $1 cifs_t:dir create_file_perms; ') define(`fs_manage_cifs_dirs_depend',` type cifs_t; class dir create_file_perms; ') ######################################## ## ## ## Create, read, write, and delete files ## on a CIFS or SMB network filesystem. ## ## ## The type of the domain managing the files. ## ## # define(`fs_manage_cifs_files',` requires_block_template(`$0'_depend) allow $1 cifs_t:dir rw_dir_perms; allow $1 cifs_t:file create_file_perms; ') define(`fs_manage_cifs_files_depend',` type cifs_t; class dir rw_dir_perms; class file create_file_perms; ') ######################################## ## ## ## Create, read, write, and delete symbolic links ## on a CIFS or SMB network filesystem. ## ## ## The type of the domain managing the symbolic links. ## ## # define(`fs_manage_cifs_symlinks',` requires_block_template(`$0'_depend) allow $1 cifs_t:dir rw_dir_perms; allow $1 cifs_t:lnk_file create_lnk_perms; ') define(`fs_manage_cifs_symlinks_depend',` type cifs_t; class dir rw_dir_perms; class lnk_file create_lnk_perms; ') ######################################## ## ## ## Create, read, write, and delete named pipes ## on a CIFS or SMB network filesystem. ## ## ## The type of the domain managing the pipes. ## ## # define(`fs_manage_cifs_named_pipes',` requires_block_template(`$0'_depend) allow $1 cifs_t:dir rw_dir_perms; allow $1 cifs_t:fifo_file create_file_perms; ') define(`fs_manage_cifs_named_pipes_depend',` type cifs_t; class dir rw_dir_perms; class fifo_file create_file_perms; ') ######################################## ## ## ## Create, read, write, and delete named sockets ## on a CIFS or SMB network filesystem. ## ## ## The type of the domain managing the sockets. ## ## # define(`fs_manage_cifs_named_sockets',` requires_block_template(`$0'_depend) allow $1 cifs_t:dir rw_file_perms; allow $1 cifs_t:sock_file create_file_perms; ') define(`fs_manage_cifs_named_sockets_depend',` type cifs_t; class dir rw_dir_perms; class sock_file create_file_perms; ') ######################################## ## ## ## Mount a DOS filesystem, such as ## FAT32 or NTFS. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_mount_dos_fs',` requires_block_template(`$0'_depend) allow $1 dosfs_t:filesystem mount; ') define(`fs_mount_dos_fs_depend',` type dosfs_t; class filesystem mount; ') ######################################## ## ## ## Remount a DOS filesystem, such as ## FAT32 or NTFS. This allows ## some mount options to be changed. ## ## ## The type of the domain remounting the filesystem. ## ## # define(`fs_remount_dos_fs',` requires_block_template(`$0'_depend) allow $1 dosfs_t:filesystem remount; ') define(`fs_remount_dos_fs_depend',` type dosfs_t; class filesystem remount; ') ######################################## ## ## ## Unmount a DOS filesystem, such as ## FAT32 or NTFS. ## ## ## The type of the domain unmounting the filesystem. ## ## # define(`fs_unmount_dos_fs',` requires_block_template(`$0'_depend) allow $1 dosfs_t:filesystem mount; ') define(`fs_unmount_dos_fs_depend',` type dosfs_t; class filesystem unmount; ') ######################################## ## ## ## Get the attributes of a DOS ## filesystem, such as FAT32 or NTFS. ## ## ## The type of the domain doing the ## getattr on the filesystem. ## ## # define(`fs_getattr_dos_fs',` requires_block_template(`$0'_depend) allow $1 dosfs_t:filesystem getattr; ') define(`fs_getattr_dos_fs_depend',` type dosfs_t; class filesystem getattr; ') ######################################## ## ## ## Allow changing of the label of a ## DOS filesystem using the context= mount option. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_relabelfrom_dos_fs',` requires_block_template(`$0'_depend) allow $1 dosfs_t:filesystem relabelfrom; ') define(`fs_relabelfrom_dos_fs_depend',` type dosfs_t; class filesystem relabelfrom; ') ######################################## ## ## ## Mount an iso9660 filesystem, which ## is usually used on CDs. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_mount_iso9660_fs',` requires_block_template(`$0'_depend) allow $1 iso9660_t:filesystem mount; ') define(`fs_mount_iso9660_fs_depend',` type iso9660_t; class filesystem mount; ') ######################################## ## ## ## Remount an iso9660 filesystem, which ## is usually used on CDs. This allows ## some mount options to be changed. ## ## ## The type of the domain remounting the filesystem. ## ## # define(`fs_remount_iso9660_fs',` requires_block_template(`$0'_depend) allow $1 iso9660_t:filesystem remount; ') define(`fs_remount_iso9660_fs_depend',` type iso9660_t; class filesystem remount; ') ######################################## ## ## ## Unmount an iso9660 filesystem, which ## is usually used on CDs. ## ## ## The type of the domain unmounting the filesystem. ## ## # define(`fs_unmount_iso9660_fs',` requires_block_template(`$0'_depend) allow $1 iso9660_t:filesystem mount; ') define(`fs_unmount_iso9660_fs_depend',` type iso9660_t; class filesystem unmount; ') ######################################## ## ## ## Get the attributes of an iso9660 ## filesystem, which is usually used on CDs. ## ## ## The type of the domain doing the ## getattr on the filesystem. ## ## # define(`fs_getattr_iso9660_fs',` requires_block_template(`$0'_depend) allow $1 iso9660_t:filesystem getattr; ') define(`fs_getattr_iso9660_fs_depend',` type iso9660_t; class filesystem getattr; ') ######################################## ## ## ## Mount a NFS filesystem. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_mount_nfs',` requires_block_template(`$0'_depend) allow $1 nfs_t:filesystem mount; ') define(`fs_mount_nfs_depend',` type nfs_t; class filesystem mount; ') ######################################## ## ## ## Remount a NFS filesystem. This allows ## some mount options to be changed. ## ## ## The type of the domain remounting the filesystem. ## ## # define(`fs_remount_nfs',` requires_block_template(`$0'_depend) allow $1 nfs_t:filesystem remount; ') define(`fs_remount_nfs_depend',` type nfs_t; class filesystem remount; ') ######################################## ## ## ## Unmount a NFS filesystem. ## ## ## The type of the domain unmounting the filesystem. ## ## # define(`fs_unmount_nfs',` requires_block_template(`$0'_depend) allow $1 nfs_t:filesystem mount; ') define(`fs_unmount_nfs_depend',` type nfs_t; class filesystem unmount; ') ######################################## ## ## ## Get the attributes of a NFS filesystem. ## ## ## The type of the domain doing the ## getattr on the filesystem. ## ## # define(`fs_getattr_nfs',` requires_block_template(`$0'_depend) allow $1 nfs_t:filesystem getattr; ') define(`fs_getattr_nfs_depend',` type nfs_t; class filesystem getattr; ') ######################################## ## ## ## Execute files on a NFS filesystem. ## ## ## The type of the domain executing the files. ## ## # define(`fs_execute_nfs_files',` requires_block_template(`$0'_depend) allow $1 nfs_t:dir r_dir_perms; can_exec($1, nfs_t) ') define(`fs_execute_nfs_files_depend',` type nfs_t; class dir r_dir_perms; class file { getattr read execute execute_no_trans }; ') ######################################## ## ## ## Create, read, write, and delete directories ## on a NFS filesystem. ## ## ## The type of the domain managing the directories. ## ## # define(`fs_manage_nfs_dirs',` requires_block_template(`$0'_depend) allow $1 nfs_t:dir create_dir_perms; ') define(`fs_manage_nfs_dirs_depend',` type nfs_t; class dir create_dir_perms; ') ######################################## ## ## ## Create, read, write, and delete files ## on a NFS filesystem. ## ## ## The type of the domain managing the files. ## ## # define(`fs_manage_nfs_files',` requires_block_template(`$0'_depend) allow $1 nfs_t:dir rw_dir_perms; allow $1 nfs_t:file create_file_perms; ') define(`fs_manage_nfs_files_depend',` type nfs_t; class dir rw_dir_perms; class file create_file_perms; ') ######################################### ## ## ## Create, read, write, and delete symbolic links ## on a CIFS or SMB network filesystem. ## ## ## The type of the domain managing the symbolic links. ## ## # define(`fs_manage_nfs_symlinks',` requires_block_template(`$0'_depend) allow $1 nfs_t:dir rw_dir_perms; allow $1 nfs_t:lnk_file create_lnk_perms; ') define(`fs_manage_nfs_symlinks_depend',` type nfs_t; class dir r_dir_perms; class lnk_file create_lnk_perms; ') ######################################### ## ## ## Create, read, write, and delete named pipes ## on a NFS filesystem. ## ## ## The type of the domain managing the pipes. ## ## # define(`fs_manage_nfs_named_pipes',` requires_block_template(`$0'_depend) allow $1 nfs_t:dir rw_dir_perms; allow $1 nfs_t:fifo_file create_file_perms; ') define(`fs_manage_nfs_named_pipes_depend',` type nfs_t; class dir rw_dir_perms; class fifo_file create_file_perms; ') ######################################### ## ## ## Create, read, write, and delete named sockets ## on a NFS filesystem. ## ## ## The type of the domain managing the sockets. ## ## # define(`fs_manage_nfs_named_sockets',` requires_block_template(`$0'_depend) allow $1 nfs_t:dir rw_dir_perms; allow $1 nfs_t:sock_file create_file_perms; ') define(`fs_manage_nfs_named_sockets_depend',` type nfs_t; class dir rw_dir_perms; class sock_file create_file_perms; ') ######################################## ## ## ## Mount a NFS server pseudo filesystem. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_mount_nfsd_fs',` requires_block_template(`$0'_depend) allow $1 nfsd_fs_t:filesystem mount; ') define(`fs_mount_nfsd_fs_depend',` type nfsd_fs_t; class filesystem mount; ') ######################################## ## ## ## Mount a NFS server pseudo filesystem. ## This allows some mount options to be changed. ## ## ## The type of the domain remounting the filesystem. ## ## # define(`fs_remount_nfsd_fs',` requires_block_template(`$0'_depend) allow $1 nfsd_fs_t:filesystem remount; ') define(`fs_remount_nfsd_fs_depend',` type nfsd_fs_t; class filesystem remount; ') ######################################## ## ## ## Unmount a NFS server pseudo filesystem. ## ## ## The type of the domain unmounting the filesystem. ## ## # define(`fs_unmount_nfsd_fs',` requires_block_template(`$0'_depend) allow $1 nfsd_fs_t:filesystem mount; ') define(`fs_unmount_nfsd_fs_depend',` type nfsd_fs_t; class filesystem unmount; ') ######################################## ## ## ## Get the attributes of a NFS server ## pseudo filesystem. ## ## ## The type of the domain doing the ## getattr on the filesystem. ## ## # define(`fs_getattr_nfsd_fs',` requires_block_template(`$0'_depend) allow $1 nfsd_fs_t:filesystem getattr; ') define(`fs_getattr_nfsd_fs_depend',` type nfsd_fs_t; class filesystem getattr; ') ######################################## ## ## ## Mount a RAM filesystem. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_mount_ramfs',` requires_block_template(`$0'_depend) allow $1 ramfs_t:filesystem mount; ') define(`fs_mount_ramfs_depend',` type ramfs_t; class filesystem mount; ') ######################################## ## ## ## Remount a RAM filesystem. This allows ## some mount options to be changed. ## ## ## The type of the domain remounting the filesystem. ## ## # define(`fs_remount_ramfs',` requires_block_template(`$0'_depend) allow $1 ramfs_t:filesystem remount; ') define(`fs_remount_ramfs_depend',` type ramfs_t; class filesystem remount; ') ######################################## ## ## ## Unmount a RAM filesystem. ## ## ## The type of the domain unmounting the filesystem. ## ## # define(`fs_unmount_ramfs',` requires_block_template(`$0'_depend) allow $1 ramfs_t:filesystem mount; ') define(`fs_unmount_ramfs_depend',` type ramfs_t; class filesystem unmount; ') ######################################## ## ## ## Get the attributes of a RAM filesystem. ## ## ## The type of the domain doing the ## getattr on the filesystem. ## ## # define(`fs_getattr_ramfs',` requires_block_template(`$0'_depend) allow $1 ramfs_t:filesystem getattr; ') define(`fs_getattr_ramfs_depend',` type ramfs_t; class filesystem getattr; ') ######################################## ## ## ## Mount a ROM filesystem. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_mount_romfs',` requires_block_template(`$0'_depend) allow $1 romfs_t:filesystem mount; ') define(`fs_mount_romfs_depend',` type romfs_t; class filesystem mount; ') ######################################## ## ## ## Remount a ROM filesystem. This allows ## some mount options to be changed. ## ## ## The type of the domain remounting the filesystem. ## ## # define(`fs_remount_romfs',` requires_block_template(`$0'_depend) allow $1 romfs_t:filesystem remount; ') define(`fs_remount_romfs_depend',` type romfs_t; class filesystem remount; ') ######################################## ## ## ## Unmount a ROM filesystem. ## ## ## The type of the domain unmounting the filesystem. ## ## # define(`fs_unmount_romfs',` requires_block_template(`$0'_depend) allow $1 romfs_t:filesystem mount; ') define(`fs_unmount_romfs_depend',` type romfs_t; class filesystem unmount; ') ######################################## ## ## ## Get the attributes of a ROM ## filesystem. ## ## ## The type of the domain doing the ## getattr on the filesystem. ## ## # define(`fs_getattr_romfs',` requires_block_template(`$0'_depend) allow $1 romfs_t:filesystem getattr; ') define(`fs_getattr_romfs_depend',` type romfs_t; class filesystem getattr; ') ######################################## ## ## ## Mount a RPC pipe filesystem. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_mount_rpc_pipefs',` requires_block_template(`$0'_depend) allow $1 rpc_pipefs_t:filesystem mount; ') define(`fs_mount_rpc_pipefs_depend',` type rpc_pipefs_t; class filesystem mount; ') ######################################## ## ## ## Remount a RPC pipe filesystem. This ## allows some mount option to be changed. ## ## ## The type of the domain remounting the filesystem. ## ## # define(`fs_remount_rpc_pipefs',` requires_block_template(`$0'_depend) allow $1 rpc_pipefs_t:filesystem remount; ') define(`fs_remount_rpc_pipefs_depend',` type rpc_pipefs_t; class filesystem remount; ') ######################################## ## ## ## Unmount a RPC pipe filesystem. ## ## ## The type of the domain unmounting the filesystem. ## ## # define(`fs_unmount_rpc_pipefs',` requires_block_template(`$0'_depend) allow $1 rpc_pipefs_t:filesystem mount; ') define(`fs_unmount_rpc_pipefs_depend',` type rpc_pipefs_t; class filesystem unmount; ') ######################################## ## ## ## Get the attributes of a RPC pipe ## filesystem. ## ## ## The type of the domain doing the ## getattr on the filesystem. ## ## # define(`fs_getattr_rpc_pipefs',` requires_block_template(`$0'_depend) allow $1 rpc_pipefs_t:filesystem getattr; ') define(`fs_getattr_rpc_pipefs_depend',` type rpc_pipefs_t; class filesystem getattr; ') ######################################## ## ## ## Mount a tmpfs filesystem. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_mount_tmpfs',` requires_block_template(`$0'_depend) allow $1 tmpfs_t:filesystem mount; ') define(`fs_mount_tmpfs_depend',` type tmpfs_t; class filesystem mount; ') ######################################## ## ## ## Remount a tmpfs filesystem. ## ## ## The type of the domain remounting the filesystem. ## ## # define(`fs_remount_tmpfs',` requires_block_template(`$0'_depend) allow $1 tmpfs_t:filesystem remount; ') define(`fs_remount_tmpfs_depend',` type tmpfs_t; class filesystem remount; ') ######################################## ## ## ## Unmount a tmpfs filesystem. ## ## ## The type of the domain unmounting the filesystem. ## ## # define(`fs_unmount_tmpfs',` requires_block_template(`$0'_depend) allow $1 tmpfs_t:filesystem mount; ') define(`fs_unmount_tmpfs_depend',` type tmpfs_t; class filesystem unmount; ') ######################################## ## ## ## Get the attributes of a tmpfs ## filesystem. ## ## ## The type of the domain doing the ## getattr on the filesystem. ## ## # define(`fs_getattr_tmpfs',` requires_block_template(`$0'_depend) allow $1 tmpfs_t:filesystem getattr; ') define(`fs_getattr_tmpfs_depend',` type tmpfs_t; class filesystem getattr; ') ######################################## ## ## ## Allow the type to associate to tmpfs filesystems. ## ## ## The type of the object to be associated. ## ## ## # define(`fs_associate_tmpfs',` requires_block_template(`$0'_depend) allow $1 tmpfs_t:filesystem associate; ') define(`fs_associate_tmpfs_depend',` type tmpfs_t; class filesystem associate; ') ######################################## # # fs_create_tmpfs_data(domain,derivedtype,[class]) # define(`fs_create_tmpfs_data',` requires_block_template(`$0'_depend) allow $2 tmpfs_t:filesystem associate; allow $1 tmpfs_t:dir rw_dir_perms; ifelse(`$3',`',` type_transition $1 tmpfs_t:file $2; ',` type_transition $1 tmpfs_t:$3 $2; ') ') define(`fs_create_private_tmpfs_data_depend',` type tmpfs_t; class filesystem associate; class dir rw_dir_perms; ') ######################################## ## ## ## Read and write character nodes on tmpfs filesystems. ## ## ## The type of the process performing this action. ## ## ## # define(`fs_use_tmpfs_character_devices',` requires_block_template(`$0'_depend) allow $1 tmpfs_t:dir r_dir_perms; allow $1 tmpfs_t:chr_file rw_file_perms; ') define(`fs_use_tmpfs_character_devices_depend',` type tmpfs_t; class dir r_dir_perms; class chr_file rw_file_perms; ') ######################################## ## ## ## Relabel character nodes on tmpfs filesystems. ## ## ## The type of the process performing this action. ## ## ## # define(`fs_relabel_tmpfs_character_devices',` requires_block_template(`$0'_depend) allow $1 tmpfs_t:dir r_dir_perms; allow $1 tmpfs_t:chr_file { getattr relabelfrom relabelto }; ') define(`fs_relabel_tmpfs_character_devices_depend',` type tmpfs_t; class dir r_dir_perms; class chr_file { getattr relabelfrom relabelto }; ') ######################################## ## ## ## Read and write block nodes on tmpfs filesystems. ## ## ## The type of the process performing this action. ## ## ## # define(`fs_use_tmpfs_block_devices',` requires_block_template(`$0'_depend) allow $1 tmpfs_t:dir r_dir_perms; allow $1 tmpfs_t:blk_file rw_file_perms; ') define(`fs_use_tmpfs_block_devices_depend',` type tmpfs_t; class dir r_dir_perms; class blk_file rw_file_perms; ') ######################################## ## ## ## Relabel block nodes on tmpfs filesystems. ## ## ## The type of the process performing this action. ## ## ## # define(`fs_relabel_tmpfs_block_devices',` requires_block_template(`$0'_depend) allow $1 tmpfs_t:dir r_dir_perms; allow $1 tmpfs_t:blk_file { getattr relabelfrom relabelto }; ') define(`fs_use_tmpfs_block_devices_depend',` type tmpfs_t; class dir r_dir_perms; class blk_file { getattr relabelfrom relabelto }; ') ######################################## ## ## ## Read and write, create and delete character ## nodes on tmpfs filesystems. ## ## ## The type of the process performing this action. ## ## ## # define(`fs_manage_tmpfs_character_devices',` requires_block_template(`$0'_depend) allow $1 tmpfs_t:dir rw_dir_perms; allow $1 tmpfs_t:chr_file create_file_perms; ') define(`fs_manage_tmpfs_character_devices_depend',` type tmpfs_t; class dir rw_dir_perms; class chr_file create_file_perms; ') ######################################## ## ## ## Read and write, create and delete block nodes ## on tmpfs filesystems. ## ## ## The type of the process performing this action. ## ## ## # define(`fs_manage_tmpfs_block_devices',` requires_block_template(`$0'_depend) allow $1 tmpfs_t:dir rw_dir_perms; allow $1 tmpfs_t:blk_file create_file_perms; ') define(`fs_manage_tmpfs_block_devices_depend',` type tmpfs_t; class dir rw_dir_perms; class blk_file create_file_perms; ') ######################################## ## ## ## Mount all filesystems. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_mount_all_fs',` requires_block_template(`$0'_depend) allow $1 fs_type:filesystem mount; ') define(`fs_mount_all_fs_depend',` attribute fs_type; class filesystem mount; ') ######################################## ## ## ## Remount all filesystems. This ## allows some mount options to be changed. ## ## ## The type of the domain mounting the filesystem. ## ## # define(`fs_remount_all_fs',` requires_block_template(`$0'_depend) allow $1 fs_type:filesystem remount; ') define(`fs_remount_all_fs_depend',` attribute fs_type; class filesystem remount; ') ######################################## ## ## ## Unmount all filesystems. ## ## ## The type of the domain unmounting the filesystem. ## ## # define(`fs_unmount_all_fs',` requires_block_template(`$0'_depend) allow $1 fs_type:filesystem unmount; ') define(`fs_mount_all_fs_depend',` attribute fs_type; class filesystem unmount; ') ######################################## ## ## ## Get the attributes of all persistent ## filesystems. ## ## ## The type of the domain doing the ## getattr on the filesystem. ## ## # define(`fs_getattr_all_fs',` requires_block_template(`$0'_depend) allow $1 fs_type:filesystem getattr; ') define(`fs_getattr_all_fs_depend',` attribute fs_type; class filesystem getattr; ') ######################################## ## ## ## Get the quotas of all filesystems. ## ## ## The type of the domain getting quotas. ## ## # define(`fs_get_all_fs_quotas',` requires_block_template(`$0'_depend) allow $1 fs_type:filesystem quotaget; ') define(`fs_get_all_fs_quotas_depend',` attribute fs_type; class filesystem quotaget; ') ######################################## ## ## ## Set the quotas of all filesystems. ## ## ## The type of the domain setting quotas. ## ## # define(`fs_set_all_quotas',` requires_block_template(`$0'_depend) allow $1 fs_type:filesystem quotamod; ') define(`fs_set_all_quotas_depend',` attribute fs_type; class filesystem quotamod; ') ######################################## # # fs_getattr_all_files(type) # define(`fs_getattr_all_files',` requires_block_template(`$0'_depend) allow $1 fs_type:dir { search getattr }; allow $1 fs_type:file getattr; allow $1 fs_type:lnk_file getattr; allow $1 fs_type:fifo_file getattr; allow $1 fs_type:sock_file getattr; ') define(`fs_getattr_all_files_depend',` attribute fs_type; class dir { search getattr }; class file getattr; class lnk_file getattr; class fifo_file getattr; class sock_file getattr; ') ##