Add security_hardlinkRestriction test

This adds tests for the hardlink restrictions introduced by the Yama LSM
in the kernel.

BUG=chromium-os:22137
TEST=passes on x86-alex when Yama is enabled (using patch series from
 https://gerrit.chromium.org/gerrit/12409)

Signed-off-by: Kees Cook <keescook@chromium.org>

Change-Id: I66f1636bd25b375fdea3ffecb65436f1a02034ca
Reviewed-on: https://gerrit.chromium.org/gerrit/12801
Tested-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Jim Hebert <jimhebert@chromium.org>
Commit-Ready: Kees Cook <keescook@chromium.org>
2 files changed