From 3a45ffec118b80e69c7a6369dbd21602f86fbdcd Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Tue, 19 Apr 2022 14:48:14 -0700 Subject: [PATCH] Allow shutdown /data Bug: 229406072 Signed-off-by: Jaegeuk Kim Change-Id: I7bdd9acd2e85311ecb59b3f0eb1f503a93e240ef --- public/init.te | 1 + public/ioctl_defines | 1 + 2 files changed, 2 insertions(+) diff --git a/public/init.te b/public/init.te index 8dcdd3346..ce0d130fe 100644 --- a/public/init.te +++ b/public/init.te @@ -158,6 +158,7 @@ allow init self:global_capability_class_set { sys_rawio mknod }; # Mounting filesystems from block devices. allow init dev_type:blk_file r_file_perms; allowxperm init dev_type:blk_file ioctl BLKROSET; +allowxperm init system_data_root_file:dir ioctl F2FS_IOC_SHUTDOWN; # Mounting filesystems. # Only allow relabelto for types used in context= mount options, diff --git a/public/ioctl_defines b/public/ioctl_defines index fa96726ea..51cce4e06 100644 --- a/public/ioctl_defines +++ b/public/ioctl_defines @@ -722,6 +722,7 @@ define(`F2FS_IOC_GET_COMPRESS_OPTION', `0xf515') define(`F2FS_IOC_SET_COMPRESS_OPTION', `0xf516') define(`F2FS_IOC_DECOMPRESS_FILE', `0xf517') define(`F2FS_IOC_COMPRESS_FILE', `0xf518') +define(`F2FS_IOC_SHUTDOWN', `0x587d') define(`FAT_IOCTL_GET_ATTRIBUTES', `0x80047210') define(`FAT_IOCTL_GET_VOLUME_ID', `0x80047213') define(`FAT_IOCTL_SET_ATTRIBUTES', `0x40047211')