diff options
author | Christian Heimes <cheimes@redhat.com> | 2017-02-24 08:20:15 +0100 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2017-03-01 10:38:01 +0100 |
commit | 2828a2b92b89932d66b640e5047161448d522e2e (patch) | |
tree | 4d7f655d8024870d75793159a8cd8b7a8cde4120 | |
parent | 5ab85b365ae886558b1f077b0d039a0d24bebfa7 (diff) | |
download | freeipa-2828a2b92b89932d66b640e5047161448d522e2e.tar.gz freeipa-2828a2b92b89932d66b640e5047161448d522e2e.tar.xz freeipa-2828a2b92b89932d66b640e5047161448d522e2e.zip |
C compilation fixes and hardening
Fix "implicit declaration of function ‘strlen’" in ipa_pwd_ntlm.c,
credits to Lukas.
Add -Werror=implicit-function-declaration to CFLAGS to point developers
to missing includes. It causes compilation to fail when a developer
forgets to add a required include. The problem is no longer hidden in a
massive wall of text from make.
Silence a harmless error from 389-DS slapi.h until the bug is fixed in
downstream, https://pagure.io/389-ds-base/issue/48979
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | util/ipa_pwd_ntlm.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 9ee281a16..af41f5e3a 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,9 @@ LT_INIT AC_HEADER_STDC +dnl fail hard when includes statements are missing +CFLAGS+=" -Werror=implicit-function-declaration" + PKG_PROG_PKG_CONFIG AC_ARG_ENABLE([server], diff --git a/util/ipa_pwd_ntlm.c b/util/ipa_pwd_ntlm.c index f7099811e..263816dc5 100644 --- a/util/ipa_pwd_ntlm.c +++ b/util/ipa_pwd_ntlm.c @@ -26,6 +26,7 @@ #include <stdlib.h> #include <stdbool.h> +#include <string.h> #include <iconv.h> #include <openssl/md4.h> |