blob: 1f199af6c0be929cbada4b7b290d540769483eae [file] [log] [blame]
Lorenzo Colitti89faa342016-02-26 11:38:47 +09001/*
2 * Copyright 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * FirewallControllerTest.cpp - unit tests for FirewallController.cpp
17 */
18
19#include <string>
20#include <vector>
21#include <stdio.h>
22
23#include <gtest/gtest.h>
24
Hugo Benichi528d3d02018-06-20 13:35:58 +090025#include <android-base/file.h>
Lorenzo Colitti6324b182017-07-17 21:48:14 +090026#include <android-base/stringprintf.h>
Hugo Benichi528d3d02018-06-20 13:35:58 +090027#include <android-base/strings.h>
Lorenzo Colittia55388e2016-05-13 17:03:42 +090028
Lorenzo Colitti89faa342016-02-26 11:38:47 +090029#include "FirewallController.h"
Lorenzo Colitti932c44c2016-04-24 16:58:02 +090030#include "IptablesBaseTest.h"
Lorenzo Colitti89faa342016-02-26 11:38:47 +090031
Lorenzo Colittid351bea2017-07-16 22:52:30 +090032using android::base::Join;
Hugo Benichi528d3d02018-06-20 13:35:58 +090033using android::base::WriteStringToFile;
Lorenzo Colitti89faa342016-02-26 11:38:47 +090034
Luke Huange64fa382018-07-24 16:38:22 +080035namespace android {
36namespace net {
37
Lorenzo Colitti932c44c2016-04-24 16:58:02 +090038class FirewallControllerTest : public IptablesBaseTest {
Lorenzo Colitti89faa342016-02-26 11:38:47 +090039protected:
Lorenzo Colitti932c44c2016-04-24 16:58:02 +090040 FirewallControllerTest() {
Lorenzo Colitti932c44c2016-04-24 16:58:02 +090041 FirewallController::execIptablesRestore = fakeExecIptablesRestore;
Chenbo Feng47dd0732018-12-11 12:23:24 -080042 // This unit test currently doesn't cover the eBPF owner match case so
43 // we have to manually turn eBPF support off.
44 // TODO: find a way to unit test the eBPF code path.
Maciej Żenczykowski10a58922020-02-11 15:40:19 -080045 mFw.mUseBpfOwnerMatch = false;
Lorenzo Colitti932c44c2016-04-24 16:58:02 +090046 }
Lorenzo Colitti89faa342016-02-26 11:38:47 +090047 FirewallController mFw;
Lorenzo Colitti932c44c2016-04-24 16:58:02 +090048
Lorenzo Colittif157caf2016-05-13 11:25:54 +090049 std::string makeUidRules(IptablesTarget a, const char* b, bool c,
50 const std::vector<int32_t>& d) {
51 return mFw.makeUidRules(a, b, c, d);
Lorenzo Colitti89faa342016-02-26 11:38:47 +090052 }
Lorenzo Colitti932c44c2016-04-24 16:58:02 +090053
Lorenzo Colitti03b23fe2017-02-03 18:46:53 +090054 int createChain(const char* a, FirewallType b) {
55 return mFw.createChain(a, b);
Lorenzo Colitti932c44c2016-04-24 16:58:02 +090056 }
Lorenzo Colitti89faa342016-02-26 11:38:47 +090057};
58
Lorenzo Colitticdd79f12020-07-30 12:03:40 +090059TEST_F(FirewallControllerTest, TestCreateAllowlistChain) {
Lorenzo Colittia55388e2016-05-13 17:03:42 +090060 std::vector<std::string> expectedRestore4 = {
Lorenzo Colitticdd79f12020-07-30 12:03:40 +090061 "*filter",
62 ":fw_allowlist -",
63 "-A fw_allowlist -m owner --uid-owner 0-9999 -j RETURN",
64 "-A fw_allowlist -m owner ! --uid-owner 0-4294967294 -j RETURN",
65 "-A fw_allowlist -p esp -j RETURN",
66 "-A fw_allowlist -i lo -j RETURN",
67 "-A fw_allowlist -o lo -j RETURN",
68 "-A fw_allowlist -p tcp --tcp-flags RST RST -j RETURN",
69 "-A fw_allowlist -j DROP",
70 "COMMIT\n"};
Lorenzo Colittia55388e2016-05-13 17:03:42 +090071 std::vector<std::string> expectedRestore6 = {
Lorenzo Colitticdd79f12020-07-30 12:03:40 +090072 "*filter",
73 ":fw_allowlist -",
74 "-A fw_allowlist -m owner --uid-owner 0-9999 -j RETURN",
75 "-A fw_allowlist -m owner ! --uid-owner 0-4294967294 -j RETURN",
76 "-A fw_allowlist -p esp -j RETURN",
77 "-A fw_allowlist -i lo -j RETURN",
78 "-A fw_allowlist -o lo -j RETURN",
79 "-A fw_allowlist -p tcp --tcp-flags RST RST -j RETURN",
80 "-A fw_allowlist -p icmpv6 --icmpv6-type packet-too-big -j RETURN",
81 "-A fw_allowlist -p icmpv6 --icmpv6-type router-solicitation -j RETURN",
82 "-A fw_allowlist -p icmpv6 --icmpv6-type router-advertisement -j RETURN",
83 "-A fw_allowlist -p icmpv6 --icmpv6-type neighbour-solicitation -j RETURN",
84 "-A fw_allowlist -p icmpv6 --icmpv6-type neighbour-advertisement -j RETURN",
85 "-A fw_allowlist -p icmpv6 --icmpv6-type redirect -j RETURN",
86 "-A fw_allowlist -j DROP",
87 "COMMIT\n"};
Lorenzo Colittia55388e2016-05-13 17:03:42 +090088 std::vector<std::pair<IptablesTarget, std::string>> expectedRestoreCommands = {
Bernie Innocentia5161a02019-01-30 22:40:53 +090089 {V4, Join(expectedRestore4, '\n')},
90 {V6, Join(expectedRestore6, '\n')},
Lorenzo Colittia55388e2016-05-13 17:03:42 +090091 };
92
Lorenzo Colitticdd79f12020-07-30 12:03:40 +090093 createChain("fw_allowlist", ALLOWLIST);
Lorenzo Colittia55388e2016-05-13 17:03:42 +090094 expectIptablesRestoreCommands(expectedRestoreCommands);
Lorenzo Colitti932c44c2016-04-24 16:58:02 +090095}
96
Lorenzo Colitticdd79f12020-07-30 12:03:40 +090097TEST_F(FirewallControllerTest, TestCreateDenylistChain) {
Lorenzo Colittia55388e2016-05-13 17:03:42 +090098 std::vector<std::string> expectedRestore = {
Lorenzo Colitticdd79f12020-07-30 12:03:40 +090099 "*filter",
100 ":fw_denylist -",
101 "-A fw_denylist -i lo -j RETURN",
102 "-A fw_denylist -o lo -j RETURN",
103 "-A fw_denylist -p tcp --tcp-flags RST RST -j RETURN",
104 "COMMIT\n"};
Lorenzo Colittia55388e2016-05-13 17:03:42 +0900105 std::vector<std::pair<IptablesTarget, std::string>> expectedRestoreCommands = {
Bernie Innocentia5161a02019-01-30 22:40:53 +0900106 {V4, Join(expectedRestore, '\n')},
107 {V6, Join(expectedRestore, '\n')},
Lorenzo Colittia55388e2016-05-13 17:03:42 +0900108 };
109
Lorenzo Colitticdd79f12020-07-30 12:03:40 +0900110 createChain("fw_denylist", DENYLIST);
Lorenzo Colittia55388e2016-05-13 17:03:42 +0900111 expectIptablesRestoreCommands(expectedRestoreCommands);
Lorenzo Colitti932c44c2016-04-24 16:58:02 +0900112}
113
114TEST_F(FirewallControllerTest, TestSetStandbyRule) {
115 ExpectedIptablesCommands expected = {
Lorenzo Colittia7357652017-04-25 00:16:36 +0900116 { V4V6, "*filter\n-D fw_standby -m owner --uid-owner 12345 -j DROP\nCOMMIT\n" }
Lorenzo Colitti932c44c2016-04-24 16:58:02 +0900117 };
118 mFw.setUidRule(STANDBY, 12345, ALLOW);
Lorenzo Colittia7357652017-04-25 00:16:36 +0900119 expectIptablesRestoreCommands(expected);
Lorenzo Colitti932c44c2016-04-24 16:58:02 +0900120
121 expected = {
Lorenzo Colittia7357652017-04-25 00:16:36 +0900122 { V4V6, "*filter\n-A fw_standby -m owner --uid-owner 12345 -j DROP\nCOMMIT\n" }
Lorenzo Colitti932c44c2016-04-24 16:58:02 +0900123 };
124 mFw.setUidRule(STANDBY, 12345, DENY);
Lorenzo Colittia7357652017-04-25 00:16:36 +0900125 expectIptablesRestoreCommands(expected);
Lorenzo Colitti932c44c2016-04-24 16:58:02 +0900126}
127
128TEST_F(FirewallControllerTest, TestSetDozeRule) {
129 ExpectedIptablesCommands expected = {
Lorenzo Colittia7357652017-04-25 00:16:36 +0900130 { V4V6, "*filter\n-I fw_dozable -m owner --uid-owner 54321 -j RETURN\nCOMMIT\n" }
Lorenzo Colitti932c44c2016-04-24 16:58:02 +0900131 };
132 mFw.setUidRule(DOZABLE, 54321, ALLOW);
Lorenzo Colittia7357652017-04-25 00:16:36 +0900133 expectIptablesRestoreCommands(expected);
Lorenzo Colitti932c44c2016-04-24 16:58:02 +0900134
135 expected = {
Lorenzo Colittia7357652017-04-25 00:16:36 +0900136 { V4V6, "*filter\n-D fw_dozable -m owner --uid-owner 54321 -j RETURN\nCOMMIT\n" }
Lorenzo Colitti932c44c2016-04-24 16:58:02 +0900137 };
138 mFw.setUidRule(DOZABLE, 54321, DENY);
Lorenzo Colittia7357652017-04-25 00:16:36 +0900139 expectIptablesRestoreCommands(expected);
140}
141
142TEST_F(FirewallControllerTest, TestSetFirewallRule) {
143 ExpectedIptablesCommands expected = {
144 { V4V6, "*filter\n"
145 "-A fw_INPUT -m owner --uid-owner 54321 -j DROP\n"
146 "-A fw_OUTPUT -m owner --uid-owner 54321 -j DROP\n"
147 "COMMIT\n" }
148 };
149 mFw.setUidRule(NONE, 54321, DENY);
150 expectIptablesRestoreCommands(expected);
151
152 expected = {
153 { V4V6, "*filter\n"
154 "-D fw_INPUT -m owner --uid-owner 54321 -j DROP\n"
155 "-D fw_OUTPUT -m owner --uid-owner 54321 -j DROP\n"
156 "COMMIT\n" }
157 };
158 mFw.setUidRule(NONE, 54321, ALLOW);
159 expectIptablesRestoreCommands(expected);
Lorenzo Colitti932c44c2016-04-24 16:58:02 +0900160}
161
Lorenzo Colitticdd79f12020-07-30 12:03:40 +0900162TEST_F(FirewallControllerTest, TestReplaceAllowlistUidRule) {
Lorenzo Colitti89faa342016-02-26 11:38:47 +0900163 std::string expected =
164 "*filter\n"
Lorenzo Colitticdd79f12020-07-30 12:03:40 +0900165 ":FW_allowchain -\n"
166 "-A FW_allowchain -m owner --uid-owner 10023 -j RETURN\n"
167 "-A FW_allowchain -m owner --uid-owner 10059 -j RETURN\n"
168 "-A FW_allowchain -m owner --uid-owner 10124 -j RETURN\n"
169 "-A FW_allowchain -m owner --uid-owner 10111 -j RETURN\n"
170 "-A FW_allowchain -m owner --uid-owner 110122 -j RETURN\n"
171 "-A FW_allowchain -m owner --uid-owner 210153 -j RETURN\n"
172 "-A FW_allowchain -m owner --uid-owner 210024 -j RETURN\n"
173 "-A FW_allowchain -m owner --uid-owner 0-9999 -j RETURN\n"
174 "-A FW_allowchain -m owner ! --uid-owner 0-4294967294 -j RETURN\n"
175 "-A FW_allowchain -p esp -j RETURN\n"
176 "-A FW_allowchain -i lo -j RETURN\n"
177 "-A FW_allowchain -o lo -j RETURN\n"
178 "-A FW_allowchain -p tcp --tcp-flags RST RST -j RETURN\n"
179 "-A FW_allowchain -p icmpv6 --icmpv6-type packet-too-big -j RETURN\n"
180 "-A FW_allowchain -p icmpv6 --icmpv6-type router-solicitation -j RETURN\n"
181 "-A FW_allowchain -p icmpv6 --icmpv6-type router-advertisement -j RETURN\n"
182 "-A FW_allowchain -p icmpv6 --icmpv6-type neighbour-solicitation -j RETURN\n"
183 "-A FW_allowchain -p icmpv6 --icmpv6-type neighbour-advertisement -j RETURN\n"
184 "-A FW_allowchain -p icmpv6 --icmpv6-type redirect -j RETURN\n"
185 "-A FW_allowchain -j DROP\n"
Lorenzo Colitti03b23fe2017-02-03 18:46:53 +0900186 "COMMIT\n";
Lorenzo Colitti89faa342016-02-26 11:38:47 +0900187
188 std::vector<int32_t> uids = { 10023, 10059, 10124, 10111, 110122, 210153, 210024 };
Lorenzo Colitticdd79f12020-07-30 12:03:40 +0900189 EXPECT_EQ(expected, makeUidRules(V6, "FW_allowchain", true, uids));
Lorenzo Colitti89faa342016-02-26 11:38:47 +0900190}
191
Lorenzo Colitticdd79f12020-07-30 12:03:40 +0900192TEST_F(FirewallControllerTest, TestReplaceDenylistUidRule) {
Lorenzo Colitti89faa342016-02-26 11:38:47 +0900193 std::string expected =
194 "*filter\n"
Lorenzo Colitticdd79f12020-07-30 12:03:40 +0900195 ":FW_denychain -\n"
196 "-A FW_denychain -i lo -j RETURN\n"
197 "-A FW_denychain -o lo -j RETURN\n"
198 "-A FW_denychain -p tcp --tcp-flags RST RST -j RETURN\n"
199 "-A FW_denychain -m owner --uid-owner 10023 -j DROP\n"
200 "-A FW_denychain -m owner --uid-owner 10059 -j DROP\n"
201 "-A FW_denychain -m owner --uid-owner 10124 -j DROP\n"
Lorenzo Colitti03b23fe2017-02-03 18:46:53 +0900202 "COMMIT\n";
Lorenzo Colitti89faa342016-02-26 11:38:47 +0900203
204 std::vector<int32_t> uids = { 10023, 10059, 10124 };
Lorenzo Colitticdd79f12020-07-30 12:03:40 +0900205 EXPECT_EQ(expected, makeUidRules(V4, "FW_denychain", false, uids));
Lorenzo Colitti89faa342016-02-26 11:38:47 +0900206}
Lorenzo Colittidd9a54b2017-04-26 16:13:22 +0900207
208TEST_F(FirewallControllerTest, TestEnableChildChains) {
209 std::vector<std::string> expected = {
Lorenzo Colittia1611962017-04-26 16:30:39 +0900210 "*filter\n"
211 "-A fw_INPUT -j fw_dozable\n"
212 "-A fw_OUTPUT -j fw_dozable\n"
213 "COMMIT\n"
Lorenzo Colittidd9a54b2017-04-26 16:13:22 +0900214 };
215 EXPECT_EQ(0, mFw.enableChildChains(DOZABLE, true));
Lorenzo Colittia1611962017-04-26 16:30:39 +0900216 expectIptablesRestoreCommands(expected);
Lorenzo Colittidd9a54b2017-04-26 16:13:22 +0900217
218 expected = {
Lorenzo Colittia1611962017-04-26 16:30:39 +0900219 "*filter\n"
220 "-D fw_INPUT -j fw_powersave\n"
221 "-D fw_OUTPUT -j fw_powersave\n"
222 "COMMIT\n"
Lorenzo Colittidd9a54b2017-04-26 16:13:22 +0900223 };
224 EXPECT_EQ(0, mFw.enableChildChains(POWERSAVE, false));
Lorenzo Colittia1611962017-04-26 16:30:39 +0900225 expectIptablesRestoreCommands(expected);
Lorenzo Colittidd9a54b2017-04-26 16:13:22 +0900226}
Lorenzo Colitticc1bb822017-07-16 21:08:54 +0900227
Lorenzo Colitti6324b182017-07-17 21:48:14 +0900228TEST_F(FirewallControllerTest, TestFirewall) {
Lorenzo Colitticc1bb822017-07-16 21:08:54 +0900229 std::vector<std::string> enableCommands = {
Maciej Żenczykowski350dbdb2021-10-14 20:22:23 -0700230 "*filter\n"
231 "-A fw_INPUT -j DROP\n"
232 "-A fw_OUTPUT -j REJECT\n"
233 "-A fw_FORWARD -j REJECT\n"
234 "COMMIT\n"};
Lorenzo Colitticc1bb822017-07-16 21:08:54 +0900235 std::vector<std::string> disableCommands = {
Maciej Żenczykowski350dbdb2021-10-14 20:22:23 -0700236 "*filter\n"
237 ":fw_INPUT -\n"
238 ":fw_OUTPUT -\n"
239 ":fw_FORWARD -\n"
240 "-6 -A fw_OUTPUT ! -o lo -s ::1 -j DROP\n"
241 "COMMIT\n"};
Lorenzo Colitticc1bb822017-07-16 21:08:54 +0900242 std::vector<std::string> noCommands = {};
243
Luke Huange64fa382018-07-24 16:38:22 +0800244 EXPECT_EQ(0, mFw.resetFirewall());
Lorenzo Colittid351bea2017-07-16 22:52:30 +0900245 expectIptablesRestoreCommands(disableCommands);
Lorenzo Colitticc1bb822017-07-16 21:08:54 +0900246
Luke Huange64fa382018-07-24 16:38:22 +0800247 EXPECT_EQ(0, mFw.resetFirewall());
Lorenzo Colittid351bea2017-07-16 22:52:30 +0900248 expectIptablesRestoreCommands(disableCommands);
Lorenzo Colitticc1bb822017-07-16 21:08:54 +0900249
Lorenzo Colitticdd79f12020-07-30 12:03:40 +0900250 EXPECT_EQ(0, mFw.setFirewallType(DENYLIST));
Lorenzo Colittid351bea2017-07-16 22:52:30 +0900251 expectIptablesRestoreCommands(disableCommands);
Lorenzo Colitticc1bb822017-07-16 21:08:54 +0900252
Lorenzo Colitticdd79f12020-07-30 12:03:40 +0900253 EXPECT_EQ(0, mFw.setFirewallType(DENYLIST));
Lorenzo Colittid351bea2017-07-16 22:52:30 +0900254 expectIptablesRestoreCommands(noCommands);
Lorenzo Colitticc1bb822017-07-16 21:08:54 +0900255
256 std::vector<std::string> disableEnableCommands;
257 disableEnableCommands.insert(
258 disableEnableCommands.end(), disableCommands.begin(), disableCommands.end());
259 disableEnableCommands.insert(
260 disableEnableCommands.end(), enableCommands.begin(), enableCommands.end());
261
Lorenzo Colitticdd79f12020-07-30 12:03:40 +0900262 EXPECT_EQ(0, mFw.setFirewallType(ALLOWLIST));
Lorenzo Colittid351bea2017-07-16 22:52:30 +0900263 expectIptablesRestoreCommands(disableEnableCommands);
Lorenzo Colitticc1bb822017-07-16 21:08:54 +0900264
Lorenzo Colitti6324b182017-07-17 21:48:14 +0900265 std::vector<std::string> ifaceCommands = {
Lorenzo Colitti1411d452017-07-17 22:12:15 +0900266 "*filter\n"
267 "-I fw_INPUT -i rmnet_data0 -j RETURN\n"
268 "-I fw_OUTPUT -o rmnet_data0 -j RETURN\n"
269 "COMMIT\n"
Lorenzo Colitti6324b182017-07-17 21:48:14 +0900270 };
271 EXPECT_EQ(0, mFw.setInterfaceRule("rmnet_data0", ALLOW));
Lorenzo Colitti1411d452017-07-17 22:12:15 +0900272 expectIptablesRestoreCommands(ifaceCommands);
273
274 EXPECT_EQ(0, mFw.setInterfaceRule("rmnet_data0", ALLOW));
275 expectIptablesRestoreCommands(noCommands);
Lorenzo Colitti6324b182017-07-17 21:48:14 +0900276
277 ifaceCommands = {
Lorenzo Colitti1411d452017-07-17 22:12:15 +0900278 "*filter\n"
279 "-D fw_INPUT -i rmnet_data0 -j RETURN\n"
280 "-D fw_OUTPUT -o rmnet_data0 -j RETURN\n"
281 "COMMIT\n"
Lorenzo Colitti6324b182017-07-17 21:48:14 +0900282 };
283 EXPECT_EQ(0, mFw.setInterfaceRule("rmnet_data0", DENY));
Lorenzo Colitti1411d452017-07-17 22:12:15 +0900284 expectIptablesRestoreCommands(ifaceCommands);
285
286 EXPECT_EQ(0, mFw.setInterfaceRule("rmnet_data0", DENY));
287 expectIptablesRestoreCommands(noCommands);
Lorenzo Colitti6324b182017-07-17 21:48:14 +0900288
Lorenzo Colitticdd79f12020-07-30 12:03:40 +0900289 EXPECT_EQ(0, mFw.setFirewallType(ALLOWLIST));
Lorenzo Colittid351bea2017-07-16 22:52:30 +0900290 expectIptablesRestoreCommands(noCommands);
Lorenzo Colitticc1bb822017-07-16 21:08:54 +0900291
Luke Huange64fa382018-07-24 16:38:22 +0800292 EXPECT_EQ(0, mFw.resetFirewall());
Lorenzo Colittid351bea2017-07-16 22:52:30 +0900293 expectIptablesRestoreCommands(disableCommands);
Lorenzo Colitticc1bb822017-07-16 21:08:54 +0900294
Lorenzo Colitticdd79f12020-07-30 12:03:40 +0900295 // TODO: calling resetFirewall and then setFirewallType(ALLOWLIST) does
Lorenzo Colitticc1bb822017-07-16 21:08:54 +0900296 // nothing. This seems like a clear bug.
Lorenzo Colitticdd79f12020-07-30 12:03:40 +0900297 EXPECT_EQ(0, mFw.setFirewallType(ALLOWLIST));
Lorenzo Colittid351bea2017-07-16 22:52:30 +0900298 expectIptablesRestoreCommands(noCommands);
Lorenzo Colitticc1bb822017-07-16 21:08:54 +0900299}
Hugo Benichi528d3d02018-06-20 13:35:58 +0900300
301TEST_F(FirewallControllerTest, TestDiscoverMaximumValidUid) {
302 struct {
303 const std::string description;
304 const std::string content;
305 const uint32_t expected;
306 } testCases[] = {
307 {
308 .description = "root namespace case",
309 .content = " 0 0 4294967295",
310 .expected = 4294967294,
311 },
312 {
313 .description = "container namespace case",
314 .content = " 0 655360 5000\n"
315 " 5000 600 50\n"
316 " 5050 660410 1994950\n",
317 .expected = 1999999,
318 },
319 {
320 .description = "garbage content case",
321 .content = "garbage",
322 .expected = 4294967294,
323 },
324 {
325 .description = "no content case",
326 .content = "",
327 .expected = 4294967294,
328 },
329 };
330
331 const std::string tempFile = "/data/local/tmp/fake_uid_mapping";
332
333 for (const auto& test : testCases) {
334 EXPECT_TRUE(WriteStringToFile(test.content, tempFile, false));
335 uint32_t got = FirewallController::discoverMaximumValidUid(tempFile);
336 EXPECT_EQ(0, remove(tempFile.c_str()));
337 if (got != test.expected) {
338 FAIL() << test.description << ":\n"
339 << test.content << "\ngot " << got << ", but expected " << test.expected;
340 }
341 }
342
343 // Also check when the file is not defined
344 EXPECT_NE(0, access(tempFile.c_str(), F_OK));
345 EXPECT_EQ(4294967294, FirewallController::discoverMaximumValidUid(tempFile));
346}
Luke Huange64fa382018-07-24 16:38:22 +0800347
348} // namespace net
Bernie Innocentia5161a02019-01-30 22:40:53 +0900349} // namespace android