From 4fe3ecefa04d7ca1321109574014950503fca5b8 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 22 Feb 2011 11:57:23 +0100 Subject: s3-waf: add check for realpath() NULL arg. Guenther --- source3/wscript | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'source3') diff --git a/source3/wscript b/source3/wscript index ddfad069df8..de626406c97 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1268,6 +1268,27 @@ main() { dev_t dev = makedev(1,2); return 0; } addmain=False, msg='Checking whether the macro for makedev is available') + conf.CHECK_CODE(''' +#include +#include +#include + +void exit_on_core(int ignored) { + exit(1); +} + +main() { + char *newpath; + signal(SIGSEGV, exit_on_core); + newpath = realpath("/tmp", NULL); + exit((newpath != NULL) ? 0 : 1); +} +''', + 'REALPATH_TAKES_NULL', + addmain=False, + execute=True, + msg='Checking whether the realpath function allows a NULL argument') + default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin vfs_default -- cgit