summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2015-11-06 20:54:13 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-11-11 12:29:16 +0100
commit94a4a847bc4b0e2871fd1db258796cd09de07afb (patch)
tree14113dbdf8234bf71ca569a500532b25fc91e969 /configure.ac
parent976721275abd6202749dbf4e0f9494c678d9fbf9 (diff)
downloadsssd-94a4a847bc4b0e2871fd1db258796cd09de07afb.tar.gz
sssd-94a4a847bc4b0e2871fd1db258796cd09de07afb.tar.xz
sssd-94a4a847bc4b0e2871fd1db258796cd09de07afb.zip
sbus: Check string arguments for valid UTF-8 strings
libdbus abort()s when a string argument is not valid UTF-8. Since the arguments sometimes come from untrusted sources, it's better to check the string validity explicitly.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c45787979..63bf0b685 100644
--- a/configure.ac
+++ b/configure.ac
@@ -218,10 +218,19 @@ fi
if test x$has_dbus != xno; then
SAFE_LIBS="$LIBS"
LIBS="$DBUS_LIBS"
+ SAFE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $DBUS_CFLAGS"
+
AC_CHECK_FUNC([dbus_watch_get_unix_fd],
AC_DEFINE([HAVE_DBUS_WATCH_GET_UNIX_FD], [1],
[Define if dbus_watch_get_unix_fd exists]))
+ AC_CHECK_TYPES([DBusBasicValue],
+ [],
+ [],
+ [ #include <dbus/dbus.h> ])
+
LIBS="$SAFE_LIBS"
+ CFLAGS=$SAFE_CFLAGS
fi
# work around a bug in cov-build from Coverity