summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-11-15 01:18:10 +0000
committerJeremy Allison <jra@samba.org>2001-11-15 01:18:10 +0000
commit5302dc12184481514e143f0b3cf4167c84a32ddd (patch)
tree2380819904b1dd99b680cf36f2c241de792dfc08 /source3
parent50005ee3adf3a3b657feeba218a543a61f5c20b6 (diff)
downloadsamba-5302dc12184481514e143f0b3cf4167c84a32ddd.tar.gz
samba-5302dc12184481514e143f0b3cf4167c84a32ddd.tar.bz2
samba-5302dc12184481514e143f0b3cf4167c84a32ddd.zip
Fix detection of RedHat 7.2.
Remove unused old file. Test 42 byte reply to SMBntcreate (W2K does this). Jeremy. (This used to be commit a55a63a4ca55602ad9221af17c0bc8e185536433)
Diffstat (limited to 'source3')
-rwxr-xr-xsource3/configure202
-rw-r--r--source3/configure.in6
-rw-r--r--source3/nsswitch/winbindd_glue.c442
-rw-r--r--source3/smbd/nttrans.c5
4 files changed, 113 insertions, 542 deletions
diff --git a/source3/configure b/source3/configure
index 520280d018..b72b6ff4a6 100755
--- a/source3/configure
+++ b/source3/configure
@@ -2524,12 +2524,12 @@ else
#line 2525 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) return(1);
+ if (!f) exit(1);
fprintf(f, "%d\n", sizeof(int));
- return(0);
+ exit(0);
}
EOF
if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -2563,12 +2563,12 @@ else
#line 2564 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) return(1);
+ if (!f) exit(1);
fprintf(f, "%d\n", sizeof(long));
- return(0);
+ exit(0);
}
EOF
if { (eval echo configure:2575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -2602,12 +2602,12 @@ else
#line 2603 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) return(1);
+ if (!f) exit(1);
fprintf(f, "%d\n", sizeof(short));
- return(0);
+ exit(0);
}
EOF
if { (eval echo configure:2614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -11034,14 +11034,18 @@ cat > conftest.$ac_ext <<EOF
#line 11035 "configure"
#include "confdefs.h"
+#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
+#endif
+#ifdef HAVE_SYS_CAPABILITY
#include <sys/capability.h>
+#endif
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:11045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
else
@@ -11064,23 +11068,23 @@ fi
esac
echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
-echo "configure:11068: checking for broken nisplus include files" >&5
+echo "configure:11072: 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 11074 "configure"
+#line 11078 "configure"
#include "confdefs.h"
#include <sys/acl.h>
#if defined(HAVE_RPCSVC_NIS_H)
#include <rpcsvc/nis.h>
#endif
int main() {
-return 0;
+int i;
; return 0; }
EOF
-if { (eval echo configure:11084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
else
@@ -11104,7 +11108,7 @@ fi
#################################################
# check for smbwrapper support
echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
-echo "configure:11108: checking whether to use smbwrapper" >&5
+echo "configure:11112: 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"
@@ -11148,7 +11152,7 @@ fi
#################################################
# check for AFS clear-text auth support
echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
-echo "configure:11152: checking whether to use AFS clear-text auth" >&5
+echo "configure:11156: checking whether to use AFS clear-text auth" >&5
# Check whether --with-afs or --without-afs was given.
if test "${with_afs+set}" = set; then
withval="$with_afs"
@@ -11174,7 +11178,7 @@ fi
#################################################
# check for the DFS clear-text auth system
echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
-echo "configure:11178: checking whether to use DFS clear-text auth" >&5
+echo "configure:11182: checking whether to use DFS clear-text auth" >&5
# Check whether --with-dfs or --without-dfs was given.
if test "${with_dfs+set}" = set; then
withval="$with_dfs"
@@ -11200,7 +11204,7 @@ fi
#################################################
# check for location of Kerberos 5 install
echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
-echo "configure:11204: checking for kerberos 5 install path" >&5
+echo "configure:11208: checking for kerberos 5 install path" >&5
# Check whether --with-krb5 or --without-krb5 was given.
if test "${with_krb5+set}" = set; then
withval="$with_krb5"
@@ -11231,7 +11235,7 @@ fi
# now see if we can find the krb5 libs in standard paths
if test x$have_krb5 != xyes; then
echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
-echo "configure:11235: checking for krb5_mk_req_extended in -lkrb5" >&5
+echo "configure:11239: checking for krb5_mk_req_extended in -lkrb5" >&5
ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -11239,7 +11243,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lkrb5 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11243 "configure"
+#line 11247 "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
@@ -11250,7 +11254,7 @@ int main() {
krb5_mk_req_extended()
; return 0; }
EOF
-if { (eval echo configure:11254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11258: \"$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
@@ -11279,7 +11283,7 @@ fi
##################################################################
# we might need the k5crypto and com_err libraries on some systems
echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
-echo "configure:11283: checking for _et_list in -lcom_err" >&5
+echo "configure:11287: checking for _et_list in -lcom_err" >&5
ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -11287,7 +11291,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcom_err $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11291 "configure"
+#line 11295 "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
@@ -11298,7 +11302,7 @@ int main() {
_et_list()
; return 0; }
EOF
-if { (eval echo configure:11302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11306: \"$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
@@ -11319,7 +11323,7 @@ else
fi
echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
-echo "configure:11323: checking for krb5_encrypt_data in -lk5crypto" >&5
+echo "configure:11327: checking for krb5_encrypt_data in -lk5crypto" >&5
ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -11327,7 +11331,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lk5crypto $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11331 "configure"
+#line 11335 "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
@@ -11338,7 +11342,7 @@ int main() {
krb5_encrypt_data()
; return 0; }
EOF
-if { (eval echo configure:11342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11346: \"$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
@@ -11362,7 +11366,7 @@ fi
#################################################
# check for automount support
echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
-echo "configure:11366: checking whether to use AUTOMOUNT" >&5
+echo "configure:11370: 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"
@@ -11387,7 +11391,7 @@ fi
#################################################
# check for smbmount support
echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
-echo "configure:11391: checking whether to use SMBMOUNT" >&5
+echo "configure:11395: 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"
@@ -11424,7 +11428,7 @@ fi
# check for a PAM clear-text auth, accounts, password and session support
with_pam_for_crypt=no
echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
-echo "configure:11428: checking whether to use PAM" >&5
+echo "configure:11432: checking whether to use PAM" >&5
# Check whether --with-pam or --without-pam was given.
if test "${with_pam+set}" = set; then
withval="$with_pam"
@@ -11450,7 +11454,7 @@ fi
# we can't build a pam module if we don't have pam.
echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
-echo "configure:11454: checking for pam_get_data in -lpam" >&5
+echo "configure:11458: checking for pam_get_data in -lpam" >&5
ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -11458,7 +11462,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpam $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11462 "configure"
+#line 11466 "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
@@ -11469,7 +11473,7 @@ int main() {
pam_get_data()
; return 0; }
EOF
-if { (eval echo configure:11473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11477: \"$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
@@ -11496,7 +11500,7 @@ fi
#################################################
# check for pam_smbpass support
echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
-echo "configure:11500: checking whether to use pam_smbpass" >&5
+echo "configure:11504: checking whether to use pam_smbpass" >&5
# Check whether --with-pam_smbpass or --without-pam_smbpass was given.
if test "${with_pam_smbpass+set}" = set; then
withval="$with_pam_smbpass"
@@ -11534,12 +11538,12 @@ if test $with_pam_for_crypt = no; then
for ac_func in crypt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:11538: checking for $ac_func" >&5
+echo "configure:11542: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11543 "configure"
+#line 11547 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -11562,7 +11566,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:11566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -11588,7 +11592,7 @@ done
if test x"$ac_cv_func_crypt" = x"no"; then
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:11592: checking for crypt in -lcrypt" >&5
+echo "configure:11596: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -11596,7 +11600,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11600 "configure"
+#line 11604 "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
@@ -11607,7 +11611,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:11611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11615: \"$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
@@ -11642,7 +11646,7 @@ fi
##
if test $with_pam_for_crypt = no; then
echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
-echo "configure:11646: checking for a crypt that needs truncated salt" >&5
+echo "configure:11650: 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
@@ -11651,11 +11655,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_TRUNCATED_SALT=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11655 "configure"
+#line 11659 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/crypttest.c"
EOF
-if { (eval echo configure:11659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11663: \"$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
@@ -11693,7 +11697,7 @@ with_smbpasswd_sam=yes
#################################################
# check for a TDB password database
echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
-echo "configure:11697: checking whether to use TDB SAM database" >&5
+echo "configure:11701: checking whether to use TDB SAM database" >&5
# Check whether --with-tdbsam or --without-tdbsam was given.
if test "${with_tdbsam+set}" = set; then
withval="$with_tdbsam"
@@ -11719,7 +11723,7 @@ fi
#################################################
# check for a LDAP password database
echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
-echo "configure:11723: checking whether to use LDAP SAM database" >&5
+echo "configure:11727: checking whether to use LDAP SAM database" >&5
# Check whether --with-ldapsam or --without-ldapsam was given.
if test "${with_ldapsam+set}" = set; then
withval="$with_ldapsam"
@@ -11746,7 +11750,7 @@ fi
#################################################
# check for a NISPLUS password database
echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
-echo "configure:11750: checking whether to use NISPLUS SAM database" >&5
+echo "configure:11754: checking whether to use NISPLUS SAM database" >&5
# Check whether --with-nisplussam or --without-nisplussam was given.
if test "${with_nisplussam+set}" = set; then
withval="$with_nisplussam"
@@ -11774,7 +11778,7 @@ fi
# smbpasswd SAM is only used if another format
# has not been defined
echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6
-echo "configure:11778: checking whether to use traditional smbpasswd file" >&5
+echo "configure:11782: checking whether to use traditional smbpasswd file" >&5
if test $with_smbpasswd_sam = yes; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
@@ -11794,7 +11798,7 @@ fi
#################################################
# check for a NISPLUS_HOME support
echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
-echo "configure:11798: checking whether to use NISPLUS_HOME" >&5
+echo "configure:11802: 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"
@@ -11819,7 +11823,7 @@ fi
#################################################
# check for the secure socket layer
echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
-echo "configure:11823: checking whether to use SSL" >&5
+echo "configure:11827: 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"
@@ -11893,7 +11897,7 @@ fi
#################################################
# check for syslog logging
echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
-echo "configure:11897: checking whether to use syslog logging" >&5
+echo "configure:11901: 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"
@@ -11918,7 +11922,7 @@ fi
#################################################
# check for a shared memory profiling support
echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
-echo "configure:11922: checking whether to use profiling" >&5
+echo "configure:11926: checking whether to use profiling" >&5
# Check whether --with-profiling-data or --without-profiling-data was given.
if test "${with_profiling_data+set}" = set; then
withval="$with_profiling_data"
@@ -11946,7 +11950,7 @@ fi
QUOTAOBJS=smbd/noquotas.o
echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
-echo "configure:11950: checking whether to support disk-quotas" >&5
+echo "configure:11954: 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"
@@ -11957,13 +11961,13 @@ if test "${with_quotas+set}" = set; then
*linux*)
# Check for kernel 2.4.x quota braindamage...
echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
-echo "configure:11961: checking for linux 2.4.x quota braindamage.." >&5
+echo "configure:11965: checking for linux 2.4.x quota braindamage.." >&5
if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11967 "configure"
+#line 11971 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
@@ -11975,7 +11979,7 @@ int main() {
struct mem_dqblk D;
; return 0; }
EOF
-if { (eval echo configure:11979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_linux_2_4_quota_braindamage=yes
else
@@ -12024,7 +12028,7 @@ fi
# check for experimental utmp accounting
echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
-echo "configure:12028: checking whether to support utmp accounting" >&5
+echo "configure:12032: 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"
@@ -12124,7 +12128,7 @@ fi
#################################################
# choose native language(s) of man pages
echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
-echo "configure:12128: checking chosen man pages' language(s)" >&5
+echo "configure:12132: checking chosen man pages' language(s)" >&5
# Check whether --with-manpages-langs or --without-manpages-langs was given.
if test "${with_manpages_langs+set}" = set; then
withval="$with_manpages_langs"
@@ -12152,14 +12156,14 @@ fi
#################################################
# these tests are taken from the GNU fileutils package
echo "checking how to get filesystem space usage" 1>&6
-echo "configure:12156: checking how to get filesystem space usage" >&5
+echo "configure:12160: 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:12163: checking statvfs64 function (SVR4)" >&5
+echo "configure:12167: 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
@@ -12167,7 +12171,7 @@ else
fu_cv_sys_stat_statvfs64=cross
else
cat > conftest.$ac_ext <<EOF
-#line 12171 "configure"
+#line 12175 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -12181,7 +12185,7 @@ else
exit (statvfs64 (".", &fsd));
}
EOF
-if { (eval echo configure:12185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12189: \"$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
@@ -12214,12 +12218,12 @@ fi
if test $space = no; then
# SVR4
echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
-echo "configure:12218: checking statvfs function (SVR4)" >&5
+echo "configure:12222: 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 12223 "configure"
+#line 12227 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statvfs.h>
@@ -12227,7 +12231,7 @@ int main() {
struct statvfs fsd; statvfs (0, &fsd);
; return 0; }
EOF
-if { (eval echo configure:12231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12235: \"$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
@@ -12252,7 +12256,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:12256: checking for 3-argument statfs function (DEC OSF/1)" >&5
+echo "configure:12260: 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
@@ -12260,7 +12264,7 @@ else
fu_cv_sys_stat_statfs3_osf1=no
else
cat > conftest.$ac_ext <<EOF
-#line 12264 "configure"
+#line 12268 "configure"
#include "confdefs.h"
#include <sys/param.h>
@@ -12273,7 +12277,7 @@ else
exit (statfs (".", &fsd, sizeof (struct statfs)));
}
EOF
-if { (eval echo configure:12277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12281: \"$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
@@ -12300,7 +12304,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:12304: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
+echo "configure:12308: 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
@@ -12308,7 +12312,7 @@ else
fu_cv_sys_stat_statfs2_bsize=no
else
cat > conftest.$ac_ext <<EOF
-#line 12312 "configure"
+#line 12316 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_PARAM_H
@@ -12327,7 +12331,7 @@ else
exit (statfs (".", &fsd));
}
EOF
-if { (eval echo configure:12331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12335: \"$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
@@ -12354,7 +12358,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:12358: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
+echo "configure:12362: 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
@@ -12362,7 +12366,7 @@ else
fu_cv_sys_stat_statfs4=no
else
cat > conftest.$ac_ext <<EOF
-#line 12366 "configure"
+#line 12370 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statfs.h>
@@ -12372,7 +12376,7 @@ else
exit (statfs (".", &fsd, sizeof fsd, 0));
}
EOF
-if { (eval echo configure:12376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12380: \"$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
@@ -12399,7 +12403,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:12403: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
+echo "configure:12407: 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
@@ -12407,7 +12411,7 @@ else
fu_cv_sys_stat_statfs2_fsize=no
else
cat > conftest.$ac_ext <<EOF
-#line 12411 "configure"
+#line 12415 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
@@ -12423,7 +12427,7 @@ else
exit (statfs (".", &fsd));
}
EOF
-if { (eval echo configure:12427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12431: \"$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
@@ -12450,7 +12454,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:12454: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
+echo "configure:12458: 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
@@ -12458,7 +12462,7 @@ else
fu_cv_sys_stat_fs_data=no
else
cat > conftest.$ac_ext <<EOF
-#line 12462 "configure"
+#line 12466 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
@@ -12478,7 +12482,7 @@ else
exit (statfs (".", &fsd) != 1);
}
EOF
-if { (eval echo configure:12482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12486: \"$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
@@ -12511,9 +12515,9 @@ fi
# file support.
#
echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
-echo "configure:12515: checking if large file support can be enabled" >&5
+echo "configure:12519: checking if large file support can be enabled" >&5
cat > conftest.$ac_ext <<EOF
-#line 12517 "configure"
+#line 12521 "configure"
#include "confdefs.h"
#if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
@@ -12526,7 +12530,7 @@ int main() {
int i
; return 0; }
EOF
-if { (eval echo configure:12530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:12534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
else
@@ -12591,7 +12595,7 @@ fi
# check for ACL support
echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
-echo "configure:12595: checking whether to support ACLs" >&5
+echo "configure:12599: checking whether to support ACLs" >&5
# Check whether --with-acl-support or --without-acl-support was given.
if test "${with_acl_support+set}" = set; then
withval="$with_acl_support"
@@ -12637,7 +12641,7 @@ EOF
;;
*)
echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
-echo "configure:12641: checking for acl_get_file in -lacl" >&5
+echo "configure:12645: checking for acl_get_file in -lacl" >&5
ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -12645,7 +12649,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lacl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 12649 "configure"
+#line 12653 "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
@@ -12656,7 +12660,7 @@ int main() {
acl_get_file()
; return 0; }
EOF
-if { (eval echo configure:12660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12664: \"$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
@@ -12684,13 +12688,13 @@ else
fi
echo $ac_n "checking for ACL support""... $ac_c" 1>&6
-echo "configure:12688: checking for ACL support" >&5
+echo "configure:12692: checking for ACL support" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 12694 "configure"
+#line 12698 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/acl.h>
@@ -12698,7 +12702,7 @@ int main() {
acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
; return 0; }
EOF
-if { (eval echo configure:12702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
samba_cv_HAVE_POSIX_ACLS=yes
else
@@ -12718,13 +12722,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
EOF
echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
-echo "configure:12722: checking for acl_get_perm_np" >&5
+echo "configure:12726: checking for acl_get_perm_np" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 12728 "configure"
+#line 12732 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/acl.h>
@@ -12732,7 +12736,7 @@ int main() {
acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
; return 0; }
EOF
-if { (eval echo configure:12736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
samba_cv_HAVE_ACL_GET_PERM_NP=yes
else
@@ -12779,7 +12783,7 @@ fi
# (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
-echo "configure:12783: checking whether to build winbind" >&5
+echo "configure:12787: checking whether to build winbind" >&5
# Initially, the value of $host_os decides whether winbind is supported
@@ -12869,7 +12873,7 @@ fi
if test x"$INCLUDED_POPT" != x"yes"; then
echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
-echo "configure:12873: checking for poptGetContext in -lpopt" >&5
+echo "configure:12877: checking for poptGetContext in -lpopt" >&5
ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -12877,7 +12881,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpopt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 12881 "configure"
+#line 12885 "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
@@ -12888,7 +12892,7 @@ int main() {
poptGetContext()
; return 0; }
EOF
-if { (eval echo configure:12892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12896: \"$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
@@ -12912,7 +12916,7 @@ fi
fi
echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
-echo "configure:12916: checking whether to use included popt" >&5
+echo "configure:12920: checking whether to use included popt" >&5
if test x"$INCLUDED_POPT" = x"yes"; then
echo "$ac_t""$srcdir/popt" 1>&6
BUILD_POPT='$(POPT_OBJS)'
@@ -12931,11 +12935,11 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 12935 "configure"
+#line 12939 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/summary.c"
EOF
-if { (eval echo configure:12939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12943: \"$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 e16c967b59..86493dbcb7 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1498,8 +1498,12 @@ case "$host_os" in
*linux*)
AC_CACHE_CHECK([for broken RedHat 7.2 system header files],samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[
AC_TRY_COMPILE([
+#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
+#endif
+#ifdef HAVE_SYS_CAPABILITY
#include <sys/capability.h>
+#endif
],[int i;],
samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no,samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes)])
if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
@@ -1513,7 +1517,7 @@ AC_TRY_COMPILE([#include <sys/acl.h>
#if defined(HAVE_RPCSVC_NIS_H)
#include <rpcsvc/nis.h>
#endif],
-[return 0;],
+[int i;],
samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no,samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes)])
if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
AC_DEFINE(BROKEN_NISPLUS_INCLUDE_FILES)
diff --git a/source3/nsswitch/winbindd_glue.c b/source3/nsswitch/winbindd_glue.c
deleted file mode 100644
index 0c508ccf4b..0000000000
--- a/source3/nsswitch/winbindd_glue.c
+++ /dev/null
@@ -1,442 +0,0 @@
-/*
- Unix SMB/Netbios implementation.
- Version 2.0
-
- Winbind daemon glue functions to connect new cli interface
- to older style lsa_ and samr_ functions
-
- Copyright (C) tridge@samba.org 2001
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include "winbindd.h"
-
-/****************************************************************************
-do a LSA Open Policy
-****************************************************************************/
-BOOL wb_lsa_open_policy(char *server, BOOL sec_qos, uint32 des_access,
- CLI_POLICY_HND *pol)
-{
- struct nmb_name calling, called;
- struct ntuser_creds creds;
- struct in_addr dest_ip;
- fstring dest_host;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- extern pstring global_myname;
-
- ZERO_STRUCTP(pol);
-
- pol->cli = (struct cli_state *)malloc(sizeof(struct cli_state));
- pol->mem_ctx = talloc_init();
-
- ZERO_STRUCTP(pol->cli);
-
- if (!pol->cli || !pol->mem_ctx)
- return False;
-
- /* Initialise RPC connection */
-
- if (!cli_initialise(pol->cli))
- goto done;
-
- ZERO_STRUCT(creds);
- creds.pwd.null_pwd = 1;
-
- cli_init_creds(pol->cli, &creds);
-
- /* Establish a SMB connection */
-
- if (!resolve_srv_name(server, dest_host, &dest_ip)) {
- goto done;
- }
-
- make_nmb_name(&called, dns_to_netbios_name(dest_host), 0x20);
- make_nmb_name(&calling, dns_to_netbios_name(global_myname), 0);
-
- if (!cli_establish_connection(pol->cli, dest_host, &dest_ip, &calling,
- &called, "IPC$", "IPC", False, True)) {
- goto done;
- }
-
- if (!cli_nt_session_open (pol->cli, PIPE_LSARPC)) {
- goto done;
- }
-
- result = cli_lsa_open_policy(pol->cli, pol->mem_ctx, sec_qos,
- des_access, &pol->handle);
-
- done:
- if (!NT_STATUS_IS_OK(result) && pol->cli) {
- if (pol->cli->initialised)
- cli_shutdown(pol->cli);
- SAFE_FREE(pol->cli);
- }
-
- return NT_STATUS_IS_OK(result);
-}
-
-/****************************************************************************
-do a LSA Enumerate Trusted Domain
-****************************************************************************/
-BOOL wb_lsa_enum_trust_dom(CLI_POLICY_HND *hnd, uint32 *enum_ctx,
- uint32 * num_doms, char ***names, DOM_SID **sids)
-{
- NTSTATUS ret;
-
- ret = cli_lsa_enum_trust_dom(hnd->cli, hnd->mem_ctx, &hnd->handle,
- enum_ctx, num_doms, names, sids);
-
- return NT_STATUS_IS_OK(ret);
-}
-
-/****************************************************************************
-do a LSA Query Info Policy
-****************************************************************************/
-BOOL wb_lsa_query_info_pol(CLI_POLICY_HND *hnd, uint16 info_class,
- fstring domain_name, DOM_SID *domain_sid)
-{
- NTSTATUS ret;
-
- ret = cli_lsa_query_info_policy(hnd->cli, hnd->mem_ctx, &hnd->handle,
- info_class, domain_name, domain_sid);
-
- return NT_STATUS_IS_OK(ret);
-}
-
-/****************************************************************************
-do a LSA Lookup Names
-****************************************************************************/
-BOOL wb_lsa_lookup_names(CLI_POLICY_HND *hnd, int num_names, char **names,
- DOM_SID **sids, uint32 **types, int *num_sids)
-{
- NTSTATUS ret;
-
- ret = cli_lsa_lookup_names(hnd->cli, hnd->mem_ctx, &hnd->handle,
- num_names, names, sids, types, num_sids);
-
- return NT_STATUS_IS_OK(ret);
-}
-
-/****************************************************************************
-do a LSA Lookup SIDS
-****************************************************************************/
-BOOL wb_lsa_lookup_sids(CLI_POLICY_HND *hnd, int num_sids, DOM_SID *sids,
- char ***names, uint32 **types, int *num_names)
-{
- NTSTATUS ret;
-
- ret = cli_lsa_lookup_sids(hnd->cli, hnd->mem_ctx, &hnd->handle,
- num_sids, sids, names, types, num_names);
-
- return NT_STATUS_IS_OK(ret);
-}
-
-/****************************************************************************
-lsa_close glue
-****************************************************************************/
-BOOL wb_lsa_close(CLI_POLICY_HND *hnd)
-{
- NTSTATUS ret;
-
- ret = cli_lsa_close(hnd->cli, hnd->mem_ctx, &hnd->handle);
-
- return NT_STATUS_IS_OK(ret);
-}
-
-
-/****************************************************************************
-samr_close glue
-****************************************************************************/
-BOOL wb_samr_close(CLI_POLICY_HND *hnd)
-{
- NTSTATUS ret;
-
- ret = cli_samr_close(hnd->cli, hnd->mem_ctx, &hnd->handle);
-
- return NT_STATUS_IS_OK(ret);
-}
-
-
-/****************************************************************************
-samr_connect glue
-****************************************************************************/
-BOOL wb_samr_connect(char *server, uint32 access_mask, CLI_POLICY_HND *pol)
-{
- struct nmb_name calling, called;
- struct ntuser_creds creds;
- struct in_addr dest_ip;
- fstring dest_host;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- extern pstring global_myname;
-
- ZERO_STRUCTP(pol);
-
- pol->cli = (struct cli_state *)malloc(sizeof(struct cli_state));
-
- ZERO_STRUCTP(pol->cli);
-
- pol->mem_ctx = talloc_init();
-
- if (!pol->cli || !pol->mem_ctx)
- return False;
-
- /* Initialise RPC connection */
-
- if (!cli_initialise(pol->cli))
- goto done;
-
- ZERO_STRUCT(creds);
- creds.pwd.null_pwd = 1;
-
- cli_init_creds(pol->cli, &creds);
-
- /* Establish a SMB connection */
-
- if (!resolve_srv_name(server, dest_host, &dest_ip)) {
- goto done;
- }
-
- make_nmb_name(&called, dns_to_netbios_name(dest_host), 0x20);
- make_nmb_name(&calling, dns_to_netbios_name(global_myname), 0);
-
- if (!cli_establish_connection(pol->cli, dest_host, &dest_ip, &calling,
- &called, "IPC$", "IPC", False, True)) {
- goto done;
- }
-
- if (!cli_nt_session_open (pol->cli, PIPE_SAMR)) {
- goto done;
- }
-
- result = cli_samr_connect(pol->cli, pol->mem_ctx,
- access_mask, &pol->handle);
-
- done:
- if (!NT_STATUS_IS_OK(result) && pol->cli) {
- if (pol->cli->initialised)
- cli_shutdown(pol->cli);
- SAFE_FREE(pol->cli);
- }
-
- return NT_STATUS_IS_OK(result);
-}
-
-
-/****************************************************************************
-samr_open_domain glue
-****************************************************************************/
-BOOL wb_samr_open_domain(CLI_POLICY_HND *connect_pol, uint32 ace_perms,
- DOM_SID *sid, CLI_POLICY_HND *domain_pol)
-{
- NTSTATUS ret;
-
- ret = cli_samr_open_domain(connect_pol->cli,
- connect_pol->mem_ctx,
- &connect_pol->handle,
- ace_perms,
- sid,
- &domain_pol->handle);
-
- if NT_STATUS_IS_OK(ret) {
- domain_pol->cli = connect_pol->cli;
- domain_pol->mem_ctx = connect_pol->mem_ctx;
- return True;
- }
-
- return False;
-}
-
-/****************************************************************************
-do a SAMR enumerate groups
-****************************************************************************/
-NTSTATUS wb_samr_enum_dom_groups(CLI_POLICY_HND *pol, uint32 *start_idx,
- uint32 size, struct acct_info **sam,
- uint32 *num_sam_groups)
-{
- return cli_samr_enum_dom_groups(pol->cli, pol->mem_ctx, &pol->handle,
- start_idx, size, sam, num_sam_groups);
-}
-
-/****************************************************************************
-do a SAMR query userinfo
-****************************************************************************/
-BOOL wb_get_samr_query_userinfo(CLI_POLICY_HND *pol, uint32 info_level,
- uint32 user_rid, SAM_USERINFO_CTR **ctr)
-{
- POLICY_HND user_pol;
- BOOL got_user_pol = False;
- NTSTATUS result;
-
- result = cli_samr_open_user(pol->cli, pol->mem_ctx,
- &pol->handle, MAXIMUM_ALLOWED_ACCESS,
- user_rid, &user_pol);
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- got_user_pol = True;
-
- result = cli_samr_query_userinfo(pol->cli, pol->mem_ctx,
- &user_pol, info_level, ctr);
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- done:
- if (got_user_pol) cli_samr_close(pol->cli, pol->mem_ctx, &user_pol);
-
- return NT_STATUS_IS_OK(result);
-}
-
-/****************************************************************************
-do a SAMR enumerate groups
-****************************************************************************/
-BOOL wb_samr_open_user(CLI_POLICY_HND *pol, uint32 access_mask, uint32 rid,
- POLICY_HND *user_pol)
-{
- NTSTATUS ret;
-
- ret = cli_samr_open_user(pol->cli, pol->mem_ctx, &pol->handle,
- access_mask, rid, user_pol);
-
- return NT_STATUS_IS_OK(ret);
-}
-
-BOOL wb_samr_query_usergroups(CLI_POLICY_HND *pol, uint32 *num_groups,
- DOM_GID **gid)
-{
- NTSTATUS ret;
-
- ret = cli_samr_query_usergroups(pol->cli, pol->mem_ctx, &pol->handle,
- num_groups, gid);
-
- return NT_STATUS_IS_OK(ret);
-}
-
-BOOL wb_get_samr_query_groupinfo(CLI_POLICY_HND *pol, uint32 info_level,
- uint32 group_rid, GROUP_INFO_CTR *ctr)
-{
- POLICY_HND group_pol;
- BOOL got_group_pol = False;
- NTSTATUS result;
-
- result = cli_samr_open_group(pol->cli, pol->mem_ctx,
- &pol->handle, MAXIMUM_ALLOWED_ACCESS,
- group_rid, &group_pol);
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- got_group_pol = True;
-
- result = cli_samr_query_groupinfo(pol->cli, pol->mem_ctx,
- &group_pol, info_level,
- ctr);
- done:
- if (got_group_pol) cli_samr_close(pol->cli, pol->mem_ctx, &group_pol);
-
- return NT_STATUS_IS_OK(result);
-}
-
-BOOL wb_sam_query_groupmem(CLI_POLICY_HND *pol, uint32 group_rid,
- uint32 *num_names, uint32 **rid_mem,
- char ***names, uint32 **name_types)
-{
- BOOL got_group_pol = False;
- POLICY_HND group_pol;
- NTSTATUS result;
- uint32 i, total_names = 0;
-
- result = cli_samr_open_group(pol->cli, pol->mem_ctx,
- &pol->handle, MAXIMUM_ALLOWED_ACCESS,
- group_rid, &group_pol);
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- got_group_pol = True;
-
- result = cli_samr_query_groupmem(pol->cli, pol->mem_ctx,
- &group_pol, num_names, rid_mem,
- name_types);
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- /* Call cli_samr_lookup_rids() in bunches of ~1000 rids to avoid
- crashing NT4. */
-
-#define MAX_LOOKUP_RIDS 900
-
- *names = talloc(pol->mem_ctx, *num_names * sizeof(char *));
- *name_types = talloc(pol->mem_ctx, *num_names * sizeof(uint32));
-
- for (i = 0; i < *num_names; i += MAX_LOOKUP_RIDS) {
- int num_lookup_rids = MIN(*num_names - i, MAX_LOOKUP_RIDS);
- uint32 tmp_num_names = 0;
- char **tmp_names = NULL;
- uint32 *tmp_types = NULL;
-
- /* Lookup a chunk of rids */
-
- result = cli_samr_lookup_rids(pol->cli, pol->mem_ctx,
- &pol->handle, 1000, /* flags */
- num_lookup_rids,
- &(*rid_mem)[i],
- &tmp_num_names,
- &tmp_names, &tmp_types);
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- /* Copy result into array. The talloc system will take
- care of freeing the temporary arrays later on. */
-
- memcpy(&(*names)[i], tmp_names, sizeof(char *) *
- tmp_num_names);
-
- memcpy(&(*name_types)[i], tmp_types, sizeof(uint32) *
- tmp_num_names);
-
- total_names += tmp_num_names;
- }
-
- *num_names = total_names;
-
- done:
- if (got_group_pol)
- cli_samr_close(pol->cli, pol->mem_ctx, &group_pol);
-
- return NT_STATUS_IS_OK(result);
-}
-
-BOOL wb_samr_query_dom_info(CLI_POLICY_HND *pol, uint16 switch_value,
- SAM_UNK_CTR *ctr)
-{
- NTSTATUS ret;
-
- ret = cli_samr_query_dom_info(pol->cli, pol->mem_ctx,
- &pol->handle, switch_value, ctr);
-
- return NT_STATUS_IS_OK(ret);
-}
-
-/* Unlike all the others, the status code of this function is actually used
- by winbindd. */
-
-NTSTATUS wb_samr_query_dispinfo(CLI_POLICY_HND *pol, uint32 *start_ndx,
- uint16 info_level, uint32 *num_entries,
- SAM_DISPINFO_CTR *ctr)
-{
- return cli_samr_query_dispinfo(pol->cli, pol->mem_ctx,
- &pol->handle, start_ndx,
- info_level, num_entries,
- 0xffff, ctr);
-}
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 9abc85f938..ae18fc9a53 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -819,7 +819,12 @@ int reply_ntcreate_and_X(connection_struct *conn,
if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type))
smb_action |= EXTENDED_OPLOCK_GRANTED;
+#if 1 /* JRATEST */
+ /* W2K sends back 42 words here ! */
+ set_message(outbuf,42,0,True);
+#else
set_message(outbuf,34,0,True);
+#endif
p = outbuf + smb_vwv2;