storaged: Fix SELinux denial with debugfs_mmc
Clean up init script control file usage that was removed years ago as
part of b/36228467, which resolves an SELinux denial:
avc: denied { read } for comm="storaged" path="/sys/kernel/debug/mmc0/mmc0:0001/ext_csd" dev="debugfs" ino=16785 scontext=u:r:storaged:s0 tcontext=u:object_r:debugfs_mmc:s0 tclass=file permissive=0
Also fix include ordering.
Bug: 279649316
Test: Check for denial on boot
Flag: EXEMPT bugfix
Change-Id: Idb78fb67c929c6875497a8b768326b65a47c7dfc
diff --git a/storaged/main.cpp b/storaged/main.cpp
index bbed210..8e71180 100644
--- a/storaged/main.cpp
+++ b/storaged/main.cpp
@@ -25,13 +25,12 @@
#include <sys/types.h>
#include <vector>
-#include <android-base/macros.h>
#include <android-base/logging.h>
+#include <android-base/macros.h>
#include <android-base/stringprintf.h>
-#include <binder/ProcessState.h>
-#include <binder/IServiceManager.h>
#include <binder/IPCThreadState.h>
-#include <cutils/android_get_control_file.h>
+#include <binder/IServiceManager.h>
+#include <binder/ProcessState.h>
#include <cutils/sched_policy.h>
#include <private/android_filesystem_config.h>
diff --git a/storaged/storaged.rc b/storaged/storaged.rc
index 7085743..6debb69 100644
--- a/storaged/storaged.rc
+++ b/storaged/storaged.rc
@@ -2,7 +2,6 @@
class main
capabilities DAC_READ_SEARCH
priority 10
- file /d/mmc0/mmc0:0001/ext_csd r
task_profiles ServiceCapacityLow
user root
group package_info