Don't check permissions bits on init scripts for host_init_verifier
Also get rid of the copy in parser. There's no incentive to switch to
a tokenizer that doesn't modify the input, nor is there a reason to
waste cycles making a copy of every init script as its processed.
Bug: 36970783
Test: boot
Change-Id: I8aca9c9d6f1961e1ab35dee50691a6791fc6ec66
diff --git a/init/parser.h b/init/parser.h
index 3501d8c..2454b6a 100644
--- a/init/parser.h
+++ b/init/parser.h
@@ -75,10 +75,13 @@
void AddSectionParser(const std::string& name, std::unique_ptr<SectionParser> parser);
void AddSingleLineParser(const std::string& prefix, LineCallback callback);
+ // Host init verifier check file permissions.
+ bool ParseConfigFileInsecure(const std::string& path);
+
size_t parse_error_count() const { return parse_error_count_; }
private:
- void ParseData(const std::string& filename, const std::string& data);
+ void ParseData(const std::string& filename, std::string* data);
bool ParseConfigFile(const std::string& path);
bool ParseConfigDir(const std::string& path);