Add secdiscard command for secure deletion of files
This is used by LockSettingsService to delete sensitive credential files.
Bug: 34600579
Test: manual - change device lock under synthetic password, verify
old data on disk is erased.
Change-Id: I5e11b559ad8818bd2ad2b321d67d21477aab7555
diff --git a/Ext4Crypt.cpp b/Ext4Crypt.cpp
index dd8922c..c3e0cc3 100644
--- a/Ext4Crypt.cpp
+++ b/Ext4Crypt.cpp
@@ -686,3 +686,7 @@
return res;
}
+
+bool e4crypt_secdiscard(const char* path) {
+ return android::vold::runSecdiscardSingle(std::string(path));
+}