utils/chsmack: added missing include libgen.h

libgen.h must be included for basename()

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Merge branch 'v1.0.x'
utils/smackaccess: added missing include libgen.h

libgen.h must be included for basename()

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Merge branch 'v1.0.x'
libsmack: fix smack_new_label_from_path() (regression in e6890752)

Function smack_new_label_from_path failed to null-terminate xattr value
before passing it to get_label.

Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
utils: add options for version and usage information

Added option -v/--version for displaying version information
and -h/--help for displaying usage information.

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

Conflicts:
	utils/smackctl.c
libsmack: Terminate attribute string

The smack_new_label_from_path function reads an xattr
that may not be null byte terminated. This occurs in the
SMACK64TRANSMUTE case. Technically, the transmute attribute
isn't a label, so this function shouldn't be used to fetch
the value, but we'll let that go. This is just good string
hygiene in any case.

This is an issue because chsmack prints transmute="TRUE0"
without this fix.

Signed-off-by: Casey Schaufler <casey.schaufler@intel.com>
libsmack: fix memory leak

Signed-off-by: Zbigniew Jasinski <z.jasinski@samsung.com>
Revert "libsmack: Terminate attribute string"

This reverts commit cbdd52af82bce9d2ab79e43e0757c4d077d08907.
Merge remote-tracking branch 'penszo/v1.0.x' into v1.0.x
Merge branch 'v1.0.x'
libsmack: New functions handling file's attributes

The new functions are:
 - smack_new_label_from_file
 - smack_set_label_for_file
 - smack_remove_label_for_file

This functions allow to operate on opened
files using their linux file descritor for
reading, writing or destroying the named
file attribute given.

Change-Id: I454e96ca2eeb21e08a40c39c830e5b903875580b
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
libsmack: New compatibility wrapper to 1.0.4

Adding a compatibility wrapper that declares the
legacy functions as 'deprecated' is improving
the slight transition to v1.1

Change-Id: I592e2881e33b2bb8be3f13d4072f66b5ed21eed0
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
smackctl: Adding reliable usage

Adding help text providing usage information for smackctl utility.
Minor improvement of the manual page for smackctl.

Change-Id: I31f8fd4a4c866284255e4865bf7bb9512e3c793f
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>