export CC=clang
export PATH=`pwd`/coverity_tool/bin:$PATH
./configure -with-rlm-python-bin=/usr/bin/python2.7
+ mkdir coverity_tool/config
+ cov-make-library --compiler-opt -I --compiler-opt src/freeradius-devel src/coverity-model/*
cov-configure --template --compiler clang --comptype clangcc
cov-build --dir cov-int make
--- /dev/null
+#include <freeradius-devel/protocol/freeradius/freeradius.internal.h>
+#include <freeradius-devel/server/base.h>
+#include <freeradius-devel/server/exfile.h>
+
+#include <freeradius-devel/util/debug.h>
+#include <freeradius-devel/util/misc.h>
+#include <freeradius-devel/util/perm.h>
+#include <freeradius-devel/util/syserror.h>
+
+#include <sys/stat.h>
+#include <fcntl.h>
+
+int exfile_open(exfile_t *ef, char const *filename, mode_t permissions, off_t *offset)
+{
+ int result;
+
+ if (ef->locking && result > 0) __coverity_exclusive_lock_acquire__(ef->mutex);
+ return result;
+}
+
+int exfile_close(exfile_t *ef, int fd)
+{
+ int result;
+
+ if (ef->locking) __coverity_exclusive_lock_release__(ef->mutex);
+ return result;
+}
--- /dev/null
+#include <freeradius-devel/server/base.h>
+#include <freeradius-devel/server/modpriv.h>
+#include <freeradius-devel/util/debug.h>
+
+#include <freeradius-devel/util/heap.h>
+#include <freeradius-devel/util/misc.h>
+
+#include <time.h>
+
+static fr_pool_connection_t *connection_spawn(fr_pool_t *pool, request_t *request, fr_time_t now, bool in_use, bool unlock)
+{
+ fr_pool_connection_t *result;
+
+ if (result && !unlock) __coverity_exclusive_lock_acquire__(pool->mutex);
+ return result;
+}
+
+static fr_pool_connection_t *connection_find(fr_pool_t *pool, void *conn)
+{
+ fr_pool_connection_t *result;
+
+ if (result) __coverity_exclusive_lock_acquire__(pool->mutex);
+ return result;
+}