OSDN Git Service

Loosen fchmodat AT_SYMLINK_NOFOLLOW test on symlink.
authorYabin Cui <yabinc@google.com>
Mon, 9 Mar 2015 20:55:18 +0000 (13:55 -0700)
committerYabin Cui <yabinc@google.com>
Tue, 10 Mar 2015 01:13:15 +0000 (18:13 -0700)
commitc6e5874a4c19f398eb179a23de9b1d2c06bccea0
tree28ef6705ccf67c524b52eaa8e7dc7fc0f31637a7
parente86a86f9f24df7028d2596c69ff008cf88e039e4
Loosen fchmodat AT_SYMLINK_NOFOLLOW test on symlink.

It has been reported in b2/19657449 and b2/19381040 that fchmodat
AT_SYMLINK_NOFOLLOW operation on symlink can succeed. It seems to be
controlled by kernel(version or configuration) or user configuration
whether chmod is allowed on symlinks. Unless we can disable chmod on
symlinks in bionic explicitly, we can not guarantee that the test can
pass. But it seems reasonable to allow chmod on symlink if kernel allows
to. So We prefer to loosen the test here, accepting both success and
failure when doing chmod operation on symlinks.

Bug: 19657449
Bug: 19381040
Change-Id: I780e84f0b50d0412fbac9f1c240d07e984892a28
tests/sys_stat_test.cpp