* ulogd: build fixes
@ 2012-06-05 8:41 Jan Engelhardt
2012-06-05 8:41 ` [PATCH 1/3] sqlite: resolve compiler warnings Jan Engelhardt
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Jan Engelhardt @ 2012-06-05 8:41 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
The following changes since commit 5dc52c43c4d9e0e8a6813cdcd8e1d12a9f1e3fe8:
build: use pkglibdir instead of pkglibexecdir for automake (2012-05-18 02:50:11 +0200)
are available in the git repository at:
git://git.inai.de/ulogd master
Jan Engelhardt (3):
sqlite: resolve compiler warnings
nfacct: resolve build failure
pcap: resolve unreliable detection
configure.ac | 7 +++----
input/sum/Makefile.am | 6 +++---
output/pcap/Makefile.am | 4 ++--
output/sqlite3/ulogd_output_SQLITE3.c | 2 +-
4 files changed, 9 insertions(+), 10 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] sqlite: resolve compiler warnings
2012-06-05 8:41 ulogd: build fixes Jan Engelhardt
@ 2012-06-05 8:41 ` Jan Engelhardt
2012-06-05 8:41 ` [PATCH 2/3] nfacct: resolve build failure Jan Engelhardt
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jan Engelhardt @ 2012-06-05 8:41 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
In file included from /usr/include/string.h:642:0,
from ulogd_output_SQLITE3.c:34:
In function 'strncat',
inlined from 'db_count_cols' at ulogd_output_SQLITE3.c:306:9,
inlined from 'sqlite3_init_db' at ulogd_output_SQLITE3.c:328:11:
/usr/include/bits/string3.h:152:3: warning: call to __builtin___strncat_chk might overflow destination buffer [enabled by default]
I: Statement might be overflowing a buffer in strncat. Common mistake:
BAD: strncat(buffer,charptr,sizeof(buffer)) is wrong, it takes the left over size as 3rd argument
GOOD: strncat(buffer,charptr,sizeof(buffer)-strlen(buffer)-1)
E: ulogd2 bufferoverflowstrncat ulogd_output_SQLITE3.c:328:11
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
output/sqlite3/ulogd_output_SQLITE3.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/output/sqlite3/ulogd_output_SQLITE3.c b/output/sqlite3/ulogd_output_SQLITE3.c
index 3cd2106..dffdda3 100644
--- a/output/sqlite3/ulogd_output_SQLITE3.c
+++ b/output/sqlite3/ulogd_output_SQLITE3.c
@@ -303,7 +303,7 @@ db_count_cols(struct ulogd_pluginstance *pi, sqlite3_stmt **stmt)
struct sqlite3_priv *priv = (void *)pi->private;
char query[SELECT_ALL_LEN + CONFIG_VAL_STRING_LEN] = SELECT_ALL_STR;
- strncat(query, table_ce(pi), LINE_LEN);
+ strncat(query, table_ce(pi), sizeof(query) - strlen(query) - 1);
if (sqlite3_prepare(priv->dbh, query, -1, stmt, 0) != SQLITE_OK)
return -1;
--
1.7.7
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] nfacct: resolve build failure
2012-06-05 8:41 ulogd: build fixes Jan Engelhardt
2012-06-05 8:41 ` [PATCH 1/3] sqlite: resolve compiler warnings Jan Engelhardt
@ 2012-06-05 8:41 ` Jan Engelhardt
2012-06-05 8:41 ` [PATCH 3/3] pcap: resolve unreliable detection Jan Engelhardt
2012-06-05 17:01 ` ulogd: build fixes Pablo Neira Ayuso
3 siblings, 0 replies; 5+ messages in thread
From: Jan Engelhardt @ 2012-06-05 8:41 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
CC ulogd_inpflow_NFACCT_la-ulogd_inpflow_NFACCT.lo
ulogd_inpflow_NFACCT.c:24:27: fatal error: libmnl/libmnl.h:
No such file or directory
compilation terminated.
LIBS is not interchangeable with C(PP)FLAGS.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
input/sum/Makefile.am | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/input/sum/Makefile.am b/input/sum/Makefile.am
index f129193..33fa849 100644
--- a/input/sum/Makefile.am
+++ b/input/sum/Makefile.am
@@ -1,8 +1,8 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include $(LIBNETFILTER_ACCT_CFLAGS) $(LIBMNL_CFLAGS)
AM_CFLAGS = ${regular_CFLAGS}
pkglib_LTLIBRARIES = ulogd_inpflow_NFACCT.la
ulogd_inpflow_NFACCT_la_SOURCES = ulogd_inpflow_NFACCT.c
-ulogd_inpflow_NFACCT_la_LDFLAGS = -avoid-version -module $(LIBMNL_LIBS) $(LIBNETFILTER_ACCT_LIBS)
-ulogd_inpflow_NFACCT_la_CFLAGS = $(AM_CFLAGS) $(LIBMNL_LIBS) $(LIBNETFILTER_ACCT_CFLAGS)
+ulogd_inpflow_NFACCT_la_LDFLAGS = -avoid-version -module
+ulogd_inpflow_NFACCT_la_LIBADD = $(LIBMNL_LIBS) $(LIBNETFILTER_ACCT_LIBS)
--
1.7.7
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] pcap: resolve unreliable detection
2012-06-05 8:41 ulogd: build fixes Jan Engelhardt
2012-06-05 8:41 ` [PATCH 1/3] sqlite: resolve compiler warnings Jan Engelhardt
2012-06-05 8:41 ` [PATCH 2/3] nfacct: resolve build failure Jan Engelhardt
@ 2012-06-05 8:41 ` Jan Engelhardt
2012-06-05 17:01 ` ulogd: build fixes Pablo Neira Ayuso
3 siblings, 0 replies; 5+ messages in thread
From: Jan Engelhardt @ 2012-06-05 8:41 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
pcap is not found reliably by either --with-pcap=%_prefix or
--with-pcap-lib=%_libdir --with-pcap-inc=%_includedir.
If you have any special paths, just use
./configure CPPFLAGS="-I/my/pcap" LDFLAGS="-L/my/pcap"
(And -lpcap is already known so no need to specify that.)
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
configure.ac | 7 +++----
output/pcap/Makefile.am | 4 ++--
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 89fc338..8f1e15b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,9 @@ AC_PROG_LIBTOOL
dnl Checks for libraries.
AC_SEARCH_LIBS([dlopen], [dl], [libdl_LIBS="$LIBS"; LIBS=""])
AC_SUBST([libdl_LIBS])
-AC_CHECK_HEADER(pcap.h,HAVE_PCAP_H=true)
+AC_SEARCH_LIBS([pcap_close], [pcap], [libpcap_LIBS="-lpcap"; LIBS=""])
+AC_SUBST([libpcap_LIBS])
+AM_CONDITIONAL([HAVE_PCAP], test -n "$libpcap_LIBS"])
dnl Checks for header files.
AC_HEADER_DIRENT
@@ -58,8 +60,6 @@ AM_CONDITIONAL([HAVE_SQLITE3], [test -n "$libsqlite3_LIBS"])
CT_CHECK_DBI()
AM_CONDITIONAL(HAVE_DBI, test "x$DBI_LIB" != "x")
-CT_CHECK_PCAP()
-AM_CONDITIONAL(HAVE_PCAP, test "x$HAVE_PCAP_LIB" != "x")
dnl AC_SUBST(DATABASE_DIR)
@@ -70,7 +70,6 @@ dnl AC_SUBST(EXTRA_MYSQL_DEF)
dnl AC_SUBST(EXTRA_PGSQL_DEF)
dnl AC_SUBST(DATABASE_DRIVERS)
-dnl AC_SUBST(HAVE_PCAP_H)
dnl AM_CONDITIONAL(HAVE_MYSQL, test x$mysqldir != x)
dnl AM_CONDITIONAL(HAVE_PGSQL, test x$pgsqldir != x)
diff --git a/output/pcap/Makefile.am b/output/pcap/Makefile.am
index 47580d2..c1723a6 100644
--- a/output/pcap/Makefile.am
+++ b/output/pcap/Makefile.am
@@ -1,5 +1,5 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include $(PCAP_INC)
+AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CFLAGS = ${regular_CFLAGS}
if HAVE_PCAP
@@ -7,7 +7,7 @@ if HAVE_PCAP
pkglib_LTLIBRARIES = ulogd_output_PCAP.la
ulogd_output_PCAP_la_SOURCES = ulogd_output_PCAP.c
-ulogd_output_PCAP_la_LIBADD = ${PCAP_LIB}
+ulogd_output_PCAP_la_LIBADD = ${libpcap_LIBS}
ulogd_output_PCAP_la_LDFLAGS = -avoid-version -module
endif
--
1.7.7
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: ulogd: build fixes
2012-06-05 8:41 ulogd: build fixes Jan Engelhardt
` (2 preceding siblings ...)
2012-06-05 8:41 ` [PATCH 3/3] pcap: resolve unreliable detection Jan Engelhardt
@ 2012-06-05 17:01 ` Pablo Neira Ayuso
3 siblings, 0 replies; 5+ messages in thread
From: Pablo Neira Ayuso @ 2012-06-05 17:01 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
On Tue, Jun 05, 2012 at 10:41:00AM +0200, Jan Engelhardt wrote:
>
> The following changes since commit 5dc52c43c4d9e0e8a6813cdcd8e1d12a9f1e3fe8:
>
> build: use pkglibdir instead of pkglibexecdir for automake (2012-05-18 02:50:11 +0200)
>
> are available in the git repository at:
> git://git.inai.de/ulogd master
>
> Jan Engelhardt (3):
> sqlite: resolve compiler warnings
> nfacct: resolve build failure
> pcap: resolve unreliable detection
This is pretty convenient. Thanks a lot Jan.
Let's see if I find the time to release ulogd 2.0 by end of this week.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-05 17:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-05 8:41 ulogd: build fixes Jan Engelhardt
2012-06-05 8:41 ` [PATCH 1/3] sqlite: resolve compiler warnings Jan Engelhardt
2012-06-05 8:41 ` [PATCH 2/3] nfacct: resolve build failure Jan Engelhardt
2012-06-05 8:41 ` [PATCH 3/3] pcap: resolve unreliable detection Jan Engelhardt
2012-06-05 17:01 ` ulogd: build fixes Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).