summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-11 23:19:08 +0000
committerJeremy Allison <jra@samba.org>2001-04-11 23:19:08 +0000
commit6578fd874283ee97c2896bcf7257db7f3e37c2ec (patch)
treea5e9ee2ed36b4b0ba1521edbe961f3e2f9026f13 /source3/configure.in
parent0ca9f5c023df2ee498dcd1bdb2f29abc632a5d60 (diff)
downloadsamba-6578fd874283ee97c2896bcf7257db7f3e37c2ec.tar.gz
samba-6578fd874283ee97c2896bcf7257db7f3e37c2ec.tar.bz2
samba-6578fd874283ee97c2896bcf7257db7f3e37c2ec.zip
To stop people complaining about the mktemp call, move it into lib/util.c. Thanks
to Andrew for all this code. Fixed extra line in lib/sysacls.c that broke XFS ACL code. Jeremy. (This used to be commit 9b32b8a8cfc8ddb93c14d5581f433d2e93f89ed2)
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in22
1 files changed, 22 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 3d32346821..eb4fe821cd 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1080,6 +1080,28 @@ if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
AC_DEFINE(REPLACE_INET_NTOA)
fi
+AC_CACHE_CHECK([for secure mkstemp],samba_cv_HAVE_SECURE_MKSTEMP,[
+AC_TRY_RUN([#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+main() {
+ struct stat st;
+ char tpl[20]="/tmp/test.XXXXXX";
+ int fd = mkstemp(tpl);
+ if (fd == -1) exit(1);
+ unlink(tpl);
+ if (fstat(fd, &st) != 0) exit(1);
+ if ((st.st_mode & 0777) != 0600) exit(1);
+ exit(0);
+}],
+samba_cv_HAVE_SECURE_MKSTEMP=yes,
+samba_cv_HAVE_SECURE_MKSTEMP=no,
+samba_cv_HAVE_SECURE_MKSTEMP=cross)])
+if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
+ AC_DEFINE(HAVE_SECURE_MKSTEMP)
+fi
+
AC_CACHE_CHECK([for sysconf(_SC_NGROUPS_MAX)],samba_cv_SYSCONF_SC_NGROUPS_MAX,[
AC_TRY_RUN([#include <unistd.h>
main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }],