Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 050f3d7e authored by Boleyn Su's avatar Boleyn Su Committed by Automerger Merge Worker
Browse files

ReadFileSymbolicLink checks /system/bin/ps am: 9285b496

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12066063

Change-Id: I859102b257204ec9f426c1466ec63b289acdb559
parents 2cc0dbe7 9285b496
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -61,8 +61,9 @@ TEST(util, ReadFileWorldWiteable) {

TEST(util, ReadFileSymbolicLink) {
    errno = 0;
    // lrw------- 1 root root 23 2008-12-31 19:00 default.prop -> system/etc/prop.default
    auto file_contents = ReadFile("/default.prop");
    // lrwxrwxrwx 1 root shell 6 2020-06-26 09:55 /system/bin/ps -> toybox
    auto file_contents = ReadFile("/system/bin/ps");

    EXPECT_EQ(ELOOP, errno);
    ASSERT_FALSE(file_contents.ok());
    EXPECT_EQ("open() failed: Too many symbolic links encountered",