diff options
Diffstat (limited to 'init/property_service.c')
-rw-r--r-- | init/property_service.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/init/property_service.c b/init/property_service.c index fe7cbb5..7e8d79a 100644 --- a/init/property_service.c +++ b/init/property_service.c @@ -269,6 +269,7 @@ static void write_persistent_property(const char *name, const char *value) return; } write(fd, value, strlen(value)); + fsync(fd); close(fd); snprintf(path, sizeof(path), "%s/%s", PERSISTENT_PROPERTY_DIR, name); @@ -556,7 +557,8 @@ static void load_persistent_properties() || (sb.st_gid != 0) || (sb.st_nlink != 1)) { ERROR("skipping insecure property file %s (uid=%u gid=%u nlink=%d mode=%o)\n", - entry->d_name, sb.st_uid, sb.st_gid, sb.st_nlink, sb.st_mode); + entry->d_name, (unsigned int)sb.st_uid, (unsigned int)sb.st_gid, + sb.st_nlink, sb.st_mode); close(fd); continue; } |