if (!dir || strncmp(dir, "/data/", 6) || strchr(dir + 6, '/')) {
return 0;
}
+ // ext4enc:TODO exclude /data/user with a horrible special case.
+ if (!strcmp(dir, "/data/user")) {
+ return 0;
+ }
UnencryptedProperties props("/data");
std::string policy = props.Get<std::string>(properties::ref);
if (policy.empty()) {
+ // ext4enc:TODO why is this OK?
return 0;
}
bool UnencryptedProperties::Remove(const char* name)
{
+ if (!OK()) return false;
if (remove((folder_ + "/" + name).c_str())
&& errno != ENOENT) {
return false;