libsmack: early fail in accesses_apply() if modify rules are not supported
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Sun, 1 Dec 2013 14:43:14 +0000 (16:43 +0200)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Sun, 1 Dec 2013 15:31:44 +0000 (17:31 +0200)
commit0b952fcf6befd24a3f3a0a6c54d0eb9bba6120cd
treefd0d9cc06e7d40455a14d278d451b8d354ae479c
parentc789367d4c3e5ce297644603a8fb1c30f54cabde
libsmack: early fail in accesses_apply() if modify rules are not supported

In accesses_apply(), in the beginning of each iteration, check
that change_fd is a valid file descriptor if the current rule
is a modify rule. Return with -1 immediately if that is not the
case.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
libsmack/libsmack.c