summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/builtins.c4
-rw-r--r--init/property_service.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/init/builtins.c b/init/builtins.c
index e2932d5..a168062 100644
--- a/init/builtins.c
+++ b/init/builtins.c
@@ -501,10 +501,10 @@ int do_mount_all(int nargs, char **args)
return -1;
}
- /* ret is 1 if the device is encrypted, 0 if not, and -1 on error */
+ /* ret is 1 if the device appears encrypted, 0 if not, and -1 on error */
if (ret == 1) {
property_set("ro.crypto.state", "encrypted");
- property_set("vold.decrypt", "1");
+ property_set("vold.decrypt", "trigger_default_encryption");
} else if (ret == 0) {
property_set("ro.crypto.state", "unencrypted");
/* If fs_mgr determined this is an unencrypted device, then trigger
diff --git a/init/property_service.c b/init/property_service.c
index 56ae56f..10b1cc7 100644
--- a/init/property_service.c
+++ b/init/property_service.c
@@ -97,6 +97,7 @@ struct {
{ "persist.gps.", AID_GPS, 0 },
{ "persist.service.bdroid.", AID_BLUETOOTH, 0 },
{ "selinux." , AID_SYSTEM, 0 },
+ { "partition." , AID_SYSTEM, 0},
{ NULL, 0, 0 }
};
@@ -111,6 +112,7 @@ struct {
} control_perms[] = {
{ "dumpstate",AID_SHELL, AID_LOG },
{ "ril-daemon",AID_RADIO, AID_RADIO },
+ { "pre-recovery", AID_SYSTEM, AID_SYSTEM },
{NULL, 0, 0 }
};
@@ -282,7 +284,6 @@ static void write_persistent_property(const char *name, const char *value)
static bool is_legal_property_name(const char* name, size_t namelen)
{
size_t i;
- bool previous_was_dot = false;
if (namelen >= PROP_NAME_MAX) return false;
if (namelen < 1) return false;
if (name[0] == '.') return false;
@@ -292,11 +293,10 @@ static bool is_legal_property_name(const char* name, size_t namelen)
/* Don't allow ".." to appear in a property name */
for (i = 0; i < namelen; i++) {
if (name[i] == '.') {
- if (previous_was_dot == true) return false;
- previous_was_dot = true;
+ // i=0 is guaranteed to never have a dot. See above.
+ if (name[i-1] == '.') return false;
continue;
}
- previous_was_dot = false;
if (name[i] == '_' || name[i] == '-') continue;
if (name[i] >= 'a' && name[i] <= 'z') continue;
if (name[i] >= 'A' && name[i] <= 'Z') continue;