Avoid memory allocation while opening smackfs files.
authorRafal Krypa <r.krypa@samsung.com>
Tue, 3 Dec 2013 14:58:57 +0000 (15:58 +0100)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Wed, 18 Dec 2013 19:29:38 +0000 (21:29 +0200)
commite8fa17ac2b11b8ce2c6021fa610fafc5e5fcc503
treee16ad0379ce692fe6f7b52bf5c630e56e5ebd771
parentcd2ce1119d31ce04da6fe06f46ddc9436efdb66f
Avoid memory allocation while opening smackfs files.

Using openat() on pre-opened smackfs directory eliminates need to
construct absolute path to a smackfs file before opening it.

Other than it improves availability because file descriptor is kept
open to the mount point throughout the life-cycle of the process.
And it also improves security because as long as the file descriptor
is valid, files really come from SmackFS.

[jsakkine: updated commit message]

Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
libsmack/init.c
libsmack/libsmack.c