summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-06-15 09:35:37 +0000
committerAndrew Tridgell <tridge@samba.org>2000-06-15 09:35:37 +0000
commitf94f053b7618157f6caaa1d65553c1abb3aba917 (patch)
treecd2d3ffa7fc95942bc5ad906dabc3f38a4fa5b92 /source3
parentb41b1daa36c9ff48616fe23c99da1a00bf11ff84 (diff)
downloadsamba-f94f053b7618157f6caaa1d65553c1abb3aba917.tar.gz
samba-f94f053b7618157f6caaa1d65553c1abb3aba917.tar.bz2
samba-f94f053b7618157f6caaa1d65553c1abb3aba917.zip
added support for kernel level share modes. These are a (small) hack,
I suspect we will either get rid of them or do them properly at some stage. (This used to be commit fabe1f350e1fc58db33d22cebd38652950697ced)
Diffstat (limited to 'source3')
-rw-r--r--source3/acconfig.h1
-rwxr-xr-xsource3/configure310
-rw-r--r--source3/configure.in19
-rw-r--r--source3/include/config.h.in1
-rw-r--r--source3/include/includes.h9
-rw-r--r--source3/smbd/open.c25
6 files changed, 233 insertions, 132 deletions
diff --git a/source3/acconfig.h b/source3/acconfig.h
index 924785e27e..2919dccf11 100644
--- a/source3/acconfig.h
+++ b/source3/acconfig.h
@@ -79,6 +79,7 @@
#undef SIZEOF_OFF_T
#undef STAT_STATVFS64
#undef HAVE_LIBREADLINE
+#undef HAVE_KERNEL_SHARE_MODES
#undef HAVE_KERNEL_OPLOCKS_IRIX
#undef HAVE_KERNEL_OPLOCKS_LINUX
#undef HAVE_KERNEL_CHANGE_NOTIFY
diff --git a/source3/configure b/source3/configure
index a21a4bbab4..3d3b28e396 100755
--- a/source3/configure
+++ b/source3/configure
@@ -8613,17 +8613,65 @@ EOF
fi
+echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
+echo "configure:8618: checking for kernel share modes" >&5
+if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+if test "$cross_compiling" = yes; then
+ samba_cv_HAVE_KERNEL_SHARE_MODES=cross
+else
+ cat > conftest.$ac_ext <<EOF
+#line 8627 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/file.h>
+#ifndef LOCK_MAND
+#define LOCK_MAND 32
+#define LOCK_READ 64
+#endif
+main() {
+ exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
+}
+
+EOF
+if { (eval echo configure:8643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ samba_cv_HAVE_KERNEL_SHARE_MODES=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ samba_cv_HAVE_KERNEL_SHARE_MODES=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
+if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_KERNEL_SHARE_MODES 1
+EOF
+
+fi
+
echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
-echo "configure:8621: checking for IRIX kernel oplock type definitions" >&5
+echo "configure:8669: checking for IRIX kernel oplock type definitions" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8627 "configure"
+#line 8675 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <fcntl.h>
@@ -8631,7 +8679,7 @@ int main() {
oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
; return 0; }
EOF
-if { (eval echo configure:8635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
else
@@ -8652,7 +8700,7 @@ EOF
fi
echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
-echo "configure:8656: checking for irix specific capabilities" >&5
+echo "configure:8704: checking for irix specific capabilities" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8661,7 +8709,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
else
cat > conftest.$ac_ext <<EOF
-#line 8665 "configure"
+#line 8713 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/capability.h>
@@ -8676,7 +8724,7 @@ main() {
}
EOF
-if { (eval echo configure:8680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
else
@@ -8704,13 +8752,13 @@ fi
#
echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:8708: checking for int16 typedef included by rpc/rpc.h" >&5
+echo "configure:8756: checking for int16 typedef included by rpc/rpc.h" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8714 "configure"
+#line 8762 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
@@ -8720,7 +8768,7 @@ int main() {
int16 testvar;
; return 0; }
EOF
-if { (eval echo configure:8724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
else
@@ -8741,13 +8789,13 @@ EOF
fi
echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:8745: checking for uint16 typedef included by rpc/rpc.h" >&5
+echo "configure:8793: checking for uint16 typedef included by rpc/rpc.h" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8751 "configure"
+#line 8799 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
@@ -8757,7 +8805,7 @@ int main() {
uint16 testvar;
; return 0; }
EOF
-if { (eval echo configure:8761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
else
@@ -8778,13 +8826,13 @@ EOF
fi
echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:8782: checking for int32 typedef included by rpc/rpc.h" >&5
+echo "configure:8830: checking for int32 typedef included by rpc/rpc.h" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8788 "configure"
+#line 8836 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
@@ -8794,7 +8842,7 @@ int main() {
int32 testvar;
; return 0; }
EOF
-if { (eval echo configure:8798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
else
@@ -8815,13 +8863,13 @@ EOF
fi
echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:8819: checking for uint32 typedef included by rpc/rpc.h" >&5
+echo "configure:8867: checking for uint32 typedef included by rpc/rpc.h" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8825 "configure"
+#line 8873 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
@@ -8831,7 +8879,7 @@ int main() {
uint32 testvar;
; return 0; }
EOF
-if { (eval echo configure:8835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
else
@@ -8853,13 +8901,13 @@ fi
echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:8857: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
+echo "configure:8905: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8863 "configure"
+#line 8911 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_SECURITY_H
@@ -8873,7 +8921,7 @@ int main() {
int testvar;
; return 0; }
EOF
-if { (eval echo configure:8877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
else
@@ -8894,16 +8942,16 @@ EOF
fi
echo $ac_n "checking for test routines""... $ac_c" 1>&6
-echo "configure:8898: checking for test routines" >&5
+echo "configure:8946: checking for test routines" >&5
if test "$cross_compiling" = yes; then
echo "configure: warning: cannot run when cross-compiling" 1>&2
else
cat > conftest.$ac_ext <<EOF
-#line 8903 "configure"
+#line 8951 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/trivial.c"
EOF
-if { (eval echo configure:8907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""yes" 1>&6
else
@@ -8917,7 +8965,7 @@ fi
echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
-echo "configure:8921: checking for ftruncate extend" >&5
+echo "configure:8969: checking for ftruncate extend" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8926,11 +8974,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_FTRUNCATE_EXTEND=cross
else
cat > conftest.$ac_ext <<EOF
-#line 8930 "configure"
+#line 8978 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/ftruncate.c"
EOF
-if { (eval echo configure:8934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_FTRUNCATE_EXTEND=yes
else
@@ -8953,7 +9001,7 @@ EOF
fi
echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
-echo "configure:8957: checking for broken getgroups" >&5
+echo "configure:9005: checking for broken getgroups" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8962,11 +9010,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_BROKEN_GETGROUPS=cross
else
cat > conftest.$ac_ext <<EOF
-#line 8966 "configure"
+#line 9014 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/getgroups.c"
EOF
-if { (eval echo configure:8970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_BROKEN_GETGROUPS=yes
else
@@ -8989,7 +9037,7 @@ EOF
fi
echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
-echo "configure:8993: checking whether getpass should be replaced" >&5
+echo "configure:9041: checking whether getpass should be replaced" >&5
if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8997,7 +9045,7 @@ else
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
cat > conftest.$ac_ext <<EOF
-#line 9001 "configure"
+#line 9049 "configure"
#include "confdefs.h"
#define REPLACE_GETPASS 1
@@ -9010,7 +9058,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:9014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_REPLACE_GETPASS=yes
else
@@ -9033,7 +9081,7 @@ EOF
fi
echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
-echo "configure:9037: checking for broken inet_ntoa" >&5
+echo "configure:9085: checking for broken inet_ntoa" >&5
if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9042,7 +9090,7 @@ if test "$cross_compiling" = yes; then
samba_cv_REPLACE_INET_NTOA=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9046 "configure"
+#line 9094 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -9056,7 +9104,7 @@ if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); }
exit(1);}
EOF
-if { (eval echo configure:9060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_REPLACE_INET_NTOA=yes
else
@@ -9079,7 +9127,7 @@ EOF
fi
echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
-echo "configure:9083: checking for sysconf(_SC_NGROUPS_MAX)" >&5
+echo "configure:9131: checking for sysconf(_SC_NGROUPS_MAX)" >&5
if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9088,12 +9136,12 @@ if test "$cross_compiling" = yes; then
samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9092 "configure"
+#line 9140 "configure"
#include "confdefs.h"
#include <unistd.h>
main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
EOF
-if { (eval echo configure:9097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
else
@@ -9116,7 +9164,7 @@ EOF
fi
echo $ac_n "checking for root""... $ac_c" 1>&6
-echo "configure:9120: checking for root" >&5
+echo "configure:9168: checking for root" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9125,11 +9173,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_ROOT=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9129 "configure"
+#line 9177 "configure"
#include "confdefs.h"
main() { exit(getuid() != 0); }
EOF
-if { (eval echo configure:9133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_ROOT=yes
else
@@ -9157,7 +9205,7 @@ fi
# look for a method of finding the list of network interfaces
iface=no;
echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
-echo "configure:9161: checking for iface AIX" >&5
+echo "configure:9209: checking for iface AIX" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9166,7 +9214,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_IFACE_AIX=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9170 "configure"
+#line 9218 "configure"
#include "confdefs.h"
#define HAVE_IFACE_AIX 1
@@ -9174,7 +9222,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
EOF
-if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_IFACE_AIX=yes
else
@@ -9198,7 +9246,7 @@ fi
if test $iface = no; then
echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
-echo "configure:9202: checking for iface ifconf" >&5
+echo "configure:9250: checking for iface ifconf" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9207,7 +9255,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_IFACE_IFCONF=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9211 "configure"
+#line 9259 "configure"
#include "confdefs.h"
#define HAVE_IFACE_IFCONF 1
@@ -9215,7 +9263,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
EOF
-if { (eval echo configure:9219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_IFACE_IFCONF=yes
else
@@ -9240,7 +9288,7 @@ fi
if test $iface = no; then
echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
-echo "configure:9244: checking for iface ifreq" >&5
+echo "configure:9292: checking for iface ifreq" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9249,7 +9297,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_IFACE_IFREQ=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9253 "configure"
+#line 9301 "configure"
#include "confdefs.h"
#define HAVE_IFACE_IFREQ 1
@@ -9257,7 +9305,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
EOF
-if { (eval echo configure:9261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_IFACE_IFREQ=yes
else
@@ -9286,7 +9334,7 @@ fi
seteuid=no;
if test $seteuid = no; then
echo $ac_n "checking for setresuid""... $ac_c" 1>&6
-echo "configure:9290: checking for setresuid" >&5
+echo "configure:9338: checking for setresuid" >&5
if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9295,7 +9343,7 @@ if test "$cross_compiling" = yes; then
samba_cv_USE_SETRESUID=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9299 "configure"
+#line 9347 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
@@ -9303,7 +9351,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
EOF
-if { (eval echo configure:9307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_USE_SETRESUID=yes
else
@@ -9329,7 +9377,7 @@ fi
if test $seteuid = no; then
echo $ac_n "checking for setreuid""... $ac_c" 1>&6
-echo "configure:9333: checking for setreuid" >&5
+echo "configure:9381: checking for setreuid" >&5
if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9338,7 +9386,7 @@ if test "$cross_compiling" = yes; then
samba_cv_USE_SETREUID=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9342 "configure"
+#line 9390 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
@@ -9346,7 +9394,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
EOF
-if { (eval echo configure:9350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_USE_SETREUID=yes
else
@@ -9371,7 +9419,7 @@ fi
if test $seteuid = no; then
echo $ac_n "checking for seteuid""... $ac_c" 1>&6
-echo "configure:9375: checking for seteuid" >&5
+echo "configure:9423: checking for seteuid" >&5
if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9380,7 +9428,7 @@ if test "$cross_compiling" = yes; then
samba_cv_USE_SETEUID=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9384 "configure"
+#line 9432 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
@@ -9388,7 +9436,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
EOF
-if { (eval echo configure:9392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_USE_SETEUID=yes
else
@@ -9413,7 +9461,7 @@ fi
if test $seteuid = no; then
echo $ac_n "checking for setuidx""... $ac_c" 1>&6
-echo "configure:9417: checking for setuidx" >&5
+echo "configure:9465: checking for setuidx" >&5
if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9422,7 +9470,7 @@ if test "$cross_compiling" = yes; then
samba_cv_USE_SETUIDX=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9426 "configure"
+#line 9474 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
@@ -9430,7 +9478,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
EOF
-if { (eval echo configure:9434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_USE_SETUIDX=yes
else
@@ -9455,7 +9503,7 @@ fi
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:9459: checking for working mmap" >&5
+echo "configure:9507: checking for working mmap" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9464,11 +9512,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_MMAP=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9468 "configure"
+#line 9516 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/shared_mmap.c"
EOF
-if { (eval echo configure:9472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_MMAP=yes
else
@@ -9491,7 +9539,7 @@ EOF
fi
echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
-echo "configure:9495: checking for ftruncate needs root" >&5
+echo "configure:9543: checking for ftruncate needs root" >&5
if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9500,11 +9548,11 @@ if test "$cross_compiling" = yes; then
samba_cv_FTRUNCATE_NEEDS_ROOT=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9504 "configure"
+#line 9552 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/ftruncroot.c"
EOF
-if { (eval echo configure:9508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_FTRUNCATE_NEEDS_ROOT=yes
else
@@ -9527,7 +9575,7 @@ EOF
fi
echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
-echo "configure:9531: checking for fcntl locking" >&5
+echo "configure:9579: checking for fcntl locking" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9536,11 +9584,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_FCNTL_LOCK=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9540 "configure"
+#line 9588 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/fcntl_lock.c"
EOF
-if { (eval echo configure:9544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_FCNTL_LOCK=yes
else
@@ -9563,7 +9611,7 @@ EOF
fi
echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
-echo "configure:9567: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
+echo "configure:9615: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9572,11 +9620,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9576 "configure"
+#line 9624 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/fcntl_lock64.c"
EOF
-if { (eval echo configure:9580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
else
@@ -9601,7 +9649,7 @@ else
echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
-echo "configure:9605: checking for 64 bit fcntl locking" >&5
+echo "configure:9653: checking for 64 bit fcntl locking" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9610,7 +9658,7 @@ else
samba_cv_HAVE_STRUCT_FLOCK64=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9614 "configure"
+#line 9662 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -9634,7 +9682,7 @@ exit(1);
#endif
}
EOF
-if { (eval echo configure:9638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_STRUCT_FLOCK64=yes
else
@@ -9659,7 +9707,7 @@ EOF
fi
echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
-echo "configure:9663: checking for a crypt that needs truncated salt" >&5
+echo "configure:9711: checking for a crypt that needs truncated salt" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9668,11 +9716,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_TRUNCATED_SALT=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9672 "configure"
+#line 9720 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/crypttest.c"
EOF
-if { (eval echo configure:9676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_TRUNCATED_SALT=no
else
@@ -9695,13 +9743,13 @@ EOF
fi
echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
-echo "configure:9699: checking for broken nisplus include files" >&5
+echo "configure:9747: checking for broken nisplus include files" >&5
if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9705 "configure"
+#line 9753 "configure"
#include "confdefs.h"
#include <sys/acl.h>
#if defined(HAVE_RPCSVC_NIS_H)
@@ -9711,7 +9759,7 @@ int main() {
return 0;
; return 0; }
EOF
-if { (eval echo configure:9715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
else
@@ -9735,7 +9783,7 @@ fi
#################################################
# check for smbwrapper support
echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
-echo "configure:9739: checking whether to use smbwrapper" >&5
+echo "configure:9787: checking whether to use smbwrapper" >&5
# Check whether --with-smbwrapper or --without-smbwrapper was given.
if test "${with_smbwrapper+set}" = set; then
withval="$with_smbwrapper"
@@ -9779,7 +9827,7 @@ fi
#################################################
# check for the AFS filesystem
echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
-echo "configure:9783: checking whether to use AFS" >&5
+echo "configure:9831: checking whether to use AFS" >&5
# Check whether --with-afs or --without-afs was given.
if test "${with_afs+set}" = set; then
withval="$with_afs"
@@ -9805,7 +9853,7 @@ fi
#################################################
# check for the DFS auth system
echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
-echo "configure:9809: checking whether to use DFS auth" >&5
+echo "configure:9857: checking whether to use DFS auth" >&5
# Check whether --with-dfs or --without-dfs was given.
if test "${with_dfs+set}" = set; then
withval="$with_dfs"
@@ -9830,7 +9878,7 @@ fi
#################################################
# check for Kerberos IV auth system
echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
-echo "configure:9834: checking whether to use Kerberos IV" >&5
+echo "configure:9882: checking whether to use Kerberos IV" >&5
# Check whether --with-krb4 or --without-krb4 was given.
if test "${with_krb4+set}" = set; then
withval="$with_krb4"
@@ -9840,7 +9888,7 @@ if test "${with_krb4+set}" = set; then
EOF
echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
-echo "configure:9844: checking for dn_expand in -lresolv" >&5
+echo "configure:9892: checking for dn_expand in -lresolv" >&5
ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -9848,7 +9896,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 9852 "configure"
+#line 9900 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -9859,7 +9907,7 @@ int main() {
dn_expand()
; return 0; }
EOF
-if { (eval echo configure:9863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -9898,7 +9946,7 @@ fi
#################################################
# check for Kerberos 5 auth system
echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
-echo "configure:9902: checking whether to use Kerberos 5" >&5
+echo "configure:9950: checking whether to use Kerberos 5" >&5
# Check whether --with-krb5 or --without-krb5 was given.
if test "${with_krb5+set}" = set; then
withval="$with_krb5"
@@ -9919,7 +9967,7 @@ fi
#################################################
# check for automount support
echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
-echo "configure:9923: checking whether to use AUTOMOUNT" >&5
+echo "configure:9971: checking whether to use AUTOMOUNT" >&5
# Check whether --with-automount or --without-automount was given.
if test "${with_automount+set}" = set; then
withval="$with_automount"
@@ -9944,7 +9992,7 @@ fi
#################################################
# check for smbmount support
echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
-echo "configure:9948: checking whether to use SMBMOUNT" >&5
+echo "configure:9996: checking whether to use SMBMOUNT" >&5
# Check whether --with-smbmount or --without-smbmount was given.
if test "${with_smbmount+set}" = set; then
withval="$with_smbmount"
@@ -9973,7 +10021,7 @@ fi
#################################################
# check for a PAM password database
echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
-echo "configure:9977: checking whether to use PAM password database" >&5
+echo "configure:10025: checking whether to use PAM password database" >&5
# Check whether --with-pam or --without-pam was given.
if test "${with_pam+set}" = set; then
withval="$with_pam"
@@ -10000,7 +10048,7 @@ fi
#################################################
# check for a LDAP password database
echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
-echo "configure:10004: checking whether to use LDAP password database" >&5
+echo "configure:10052: checking whether to use LDAP password database" >&5
# Check whether --with-ldap or --without-ldap was given.
if test "${with_ldap+set}" = set; then
withval="$with_ldap"
@@ -10026,7 +10074,7 @@ fi
#################################################
# check for a NISPLUS password database
echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
-echo "configure:10030: checking whether to use NISPLUS password database" >&5
+echo "configure:10078: checking whether to use NISPLUS password database" >&5
# Check whether --with-nisplus or --without-nisplus was given.
if test "${with_nisplus+set}" = set; then
withval="$with_nisplus"
@@ -10051,7 +10099,7 @@ fi
#################################################
# check for a NISPLUS_HOME support
echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
-echo "configure:10055: checking whether to use NISPLUS_HOME" >&5
+echo "configure:10103: checking whether to use NISPLUS_HOME" >&5
# Check whether --with-nisplus-home or --without-nisplus-home was given.
if test "${with_nisplus_home+set}" = set; then
withval="$with_nisplus_home"
@@ -10076,7 +10124,7 @@ fi
#################################################
# check for the secure socket layer
echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
-echo "configure:10080: checking whether to use SSL" >&5
+echo "configure:10128: checking whether to use SSL" >&5
# Check whether --with-ssl or --without-ssl was given.
if test "${with_ssl+set}" = set; then
withval="$with_ssl"
@@ -10135,7 +10183,7 @@ fi
#################################################
# check for syslog logging
echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
-echo "configure:10139: checking whether to use syslog logging" >&5
+echo "configure:10187: checking whether to use syslog logging" >&5
# Check whether --with-syslog or --without-syslog was given.
if test "${with_syslog+set}" = set; then
withval="$with_syslog"
@@ -10160,7 +10208,7 @@ fi
#################################################
# check for a shared memory profiling support
echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
-echo "configure:10164: checking whether to use profiling" >&5
+echo "configure:10212: checking whether to use profiling" >&5
# Check whether --with-profile or --without-profile was given.
if test "${with_profile+set}" = set; then
withval="$with_profile"
@@ -10186,7 +10234,7 @@ fi
#################################################
# check for experimental netatalk resource fork support
echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
-echo "configure:10190: checking whether to support netatalk" >&5
+echo "configure:10238: checking whether to support netatalk" >&5
# Check whether --with-netatalk or --without-netatalk was given.
if test "${with_netatalk+set}" = set; then
withval="$with_netatalk"
@@ -10213,7 +10261,7 @@ fi
QUOTAOBJS=smbd/noquotas.o
echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
-echo "configure:10217: checking whether to support disk-quotas" >&5
+echo "configure:10265: checking whether to support disk-quotas" >&5
# Check whether --with-quotas or --without-quotas was given.
if test "${with_quotas+set}" = set; then
withval="$with_quotas"
@@ -10237,7 +10285,7 @@ fi
# check for experimental utmp accounting
echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
-echo "configure:10241: checking whether to support utmp accounting" >&5
+echo "configure:10289: checking whether to support utmp accounting" >&5
# Check whether --with-utmp or --without-utmp was given.
if test "${with_utmp+set}" = set; then
withval="$with_utmp"
@@ -10263,7 +10311,7 @@ fi
# check for MS Dfs support
echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
-echo "configure:10267: checking whether to support Microsoft Dfs" >&5
+echo "configure:10315: checking whether to support Microsoft Dfs" >&5
# Check whether --with-msdfs or --without-msdfs was given.
if test "${with_msdfs+set}" = set; then
withval="$with_msdfs"
@@ -10363,14 +10411,14 @@ fi
#################################################
# these tests are taken from the GNU fileutils package
echo "checking how to get filesystem space usage" 1>&6
-echo "configure:10367: checking how to get filesystem space usage" >&5
+echo "configure:10415: checking how to get filesystem space usage" >&5
space=no
# Test for statvfs64.
if test $space = no; then
# SVR4
echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
-echo "configure:10374: checking statvfs64 function (SVR4)" >&5
+echo "configure:10422: checking statvfs64 function (SVR4)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10378,7 +10426,7 @@ else
fu_cv_sys_stat_statvfs64=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10382 "configure"
+#line 10430 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -10392,7 +10440,7 @@ else
exit (statvfs64 (".", &fsd));
}
EOF
-if { (eval echo configure:10396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
fu_cv_sys_stat_statvfs64=yes
else
@@ -10425,12 +10473,12 @@ fi
if test $space = no; then
# SVR4
echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
-echo "configure:10429: checking statvfs function (SVR4)" >&5
+echo "configure:10477: checking statvfs function (SVR4)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10434 "configure"
+#line 10482 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statvfs.h>
@@ -10438,7 +10486,7 @@ int main() {
struct statvfs fsd; statvfs (0, &fsd);
; return 0; }
EOF
-if { (eval echo configure:10442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
fu_cv_sys_stat_statvfs=yes
else
@@ -10463,7 +10511,7 @@ fi
if test $space = no; then
# DEC Alpha running OSF/1
echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
-echo "configure:10467: checking for 3-argument statfs function (DEC OSF/1)" >&5
+echo "configure:10515: checking for 3-argument statfs function (DEC OSF/1)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10471,7 +10519,7 @@ else
fu_cv_sys_stat_statfs3_osf1=no
else
cat > conftest.$ac_ext <<EOF
-#line 10475 "configure"
+#line 10523 "configure"
#include "confdefs.h"
#include <sys/param.h>
@@ -10484,7 +10532,7 @@ else
exit (statfs (".", &fsd, sizeof (struct statfs)));
}
EOF
-if { (eval echo configure:10488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
fu_cv_sys_stat_statfs3_osf1=yes
else
@@ -10511,7 +10559,7 @@ fi
if test $space = no; then
# AIX
echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
-echo "configure:10515: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
+echo "configure:10563: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10519,7 +10567,7 @@ else
fu_cv_sys_stat_statfs2_bsize=no
else
cat > conftest.$ac_ext <<EOF
-#line 10523 "configure"
+#line 10571 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_PARAM_H
@@ -10538,7 +10586,7 @@ else
exit (statfs (".", &fsd));
}
EOF
-if { (eval echo configure:10542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
fu_cv_sys_stat_statfs2_bsize=yes
else
@@ -10565,7 +10613,7 @@ fi
if test $space = no; then
# SVR3
echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
-echo "configure:10569: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
+echo "configure:10617: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10573,7 +10621,7 @@ else
fu_cv_sys_stat_statfs4=no
else
cat > conftest.$ac_ext <<EOF
-#line 10577 "configure"
+#line 10625 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statfs.h>
@@ -10583,7 +10631,7 @@ else
exit (statfs (".", &fsd, sizeof fsd, 0));
}
EOF
-if { (eval echo configure:10587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
fu_cv_sys_stat_statfs4=yes
else
@@ -10610,7 +10658,7 @@ fi
if test $space = no; then
# 4.4BSD and NetBSD
echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
-echo "configure:10614: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
+echo "configure:10662: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10618,7 +10666,7 @@ else
fu_cv_sys_stat_statfs2_fsize=no
else
cat > conftest.$ac_ext <<EOF
-#line 10622 "configure"
+#line 10670 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
@@ -10634,7 +10682,7 @@ else
exit (statfs (".", &fsd));
}
EOF
-if { (eval echo configure:10638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
fu_cv_sys_stat_statfs2_fsize=yes
else
@@ -10661,7 +10709,7 @@ fi
if test $space = no; then
# Ultrix
echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
-echo "configure:10665: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
+echo "configure:10713: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10669,7 +10717,7 @@ else
fu_cv_sys_stat_fs_data=no
else
cat > conftest.$ac_ext <<EOF
-#line 10673 "configure"
+#line 10721 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
@@ -10689,7 +10737,7 @@ else
exit (statfs (".", &fsd) != 1);
}
EOF
-if { (eval echo configure:10693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
fu_cv_sys_stat_fs_data=yes
else
@@ -10723,7 +10771,7 @@ fi
#
echo "checking if large file support can be enabled"
cat > conftest.$ac_ext <<EOF
-#line 10727 "configure"
+#line 10775 "configure"
#include "confdefs.h"
#if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
@@ -10736,7 +10784,7 @@ int main() {
int i
; return 0; }
EOF
-if { (eval echo configure:10740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
else
@@ -10761,11 +10809,11 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 10765 "configure"
+#line 10813 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/summary.c"
EOF
-if { (eval echo configure:10769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "configure OK";
else
diff --git a/source3/configure.in b/source3/configure.in
index 4b8b03a72b..1ff89e02d0 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -738,6 +738,25 @@ if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
AC_DEFINE(HAVE_KERNEL_CHANGE_NOTIFY)
fi
+AC_CACHE_CHECK([for kernel share modes],samba_cv_HAVE_KERNEL_SHARE_MODES,[
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/file.h>
+#ifndef LOCK_MAND
+#define LOCK_MAND 32
+#define LOCK_READ 64
+#endif
+main() {
+ exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
+}
+],
+samba_cv_HAVE_KERNEL_SHARE_MODES=yes,samba_cv_HAVE_KERNEL_SHARE_MODES=no,samba_cv_HAVE_KERNEL_SHARE_MODES=cross)])
+if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
+ AC_DEFINE(HAVE_KERNEL_SHARE_MODES)
+fi
+
diff --git a/source3/include/config.h.in b/source3/include/config.h.in
index ab9da3a7ad..699dbe6fc9 100644
--- a/source3/include/config.h.in
+++ b/source3/include/config.h.in
@@ -142,6 +142,7 @@
#undef SIZEOF_OFF_T
#undef STAT_STATVFS64
#undef HAVE_LIBREADLINE
+#undef HAVE_KERNEL_SHARE_MODES
#undef HAVE_KERNEL_OPLOCKS_IRIX
#undef HAVE_KERNEL_OPLOCKS_LINUX
#undef HAVE_KERNEL_CHANGE_NOTIFY
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 432fd09f0b..a1a04333bf 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -868,6 +868,15 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
#include <dlfcn.h>
#endif
+#if HAVE_KERNEL_SHARE_MODES
+#ifndef LOCK_MAND
+#define LOCK_MAND 32 /* This is a mandatory flock */
+#define LOCK_READ 64 /* ... Which allows concurrent read operations */
+#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */
+#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */
+#endif
+#endif
+
extern int DEBUGLEVEL;
#endif /* _INCLUDES_H */
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 23d95eadfd..5a0493e625 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -492,9 +492,24 @@ dev = %x, inode = %.0f\n", old_shares[i].op_type, fname, (unsigned int)dev, (dou
}
/****************************************************************************
- Open a file with a share mode.
+set a kernel flock on a file for NFS interoperability
+this requires a patch to Linux
****************************************************************************/
+static void kernel_flock(files_struct *fsp, int deny_mode)
+{
+#if HAVE_KERNEL_SHARE_MODES
+ int kernel_mode = 0;
+ if (deny_mode == DENY_READ) kernel_mode = LOCK_MAND|LOCK_WRITE;
+ else if (deny_mode == DENY_WRITE) kernel_mode = LOCK_MAND|LOCK_READ;
+ else if (deny_mode == DENY_ALL) kernel_mode = LOCK_MAND;
+ if (kernel_mode) flock(fsp->fd, kernel_mode);
+#endif
+}
+
+/****************************************************************************
+ Open a file with a share mode.
+****************************************************************************/
files_struct *open_file_shared(connection_struct *conn,char *fname,int share_mode,int ofun,
mode_t mode,int oplock_request, int *Access,int *action)
{
@@ -653,6 +668,14 @@ files_struct *open_file_shared(connection_struct *conn,char *fname,int share_mod
return NULL;
}
+ /* not that we ignore failure for the following. It is
+ basically a hack for NFS, and NFS will never set one of
+ these only read them. Nobody but Samba can ever set a deny
+ mode and we have already checked our more authoritative
+ locking database for permission to set this deny mode. If
+ the kernel refuses the operations then the kernel is wrong */
+ kernel_flock(fsp, deny_mode);
+
/*
* Deal with the race condition where two smbd's detect the file doesn't
* exist and do the create at the same time. One of them will win and