id: adjust/restrict smack support to newer versions of libsmack 16/8316/1
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Thu, 20 Jun 2013 18:21:37 +0000 (21:21 +0300)
committerMichael Demeter <michael.demeter@intel.com>
Mon, 12 Aug 2013 22:50:25 +0000 (15:50 -0700)
commitd3eb2262c619ea3121cbb5dd22d19b145de55899
tree17d80c9da43cff6ae15ddcc5cf0a3660a56ab0dc
parent9ec2f172808b6fe936a4e99675ebdaeb1a372a67
id: adjust/restrict smack support to newer versions of libsmack

There was slight change to libsmack such that positive values are
reserved for returning length of the label for smack_new_label_from_*
functions.

* m4/jm-macros.m4: Set HAVE_SMACK when both smack_new_label_from_self()
and recently added smack_new_label_from_path() are present.
The latter's presence indicates the newer API of the former.
* src/id.c (main): Check that smack_new_label_from_self() < 0,
and not just non-zero.
m4/jm-macros.m4
src/id.c