Date: Fri, 5 Aug 2016 19:13:39 +0200 From: Mateusz Piotrowski <0mp@FreeBSD.org> To: freebsd-hackers@freebsd.org Cc: Konrad Witaszczyk <def@freebsd.org> Subject: Accessing libbsm functions (conditionally compiled with #if defined(_KERNEL) || defined(KERNEL)) Message-ID: <C2287469-042C-4665-80F2-AD0880428C68@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
Hello, I am participating in Google Summer of Code and I work on converting = auditing logs from the Linux Audit format to the BSM format (more = details are available on wiki[1] and GitHub[2][3]). I use libbsm to generate tokens. After including <bsm/libbsm.h> I am = able to most of the functions listed=20 in au_token(3) (note that this manual is a little bit outdated), however = I am unable to call au_to_attr() and to define=20 a struct vnode_au_info variable which is the parameter of au_to_attr(). I read the source code and I found out that au_to_attr() is prototyped = in sys/bsm/audit_record.h like this: #if defined(_KERNEL) || defined(KERNEL) token_t *au_to_attr(struct vnode_au_info *vni); token_t *au_to_attr32(struct vnode_au_info *vni); token_t *au_to_attr64(struct vnode_au_info *vni); #endif The prototype of struct vnode_au_info is wrapped in = if-defined-kernel-macros as well in the same file. What should I do to be able to use those functions?=20 Why are those functions available only when the library was compiled = with KERNEL defined? Thanks for any help/hints. -Mateusz [1]: = https://wiki.freebsd.org/SummerOfCode2016/NonBSMtoBSMConversionTools [2]: https://github.com/0mp/freebsd [3]: https://github.com/0mp/freebsd/wiki=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C2287469-042C-4665-80F2-AD0880428C68>