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: check in accesses_apply() that rule has short labels

Check rule has short labels when only 'load' is available.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
libsmack: remove redundant strlen() call from accesses_apply()

Return value of snprintf() should give the same length as strlen()
would given that string fits into buffer.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
libsmack: remove redundant check for clear flag form accesses_apply()

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Merge remote-tracking branch 'jsakkine/issue60' into v1.0.x
Merge branch 'v1.0.x'