diff --git a/src/update_engine/omaha_request_action.cc b/src/update_engine/omaha_request_action.cc index 5a3cb83..25ea3af 100644 --- a/src/update_engine/omaha_request_action.cc +++ b/src/update_engine/omaha_request_action.cc @@ -42,7 +42,7 @@ static const char* kTagMaxFailureCountPerUrl = "MaxFailureCountPerUrl"; // Deprecated: "MoreInfo"; See https://github.com/google/omaha/blob/main/doc/ServerProtocolV2.md // "And on the Mac, the Google Software Update Agent supports the following optional attributes": Prompt, MoreInfo // Deprecated: "Prompt" -static const char* kTagNeedsAdmin = "needsadmin"; +// Deprecated: "needsadmin"; Not used by Flatcar static const char* kTagSha256 = "sha256"; namespace { @@ -591,8 +591,6 @@ bool OmahaRequestAction::ParseParams(xmlDoc* doc, } // Get the optional properties one by one. - output_object->needs_admin = - XmlGetProperty(pie_action_node, kTagNeedsAdmin) == "true"; string max = XmlGetProperty(pie_action_node, kTagMaxFailureCountPerUrl); if (!strings::StringToUint(max, &output_object->max_failure_count_per_url)) diff --git a/src/update_engine/omaha_request_action_unittest.cc b/src/update_engine/omaha_request_action_unittest.cc index de4e926..8d7d178 100644 --- a/src/update_engine/omaha_request_action_unittest.cc +++ b/src/update_engine/omaha_request_action_unittest.cc @@ -72,7 +72,6 @@ string GetUpdateResponse2(const string& app_id, const string& codebase, const string& filename, const string& hash, - const string& needsadmin, const string& size) { string response = ""; LOG(INFO) << "Response = " << response; return response; @@ -99,14 +97,12 @@ string GetUpdateResponse(const string& app_id, const string& codebase, const string& filename, const string& hash, - const string& needsadmin, const string& size) { return GetUpdateResponse2(app_id, display_version, codebase, filename, hash, - needsadmin, size); } } // namespace {} @@ -207,7 +203,6 @@ TEST(OmahaRequestActionTest, ValidUpdateTest) { "http://code/base/", // dl url "file.signed", // file name "HASH1234=", // checksum - "false", // needs admin "123"), // size -1, false, // ping_only @@ -220,7 +215,6 @@ TEST(OmahaRequestActionTest, ValidUpdateTest) { EXPECT_EQ("http://code/base/file.signed", response.payload_urls[0]); EXPECT_EQ("HASH1234=", response.hash); EXPECT_EQ(123, response.size); - EXPECT_FALSE(response.needs_admin); } TEST(OmahaRequestActionTest, NoOutputPipeTest) { @@ -340,7 +334,6 @@ TEST(OmahaRequestActionTest, MissingFieldTest) { "IsDelta=\"true\" " "IsDeltaPayload=\"false\" " "sha256=\"lkq34j5345\" " - "needsadmin=\"true\" " "/>"; LOG(INFO) << "Input Response = " << input_response; @@ -358,7 +351,6 @@ TEST(OmahaRequestActionTest, MissingFieldTest) { EXPECT_EQ("http://missing/field/test/f", response.payload_urls[0]); EXPECT_EQ("lkq34j5345", response.hash); EXPECT_EQ(587, response.size); - EXPECT_TRUE(response.needs_admin); } TEST(OmahaRequestActionTest, ConcatUrlSlashTest) { @@ -376,7 +368,6 @@ TEST(OmahaRequestActionTest, ConcatUrlSlashTest) { "IsDelta=\"true\" " "IsDeltaPayload=\"false\" " "sha256=\"lkq34j5345\" " - "needsadmin=\"true\" " "/>"; LOG(INFO) << "Input Response = " << input_response; @@ -490,7 +481,6 @@ TEST(OmahaRequestActionTest, XmlDecodeTest) { "testthe&codebase/", // dl url "file.signed", // file name "HASH1234=", // checksum - "false", // needs admin "123"), // size -1, false, // ping_only @@ -511,7 +501,6 @@ TEST(OmahaRequestActionTest, ParseIntTest) { "thecodebase/", // dl url "file.signed", // file name "HASH1234=", // checksum - "false", // needs admin // overflows int32: "123123123123123"), // size -1, diff --git a/src/update_engine/omaha_response.h b/src/update_engine/omaha_response.h index 9d22349..787bc29 100644 --- a/src/update_engine/omaha_response.h +++ b/src/update_engine/omaha_response.h @@ -22,7 +22,6 @@ struct OmahaResponse { poll_interval(0), size(0), max_failure_count_per_url(0), - needs_admin(false), is_delta_payload(false), disable_payload_backoff(false) {} @@ -45,7 +44,6 @@ struct OmahaResponse { // next URL in the current pass. This is a configurable value from the // Omaha Response attribute, if ever we need to fine tune the behavior. uint32_t max_failure_count_per_url; - bool needs_admin; // True if the payload described in this response is a delta payload. // False if it's a full payload. diff --git a/src/update_engine/omaha_response_handler_action_unittest.cc b/src/update_engine/omaha_response_handler_action_unittest.cc index dfff580..c7af84b 100644 --- a/src/update_engine/omaha_response_handler_action_unittest.cc +++ b/src/update_engine/omaha_response_handler_action_unittest.cc @@ -87,7 +87,6 @@ TEST_F(OmahaResponseHandlerActionTest, SimpleTest) { in.payload_urls.push_back("http://foo/the_update_a.b.c.d.tgz"); in.hash = "HASH+"; in.size = 12; - in.needs_admin = true; InstallPlan install_plan; EXPECT_TRUE(DoTest(in, "/dev/sda3", &install_plan)); EXPECT_EQ(in.payload_urls[0], install_plan.download_url); @@ -102,7 +101,6 @@ TEST_F(OmahaResponseHandlerActionTest, SimpleTest) { in.payload_urls.push_back("http://foo/the_update_a.b.c.d.tgz"); in.hash = "HASHj+"; in.size = 12; - in.needs_admin = true; InstallPlan install_plan; EXPECT_TRUE(DoTest(in, "/dev/sda4", &install_plan)); EXPECT_EQ(in.payload_urls[0], install_plan.download_url); @@ -117,7 +115,6 @@ TEST_F(OmahaResponseHandlerActionTest, SimpleTest) { in.payload_urls.push_back(kLongName); in.hash = "HASHj+"; in.size = 12; - in.needs_admin = true; InstallPlan install_plan; EXPECT_TRUE(DoTest(in, "/dev/sda3", &install_plan)); EXPECT_EQ(in.payload_urls[0], install_plan.download_url);