summaryrefslogtreecommitdiff
path: root/source3/wscript
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-02-22 11:57:23 +0100
committerGünther Deschner <gd@samba.org>2011-02-22 12:46:06 +0100
commit4fe3ecefa04d7ca1321109574014950503fca5b8 (patch)
tree6bf3778bbcbdb5aff333b34ac81378c5d85ff8bb /source3/wscript
parent33d676cd7e34ca5b9ed5ea0c99bcbda441b3b95f (diff)
downloadsamba-4fe3ecefa04d7ca1321109574014950503fca5b8.tar.gz
samba-4fe3ecefa04d7ca1321109574014950503fca5b8.tar.bz2
samba-4fe3ecefa04d7ca1321109574014950503fca5b8.zip
s3-waf: add check for realpath() NULL arg.
Guenther
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript21
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/wscript b/source3/wscript
index ddfad069df..de626406c9 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 <stdio.h>
+#include <limits.h>
+#include <signal.h>
+
+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