diff options
author | Ashlee Young <ashlee@wildernessvoice.com> | 2015-11-29 08:22:13 -0800 |
---|---|---|
committer | Ashlee Young <ashlee@wildernessvoice.com> | 2015-11-29 08:22:13 -0800 |
commit | df5afa4fcd9725380f94ca6476248d4cc24f889a (patch) | |
tree | 65456f62397305febf7f40778c5a413a35d094ef /framework/src/audit/bindings/swig | |
parent | 76f6bf922552c00546e6e85ca471eab28f56986c (diff) |
v2.4.4 audit sources
Change-Id: I9315a7408817db51edf084fb4d27fbb492785084
Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/audit/bindings/swig')
-rw-r--r-- | framework/src/audit/bindings/swig/Makefile.am | 33 | ||||
-rw-r--r-- | framework/src/audit/bindings/swig/python/Makefile.am | 40 | ||||
-rw-r--r-- | framework/src/audit/bindings/swig/python3/Makefile.am | 41 | ||||
-rw-r--r-- | framework/src/audit/bindings/swig/src/Makefile.am | 26 | ||||
-rw-r--r-- | framework/src/audit/bindings/swig/src/auditswig.i | 46 |
5 files changed, 186 insertions, 0 deletions
diff --git a/framework/src/audit/bindings/swig/Makefile.am b/framework/src/audit/bindings/swig/Makefile.am new file mode 100644 index 00000000..29355022 --- /dev/null +++ b/framework/src/audit/bindings/swig/Makefile.am @@ -0,0 +1,33 @@ +# Makefile.am -- +# Copyright 2015 Red Hat Inc., Durham, North Carolina. +# All Rights Reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Authors: +# Steve Grubb <sgrubb@redhat.com> +# + +CONFIG_CLEAN_FILES = *.loT *.rej *.orig +EXTRA_DIST = src/auditswig.i + +SUBDIRS = src +if HAVE_PYTHON +SUBDIRS += python +endif +if USE_PYTHON3 +SUBDIRS += python3 +endif + diff --git a/framework/src/audit/bindings/swig/python/Makefile.am b/framework/src/audit/bindings/swig/python/Makefile.am new file mode 100644 index 00000000..8c98b943 --- /dev/null +++ b/framework/src/audit/bindings/swig/python/Makefile.am @@ -0,0 +1,40 @@ +# Makefile.am -- +# Copyright 2005,2007,2015 Red Hat Inc., Durham, North Carolina. +# All Rights Reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Authors: +# Steve Grubb <sgrubb@redhat.com> +# +CONFIG_CLEAN_FILES = *.loT *.rej *.orig +AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing +AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib -I@PYINCLUDEDIR@ +SWIG_FLAGS = -python +SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I@PYINCLUDEDIR@ +pyexec_PYTHON = audit.py +pyexec_LTLIBRARIES = _audit.la +pyexec_SOLIBRARIES = _audit.so +_audit_la_CFLAGS = -shared +_audit_la_LDFLAGS = -module -avoid-version -Wl,-z,relro +_audit_la_HEADERS: $(top_builddir)/config.h +_audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la +_audit_la_LIBADD = $(top_builddir)/lib/libaudit.la +nodist__audit_la_SOURCES = audit_wrap.c +audit.py audit_wrap.c: ${srcdir}/../src/auditswig.i + swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/auditswig.i + +CLEANFILES = audit.py* audit_wrap.c *~ + diff --git a/framework/src/audit/bindings/swig/python3/Makefile.am b/framework/src/audit/bindings/swig/python3/Makefile.am new file mode 100644 index 00000000..036b5edb --- /dev/null +++ b/framework/src/audit/bindings/swig/python3/Makefile.am @@ -0,0 +1,41 @@ +# Makefile.am -- +# Copyright 2015 Red Hat Inc., Durham, North Carolina. +# All Rights Reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Authors: +# Steve Grubb <sgrubb@redhat.com> +# +CONFIG_CLEAN_FILES = *.loT *.rej *.orig +AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing $(PYTHON3_CFLAGS) +AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib $(PYTHON3_INCLUDES) +LIBS = $(top_builddir)/lib/libaudit.la +SWIG_FLAGS = -python -py3 -modern +SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib $(PYTHON3_INCLUDES) +py3exec_PYTHON = audit.py +py3exec_LTLIBRARIES = _audit.la +py3exec_SOLIBRARIES = _audit.so +_audit_la_CFLAGS = -shared +_audit_la_LDFLAGS = -module -avoid-version -Wl,-z,relro +_audit_la_HEADERS: $(top_builddir)/config.h +_audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la +_audit_la_LIBADD = ${top_builddir}/lib/libaudit.la +nodist__audit_la_SOURCES = audit_wrap.c +audit.py audit_wrap.c: ${srcdir}/../src/auditswig.i + swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/auditswig.i + +CLEANFILES = audit.py* audit_wrap.c *~ + diff --git a/framework/src/audit/bindings/swig/src/Makefile.am b/framework/src/audit/bindings/swig/src/Makefile.am new file mode 100644 index 00000000..590052aa --- /dev/null +++ b/framework/src/audit/bindings/swig/src/Makefile.am @@ -0,0 +1,26 @@ +# Makefile.am -- +# Copyright 2015 Red Hat Inc., Durham, North Carolina. +# All Rights Reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Authors: +# Steve Grubb <sgrubb@redhat.com> +# + +EXTRA_DIST = auditswig.i +SWIG_SOUIRCES = auditswig.i +CONFIG_CLEAN_FILES = *.loT *.rej *.orig + diff --git a/framework/src/audit/bindings/swig/src/auditswig.i b/framework/src/audit/bindings/swig/src/auditswig.i new file mode 100644 index 00000000..9364ac4b --- /dev/null +++ b/framework/src/audit/bindings/swig/src/auditswig.i @@ -0,0 +1,46 @@ +/* Author: Dan Walsh + * + * Copyright (C) 2005,2006,2009 Red Hat + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +%module audit +%{ + #include "../lib/libaudit.h" +%} + +#if defined(SWIGPYTHON) +%except(python) { + $action + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } +} +#endif + +%define __signed__ +signed +%enddef +#define __attribute(X) /*nothing*/ +typedef unsigned __u32; +typedef unsigned uid_t; +%include "/usr/include/linux/audit.h" +#define __extension__ /*nothing*/ +%include "/usr/include/stdint.h" +%include "../lib/libaudit.h" + |