summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-08-27 23:39:38 +0000
committerGerald Carter <jerry@samba.org>2002-08-27 23:39:38 +0000
commite41d4ad5e68515ccb18a2a996a1e1c0901689bf4 (patch)
tree990c24250112efcb6a5a40ed8d0aff9a2680c32b
parentc8b769a940a06c7cd95385347bb6dcba7eacff06 (diff)
downloadsamba-e41d4ad5e68515ccb18a2a996a1e1c0901689bf4.tar.gz
samba-e41d4ad5e68515ccb18a2a996a1e1c0901689bf4.tar.xz
samba-e41d4ad5e68515ccb18a2a996a1e1c0901689bf4.zip
syncing up for 2.2.6pre2
-rw-r--r--docs/docbook/manpages/testparm.1.sgml5
-rw-r--r--docs/htmldocs/printer_driver2.html4
-rw-r--r--docs/manpages/testparm.15
-rw-r--r--examples/VFS/recycle/recycle.c2
-rw-r--r--packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl10
-rw-r--r--packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl7
-rw-r--r--packaging/Caldera/OpenLinux/samba2.spec-team.tmpl8
-rw-r--r--packaging/Caldera/OpenLinux/samba2.spec.tmpl6
-rw-r--r--packaging/Mandrake/README.mandrake117
-rw-r--r--packaging/Mandrake/makerpms-cvs.sh34
-rw-r--r--packaging/Mandrake/makerpms.sh.tmpl32
-rw-r--r--packaging/Mandrake/samba-2.2.5-gp-reloc-fix.patch12
-rw-r--r--packaging/Mandrake/samba-print-pdf.sh59
-rw-r--r--packaging/Mandrake/samba-slapd-include.conf15
-rw-r--r--packaging/Mandrake/samba.pamd1
-rw-r--r--packaging/Mandrake/samba2.spec.tmpl826
-rw-r--r--packaging/Mandrake/smb.conf55
-rw-r--r--packaging/Mandrake/winbind.init33
-rw-r--r--packaging/Solaris/prototype.master1
-rw-r--r--source/acconfig.h3
-rw-r--r--source/client/client.c6
-rwxr-xr-xsource/configure670
-rw-r--r--source/configure.in19
-rw-r--r--source/include/config.h.in9
-rw-r--r--source/include/includes.h9
-rw-r--r--source/include/local.h1
-rw-r--r--source/include/proto.h558
-rwxr-xr-xsource/include/rpc_spoolss.h3
-rw-r--r--source/include/smb.h42
-rw-r--r--source/include/smb_macros.h3
-rw-r--r--source/include/version.h2
-rw-r--r--source/lib/error.c3
-rw-r--r--source/lib/util_sock.c2
-rw-r--r--source/libsmb/cliconnect.c2
-rw-r--r--source/libsmb/libsmbclient.c2
-rw-r--r--source/param/loadparm.c18
-rw-r--r--source/passdb/passdb.c14
-rw-r--r--source/passdb/pdb_ldap.c1
-rw-r--r--source/printing/nt_printing.c87
-rw-r--r--source/profile/profile.c10
-rw-r--r--source/rpc_parse/parse_spoolss.c25
-rw-r--r--source/rpc_server/srv_samr_nt.c2
-rw-r--r--source/rpc_server/srv_spoolss_nt.c369
-rw-r--r--source/smbd/blocking.c56
-rw-r--r--source/smbd/nttrans.c155
-rw-r--r--source/smbd/process.c22
-rw-r--r--source/smbd/reply.c6
-rw-r--r--source/smbd/server.c4
-rw-r--r--source/smbd/trans2.c82
-rw-r--r--source/utils/status.c4
-rw-r--r--source/utils/testparm.c9
-rw-r--r--source/web/swat.c254
52 files changed, 2264 insertions, 1420 deletions
diff --git a/docs/docbook/manpages/testparm.1.sgml b/docs/docbook/manpages/testparm.1.sgml
index 320e39e6f58..9128d8f4c51 100644
--- a/docs/docbook/manpages/testparm.1.sgml
+++ b/docs/docbook/manpages/testparm.1.sgml
@@ -18,6 +18,7 @@
<command>testparm</command>
<arg choice="opt">-s</arg>
<arg choice="opt">-h</arg>
+ <arg choice="opt">-x</arg>
<arg choice="opt">-L &lt;servername&gt;</arg>
<arg choice="req">config filename</arg>
<arg choice="opt">hostname hostIP</arg>
@@ -69,6 +70,10 @@
<listitem><para>Print usage message </para></listitem>
</varlistentry>
+ <varlistentry>
+ <term>-x</term>
+ <listitem><para>Print only parameters that have non-default values</para></listitem>
+ </varlistentry>
<varlistentry>
<term>-L servername</term>
diff --git a/docs/htmldocs/printer_driver2.html b/docs/htmldocs/printer_driver2.html
index b3dbc9f9fcb..b94d0fbbfd4 100644
--- a/docs/htmldocs/printer_driver2.html
+++ b/docs/htmldocs/printer_driver2.html
@@ -165,7 +165,7 @@ CLASS="PARAMETER"
>printer driver
file</I
></TT
-> parameter, are being depreciated and should not
+> parameter, are being deprecated and should not
be used in new installations. For more information on this change,
you should refer to the <A
HREF="#MIGRATION"
@@ -984,4 +984,4 @@ disabled by default.</P
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/docs/manpages/testparm.1 b/docs/manpages/testparm.1
index 384f7bde0ab..13afa02c7ff 100644
--- a/docs/manpages/testparm.1
+++ b/docs/manpages/testparm.1
@@ -8,7 +8,7 @@
testparm \- check an smb.conf configuration file for internal correctness
.SH SYNOPSIS
.sp
-\fBtestparm\fR [ \fB-s\fR ] [ \fB-h\fR ] [ \fB-L <servername>\fR ] \fBconfig filename\fR [ \fBhostname hostIP\fR ]
+\fBtestparm\fR [ \fB-s\fR ] [ \fB-h\fR ] [\fB-x\fR] [ \fB-L <servername>\fR ] \fBconfig filename\fR [ \fBhostname hostIP\fR ]
.SH "DESCRIPTION"
.PP
This tool is part of the Sambasuite.
@@ -46,6 +46,9 @@ Sets the value of the %L macro to \fIservername\fR.
This is useful for testing include files specified with the
%L macro.
.TP
+\fB-x\fR
+Exclude from parameter list all parameters with values set at default.
+.TP
\fBconfigfilename\fR
This is the name of the configuration file
to check. If this parameter is not present then the
diff --git a/examples/VFS/recycle/recycle.c b/examples/VFS/recycle/recycle.c
index 4e7b6c7bcf3..4d793395ce3 100644
--- a/examples/VFS/recycle/recycle.c
+++ b/examples/VFS/recycle/recycle.c
@@ -326,7 +326,7 @@ static BOOL recycle_create_dir(connection_struct *conn, const char *dname)
pstrcpy(tempstr,dname);
y=tempstr;
/* Create directory tree if neccessary */
- while((c=strsep(&y,"/"))) {
+ for(c = strtok(y,"/"); c; c= strtok(NULL,"/")) {
pstrcat(newdir,c);
if (recycle_directory_exist(conn,newdir))
DEBUG(3, ("dir %s already exists\n",newdir));
diff --git a/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl
index 8af6974b58f..2b8bba8fb29 100644
--- a/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl
+++ b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl
@@ -28,10 +28,6 @@ Requires : libpam >= 0.66, SysVinit-scripts >= 1.04-6
BuildRoot : /tmp/%{Name}-%{Version}
Source: ftp://ftp.samba.org/pub/samba/%{Name}-%{Version}.tar.gz
-#Patch0: %{Name}-%{Version}-smbmount.patch
-#Patch1: %{Name}-%{Version}-install.patch
-#Patch2: %{Name}-%{Version}-smbconf.patch
-Patch6: %{Name}-2.2.2-libsmbclient.patch
%Package doc
Group : Server/Network
@@ -192,10 +188,6 @@ a clean and stable API for SMB client application development.
%Prep
%setup
-#%patch0 -p1
-#%patch1 -p1
-#%patch2 -p1
-%patch6 -p1
# instead of patch (to help configuration) ... ;^)
%{fixUP} -vbT source/Makefile.in -e '
@@ -265,7 +257,7 @@ done
%Build
cd source
-autoreconf
+#autoreconf
CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
--with-fhs \
diff --git a/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl
index 07b188d81be..86ed85a3513 100644
--- a/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl
+++ b/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl
@@ -28,10 +28,6 @@ Requires : libpam >= 0.66, SysVinit-scripts >= 1.04-6
BuildRoot : /tmp/%{Name}-%{Version}
Source: ftp://ftp.samba.org/pub/samba/%{Name}-%{Version}.tar.gz
-#Patch0: %{Name}-%{Version}-smbmount.patch
-#Patch1: %{Name}-%{Version}-install.patch
-#Patch2: %{Name}-%{Version}-smbconf.patch
-#Patch6: %{Name}-2.2.2-libsmbclient.patch
%Package doc
Group : Server/Network
@@ -191,9 +187,6 @@ a clean and stable API for SMB client application development.
%Prep
%setup
-#%patch0 -p1
-#%patch1 -p1
-#%patch2 -p1
# instead of patch (to help configuration) ... ;^)
%{fixUP} -vbT source/Makefile.in -e '
diff --git a/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl
index 216d23e6162..3d90ecc7fe9 100644
--- a/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl
+++ b/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl
@@ -28,11 +28,6 @@ Requires : libpam >= 0.66, SysVinit-scripts >= 1.04-6
BuildRoot : /tmp/%{Name}-%{Version}
Source: ftp://ftp.samba.org/pub/samba/%{Name}-%{Version}.tar.gz
-#Patch0: %{Name}-%{Version}-smbmount.patch
-#Patch1: %{Name}-%{Version}-install.patch
-#Patch2: %{Name}-%{Version}-smbconf.patch
-#Patch6: %{Name}-2.2.2-libsmbclient.patch
-Patch7: kanji-makefile.patch
%Package doc
Group : Server/Network
@@ -282,9 +277,6 @@ CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
--with-utmp \
--with-winbind \
--with-syslog
-# --with-tdbsam
-
-#%patch7 -p1
make LOGFILEBASE=/var/log/samba.d everything nsswitch/libnss_wins.so
diff --git a/packaging/Caldera/OpenLinux/samba2.spec.tmpl b/packaging/Caldera/OpenLinux/samba2.spec.tmpl
index 9b5299867c8..8036a112f27 100644
--- a/packaging/Caldera/OpenLinux/samba2.spec.tmpl
+++ b/packaging/Caldera/OpenLinux/samba2.spec.tmpl
@@ -29,9 +29,6 @@ Requires : libpam >= 0.66, SysVinit-scripts >= 1.04-6
BuildRoot : /tmp/%{Name}-%{Version}
Source: ftp://ftp.samba.org/pub/samba/%{Name}-%{Version}.tar.gz
-#Patch0: %{Name}-%{Version}-smbmount.patch
-#Patch1: %{Name}-%{Version}-install.patch
-#Patch2: %{Name}-%{Version}-smbconf.patch
%Package doc
@@ -188,9 +185,6 @@ verificar rapidamente o efeite de qualquer alteração.
%Prep
%setup
-#%patch0 -p1
-#%patch1 -p1
-#%patch2 -p1
# instead of patch (to help configuration) ... ;^)
%{fixUP} -vbT source/Makefile.in -e '
diff --git a/packaging/Mandrake/README.mandrake b/packaging/Mandrake/README.mandrake
new file mode 100644
index 00000000000..83920f238f1
--- /dev/null
+++ b/packaging/Mandrake/README.mandrake
@@ -0,0 +1,117 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+The Mandrake samba spec file used for packaging for Mandrake and cooker
+is now also used by the makerpms.sh script, and you can pass any options
+that you would normally pass to rpm via the makerpms.sh script.
+
+Note that only release after 8.1 support passing options using
+"--with <option>" syntax. The following options are available when
+building with the script:
+
+- --with|--without ldap
+- --with|--without acl
+- --with|--without winbind
+- --with|--without wins
+- --with vscan
+Using "--with vscan" requires that you place a copy of the samba-vscan
+tarball (coverted to bz2 using bzme) from:
+http://prdownloads.sourceforge.net/openantivirus/samba-vscan-0.2.5a.tar.gz?download in your rpm source directory:
+
+cp samba-vscan-0.2.5a.tar.gz `rpm --eval "%_sourcedir"`
+bzme `rpm --eval "%_sourcedir"`/samba-vscan-0.2.5a.tar.gz
+
+When using "--with vscan" you will probably want to enable a virus scanner
+also:
+- --with fprot
+- --with kaspersky
+- --with mks
+- --with openantivirus
+- --with sophos
+- --with symantec
+- --with trend
+
+You may need to do additional setup for your virus scanner to get this to
+work, please see ../../examples/VFS/<scanner>/INSTALL (after having started
+a build with "sh makerpms.sh --with vscan")
+
+Note that only sophos has been tested with the spec, but the rest should work
+(after the preparation). Reports of working scanners are welcome, and please
+report any that do not work (preferably with a fix :-)).
+
+So, to build ldap-enable RPMs for with antivirus support with sophos, but
+no acl support, use:
+sh makerpms.sh --with ldap --with vscan --with sophos --without acl
+
+The same features can be enabled on Mandrake 7.2/8.0 by editing samba2.spec,
+and changing the 0 to 1 to enable the option:
+
+%if %build_mdk80
+%define build_acl 0
+%define build_winbind 0
+%define build_wins 0
+%define build_ldap 0
+%endif
+
+Similar sections exist for the virus scanning options.
+
+(If you haven't rebuilt RPMs before, it is suggested that you take a
+brief look through http://www.linux-mandrake.com/howtos/mdk-rpm/,
+specifically sections 3.1 and 3.2)
+
+The defaults for Mandrake 8.1 and 8.2 are shown below:
+%if %build_mdk82
+%define build_acl 1
+%define build_winbind 1
+%define build_wins 1
+%define build_ldap 0
+%endif
+
+%if %build_mdk81
+%define build_acl 1
+%define build_winbind 0
+%define build_wins 0
+%define build_ldap 0
+%endif
+
+Note that building with LDAP support will only allow you to use smbpasswd's
+stored in ldap, not in the local smbpasswd file. From 2.2.5 onwards in the
+2.2 tree, ldap-enable RPMs now carry an ldap modifier to indicate this (for
+example, samba-server becomes samba-server-ldap).
+
+Building with acl requires that you have the acl development libraries.
+The libraries are standard on 8.1 and 8.2.
+ACLs can be used on Mandrake 8.0 with the updated kernel (to support XFS)
+if you install the RPMs available at
+http://ranger.dnsalias.com/mandrake/samba/RPMS/8.0/samba-2.2.1a_xfs/
+
+Note that precompiled binaries of samba are also available on my site:
+http://ranger.dnsalias.com/mandrake/samba
+and that of Sylvestre Taburet:
+http://people.mandrakesoft.com/~staburet/samba/
+
+If you have any problems with these RPMs, please send email to both
+bgmilne@cae.co.za and staburet@mandrakesoft.com
+
+These RPMs are provided as-is, are not official, and can not be
+supported by Mandrakesoft. However, we will do our best to provide
+reliable and well-packaged RPMS, since we use them on our own servers
+and those of clients.
+
+This file is signed with my gpg key, a copy of my public key is available
+at http://ranger.dnsalias.com/bgmilne.asc. The finger-print for this key
+follows:
+1024D/60D204A7 2919 E232 5610 A038 87B1 72D6 AC92 BA50 60D2 04A7
+
+Recent posts by me on samba@samba.org have been signed with this key,
+in case you really want to verify who I am to some extent.
+
+Buchan Milne
+18 June 2002
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.0.6 (GNU/Linux)
+
+iD8DBQE9D2h3rJK6UGDSBKcRAhtJAKC0fVkIMETgRxccrwLBcKZKHllCIACeNcZ9
+bxGZSTOHs57ir3wFR+3s0XM=
+=ifKf
+-----END PGP SIGNATURE-----
diff --git a/packaging/Mandrake/makerpms-cvs.sh b/packaging/Mandrake/makerpms-cvs.sh
new file mode 100644
index 00000000000..72c75b772b5
--- /dev/null
+++ b/packaging/Mandrake/makerpms-cvs.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+# makerpms-cvs.sh
+# A quick script to build RPMs from cvs to test packaging
+# Buchan Milne <bgmilne@cae.co.za>
+
+[ $# -lt 1 ] && echo "Usage: $0 <Samba version>" && exit 1
+
+VERSION=$1
+RELEASE=0.`date +%Y%m%d`
+shift
+
+# Replace PRELEASE and PVERSION with release number in all files ending with
+# .tmpl
+
+FILES=$(find . -name "*.tmpl" -type f)
+
+for i in $FILES;do
+ NEW=$(echo $i|sed -e 's/\.tmpl//g');
+ cat $i |sed -e 's/PVERSION/'$VERSION'/g; s/PRELEASE/'$RELEASE'/g'> $NEW ;
+done
+
+#Change up three directories, rename directory to samba-$VERSION, change back
+#then run makerpms.sh
+
+(
+CURRENT=$(pwd)
+cd $(dirname $(dirname $(dirname $CURRENT)))
+SAMBA_DIR=$(basename $(dirname $(dirname $CURRENT)))
+mv $SAMBA_DIR samba-$VERSION
+cd samba-$VERSION/packaging/Mandrake
+sh makerpms.sh $@
+cd $(dirname $(dirname $(dirname $CURRENT)))
+mv samba-$VERSION $SAMBA_DIR
+)
diff --git a/packaging/Mandrake/makerpms.sh.tmpl b/packaging/Mandrake/makerpms.sh.tmpl
index 06ea4499247..493de7e0cd5 100644
--- a/packaging/Mandrake/makerpms.sh.tmpl
+++ b/packaging/Mandrake/makerpms.sh.tmpl
@@ -50,33 +50,23 @@ echo "Compressing the source as bzip2, may take a while ..."
( cd ../../.. ; tar --exclude=CVS -cjf ${SRCDIR}/samba-${VERSION}.tar.bz2 samba-${VERSION} )
cp -av samba.spec ${SPECDIR}
-cp -a *.patch.bz2 *.xpm.bz2 smb.* samba.xinetd samba.log $SRCDIR
+# cp -a *.patch.bz2 *.xpm.bz2 smb.* samba.xinetd samba.log $SRCDIR
# Prepare to allow straight patches synced from Mandrake cvs:
-# This section is taken from my own build_from_cvs script, which
-# did all the same things. Buchan Milne <bgmilne@cae.co.za>, 20020422.
-#create new snapshots of the patches from distributions tree:
-PATCHES=$(find . -name '*.patch')
-ICONS=$(find '.' -name '*.xpm')
-CONFIGS=$(find `pwd` -name '*'|grep -v ".patch"|grep -v ".xpm"|grep -v "CVS")
-#for PATCH in $PATCHES;do
-bzip2 -kf $PATCHES
-bzip2 -kf $ICONS
+# Updating of sources and patches can be done more easily and accurately
+# by using info in the spec file. It won't work for files that use an rpm
+# macro in their name, but that shouldn't be a problem.
-#Copy bzip2'ed new snapshots to SOURCES:
-for PATCH in $PATCHES $ICONS;do
- echo "Updating patch or icon: `basename $PATCH`"
- cp -f $PATCH.bz2 $SRCDIR
- rm -f $PATCH.bz2;
-done
+SOURCES=`awk '/^Source/ {print $2}' samba.spec |grep -v "%{"`
+PATCHES=`awk '/^Patch/ {print $2}' samba.spec`
-#copy configs to SOURCES
-for CONFIG in $CONFIGS;do
- echo "Updating config file: `basename $CONFIG`"
- cp -f $CONFIG $SRCDIR;
+for i in $PATCHES $SOURCES;do
+ [ -e $i ] && cp -av $i $SRCDIR
+ i_nobz2=`echo $i|sed -e 's/.bz2$//'`
+ [ -e $i_nobz2 ] && bzip2 -kf $i_nobz2 && mv -fv $i $SRCDIR
done
echo Getting Ready to build release package
cd ${SPECDIR}
-rpm -ba -v --clean --rmsource samba.spec
+rpm -ba -v --clean --rmsource samba.spec $@
echo Done.
diff --git a/packaging/Mandrake/samba-2.2.5-gp-reloc-fix.patch b/packaging/Mandrake/samba-2.2.5-gp-reloc-fix.patch
new file mode 100644
index 00000000000..8888d6622e5
--- /dev/null
+++ b/packaging/Mandrake/samba-2.2.5-gp-reloc-fix.patch
@@ -0,0 +1,12 @@
+diff -ur samba-2.2.5.orig/examples/VFS/Makefile.in samba-2.2.5/examples/VFS/Makefile.in
+--- samba-2.2.5.orig/examples/VFS/Makefile.in 2002-06-17 20:35:09.000000000 +0200
++++ samba-2.2.5/examples/VFS/Makefile.in 2002-06-30 16:43:15.000000000 +0200
+@@ -4,7 +4,7 @@
+
+ CC=@CC@
+ LIBTOOL=@LIBTOOL@
+-CFLAGS=@CFLAGS@
++CFLAGS=@CFLAGS@ -DPIC -fPIC
+ LDFLAGS=@LDFLAGS@
+
+ VFS_OBJS=audit.so skel.so block/block.so recycle/recycle.so
diff --git a/packaging/Mandrake/samba-print-pdf.sh b/packaging/Mandrake/samba-print-pdf.sh
new file mode 100644
index 00000000000..5c744f0a83d
--- /dev/null
+++ b/packaging/Mandrake/samba-print-pdf.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+# samba-print-pdf
+# This is a script which allows you to set up a virtual printer on samba
+# which will take the file (generated by a postscript filter on windows)
+# and turn it into a PDF, informing the user of where it is when it
+# is done
+#
+# Buchan Milne <bgmilne@cae.co.za> 20020723
+#
+# Arguments:
+# $1 = file (usually passed with %s from samba)
+# $2 = unix prefix to where to place the file (~%u should work)
+# $3 = windows prefix to the same location (\\%L\%u should work)
+# $4 = user/computer to send a notification to (%u or %m)
+# $5 = IP address of client (%I)
+
+
+PS2PDF=ps2pdf13
+OPTIONS="-dAutoFilterColorImages=false -sColorImageFilter=FlateEncode"
+INPUT=$1
+KEEP_PS=1
+PERMS=640
+INFILE=$(basename $INPUT)
+BASEFILE=pdf-service
+
+#make a temp file to use for the output of the PDF
+OUTPUT=`mktemp -q $2/$BASEFILE-XXXXXX`
+if [ $? -ne 0 ]; then
+ echo "$0: Can't create temp file $2/$BASEFILE-XXXXXX, exiting..."
+ exit 1
+fi
+
+WIN_OUTPUT="$3\\`basename $OUTPUT`"
+
+# create the PDF:
+$PS2PDF $OPTOINS $INPUT $OUTPUT.pdf >/dev/null 2>&1
+
+# Generate a message to send to the user, and deal with the original file:
+MESSAGE=$(echo "Your PDF file has been created as $WIN_OUTPUT.pdf\n")
+
+if [ $KEEP_PS ];then
+ mv $INPUT $OUTPUT.ps
+ MESSAGE=$(echo "$MESSAGE and your postscript file as $WIN_OUTPUT.ps")
+ # Fix permissions on the generated files
+ chmod $PERMS $OUTPUT.ps
+else
+ rm -f $INPUT
+ chmod $PERMS $OUTPUT.ps $OUTPUT.pdf
+ # Fix permissions on the generated files
+fi
+
+chmod $PERMS $OUTPUT.ps $OUTPUT.pdf
+
+#Remove empty file from mktemp:
+rm -f $OUTPUT
+
+# Send notification to user
+echo -e $MESSAGE|smbclient -M $4 -I $5 -U "PDF Generator" >/dev/null 2>&1
+
diff --git a/packaging/Mandrake/samba-slapd-include.conf b/packaging/Mandrake/samba-slapd-include.conf
new file mode 100644
index 00000000000..9c065b6f737
--- /dev/null
+++ b/packaging/Mandrake/samba-slapd-include.conf
@@ -0,0 +1,15 @@
+# You should either include this file into your
+# /etc/openldap/slapd.conf, or add the contents (after editing), inside
+# the db definition your samba server will use.
+
+
+# Index the rid for samba:
+index rid eq
+
+
+# Basic samba acl:
+access to attrs=lmPassword,ntPassword
+ by dn="cn=root,dc=mydomain,dc=com" write
+ by dn="uid=root,ou=People,dc=mydomain,dc=com" write
+ by * none
+
diff --git a/packaging/Mandrake/samba.pamd b/packaging/Mandrake/samba.pamd
index 30912de1726..27eeb99e32a 100644
--- a/packaging/Mandrake/samba.pamd
+++ b/packaging/Mandrake/samba.pamd
@@ -3,3 +3,4 @@ auth required /lib/security/pam_nologin.so
auth required /lib/security/pam_stack.so service=system-auth
account required /lib/security/pam_stack.so service=system-auth
session required /lib/security/pam_stack.so service=system-auth
+password required /lib/security/pam_stack.so service=system-auth
diff --git a/packaging/Mandrake/samba2.spec.tmpl b/packaging/Mandrake/samba2.spec.tmpl
index 321f075864e..5c0037388fc 100644
--- a/packaging/Mandrake/samba2.spec.tmpl
+++ b/packaging/Mandrake/samba2.spec.tmpl
@@ -1,42 +1,57 @@
-%define ver 2.2.3a
-%define rel 11
+%define ver 2.2.5
+%define rel 16mdk
+%define vscanver 0.2.5c
-# PVERSION and PRELEASE replace by samba-team at release
+# 2.2.4 and 1 replace by samba-team at release
%define pversion PVERSION
%define prelease PRELEASE
# For testing this setup:
-#%define pversion 2.2.4
-#%define prelease %(date +%Y%m%d)
+#%define pversion1 2.2.5
+#%define prelease1 %(date +%Y%m%d)
#Check to see if p(version|release) has been replaced (1 if replaced)
%define have_pversion %(if [ "%pversion" = `echo "pversion" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi)
%define have_prelease %(if [ "%prelease" = `echo "prelease" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi)
+# Check to see if we are running a build from a tarball release from samba.org
+# (%have_pversion) If so, disable vscan, unless explicitly requested
+# (--with vscan).
+%define build_vscan 1
+%if %have_pversion
+%define build_vscan 0
+%{?_with_vscan: %define build_vscan 1}
+%endif
+
# We now do detection of the Mandrake release we are building on:
-%define build_cooker %(if [ `awk '{print $3}' /etc/mandrake-release` = "Cooker" ];then echo 1; else echo 0; fi)
+#%define build_cooker %(if [ `awk '{print $3}' /etc/mandrake-release` = "Cooker" ];then echo 1; else echo 0; fi)
+#%define build_cooker %(if [[ `cat /etc/mandrake-release|grep Cooker` ]];then echo 1; else echo 0; fi)
+%define build_mdk90 %(if [ `awk '{print $4}' /etc/mandrake-release` = 9.0 ];then echo 1; else echo 0; fi)
+%define build_mdk83 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.3 ];then echo 1; else echo 0; fi)
%define build_mdk82 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.2 ];then echo 1; else echo 0; fi)
%define build_mdk81 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.1 ];then echo 1; else echo 0; fi)
%define build_mdk80 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.0 ];then echo 1; else echo 0; fi)
%define build_mdk72 %(if [ `awk '{print $4}' /etc/mandrake-release` = 7.2 ];then echo 1; else echo 0; fi)
%define build_non_default 0
-# Set defaults for each version
-%if %build_cooker
%define build_acl 1
%define build_winbind 1
%define build_wins 1
-%define build_ldap 1
+%define build_ldap 0
+
+# Set defaults for each version
+%if %build_mdk90
+%define build_ldap 0
+%endif
+
+%if %build_mdk83
+%define build_ldap 0
%endif
%if %build_mdk82
-%define build_acl 1
-%define build_winbind 1
-%define build_wins 1
%define build_ldap 0
%endif
%if %build_mdk81
-%define build_acl 1
%define build_winbind 0
%define build_wins 0
%define build_ldap 0
@@ -63,19 +78,43 @@
%{?_with_acl: %{expand: %%define build_non_default 1}}
%{?_without_acl: %{expand: %%define build_acl 0}}
%{?_without_acl: %{expand: %%define build_non_default 1}}
-%{?_with_winbind: %{expand: %%define build_winbind 1}}
+%{?_with_winbind: %{expand: %%global build_winbind 1}}
%{?_with_winbind: %{expand: %%define build_non_default 1}}
-%{?_without_winbind: %{expand: %%define build_winbind 0}}
+%{?_without_winbind: %{expand: %%global build_winbind 0}}
%{?_without_winbind: %{expand: %%define build_non_default 1}}
-%{?_with_wins: %{expand: %%define build_wins 1}}
+%{?_with_wins: %{expand: %%global build_wins 1}}
%{?_with_wins: %{expand: %%define build_non_default 1}}
-%{?_without_wins: %{expand: %%define build_wins 0}}
+%{?_without_wins: %{expand: %%global build_wins 0}}
%{?_without_wins: %{expand: %%define build_non_default 1}}
-%{?_with_ldap: %{expand: %%define build_ldap 1}}
+%{?_with_ldap: %{expand: %%global build_ldap 1}}
%{?_with_ldap: %{expand: %%define build_non_default 1}}
-%{?_without_ldap: %{expand: %%define build_ldap 0}}
+%{?_without_ldap: %{expand: %%global build_ldap 0}}
%{?_without_ldap: %{expand: %%define build_non_default 1}}
+# As if that weren't enough, we're going to try building with antivirus
+# support as an option also
+%define build_fprot 0
+%define build_kaspersky 0
+%define build_mks 0
+%define build_openantivirus 0
+%define build_sophos 0
+%define build_symantec 0
+%define build_trend 0
+%if %build_vscan
+%{?_with_fprot: %{expand: %%global build_fprot 1}}
+%{?_with_kaspersky: %{expand: %%global build_kaspersky 1}}
+%{?_with_mks: %{expand: %%global build_mks 1}}
+%{?_with_openav: %{expand: %%global build_openantivirus 1}}
+%{?_with_sophos: %{expand: %%global build_sophos 1}}
+%{?_with_symantec: %{expand: %%global build_symantec 1}}
+%{?_with_trend: %{expand: %%global build_trend 1}}
+%define vscandir "samba-vscan-%{vscanver}"
+%endif
+%define vfsdir "examples.bin/VFS"
+
+#Workaround missing macros in 8.x:
+%{!?perl_vendorlib: %{expand: %%global perl_vendorlib %{perl_sitearch}/../}}
+
Summary: Samba SMB server.
Name: samba
%if %have_pversion
@@ -84,7 +123,7 @@ Version: %{pversion}
Version: %{ver}
%endif
%if %have_prelease
-Release: 0.%{prelease}.1mdk
+Release: 1.%{prelease}mdk
%else
Release: %{rel}
%endif
@@ -97,36 +136,34 @@ Source3: samba.xinetd
Source4: swat_48.xpm.bz2
Source5: swat_32.xpm.bz2
Source6: swat_16.xpm.bz2
-Source7: README.samba-%{ver}-%{rel}
-#The japanese language patches are large, ignoring them now
-#Patch100: samba-j.patch.bz2
-# For some reason this won't apply as part of the -j patch
-# Seems to have been applied in samba-2.2.3
-#Patch111: samba-2.2.0-ook.patch.bz2
-#Patch200: samba-j-2.patch.bz2
-Patch: samba-2.2.0-makefilepath.patch.bz2
+Source7: README.samba-%{version}-%{release}
+%if %build_vscan
+Source8: samba-vscan-%{vscanver}.tar.bz2
+%endif
+Source10: samba-print-pdf.sh.bz2
Patch1: smbw.patch.bz2
-Patch2: samba-glibc21.patch.bz2
-#Patch3: network-recycle_bin.patch.bz2
-#Patch4: samba-nsl.patch.bz2
Patch5: samba-2.2.0-gawk.patch.bz2
-Patch6: system-auth-winbind.pamd.patch.bz2
#Patch11: samba-2.0.7-smbspool-guest.patch.bz2
Patch12: samba-2.2.0-buildroot.patch.bz2
#Patch16: samba-mkdir.patch.bz2
Patch17: smbmount-sbin.patch.bz2
+Patch18: samba-2.2.5-gp-reloc-fix.patch.bz2
%if !%have_pversion
# Version specific patches: current version
-Patch7: samba-2.2.3a-init.patch.bz2
-Patch20: samba-2.2.3a-LDAP-schema.patch.bz2
-Patch21: samba-2.2.3a-cli_spoolss_notify.patch.bz2
-Patch22: samba-2.2.3a-pam_smbpass.patch.bz2
-Patch23: samba-2.2.3a-srv_spoolss_nt.patch.bz2
+Patch26: samba-2.2.5-smb.conf.patch.bz2
+Patch28: samba-2.2.5-ldap_start_tls.patch.bz2
+Patch29: samba-2.2.5-parse_sec.patch.bz2
+Patch30: samba-2.2.5-nt-dirlisting.patch.bz2
+Patch31: samba-2.2.5-random_smbd-read.patch.bz2
+Patch32: samba-2.2.5-winbind-init.patch.bz2
+Patch33: samba-2.2.5-pam-password.patch.bz2
+Patch34: samba-2.2.5-win2k_copy_bug.patch.bz2
+Patch35: samba-2.2.5-samba-ldap-include-conf.patch.bz2
%else
# Version specific patches: upcoming version
%endif
Requires: pam >= 0.64, samba-common = %{version}
-BuildRequires: pam-devel autoconf
+BuildRequires: pam-devel autoconf readline-devel
%if %build_acl
BuildRequires: libacl-devel
%endif
@@ -177,6 +214,62 @@ see README.samba-%{ver}-%{rel} in the documentation for
more information.
%endif
+%if %build_ldap
+%package server-ldap
+Summary: Samba (SMB) server programs with LDAP (only) support
+Obsoletes: samba-server
+Provides: samba-server
+Requires: samba-common-ldap = %{version}
+%else
+%package server
+Summary: Samba (SMB) server programs.
+Obsoletes: samba-server-ldap
+Requires: samba-common = %{version}
+%endif
+Group: Networking/Other
+Provides: samba
+Obsoletes: samba
+
+%if %build_ldap
+%description server-ldap
+%else
+%description server
+%endif
+Samba-server provides a SMB server which can be used to provide
+network services to SMB (sometimes called "Lan Manager")
+clients. Samba uses NetBIOS over TCP/IP (NetBT) protocols
+and does NOT need NetBEUI (Microsoft Raw NetBIOS frame)
+protocol.
+
+Samba-2.2 features working NT Domain Control capability and
+includes the SWAT (Samba Web Administration Tool) that
+allows samba's smb.conf file to be remotely managed using your
+favourite web browser. For the time being this is being
+enabled on TCP port 901 via xinetd. SWAT is now included in
+it's own subpackage, samba-swat.
+
+Users are advised to use Samba-2.2 as a Windows NT4
+Domain Controller only on networks that do NOT have a Windows
+NT Domain Controller. This release does NOT as yet have
+Backup Domain control ability.
+
+Please refer to the WHATSNEW.txt document for fixup information.
+This binary release includes encrypted password support.
+
+Please read the smb.conf file and ENCRYPTION.txt in the
+docs directory for implementation details.
+
+%if %build_ldap
+This package was compiled with LDAP support, which means that
+passwords can ONLY be stored in LDAP, not in smbpasswd files.
+To migrate your passwords from smbpasswd into LDAP, try
+examples/LDAP/import_smbpasswd.pl using:
+/usr/share/samba/scripts/import_smbpasswd.pl </etc/samba/smbpasswd
+
+Scripts for managing users in LDAP have been added to
+/usr/share/samba/scripts, configuration is in /etc/samba/smbldap_conf.pm
+%endif
+
%package client
Summary: Samba (SMB) client programs.
Group: Networking/Other
@@ -188,11 +281,23 @@ Samba-client provides some SMB clients, which complement the built-in
SMB filesystem in Linux. These allow the accessing of SMB shares, and
printing to SMB printers.
+%if %build_ldap
+%package common-ldap
+Summary: Files used by both Samba servers and clients with LDAP support
+Obsoletes: samba-common
+Provides: samba-common
+%else
%package common
Summary: Files used by both Samba servers and clients.
+Obsoletes: samba-common-ldap
+%endif
Group: System/Servers
+%if %build_ldap
+%description common-ldap
+%else
%description common
+%endif
Samba-common provides files necessary for both the server and client
packages of Samba.
@@ -205,13 +310,28 @@ Requires: samba-common = %{version}
Samba-doc provides documentation files for both the server and client
packages of Samba.
+%if %build_ldap
+%package swat-ldap
+Summary: The Samba Web Administration Tool (with LDAP support)
+Obsoletes: samba-swat
+Provides: samba-swat
+Requires: samba-server-ldap = %{version}
+%else
%package swat
Summary: The Samba Web Administration Tool.
+Obsoletes: samba-swat-ldap
+Requires: samba-server = %{version}
+%endif
+Requires: xinetd
Group: System/Servers
-Requires: samba = %{version} xinetd
+Provides: samba-swat swat
+%if %build_ldap
+%description swat-ldap
+%else
%description swat
-SWAT (the Samba Web Administration Tool) allows samba's smb.conf file
+%endif
+SWAT (the Samba Web Administration Tool) allows the samba smb.conf file
to be remotely managed using your favourite web browser. For the time
being this is being enabled on TCP port 901 via xinetd. Note that
SWAT does not use SSL encryption, nor does it preserve comments in
@@ -221,12 +341,29 @@ them, and is therefore the preferred method for remotely managing
Samba.
-%if %build_winbind
+%if %build_winbind && %build_ldap
+%package winbind-ldap
+Requires: samba-common-ldap = %{version}
+Obsoletes: samba-winbind
+Provides: samba-winbind
+%endif
+%if %build_winbind && !%build_ldap
%package winbind
+Requires: samba-common = %{version}
+Obsoletes: samba-winbind-ldap
+%endif
+%if %build_winbind
Summary: Samba-winbind daemon, utilities and documentation
Group: System/Servers
-Requires: samba-common = %{version}
+Provides: winbind samba-winbind
+%endif
+%if %build_winbind && %build_ldap
+%description winbind-ldap
+%endif
+%if %build_winbind && !%build_ldap
%description winbind
+%endif
+%if %build_winbind
Provides the winbind daemon and testing tools to allow authentication
and group/user enumeration from a Windows or Samba domain controller.
%endif
@@ -242,6 +379,84 @@ Provides the libnss_wins shared library which resolves NetBIOS names to
IP addresses.
%endif
+#Antivirus packages:
+%if %build_fprot
+%package vscan-fprot
+Summary: On-access virus scanning for samba using FPROT
+Group: System/Servers
+Requires: samba = %{version}
+Autoreq: 0
+%description vscan-fprot
+A vfs-module for samba to implement on-access scanning using the
+FPROT antivirus software (which must be installed to use this).
+%endif
+
+%if %build_kaspersky
+%package vscan-kaspersky
+Summary: On-access virus scanning for samba using Kaspersky
+Group: System/Servers
+Requires: samba = %{version}
+Autoreq: 0
+%description vscan-kaspersky
+A vfs-module for samba to implement on-access scanning using the
+Kaspersky antivirus software (which must be installed to use this).
+%endif
+
+%if %build_mks
+%package vscan-mks
+Summary: On-access virus scanning for samba using MKS
+Group: System/Servers
+Requires: samba = %{version}
+Autoreq: 0
+%description vscan-mks
+A vfs-module for samba to implement on-access scanning using the
+MKS antivirus software (which must be installed to use this).
+%endif
+
+%if %build_openantivirus
+%package vscan-openantivirus
+Summary: On-access virus scanning for samba using OpenAntivirus
+Group: System/Servers
+Requires: samba = %{version}
+Autoreq: 0
+%description vscan-openantivirus
+A vfs-module for samba to implement on-access scanning using the
+OpenAntivirus antivirus software (which must be installed to use this).
+%endif
+
+%if %build_sophos
+%package vscan-sophos
+Summary: On-access virus scanning for samba using Sophos
+Group: System/Servers
+Requires: samba = %{version}
+Autoreq: 0
+%description vscan-sophos
+A vfs-module for samba to implement on-access scanning using the
+Sophos antivirus software (which must be installed to use this).
+%endif
+
+%if %build_symantec
+%package vscan-symantec
+Summary: On-access virus scanning for samba using Symantec
+Group: System/Servers
+Requires: samba = %{version}
+Autoreq: 0
+%description vscan-symantec
+A vfs-module for samba to implement on-access scanning using the
+Symantec antivirus software (which must be installed to use this).
+%endif
+
+%if %build_trend
+%package vscan-trend
+Summary: On-access virus scanning for samba using Trend
+Group: System/Servers
+Requires: samba = %{version}
+Autoreq: 0
+%description vscan-trend
+A vfs-module for samba to implement on-access scanning using the
+Trend antivirus software (which must be installed to use this).
+%endif
+
%prep
# Build a summary of how this RPM was built:
%if %build_acl
@@ -275,34 +490,52 @@ echo "at build time: $RPM_EXTRA_OPTIONS">>%{SOURCE7}
echo "This rpm was built with default options">%{SOURCE7}
%endif
+%if %build_vscan
+%setup -q -a 8
+%else
%setup -q
+%endif
#%patch111 -p1
%patch1 -p1 -b .smbw
-#%patch3 -p1 -b .net-r_bin
-#%patch4 -p1 -b .nsl
%patch5 -p1 -b .gawk
-#%patch6 -p1
#%patch7 -p1
#%patch11 -p0 -b .smbspool
%patch12 -p1 -b .buildroot
%patch17 -p1
+%patch18 -p1 -b .gp-reloc-fix
+
# Version specific patches: current version
%if !%have_pversion
echo "Applying patches for current version: %{ver}"
-%patch20 -p1
-%patch21 -p1
-%patch22 -p1
-%patch23 -p1
+%patch26 -p1 -b .mdk
+%patch28 -p1
+%patch29 -p1
+%patch30 -p1
+%patch31 -p1
+%patch32 -p1
+%patch33 -p1
+%patch34 -p1
+%patch35 -p1
%else
# Version specific patches: upcoming version
-echo "Applying patches for new verions: %{pversion}"
+echo "Applying patches for new versions: %{pversion}"
%endif
cp %{SOURCE7} .
+# Make a copy of examples so that we have a clean one for doc:
+cp -a examples examples.bin
+
+%if %build_vscan
+# put antivirus files in examples.bin/VFS/
+for av in fprot kaspersky mks openantivirus sophos symantec trend; do
+ cp -a %{vscandir}/$av %{vfsdir}
+done
+%endif
+
%build
#%serverbuild
-cd source
+(cd source
autoconf
CPPFLAGS="-I/usr/include/openssl"; export CPPFLAGS
CFLAGS="$RPM_OPT_FLAGS"
@@ -324,6 +557,7 @@ CFLAGS="$RPM_OPT_FLAGS"
--with-utmp \
--with-msdfs \
--with-smbwrapper \
+ --with-libsmbclient \
%if %build_acl
--with-acl-support \
%endif
@@ -333,17 +567,51 @@ CFLAGS="$RPM_OPT_FLAGS"
--with-quotas
#make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" all
-make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" all smbfilter smbwrapper smbcacls pam_smbpass nsswitch nsswitch/libnss_wins.so debug2html
-
-cd ../examples/VFS
-%configure --prefix=%{prefix} \
- --with-fhs \
- --libdir=/etc/samba \
- --sysconfdir=/etc/samba \
- --localstatedir=/var
+make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \
+ all smbfilter smbwrapper smbcacls pam_smbpass nsswitch nsswitch/libnss_wins.so debug2html
+# Build VFS modules (experimental)
+cd ../%vfsdir
+%configure --prefix=%{prefix} \
+ --mandir=%{prefix}/share/man
make
-cd block
+#make CFLAGS="$RPM_OPT_FLAGS -I../../source -I../../source/include -I../../source/ubiqx \
+# -I../../source/smbwrapper -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
+)
+
+# Build mkntpasswd in examples/LDAP/ for smbldaptools
+(
+cd examples.bin/LDAP/smbldap-tools/mkntpwd
make
+)
+
+# Build antivirus vfs objects:
+%if %build_fprot
+echo "Building fprot"
+%endif
+%if %build_kaspersky
+echo "Building Kaspersky"
+(cd %{vfsdir}/kaspersky;make)
+%endif
+%if %build_mks
+echo "Building mks"
+(cd %{vfsdir}/mks;make)
+%endif
+%if %build_openantivirus
+echo "Building OpenAntivirus"
+(cd %{vfsdir}/openantivirus;make)
+%endif
+%if %build_sophos
+echo "building sophos"
+(cd %{vfsdir}/sophos;make)
+%endif
+%if %build_symantec
+echo "Building symantec"
+(cd %{vfsdir}/symantec;make)
+%endif
+%if %build_trend
+echo "Building Trend"
+(cd %{vfsdir}/trend;make)
+%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -363,8 +631,10 @@ mkdir -p $RPM_BUILD_ROOT/var/spool/samba
mkdir -p $RPM_BUILD_ROOT/var/lib/samba/{netlogon,profiles,printers}
mkdir -p $RPM_BUILD_ROOT/var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC}
mkdir -p $RPM_BUILD_ROOT/var/lib/samba/codepages/src
-mkdir -p $RPM_BUILD_ROOT/lib/{security,samba}
+mkdir -p $RPM_BUILD_ROOT/lib/security
mkdir -p $RPM_BUILD_ROOT%prefix/lib
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/samba/vfs
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/samba/scripts
# Install standard binary files
@@ -375,11 +645,26 @@ do
install -m755 source/bin/$i $RPM_BUILD_ROOT/%{prefix}/bin
done
-install -m 755 source/bin/smbwrapper.so $RPM_BUILD_ROOT%prefix/lib/smbwrapper.so
-install -m 755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security/pam_smbpass.so
-install -m 755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security/pam_winbind.so
+install -m755 source/bin/smbwrapper.so $RPM_BUILD_ROOT%prefix/lib/smbwrapper.so
+install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security/pam_smbpass.so
+install -m755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security/pam_winbind.so
+install -m755 source/bin/libsmbclient.so $RPM_BUILD_ROOT%prefix/lib/libsmbclient.so
-#for i in addtosmbpass mksmbpasswd.sh smbtar convert_smbpasswd
+# Install VFS modules
+install -m755 %vfsdir/audit.so $RPM_BUILD_ROOT/%{_libdir}/samba/vfs
+for i in block recycle
+do
+ install -m755 %vfsdir/$i/$i.so $RPM_BUILD_ROOT/%{_libdir}/samba/vfs
+done
+
+# Antivirus support:
+# mkdir -p $RPM_BUILD_ROOT%{_libdir}/samba/vfs/vscan
+ for av in fprotd kavp mksd oav sophos symantec trend; do
+ if [ -d %{vfsdir}/$av -a -e %{vfsdir}/$av/vscan-$av.so ];then
+ cp %{vfsdir}/$av/vscan-$av.so \
+ $RPM_BUILD_ROOT%{_libdir}/samba/vfs/
+ fi
+ done
for i in mksmbpasswd.sh smbtar convert_smbpasswd
do
@@ -404,23 +689,23 @@ done
# Install codepage source files
-for i in 437 737 775 850 852 857 861 866 932 936 949 950 1251
+for i in 437 737 775 850 852 857 861 862 866 932 936 949 950 1125 1251
do
install -m644 source/codepages/codepage_def.$i $RPM_BUILD_ROOT/var/lib/samba/codepages/src
done
-for i in 437 737 775 850 852 857 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-13 ISO8859-15 KOI8-R
+for i in 437 737 775 850 852 857 861 862 866 932 936 949 950 1125 1251 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-13 ISO8859-15 KOI8-R KOI8-U
do
install -m644 source/codepages/CP$i.TXT $RPM_BUILD_ROOT/var/lib/samba/codepages/src
done
# Build codepage load files
-for i in 437 737 775 850 852 857 861 866 932 936 949 950 1251; do
+for i in 437 737 775 850 852 857 861 862 866 932 936 949 950 1125 1251; do
$RPM_BUILD_ROOT/%{prefix}/bin/make_smbcodepage c $i $RPM_BUILD_ROOT/var/lib/samba/codepages/src/codepage_def.$i $RPM_BUILD_ROOT/var/lib/samba/codepages/codepage.$i
done
# Build unicode load files
-for i in 437 737 775 850 852 857 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-13 ISO8859-15 KOI8-R; do
+for i in 437 737 775 850 852 857 861 862 866 932 936 949 950 1125 1251 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-13 ISO8859-15 KOI8-R KOI8-U; do
$RPM_BUILD_ROOT/%{prefix}/bin/make_unicodemap $i $RPM_BUILD_ROOT/var/lib/samba/codepages/src/CP$i.TXT $RPM_BUILD_ROOT/var/lib/samba/codepages/unicode_map.$i
done
rm -rf $RPM_BUILD_ROOT/var/lib/samba/codepages/src
@@ -461,6 +746,7 @@ done
# Install other stuff
+ install -m644 examples/VFS/recycle/recycle.conf $RPM_BUILD_ROOT/etc/samba/
install -m644 packaging/Mandrake/smb.conf $RPM_BUILD_ROOT/etc/samba/smb.conf
install -m644 packaging/Mandrake/smbusers $RPM_BUILD_ROOT/etc/samba/smbusers
install -m755 packaging/Mandrake/smbprint $RPM_BUILD_ROOT/usr/bin
@@ -474,13 +760,35 @@ done
install -m644 packaging/Mandrake/system-auth-winbind.pamd $RPM_BUILD_ROOT/etc/pam.d/system-auth-winbind
#
install -m644 $RPM_SOURCE_DIR/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
+ install -m644 packaging/Mandrake/samba-slapd-include.conf $RPM_BUILD_ROOT%{_sysconfdir}/samba/samba-slapd.include
+
+# Install smbldap-tools scripts:
+for i in examples/LDAP/smbldap-tools/*.pl; do
+ install -m 750 $i $RPM_BUILD_ROOT/%{_datadir}/samba/scripts/
+done
+
+install -m 750 examples/LDAP/smbldap-tools/smbldap_tools.pm $RPM_BUILD_ROOT/%{_datadir}/samba/scripts/
+
+# The conf file
+install -m 640 examples/LDAP/smbldap-tools/smbldap_conf.pm $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}
-# Install VFS Modules
- install -m755 examples/VFS/audit.so $RPM_BUILD_ROOT/lib/samba/
- install -m755 examples/VFS/recycle.so $RPM_BUILD_ROOT/lib/samba/
- install -m755 examples/VFS/block/block.so $RPM_BUILD_ROOT/lib/samba/
- install -m644 examples/VFS/block/smb-block.conf $RPM_BUILD_ROOT/etc/samba/
- install -m644 examples/VFS/block/smb.conf $RPM_BUILD_ROOT/etc/samba/smb.conf.example-with-block
+# Link both smbldap*.pm into vendor-perl (any better ideas?)
+mkdir -p %{buildroot}/%{perl_vendorlib}
+ln -s %{_sysconfdir}/samba/smbldap_conf.pm $RPM_BUILD_ROOT/%{perl_vendorlib}
+ln -s %{_datadir}/samba/scripts/smbldap_tools.pm $RPM_BUILD_ROOT/%{perl_vendorlib}
+
+#mkntpwd
+install -m750 examples.bin/LDAP/smbldap-tools/mkntpwd/mkntpwd %{buildroot}/%{_sbindir}
+
+# Samba smbpasswd migration script:
+install -m700 examples/LDAP/export_smbpasswd.pl $RPM_BUILD_ROOT/%{_datadir}/samba/scripts/
+install -m700 examples/LDAP/import_smbpasswd.pl $RPM_BUILD_ROOT/%{_datadir}/samba/scripts/
+
+
+
+# make a conf file for winbind from the default one:
+ cat packaging/Mandrake/smb.conf|sed -e 's/^; winbind/ winbind/g;s/^; obey pam/ obey pam/g; s/^; printer admin = @"D/ printer admin = @"D/g;s/^; password server = \*/ password server = \*/g;s/^; template/ template/g; s/^ security = user/ security = domain/g' > packaging/Mandrake/smb-winbind.conf
+ install -m644 packaging/Mandrake/smb-winbind.conf $RPM_BUILD_ROOT/etc/samba/smb-winbind.conf
# Link smbmount to /sbin/mount.smb and /sbin/mount.smbfs
@@ -516,17 +824,26 @@ bzcat %{SOURCE4} > $RPM_BUILD_ROOT%{_liconsdir}/swat.xpm
bzcat %{SOURCE5} > $RPM_BUILD_ROOT%{_iconsdir}/swat.xpm
bzcat %{SOURCE6} > $RPM_BUILD_ROOT%{_miconsdir}/swat.xpm
+bzcat %{SOURCE10}> $RPM_BUILD_ROOT%{_datadir}/samba/scripts/print-pdf
%clean
rm -rf $RPM_BUILD_ROOT
-%post -n samba
+%if %build_ldap
+%post -n samba-server-ldap
+%else
+%post -n samba-server
+%endif
%_post_service smb
#/sbin/chkconfig --level 35 smb on
# Add a unix group for samba machine accounts
groupadd -frg 421 machines
+%if %build_ldap
+%post -n samba-common-ldap
+%else
%post -n samba-common
+%endif
# Basic migration script for pre-2.2.1 users,
# since smb config moved from /etc to /etc/samba
@@ -568,6 +885,12 @@ ln -sf /usr/lib/smbwrapper.so /usr/bin/smbwrapper.so
echo "Creating password file for samba..."
touch /etc/samba/smbpasswd
}
+
+# And this too, in case we don't have smbd to create it for us
+[ -f /var/cache/samba/unexpected.tdb ] || {
+ touch /var/cache/samba/unexpected.tdb
+}
+
# Let's define the proper paths for config files
perl -pi -e 's/(\/etc\/)(smb)/\1samba\/\2/' /etc/samba/smb.conf
@@ -580,8 +903,13 @@ fi
# And not loose our machine account SID
[ -f /etc/MACHINE.SID ] && mv -f /etc/MACHINE.SID /etc/samba/ ||:
-%if %build_winbind
+%if %build_winbind && %build_ldap
+%post -n samba-winbind-ldap
+%endif
+%if %build_winbind && !%build_ldap
%post -n samba-winbind
+%endif
+%if %build_winbind
%_post_service winbind
if [ $1 = 1 ]; then
# /sbin/chkconfig winbind on
@@ -600,7 +928,15 @@ if [ $1 = 1 ]; then
if [ -f /etc/nsswitch.conf.rpmtemp ];then
rm -f /etc/nsswitch.conf.rpmtemp;fi
fi
+%endif
+
+%if %build_winbind && %build_ldap
+%preun -n samba-winbind-ldap
+%endif
+%if %build_winbind && !%build_ldap
%preun -n samba-winbind
+%endif
+%if %build_winbind
%_preun_service winbind
if [ $1 = 0 ]; then
echo "Removing winbind entries from /etc/nsswitch.conf"
@@ -608,7 +944,7 @@ if [ $1 = 0 ]; then
# /sbin/chkconfig winbind reset
fi
-%endif %build_winbind
+%endif
%if %build_wins
%post -n nss_wins
@@ -634,7 +970,11 @@ if [ $1 = 0 ]; then
fi
%endif %build_wins
-%preun
+%if %build_ldap
+%preun -n samba-server-ldap
+%else
+%preun -n samba-server
+%endif
if [ $1 = 0 ] ; then
%_preun_service smb
@@ -655,7 +995,11 @@ if [ $1 = 0 ] ; then
fi
fi
+%if %build_ldap
+%preun -n samba-common-ldap
+%else
%preun -n samba-common
+%endif
if [ $1 = 0 ] ; then
for n in /etc/samba/codepages/*; do
@@ -666,22 +1010,25 @@ if [ $1 = 0 ] ; then
fi
+%if %build_ldap
+%post -n samba-swat-ldap
+%else
%post -n samba-swat
+%endif
if [ -f /var/lock/subsys/xinetd ]; then
service xinetd reload >/dev/null 2>&1 || :
fi
%update_menus
+%if %build_ldap
+%postun -n samba-swat-ldap
+%else
%postun -n samba-swat
-
+%endif
# Remove swat entry from xinetd
-if [ $1 = 0 -a -f /etc/xinetd.conf ] ; then
-rm -f /etc/xinetd.d/swat
+if [ -f /var/lock/subsys/xinetd ]; then
service xinetd reload &>/dev/null || :
fi
-
-if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi
-
%clean_menus
%triggerpostun -- samba < 1.9.18p7
@@ -698,28 +1045,32 @@ if [ $1 != 0 ]; then
[ -f /etc/inetd.conf ] && chmod 644 /etc/services /etc/inetd.conf ||:
fi
-%files
+%if %build_ldap
+%files server-ldap
+%else
+%files server
+%endif
%defattr(-,root,root)
#%attr(-,root,root) %{prefix}/sbin/*
%attr(-,root,root) /sbin/*
#%attr(-,root,root) %{prefix}/bin/*
#%attr(755,root,root) /lib/*
-%{prefix}/sbin/samba
-%{prefix}/sbin/smbd
-%{prefix}/sbin/nmbd
-%{prefix}/sbin/smbcontrol
+%{_sbindir}/samba
+%{_sbindir}/smbd
+%{_sbindir}/nmbd
+%{_sbindir}/smbcontrol
+%{_sbindir}/mkntpwd
#%{prefix}/bin/addtosmbpass
-%{prefix}/bin/mksmbpasswd.sh
-%{prefix}/bin/smbstatus
-%{prefix}/bin/convert_smbpasswd
+%{_bindir}/mksmbpasswd.sh
+%{_bindir}/smbstatus
+%{_bindir}/convert_smbpasswd
%attr(755,root,root) /lib/security/pam_smbpass*
-# Samba VFS modules
-%{prefix}/lib/samba/*
#/usr/share/swat
%attr(-,root,root) %config(noreplace) /etc/samba/smbusers
%attr(-,root,root) %config /etc/rc.d/init.d/smb
%attr(-,root,root) %config(noreplace) /etc/logrotate.d/samba
%attr(-,root,root) %config(noreplace) /etc/pam.d/samba
+%attr(-,root,root) %config(noreplace) /etc/samba/samba-slapd.include
%{_mandir}/man1/smbstatus.1*
%{_mandir}/man5/smbpasswd.5*
%{_mandir}/man7/samba.7*
@@ -728,12 +1079,24 @@ fi
%{_mandir}/man1/smbcontrol.1*
#%{_mandir}/man1/lmhosts.1*
%{_mandir}/man5/smb.conf.5*
-%attr(775,root,root) %dir /var/lib/samba/netlogon
-%attr(775,root,root) %dir /var/lib/samba/profiles
-%attr(775,root,root) %dir /var/lib/samba/printers/*
-%dir /var/log/samba
-%dir /var/run/samba
+%attr(755,root,root) %dir /var/lib/samba/netlogon
+%attr(775,root,users) %dir /var/lib/samba/profiles
+%attr(755,root,root) %dir /var/lib/samba/printers/*
+%attr(755,root,root) %dir %{_libdir}/samba/vfs
+%attr(755,root,root) %{_libdir}/samba/vfs/audit.so
+%attr(755,root,root) %{_libdir}/samba/vfs/block.so
+%attr(755,root,root) %{_libdir}/samba/vfs/recycle.so
+%attr(-,root,root) %config(noreplace) %{_sysconfdir}/samba/recycle.conf
+#%attr(775,root,root) %dir %{_libdir}/samba/vfs/vscan
%attr(1777,root,root) %dir /var/spool/samba
+%dir %{_datadir}/%{name}/scripts
+%attr(0755,root,root) %{_datadir}/%{name}/scripts/print-pdf
+%attr(0750,root,root) %{_datadir}/%{name}/scripts/smbldap*.pl
+%attr(0640,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smbldap_conf.pm
+%attr(0644,root,root) %{_datadir}/%{name}/scripts/smbldap_tools.pm
+%{perl_vendorlib}/*.pm
+%attr(0700,root,root) %{_datadir}/%{name}/scripts/*port_smbpasswd.pl
+
%files doc
%defattr(-,root,root)
@@ -745,7 +1108,11 @@ fi
%doc swat/README
%attr(-,root,root) %{prefix}/share/swat/using_samba/*
+%if %build_ldap
+%files swat-ldap
+%else
%files swat
+%endif
%defattr(-,root,root)
%config(noreplace) /etc/xinetd.d/swat
%attr(-,root,root) /sbin/*
@@ -754,9 +1121,9 @@ fi
%{_miconsdir}/*.xpm
%{_liconsdir}/*.xpm
%{_iconsdir}/*.xpm
-%attr(-,root,root) %{prefix}/share/swat/help/*
-%attr(-,root,root) %{prefix}/share/swat/images/*
-%attr(-,root,root) %{prefix}/share/swat/include/*
+%attr(-,root,root) %{_datadir}/swat/help/*
+%attr(-,root,root) %{_datadir}/swat/images/*
+%attr(-,root,root) %{_datadir}/swat/include/*
%{_mandir}/man8/swat.8*
%files client
@@ -764,41 +1131,48 @@ fi
%ifnarch alpha
/sbin/mount.smb
/sbin/mount.smbfs
-%attr(775,root,root) %{prefix}/bin/smbmount
-%attr(4775,root,root) %{prefix}/bin/smbumount
-%attr(4775,root,root) %{prefix}/sbin/smbmnt
+%attr(755,root,root) %{_bindir}/smbmount
+%attr(4755,root,root) %{_bindir}/smbumount
+%attr(4755,root,root) %{_sbindir}/smbmnt
%{_mandir}/man8/smbmnt.8*
%{_mandir}/man8/smbmount.8*
%{_mandir}/man8/smbumount.8*
%endif
-%{prefix}/bin/nmblookup
-%{prefix}/bin/findsmb
-%{prefix}/bin/smbclient
-%{prefix}/bin/smbprint
-%{prefix}/bin/smbtar
-%{prefix}/bin/smbcacls
-%{prefix}/bin/smbspool
+%{_bindir}/nmblookup
+%{_bindir}/findsmb
+%{_bindir}/smbclient
+%{_bindir}/smbprint
+%{_bindir}/smbtar
+%{_bindir}/smbspool
# Link of smbspool to CUPS
-/%{prefix}/lib/cups/backend/smb
+/%{_libdir}/cups/backend/smb
/%{_mandir}/man1/nmblookup.1*
/%{_mandir}/man1/findsmb.1*
/%{_mandir}/man1/smbclient.1*
/%{_mandir}/man1/smbtar.1*
-/%{_mandir}/man1/smbcacls.1*
+%if %build_ldap
+%files common-ldap
+%else
%files common
+%endif
%defattr(-,root,root)
%dir /var/cache/samba
-/%{prefix}/bin/make_smbcodepage
-/%{prefix}/bin/make_unicodemap
-/%{prefix}/bin/testparm
-/%{prefix}/bin/testprns
-/%{prefix}/bin/make_printerdef
-/%{prefix}/bin/rpcclient
-/%{prefix}/bin/smbsh
-%{prefix}/bin/smbpasswd
-%{prefix}/lib/smbwrapper.so
+%dir /var/log/samba
+%dir /var/run/samba
+%{_bindir}/make_smbcodepage
+%{_bindir}/make_unicodemap
+%{_bindir}/testparm
+%{_bindir}/testprns
+%{_bindir}/make_printerdef
+%{_bindir}/rpcclient
+%{_bindir}/smbsh
+%{_bindir}/smbpasswd
+%{_bindir}/smbcacls
+%{_libdir}/smbwrapper.so
+%{_libdir}/libsmbclient.so
%attr(-,root,root) %config(noreplace) /etc/samba/smb.conf
+%attr(-,root,root) %config(noreplace) /etc/samba/smb-winbind.conf
%attr(-,root,root) %config(noreplace) /etc/samba/lmhosts
%attr(-,root,root) /var/lib/samba/codepages
%{_mandir}/man1/make_smbcodepage.1*
@@ -809,12 +1183,21 @@ fi
%{_mandir}/man5/smb.conf.5*
%{_mandir}/man5/lmhosts.5*
%{_mandir}/man8/smbpasswd.8*
+/%{_mandir}/man1/smbcacls.1*
-%if %build_winbind
+#%if %build_winbind
+#%if %build_ldap
+%if %build_winbind && %build_ldap
+%files winbind-ldap
+%endif
+#%else
+%if %build_winbind && !%build_ldap
%files winbind
+%endif
+%if %build_winbind
%defattr(-,root,root)
-%{prefix}/sbin/winbindd
-%{prefix}/bin/wbinfo
+%{_sbindir}/winbindd
+%{_bindir}/wbinfo
%attr(755,root,root) /lib/security/pam_winbind*
%attr(755,root,root) /lib/libnss_winbind*
%attr(-,root,root) %config /etc/rc.d/init.d/winbind
@@ -829,9 +1212,194 @@ fi
%attr(755,root,root) /lib/libnss_wins.so*
%endif
+#Files for antivirus support:
+%if %build_fprot
+%files vscan-fprot
+%defattr(-,root,root)
+%{_libdir}/samba/vfs/vscan-fprotd.so
+%doc examples.bin/VFS/fprot/INSTALL
+%endif
+
+%if %build_kaspersky
+%files vscan-kaspersky
+%defattr(-,root,root)
+%{_libdir}/samba/vfs/vscan-kavp.so
+%doc examples.bin/VFS/kaspersky/INSTALL
+%endif
+
+%if %build_mks
+%files vscan-mks
+%defattr(-,root,root)
+%{_libdir}/samba/vfs/vscan-mksd.so
+%doc examples.bin/VFS/mks/INSTALL
+%endif
+
+%if %build_openantivirus
+%files vscan-openantivirus
+%defattr(-,root,root)
+%{_libdir}/samba/vfs/vscan-oav.so
+%doc examples.bin/VFS/openantivirus/INSTALL
+%endif
+
+%if %build_sophos
+%files vscan-sophos
+%defattr(-,root,root)
+%{_libdir}/samba/vfs/vscan-sophos.so
+%doc examples.bin/VFS/sophos/INSTALL
+%endif
+
+%if %build_symantec
+%files vscan-symantec
+%defattr(-,root,root)
+%{_libdir}/samba/vfs/vscan-symantec.so
+%doc examples.bin/VFS/symantec/INSTALL
+%endif
+
+%if %build_trend
+%files vscan-trend
+%defattr(-,root,root)
+%{_libdir}/samba/vfs/vscan-trend.so
+%doc examples.bin/VFS/trend/INSTALL
+%endif
+
%changelog
-* Sun Jun 02 2002 John H Terpstra <jht@samba.org>
-- Added VFS modules
+* Thu Aug 15 2002 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.5-16mdk
+- Don't remove swat xinetd config (that's what RPM is for!)
+- Don't clean menus twice
+- This should also be 2.2.6-1.1mdk (build from official samba tarball)
+- Use samba-slapd-include.conf from packaging dir (patch it in for 2.2.5)
+
+* Wed Aug 07 2002 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.5-15mdk
+- put /var/log/samba and /var/run/samba in common (for winbind - sbenedict)
+- Integrate smbldap-tools, now in /usr/share/scripts/samba, with examples
+ in smb.conf, configuration is /etc/samba/smbldap_conf.pm (please test!)
+ This links smbldap_tools.pm and smbldap_conf.pm into perl_vendorlib
+ (better ideas?)
+- Add mkntpwd (for smbldap-tools)
+- Samba smbpasswd->ldap migration script also in samba scripts dir.
+- Add recycle.conf, fix recycle example in smb.conf (pascal@vmfacility.fr)
+- spec cleanups
+- bump samba-vscan to 0.2.5c (not tested though - yet).
+
+* Wed Jul 24 2002 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.5-14mdk
+- Fix ldap description (really only when built with LDAP)
+- Expand -server description
+- more winbind examples in smb.conf
+- add winbind version of default smb.conf (smb-winbind.conf)
+- Add PDF-creation script and share
+- Rebuild for new acl
+
+* Wed Jul 24 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.2.5-13mdk
+- rebuild for new readline
+
+* Mon Jul 22 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.5-12mdk
+- fixed source no. for samba-slapd.include (-- Oden Eriksson)
+- added CVS win2k copy bug patch (34) (-- Jeremy Alison)
+
+* Tue Jul 16 2002 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.5-11mdk
+- Fix winbind init script (doesn't need nmbd)
+- Add ldap examples, pam password change, obey pam restrictions (winbind)
+ in smb.conf (disabled of course)
+- Add sample LDAP configuration (/etc/samba/samba-slapd.include
+- Add password section to /etc/pam.d/samba (pam password change)
+- buildrequires readline-devel
+- Ensure unexpected.tdb exists for winbind/client without smbd (post in common)
+
+* Wed Jul 10 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.5-10mdk
+- patch (30) to randomize the way smb re-reads config files (-- Jonathan Knight)
+
+* Thu Jul 04 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.5-9mdk
+- changed a few perms from 775 to 755 to make rpmlint happy.
+
+* Mon Jul 01 2002 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.2.5-8mdk
+- Don't make smbmnt and smbumount group writable.
+
+* Mon Jul 01 2002 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.2.5-7mdk
+- Really fix the Alpha (I suck).
+
+* Thu Jun 27 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.5-6mdk
+- directory listings vs NT/win2k servers helper patch (30) (--Urban Widmark)
+- build --with-libsmbclient
+
+* Thu Jun 27 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.5-5mdk
+- parsing fix for spoolss (29) (-- Jerry Carter)
+- Don't make the -ldap packages conflicts with the "normal" packages,
+ but make them Obsoletes (-- Alexander Skwar)
+
+* Thu Jun 27 2002 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.2.5-4mdk
+- Alpha build fix.
+
+* Wed Jun 26 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.5-3mdk
+- ldap patch (28) (-- Jerry Carter)
+
+* Wed Jun 19 2002 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.5-2mdk
+- Fix build on 8.1 (no nested conditionals)
+- Make provision for newer Mandrake releases
+
+* Wed Jun 19 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.5-1mdk
+- 2.2.5 is out!
+- removed patch27 (included in new release)
+
+* Mon Jun 18 2002 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.5-0.pre1.5mdk
+- Modifications for samba-2.2.5 source release
+- New samba-vscan (0.2.5a)
+- Samba releases will be 1.prelease.mdk (to upgrade prereleases nicely).
+
+* Mon Jun 17 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.5-0.pre1.4mdk
+- docs are now 755.
+- Please TEST, REBUILD with or without LDAP etc., and report any errors... Thanks!
+
+* Mon Jun 17 2002 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.5-0.pre1.3mdk
+- s/%%define/%%global for macros used for package definitions (so --with
+ ldap and --with sophos actually build appropriate packages f.e.)
+- Obsoletes: samba in samba-server
+- Prevent vscan vfs objects going into samba-server (!deps on scanner)
+- Disable automatic dependency checks for vscan subpackages
+- Build vfs objects in a copy of examples (examples.bin) so no bins in doc
+- Make vi faster ;-) (remove spurious single quote in swat description)
+- Add doc (INSTALL) for vscan packages
+- Try and sort out dependencies and conflicts
+
+* Fri Jun 14 2002 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.5-0.pre1.2mdk
+- Patch27 (prevent all samba binaries linking to libldap)
+- New samba-swat-ldap and samba-winbind-ldap packages
+- move smbcacls to samba-common(-ldap), since it links to libldap
+- Only packages which don't build ldap-specific are nss_wins,doc and client
+
+* Mon Jun 10 2002 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.5-0.pre1.1mdk
+- Introduce new samba-server-ldap and samba-common-ldap packages
+
+* Mon Jun 10 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.5-0.pre1.0mdk
+- first release with 2.2.5pre1.
+- samba-*.rpm now renamed samba-server-*.rpm
+- vfs modules are back in town
+
+* Tue Jun 04 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.4-5mdk
+- changed vfs location in sample mdk smb.conf.
+
+* Mon Jun 03 2002 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.4-4mdk
+- More patch cleaning
+- Antivirus support (optional at build time). Please test if you have one of
+ fprot, kaspersky,mks,symantec or trend. Sophos has been tested and builds
+ and works.
+- Move all vfs objects to /usr/lib/samba/vfs
+
+* Mon May 27 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.4-3mdk
+- Rollup patch for most of the printing fixes in SAMBA_2_2. (-- Jerry Carter)
+- build + install VFS objects
+- patched VFS network recycle_bin (-- Kohei Yoshida)
+- added VFS examples in smb.conf
+
+* Mon May 13 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.4-2mdk
+- Cleaned a few useless patches.
+- Added a few codepages.
+- LDAP support in option.
+
+* Fri May 03 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.4-1mdk
+- Upped to 2.2.4.
+- Default build for cooker now includes LDAP support (as in 2.2.X).
+- Commented pversion/prelease defs.
+- Modif of the Cooker detection routine (use of grep).
* Fri Apr 26 2002 Buchan Milne <bgmilne@cae.co.za> 2.2.3a-12mdk
- Final changes for 2.2.4 release
diff --git a/packaging/Mandrake/smb.conf b/packaging/Mandrake/smb.conf
index 3f6e7e02c9e..f68d48cb4b3 100644
--- a/packaging/Mandrake/smb.conf
+++ b/packaging/Mandrake/smb.conf
@@ -51,6 +51,8 @@
# This parameter works like domain admin group:
# printer admin = @<group> <user>
; printer admin = @adm
+# This should work well for winbind:
+; printer admin = @"Domain Admins"
# 3. Logging Options:
# this tells Samba to use a separate log file for each machine
@@ -105,6 +107,9 @@
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
; unix password sync = Yes
+# You either need to setup a passwd program and passwd chat, or
+# enable pam password change
+; pam password change = yes
; passwd program = /usr/bin/passwd %u
; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n
;*passwd:*all*authentication*tokens*updated*successfully*
@@ -132,9 +137,21 @@
# name and username, defaults to "\"
; winbind separator = +
#
+# winbind use default domain allows you to have winbind return usernames
+# in the form user instead of DOMAIN+user for the domain listed in the
+# workgroup parameter.
+; winbind use default domain = yes
+#
# template homedir determines the home directory for winbind users, with
# %D expanding to their domain name and %U expanding to their username:
; template homedir = /home/%D/%U
+
+# When using winbind, you may want to have samba create home directories
+# on the fly for authenticated users. Ensure that /etc/pam.d/samba is
+# using 'service=system-auth-winbind' in pam_stack modules, and then
+# enable obedience of pam restrictions below:
+; obey pam restrictions = yes
+
#
# template shell determines the shell users authenticated by winbind get
; template shell = /bin/bash
@@ -201,6 +218,9 @@
# or the operation will fail. Check that groups exist if forcing a group.
# Script for domain controller for adding machines:
; add user script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u
+# Script for domain controller with LDAP backend for adding machines (please
+# configure in /etc/samba/smbldap_conf.pm first):
+; add user script = /usr/share/samba/scripts/smbldap-useradd.pl -w -d /dev/null -g machines -c 'Machine Account' -s /bin/false %u
# Script for domain member for adding local accounts for authenticated users:
; add user script = /usr/sbin/useradd -s /bin/false %u
@@ -213,6 +233,19 @@
# of the Domain Guests group
; domain guest group = nobody @guest
+# LDAP configuration for Domain Controlling:
+# The account (dn) that samba uses to access the LDAP server
+# This account needs to have write access to the LDAP tree
+# You will need to give samba the password for this dn, by
+# running 'smbpasswd -w mypassword'
+; ldap admin dn = cn=root,dc=mydomain,dc=com
+; ldap ssl = start_tls
+# start_tls should run on 389, but samba defaults incorrectly to 636
+; ldap port = 389
+; ldap suffix = dc=mydomain,dc=com
+; ldap server = ldap.mydomain.com
+
+
# 7. Name Resolution Options:
# All NetBIOS names must be resolved to IP Addresses
# 'Name Resolve Order' allows the named resolution mechanism to be specified
@@ -273,6 +306,13 @@
comment = Home Directories
browseable = no
writable = yes
+# You can enable VFS recycle bin on a per share basis:
+# Uncomment the next 2 lines (make sure you create a
+# .recycle folder in the base of the share and ensure
+# all users will have write access to it. See
+# examples/VFS/recycle/REAME in samba-doc for details
+; vfs object = /usr/lib/samba/vfs/recycle.so
+; vfs options= /etc/samba/recycle.conf
# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
@@ -333,6 +373,18 @@
read only = yes
write list = @adm root
+# A useful application of samba is to make a PDF-generation service
+# To streamline this, install windows postscript drivers (preferably colour)
+# on the samba server, so that clients can automatically install them.
+
+[pdf-generator]
+ path = /var/tmp
+ guest ok = No
+ printable = Yes
+ comment = PDF Generator (only valid users)
+ #print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP &
+ print command = /usr/share/samba/scripts/print-pdf %s ~%u \\\\\\\\%L\\\\%u %m %I &
+
# This one is useful for people to share files
;[tmp]
; comment = Temporary file space
@@ -348,6 +400,9 @@
; public = yes
; writable = no
; write list = @staff
+# Audited directory through experimental VFS audit.so module:
+# Uncomment next line.
+; vfs object = /usr/lib/samba/vfs/audit.so
# Other examples.
#
diff --git a/packaging/Mandrake/winbind.init b/packaging/Mandrake/winbind.init
index 05a4ce6f0fe..b7b452eb0b9 100644
--- a/packaging/Mandrake/winbind.init
+++ b/packaging/Mandrake/winbind.init
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# chkconfig: - 91 35
+# chkconfig: 345 81 45
# description: Starts and stops the Samba winbind daemon to provide \
# user and group information from a domain controller to linux.
@@ -26,33 +26,26 @@ RETVAL=0
start() {
- export TMPDIR="/var/tmp"
- #Is nmbd running? If not, we need to start it first.
- if ! killall -0 nmbd 2>/dev/null; then
- echo -n "Starting NMB services: "
- daemon nmbd -D
- RETVAL=$?;
- echo
- fi
echo -n "Starting Winbind services: "
- daemon winbindd
- RETVAL=$?
+ RETVAL=1
+ if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then
+ daemon winbindd
+ RETVAL=$?
+ else
+ echo "Winbind is not configured in /etc/samba/smb.conf, not starting"
+ fi
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/winbind || \
RETVAL=1
return $RETVAL
}
stop() {
- #Is smbd running? If not, we need to stop nmbd, since we must have started it.
- if ! killall -0 smbd 2>/dev/null; then
- echo -n "Stopping NMB services: "
- killproc nmbd
- RETVAL=$?;
- echo
- fi;
echo -n "Shutting down Winbind services: "
- killproc winbindd
- RETVAL=$?
+ RETVAL=1
+ if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then
+ killproc winbindd
+ RETVAL=$?
+ fi
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/winbind
return $RETVAL
diff --git a/packaging/Solaris/prototype.master b/packaging/Solaris/prototype.master
index ba10d5ddbc3..487b4a89ee0 100644
--- a/packaging/Solaris/prototype.master
+++ b/packaging/Solaris/prototype.master
@@ -34,6 +34,7 @@ d none samba/var 0711 root other
d none samba/bin 0755 root other
d none samba/lib 0755 root other
d none samba/docs 0755 root other
+d none samba/private 0700 root other
#
# Stuff that goes into lib
#
diff --git a/source/acconfig.h b/source/acconfig.h
index b27c556d9bd..6fa2f96b26a 100644
--- a/source/acconfig.h
+++ b/source/acconfig.h
@@ -180,6 +180,9 @@
#undef HAVE_GETGROUPS_TOO_MANY_EGIDS
#undef HAVE_PASSWD_PW_COMMENT
#undef HAVE_PASSWD_PW_AGE
+#undef HAVE_STAT_ST_BLKSIZE
+#undef WITH_WINBIND_AUTH_CRAP
+
/*
* Add these definitions to allow VFS modules to
* see the CPPFLAGS defines.
diff --git a/source/client/client.c b/source/client/client.c
index 600906e8edd..b620064195c 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -300,7 +300,7 @@ static BOOL do_this_one(file_info *finfo)
if (*fileselection &&
!mask_match(finfo->name,fileselection,False)) {
- DEBUG(3,("match_match %s failed\n", finfo->name));
+ DEBUG(3,("mask_match %s failed\n", finfo->name));
return False;
}
@@ -681,7 +681,7 @@ static void do_get(char *rname,char *lname)
}
DEBUG(2,("getting file %s of size %.0f as %s ",
- lname, (double)size, lname));
+ rname, (double)size, lname));
if(!(data = (char *)malloc(read_size))) {
DEBUG(0,("malloc fail for size %d\n", read_size));
@@ -1475,7 +1475,7 @@ static void cmd_open(void)
pstrcpy(mask,cur_dir);
if (!next_token(NULL,buf,NULL,sizeof(buf))) {
- DEBUG(0,("del <filename>\n"));
+ DEBUG(0,("open <filename>\n"));
return;
}
pstrcat(mask,buf);
diff --git a/source/configure b/source/configure
index 3102a368489..b3bbea962ec 100755
--- a/source/configure
+++ b/source/configure
@@ -2913,12 +2913,12 @@ else
#line 2914 "configure"
#include "confdefs.h"
#include <stdio.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
+ if (!f) return(1);
fprintf(f, "%d\n", sizeof(int));
- exit(0);
+ return(0);
}
EOF
if { (eval echo configure:2925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -2952,12 +2952,12 @@ else
#line 2953 "configure"
#include "confdefs.h"
#include <stdio.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
+ if (!f) return(1);
fprintf(f, "%d\n", sizeof(long));
- exit(0);
+ return(0);
}
EOF
if { (eval echo configure:2964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -2991,12 +2991,12 @@ else
#line 2992 "configure"
#include "confdefs.h"
#include <stdio.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
+ if (!f) return(1);
fprintf(f, "%d\n", sizeof(short));
- exit(0);
+ return(0);
}
EOF
if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -8716,7 +8716,17 @@ EOF
SONAMEFLAG="-Wl,-h,"
PICFLAG="-KPIC" # Is this correct for SunOS
;;
- *bsd*) BLDSHARED="true"
+ *freebsd*) BLDSHARED="true"
+ LDSHFLAGS="-shared"
+ DYNEXP="-Wl,--export-dynamic"
+ SONAMEFLAG="-Wl,-soname,"
+ PICFLAG="-fPIC"
+ cat >> confdefs.h <<\EOF
+#define STAT_ST_BLOCKSIZE 512
+EOF
+
+ ;;
+ *openbsd*) BLDSHARED="true"
LDSHFLAGS="-shared"
DYNEXP="-Wl,-Bdynamic"
SONAMEFLAG="-Wl,-soname,"
@@ -8824,7 +8834,7 @@ EOF
*dgux*) # Extract the first word of "groff", so it can be a program name with args.
set dummy groff; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8828: checking for $ac_word" >&5
+echo "configure:8838: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8880,16 +8890,16 @@ esac
echo "$ac_t""$BLDSHARED" 1>&6
echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
-echo "configure:8884: checking linker flags for shared libraries" >&5
+echo "configure:8894: checking linker flags for shared libraries" >&5
echo "$ac_t""$LDSHFLAGS" 1>&6
echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
-echo "configure:8887: checking compiler flags for position-independent code" >&5
+echo "configure:8897: checking compiler flags for position-independent code" >&5
echo "$ac_t""$PICFLAGS" 1>&6
# try to work out how to produce pic code with this compiler
if test x$PICFLAG = x; then
echo $ac_n "checking whether ${CC-cc} accepts -fpic""... $ac_c" 1>&6
-echo "configure:8893: checking whether ${CC-cc} accepts -fpic" >&5
+echo "configure:8903: checking whether ${CC-cc} accepts -fpic" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8910,7 +8920,7 @@ echo "$ac_t""$ac_cv_prog_cc_fpic" 1>&6
fi
if test x$PICFLAG = x; then
echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
-echo "configure:8914: checking whether ${CC-cc} accepts -KPIC" >&5
+echo "configure:8924: checking whether ${CC-cc} accepts -KPIC" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8931,7 +8941,7 @@ echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
fi
if test x$PICFLAG = x; then
echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
-echo "configure:8935: checking whether ${CC-cc} accepts -Kpic" >&5
+echo "configure:8945: checking whether ${CC-cc} accepts -Kpic" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8954,7 +8964,7 @@ fi
################
echo $ac_n "checking for long long""... $ac_c" 1>&6
-echo "configure:8958: checking for long long" >&5
+echo "configure:8968: checking for long long" >&5
if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8963,12 +8973,12 @@ if test "$cross_compiling" = yes; then
samba_cv_have_longlong=cross
else
cat > conftest.$ac_ext <<EOF
-#line 8967 "configure"
+#line 8977 "configure"
#include "confdefs.h"
#include <stdio.h>
main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
EOF
-if { (eval echo configure:8972: \"$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_longlong=yes
else
@@ -8995,20 +9005,20 @@ fi
# AIX needs this.
echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
-echo "configure:8999: checking for LL suffix on long long integers" >&5
+echo "configure:9009: checking for LL suffix on long long integers" >&5
if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9005 "configure"
+#line 9015 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
long long i = 0x8000000000LL
; return 0; }
EOF
-if { (eval echo configure:9012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_compiler_supports_ll=yes
else
@@ -9030,7 +9040,7 @@ fi
echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
-echo "configure:9034: checking for 64 bit off_t" >&5
+echo "configure:9044: checking for 64 bit off_t" >&5
if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9039,13 +9049,13 @@ if test "$cross_compiling" = yes; then
samba_cv_SIZEOF_OFF_T=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9043 "configure"
+#line 9053 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/stat.h>
main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
EOF
-if { (eval echo configure:9049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_SIZEOF_OFF_T=yes
else
@@ -9068,7 +9078,7 @@ EOF
fi
echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:9072: checking for off64_t" >&5
+echo "configure:9082: checking for off64_t" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9077,7 +9087,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_OFF64_T=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9081 "configure"
+#line 9091 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -9087,7 +9097,7 @@ else
#include <sys/stat.h>
main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
EOF
-if { (eval echo configure:9091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_OFF64_T=yes
else
@@ -9110,7 +9120,7 @@ EOF
fi
echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
-echo "configure:9114: checking for 64 bit ino_t" >&5
+echo "configure:9124: checking for 64 bit ino_t" >&5
if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9119,13 +9129,13 @@ if test "$cross_compiling" = yes; then
samba_cv_SIZEOF_INO_T=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9123 "configure"
+#line 9133 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/stat.h>
main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
EOF
-if { (eval echo configure:9129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_SIZEOF_INO_T=yes
else
@@ -9148,7 +9158,7 @@ EOF
fi
echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
-echo "configure:9152: checking for ino64_t" >&5
+echo "configure:9162: checking for ino64_t" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9157,7 +9167,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_INO64_T=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9161 "configure"
+#line 9171 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -9167,7 +9177,7 @@ else
#include <sys/stat.h>
main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
EOF
-if { (eval echo configure:9171: \"$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_INO64_T=yes
else
@@ -9190,7 +9200,7 @@ EOF
fi
echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
-echo "configure:9194: checking for dev64_t" >&5
+echo "configure:9204: checking for dev64_t" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9199,7 +9209,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_DEV64_T=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9203 "configure"
+#line 9213 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -9209,7 +9219,7 @@ else
#include <sys/stat.h>
main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
EOF
-if { (eval echo configure:9213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_DEV64_T=yes
else
@@ -9232,13 +9242,13 @@ EOF
fi
echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:9236: checking for struct dirent64" >&5
+echo "configure:9246: checking for struct dirent64" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9242 "configure"
+#line 9252 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -9250,7 +9260,7 @@ int main() {
struct dirent64 de;
; return 0; }
EOF
-if { (eval echo configure:9254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_STRUCT_DIRENT64=yes
else
@@ -9271,7 +9281,7 @@ EOF
fi
echo $ac_n "checking for major macro""... $ac_c" 1>&6
-echo "configure:9275: checking for major macro" >&5
+echo "configure:9285: checking for major macro" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9280,7 +9290,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_DEVICE_MAJOR_FN=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9284 "configure"
+#line 9294 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -9289,7 +9299,7 @@ else
#include <sys/types.h>
main() { dev_t dev; int i = major(dev); return 0; }
EOF
-if { (eval echo configure:9293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_DEVICE_MAJOR_FN=yes
else
@@ -9312,7 +9322,7 @@ EOF
fi
echo $ac_n "checking for minor macro""... $ac_c" 1>&6
-echo "configure:9316: checking for minor macro" >&5
+echo "configure:9326: checking for minor macro" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9321,7 +9331,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_DEVICE_MINOR_FN=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9325 "configure"
+#line 9335 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -9330,7 +9340,7 @@ else
#include <sys/types.h>
main() { dev_t dev; int i = minor(dev); return 0; }
EOF
-if { (eval echo configure:9334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_DEVICE_MINOR_FN=yes
else
@@ -9353,7 +9363,7 @@ EOF
fi
echo $ac_n "checking for makedev macro""... $ac_c" 1>&6
-echo "configure:9357: checking for makedev macro" >&5
+echo "configure:9367: checking for makedev macro" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9362,7 +9372,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_MAKEDEV_FN=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9366 "configure"
+#line 9376 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -9371,7 +9381,7 @@ else
#include <sys/types.h>
main() { dev_t dev = makedev(1,2); return 0; }
EOF
-if { (eval echo configure:9375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_MAKEDEV_FN=yes
else
@@ -9394,7 +9404,7 @@ EOF
fi
echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
-echo "configure:9398: checking for unsigned char" >&5
+echo "configure:9408: checking for unsigned char" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9403,12 +9413,12 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_UNSIGNED_CHAR=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9407 "configure"
+#line 9417 "configure"
#include "confdefs.h"
#include <stdio.h>
main() { char c; c=250; exit((c > 0)?0:1); }
EOF
-if { (eval echo configure:9412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_UNSIGNED_CHAR=yes
else
@@ -9431,13 +9441,13 @@ EOF
fi
echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
-echo "configure:9435: checking for sin_len in sock" >&5
+echo "configure:9445: checking for sin_len in sock" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9441 "configure"
+#line 9451 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -9446,7 +9456,7 @@ int main() {
struct sockaddr_in sock; sock.sin_len = sizeof(sock);
; return 0; }
EOF
-if { (eval echo configure:9450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_SOCK_SIN_LEN=yes
else
@@ -9467,13 +9477,13 @@ EOF
fi
echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
-echo "configure:9471: checking whether seekdir returns void" >&5
+echo "configure:9481: checking whether seekdir returns void" >&5
if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9477 "configure"
+#line 9487 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <dirent.h>
@@ -9482,7 +9492,7 @@ int main() {
return 0;
; return 0; }
EOF
-if { (eval echo configure:9486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_SEEKDIR_RETURNS_VOID=yes
else
@@ -9503,20 +9513,20 @@ EOF
fi
echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
-echo "configure:9507: checking for __FILE__ macro" >&5
+echo "configure:9517: checking for __FILE__ macro" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9513 "configure"
+#line 9523 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("%s\n", __FILE__);
; return 0; }
EOF
-if { (eval echo configure:9520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_FILE_MACRO=yes
else
@@ -9537,20 +9547,20 @@ EOF
fi
echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
-echo "configure:9541: checking for __FUNCTION__ macro" >&5
+echo "configure:9551: checking for __FUNCTION__ macro" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9547 "configure"
+#line 9557 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("%s\n", __FUNCTION__);
; return 0; }
EOF
-if { (eval echo configure:9554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_FUNCTION_MACRO=yes
else
@@ -9571,7 +9581,7 @@ EOF
fi
echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
-echo "configure:9575: checking if gettimeofday takes tz argument" >&5
+echo "configure:9585: checking if gettimeofday takes tz argument" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9580,14 +9590,14 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9584 "configure"
+#line 9594 "configure"
#include "confdefs.h"
#include <sys/time.h>
#include <unistd.h>
main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
EOF
-if { (eval echo configure:9591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
else
@@ -9610,13 +9620,13 @@ EOF
fi
echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
-echo "configure:9614: checking for __va_copy" >&5
+echo "configure:9624: checking for __va_copy" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9620 "configure"
+#line 9630 "configure"
#include "confdefs.h"
#include <stdarg.h>
va_list ap1,ap2;
@@ -9624,7 +9634,7 @@ int main() {
__va_copy(ap1,ap2);
; return 0; }
EOF
-if { (eval echo configure:9628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
samba_cv_HAVE_VA_COPY=yes
else
@@ -9645,7 +9655,7 @@ EOF
fi
echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
-echo "configure:9649: checking for C99 vsnprintf" >&5
+echo "configure:9659: checking for C99 vsnprintf" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9654,7 +9664,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_C99_VSNPRINTF=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9658 "configure"
+#line 9668 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -9681,7 +9691,7 @@ void foo(const char *format, ...) {
main() { foo("hello"); }
EOF
-if { (eval echo configure:9685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_C99_VSNPRINTF=yes
else
@@ -9704,7 +9714,7 @@ EOF
fi
echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
-echo "configure:9708: checking for broken readdir" >&5
+echo "configure:9718: checking for broken readdir" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9713,7 +9723,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_BROKEN_READDIR=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9717 "configure"
+#line 9727 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <dirent.h>
@@ -9721,7 +9731,7 @@ main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
di->d_name[0] == 0) exit(0); exit(1);}
EOF
-if { (eval echo configure:9725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_BROKEN_READDIR=yes
else
@@ -9744,13 +9754,13 @@ EOF
fi
echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
-echo "configure:9748: checking for utimbuf" >&5
+echo "configure:9758: checking for utimbuf" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9754 "configure"
+#line 9764 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utime.h>
@@ -9758,7 +9768,7 @@ int main() {
struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
; return 0; }
EOF
-if { (eval echo configure:9762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UTIMBUF=yes
else
@@ -9782,12 +9792,12 @@ fi
for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9786: checking for $ac_func" >&5
+echo "configure:9796: 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 9791 "configure"
+#line 9801 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -9810,7 +9820,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:9814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9824: \"$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
@@ -9836,13 +9846,13 @@ done
echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
-echo "configure:9840: checking for ut_name in utmp" >&5
+echo "configure:9850: checking for ut_name in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9846 "configure"
+#line 9856 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -9850,7 +9860,7 @@ int main() {
struct utmp ut; ut.ut_name[0] = 'a';
; return 0; }
EOF
-if { (eval echo configure:9854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_NAME=yes
else
@@ -9871,13 +9881,13 @@ EOF
fi
echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
-echo "configure:9875: checking for ut_user in utmp" >&5
+echo "configure:9885: checking for ut_user in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9881 "configure"
+#line 9891 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -9885,7 +9895,7 @@ int main() {
struct utmp ut; ut.ut_user[0] = 'a';
; return 0; }
EOF
-if { (eval echo configure:9889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_USER=yes
else
@@ -9906,13 +9916,13 @@ EOF
fi
echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
-echo "configure:9910: checking for ut_id in utmp" >&5
+echo "configure:9920: checking for ut_id in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9916 "configure"
+#line 9926 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -9920,7 +9930,7 @@ int main() {
struct utmp ut; ut.ut_id[0] = 'a';
; return 0; }
EOF
-if { (eval echo configure:9924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_ID=yes
else
@@ -9941,13 +9951,13 @@ EOF
fi
echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
-echo "configure:9945: checking for ut_host in utmp" >&5
+echo "configure:9955: checking for ut_host in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9951 "configure"
+#line 9961 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -9955,7 +9965,7 @@ int main() {
struct utmp ut; ut.ut_host[0] = 'a';
; return 0; }
EOF
-if { (eval echo configure:9959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_HOST=yes
else
@@ -9976,13 +9986,13 @@ EOF
fi
echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
-echo "configure:9980: checking for ut_time in utmp" >&5
+echo "configure:9990: checking for ut_time in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9986 "configure"
+#line 9996 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -9990,7 +10000,7 @@ int main() {
struct utmp ut; time_t t; ut.ut_time = t;
; return 0; }
EOF
-if { (eval echo configure:9994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_TIME=yes
else
@@ -10011,13 +10021,13 @@ EOF
fi
echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
-echo "configure:10015: checking for ut_tv in utmp" >&5
+echo "configure:10025: checking for ut_tv in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10021 "configure"
+#line 10031 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -10025,7 +10035,7 @@ int main() {
struct utmp ut; struct timeval tv; ut.ut_tv = tv;
; return 0; }
EOF
-if { (eval echo configure:10029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_TV=yes
else
@@ -10046,13 +10056,13 @@ EOF
fi
echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
-echo "configure:10050: checking for ut_type in utmp" >&5
+echo "configure:10060: checking for ut_type in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10056 "configure"
+#line 10066 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -10060,7 +10070,7 @@ int main() {
struct utmp ut; ut.ut_type = 0;
; return 0; }
EOF
-if { (eval echo configure:10064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_TYPE=yes
else
@@ -10081,13 +10091,13 @@ EOF
fi
echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
-echo "configure:10085: checking for ut_pid in utmp" >&5
+echo "configure:10095: checking for ut_pid in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10091 "configure"
+#line 10101 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -10095,7 +10105,7 @@ int main() {
struct utmp ut; ut.ut_pid = 0;
; return 0; }
EOF
-if { (eval echo configure:10099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_PID=yes
else
@@ -10116,13 +10126,13 @@ EOF
fi
echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
-echo "configure:10120: checking for ut_exit in utmp" >&5
+echo "configure:10130: checking for ut_exit in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10126 "configure"
+#line 10136 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -10130,7 +10140,7 @@ int main() {
struct utmp ut; ut.ut_exit.e_exit = 0;
; return 0; }
EOF
-if { (eval echo configure:10134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_EXIT=yes
else
@@ -10151,13 +10161,13 @@ EOF
fi
echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
-echo "configure:10155: checking for ut_addr in utmp" >&5
+echo "configure:10165: checking for ut_addr in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10161 "configure"
+#line 10171 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -10165,7 +10175,7 @@ int main() {
struct utmp ut; ut.ut_addr = 0;
; return 0; }
EOF
-if { (eval echo configure:10169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_ADDR=yes
else
@@ -10187,13 +10197,13 @@ fi
if test x$ac_cv_func_pututline = xyes ; then
echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
-echo "configure:10191: checking whether pututline returns pointer" >&5
+echo "configure:10201: checking whether pututline returns pointer" >&5
if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10197 "configure"
+#line 10207 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -10201,7 +10211,7 @@ int main() {
struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
; return 0; }
EOF
-if { (eval echo configure:10205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_PUTUTLINE_RETURNS_UTMP=yes
else
@@ -10223,13 +10233,13 @@ EOF
fi
echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
-echo "configure:10227: checking for ut_syslen in utmpx" >&5
+echo "configure:10237: checking for ut_syslen in utmpx" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10233 "configure"
+#line 10243 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmpx.h>
@@ -10237,7 +10247,7 @@ int main() {
struct utmpx ux; ux.ut_syslen = 0;
; return 0; }
EOF
-if { (eval echo configure:10241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UX_UT_SYSLEN=yes
else
@@ -10258,7 +10268,7 @@ EOF
fi
echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
-echo "configure:10262: checking for Linux kernel oplocks" >&5
+echo "configure:10272: checking for Linux kernel oplocks" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10267,7 +10277,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10271 "configure"
+#line 10281 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -10281,7 +10291,7 @@ main() {
}
EOF
-if { (eval echo configure:10285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
else
@@ -10304,7 +10314,7 @@ EOF
fi
echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
-echo "configure:10308: checking for kernel change notify support" >&5
+echo "configure:10318: checking for kernel change notify support" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10313,7 +10323,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10317 "configure"
+#line 10327 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -10327,7 +10337,7 @@ main() {
}
EOF
-if { (eval echo configure:10331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
else
@@ -10350,7 +10360,7 @@ EOF
fi
echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
-echo "configure:10354: checking for kernel share modes" >&5
+echo "configure:10364: 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
@@ -10359,7 +10369,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_KERNEL_SHARE_MODES=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10363 "configure"
+#line 10373 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -10375,7 +10385,7 @@ main() {
}
EOF
-if { (eval echo configure:10379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10389: \"$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
@@ -10401,13 +10411,13 @@ fi
echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
-echo "configure:10405: checking for IRIX kernel oplock type definitions" >&5
+echo "configure:10415: 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 10411 "configure"
+#line 10421 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <fcntl.h>
@@ -10415,7 +10425,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:10419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
else
@@ -10436,7 +10446,7 @@ EOF
fi
echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
-echo "configure:10440: checking for irix specific capabilities" >&5
+echo "configure:10450: 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
@@ -10445,7 +10455,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10449 "configure"
+#line 10459 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/capability.h>
@@ -10460,7 +10470,7 @@ main() {
}
EOF
-if { (eval echo configure:10464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10474: \"$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
@@ -10488,13 +10498,13 @@ fi
#
echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10492: checking for int16 typedef included by rpc/rpc.h" >&5
+echo "configure:10502: 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 10498 "configure"
+#line 10508 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
@@ -10504,7 +10514,7 @@ int main() {
int16 testvar;
; return 0; }
EOF
-if { (eval echo configure:10508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
else
@@ -10525,13 +10535,13 @@ EOF
fi
echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10529: checking for uint16 typedef included by rpc/rpc.h" >&5
+echo "configure:10539: 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 10535 "configure"
+#line 10545 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
@@ -10541,7 +10551,7 @@ int main() {
uint16 testvar;
; return 0; }
EOF
-if { (eval echo configure:10545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
else
@@ -10562,13 +10572,13 @@ EOF
fi
echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10566: checking for int32 typedef included by rpc/rpc.h" >&5
+echo "configure:10576: 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 10572 "configure"
+#line 10582 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
@@ -10578,7 +10588,7 @@ int main() {
int32 testvar;
; return 0; }
EOF
-if { (eval echo configure:10582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
else
@@ -10599,13 +10609,13 @@ EOF
fi
echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10603: checking for uint32 typedef included by rpc/rpc.h" >&5
+echo "configure:10613: 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 10609 "configure"
+#line 10619 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
@@ -10615,7 +10625,7 @@ int main() {
uint32 testvar;
; return 0; }
EOF
-if { (eval echo configure:10619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
else
@@ -10637,13 +10647,13 @@ fi
echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10641: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
+echo "configure:10651: 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 10647 "configure"
+#line 10657 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_SECURITY_H
@@ -10657,7 +10667,7 @@ int main() {
int testvar;
; return 0; }
EOF
-if { (eval echo configure:10661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
else
@@ -10678,16 +10688,16 @@ EOF
fi
echo $ac_n "checking for test routines""... $ac_c" 1>&6
-echo "configure:10682: checking for test routines" >&5
+echo "configure:10692: 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 10687 "configure"
+#line 10697 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/trivial.c"
EOF
-if { (eval echo configure:10691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10701: \"$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
@@ -10701,7 +10711,7 @@ fi
echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
-echo "configure:10705: checking for ftruncate extend" >&5
+echo "configure:10715: 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
@@ -10710,11 +10720,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_FTRUNCATE_EXTEND=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10714 "configure"
+#line 10724 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/ftruncate.c"
EOF
-if { (eval echo configure:10718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10728: \"$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
@@ -10737,7 +10747,7 @@ EOF
fi
echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
-echo "configure:10741: checking for broken getgroups" >&5
+echo "configure:10751: 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
@@ -10746,11 +10756,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_BROKEN_GETGROUPS=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10750 "configure"
+#line 10760 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/getgroups.c"
EOF
-if { (eval echo configure:10754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10764: \"$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
@@ -10773,7 +10783,7 @@ EOF
fi
echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
-echo "configure:10777: checking whether getpass should be replaced" >&5
+echo "configure:10787: 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
@@ -10781,7 +10791,7 @@ else
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/smbwrapper"
cat > conftest.$ac_ext <<EOF
-#line 10785 "configure"
+#line 10795 "configure"
#include "confdefs.h"
#define REPLACE_GETPASS 1
@@ -10794,7 +10804,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:10798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_REPLACE_GETPASS=yes
else
@@ -10817,7 +10827,7 @@ EOF
fi
echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
-echo "configure:10821: checking for broken inet_ntoa" >&5
+echo "configure:10831: 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
@@ -10826,7 +10836,7 @@ if test "$cross_compiling" = yes; then
samba_cv_REPLACE_INET_NTOA=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10830 "configure"
+#line 10840 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -10840,7 +10850,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:10844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10854: \"$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
@@ -10863,7 +10873,7 @@ EOF
fi
echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
-echo "configure:10867: checking for secure mkstemp" >&5
+echo "configure:10877: checking for secure mkstemp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10872,7 +10882,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_SECURE_MKSTEMP=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10876 "configure"
+#line 10886 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <sys/types.h>
@@ -10889,7 +10899,7 @@ main() {
exit(0);
}
EOF
-if { (eval echo configure:10893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_SECURE_MKSTEMP=yes
else
@@ -10912,7 +10922,7 @@ EOF
fi
echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
-echo "configure:10916: checking for sysconf(_SC_NGROUPS_MAX)" >&5
+echo "configure:10926: 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
@@ -10921,12 +10931,12 @@ if test "$cross_compiling" = yes; then
samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10925 "configure"
+#line 10935 "configure"
#include "confdefs.h"
#include <unistd.h>
main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
EOF
-if { (eval echo configure:10930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10940: \"$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
@@ -10949,7 +10959,7 @@ EOF
fi
echo $ac_n "checking for root""... $ac_c" 1>&6
-echo "configure:10953: checking for root" >&5
+echo "configure:10963: checking for root" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10958,11 +10968,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_ROOT=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10962 "configure"
+#line 10972 "configure"
#include "confdefs.h"
main() { exit(getuid() != 0); }
EOF
-if { (eval echo configure:10966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10976: \"$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
@@ -10990,7 +11000,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:10994: checking for iface AIX" >&5
+echo "configure:11004: 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
@@ -10999,7 +11009,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_IFACE_AIX=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11003 "configure"
+#line 11013 "configure"
#include "confdefs.h"
#define HAVE_IFACE_AIX 1
@@ -11007,7 +11017,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
EOF
-if { (eval echo configure:11011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11021: \"$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
@@ -11031,7 +11041,7 @@ fi
if test $iface = no; then
echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
-echo "configure:11035: checking for iface ifconf" >&5
+echo "configure:11045: 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
@@ -11040,7 +11050,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_IFACE_IFCONF=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11044 "configure"
+#line 11054 "configure"
#include "confdefs.h"
#define HAVE_IFACE_IFCONF 1
@@ -11048,7 +11058,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
EOF
-if { (eval echo configure:11052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11062: \"$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
@@ -11073,7 +11083,7 @@ fi
if test $iface = no; then
echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
-echo "configure:11077: checking for iface ifreq" >&5
+echo "configure:11087: 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
@@ -11082,7 +11092,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_IFACE_IFREQ=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11086 "configure"
+#line 11096 "configure"
#include "confdefs.h"
#define HAVE_IFACE_IFREQ 1
@@ -11090,7 +11100,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
EOF
-if { (eval echo configure:11094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11104: \"$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
@@ -11119,7 +11129,7 @@ fi
seteuid=no;
if test $seteuid = no; then
echo $ac_n "checking for setresuid""... $ac_c" 1>&6
-echo "configure:11123: checking for setresuid" >&5
+echo "configure:11133: checking for setresuid" >&5
if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -11128,7 +11138,7 @@ if test "$cross_compiling" = yes; then
samba_cv_USE_SETRESUID=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11132 "configure"
+#line 11142 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
@@ -11136,7 +11146,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
EOF
-if { (eval echo configure:11140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11150: \"$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
@@ -11162,7 +11172,7 @@ fi
if test $seteuid = no; then
echo $ac_n "checking for setreuid""... $ac_c" 1>&6
-echo "configure:11166: checking for setreuid" >&5
+echo "configure:11176: checking for setreuid" >&5
if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -11171,7 +11181,7 @@ if test "$cross_compiling" = yes; then
samba_cv_USE_SETREUID=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11175 "configure"
+#line 11185 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
@@ -11179,7 +11189,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
EOF
-if { (eval echo configure:11183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11193: \"$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
@@ -11204,7 +11214,7 @@ fi
if test $seteuid = no; then
echo $ac_n "checking for seteuid""... $ac_c" 1>&6
-echo "configure:11208: checking for seteuid" >&5
+echo "configure:11218: checking for seteuid" >&5
if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -11213,7 +11223,7 @@ if test "$cross_compiling" = yes; then
samba_cv_USE_SETEUID=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11217 "configure"
+#line 11227 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
@@ -11221,7 +11231,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
EOF
-if { (eval echo configure:11225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11235: \"$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
@@ -11246,7 +11256,7 @@ fi
if test $seteuid = no; then
echo $ac_n "checking for setuidx""... $ac_c" 1>&6
-echo "configure:11250: checking for setuidx" >&5
+echo "configure:11260: checking for setuidx" >&5
if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -11255,7 +11265,7 @@ if test "$cross_compiling" = yes; then
samba_cv_USE_SETUIDX=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11259 "configure"
+#line 11269 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
@@ -11263,7 +11273,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
EOF
-if { (eval echo configure:11267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11277: \"$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
@@ -11288,7 +11298,7 @@ fi
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:11292: checking for working mmap" >&5
+echo "configure:11302: 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
@@ -11297,11 +11307,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_MMAP=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11301 "configure"
+#line 11311 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/shared_mmap.c"
EOF
-if { (eval echo configure:11305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11315: \"$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
@@ -11324,7 +11334,7 @@ EOF
fi
echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
-echo "configure:11328: checking for ftruncate needs root" >&5
+echo "configure:11338: 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
@@ -11333,11 +11343,11 @@ if test "$cross_compiling" = yes; then
samba_cv_FTRUNCATE_NEEDS_ROOT=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11337 "configure"
+#line 11347 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/ftruncroot.c"
EOF
-if { (eval echo configure:11341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11351: \"$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
@@ -11360,7 +11370,7 @@ EOF
fi
echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
-echo "configure:11364: checking for fcntl locking" >&5
+echo "configure:11374: 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
@@ -11369,11 +11379,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_FCNTL_LOCK=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11373 "configure"
+#line 11383 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/fcntl_lock.c"
EOF
-if { (eval echo configure:11377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11387: \"$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
@@ -11396,7 +11406,7 @@ EOF
fi
echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
-echo "configure:11400: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
+echo "configure:11410: 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
@@ -11405,11 +11415,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11409 "configure"
+#line 11419 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/fcntl_lock64.c"
EOF
-if { (eval echo configure:11413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11423: \"$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
@@ -11434,7 +11444,7 @@ else
echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
-echo "configure:11438: checking for 64 bit fcntl locking" >&5
+echo "configure:11448: 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
@@ -11443,7 +11453,7 @@ else
samba_cv_HAVE_STRUCT_FLOCK64=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11447 "configure"
+#line 11457 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -11467,7 +11477,7 @@ exit(1);
#endif
}
EOF
-if { (eval echo configure:11471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11481: \"$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
@@ -11492,13 +11502,13 @@ EOF
fi
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:11496: checking for st_blocks in struct stat" >&5
+echo "configure:11506: checking for st_blocks in struct stat" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11502 "configure"
+#line 11512 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -11507,7 +11517,7 @@ int main() {
struct stat st; st.st_blocks = 0;
; return 0; }
EOF
-if { (eval echo configure:11511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_STAT_ST_BLOCKS=yes
else
@@ -11527,16 +11537,52 @@ EOF
fi
+echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
+echo "configure:11542: checking for st_blksize in struct stat" >&5
+if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLKSIZE'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 11548 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+int main() {
+struct stat st; st.st_blksize = 0;
+; return 0; }
+EOF
+if { (eval echo configure:11557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ samba_cv_HAVE_STAT_ST_BLKSIZE=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ samba_cv_HAVE_STAT_ST_BLKSIZE=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLKSIZE" 1>&6
+if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STAT_ST_BLKSIZE 1
+EOF
+
+fi
+
case "$host_os" in
*linux*)
echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
-echo "configure:11534: checking for broken RedHat 7.2 system header files" >&5
+echo "configure:11580: checking for broken RedHat 7.2 system header files" >&5
if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11540 "configure"
+#line 11586 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_VFS_H
@@ -11550,7 +11596,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:11554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
else
@@ -11573,13 +11619,13 @@ fi
esac
echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
-echo "configure:11577: checking for broken nisplus include files" >&5
+echo "configure:11623: 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 11583 "configure"
+#line 11629 "configure"
#include "confdefs.h"
#include <sys/acl.h>
#if defined(HAVE_RPCSVC_NIS_H)
@@ -11589,7 +11635,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:11593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
else
@@ -11613,7 +11659,7 @@ fi
#################################################
# check for smbwrapper support
echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
-echo "configure:11617: checking whether to use smbwrapper" >&5
+echo "configure:11663: 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"
@@ -11660,7 +11706,7 @@ fi
#################################################
# check for the AFS filesystem
echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
-echo "configure:11664: checking whether to use AFS" >&5
+echo "configure:11710: 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"
@@ -11686,7 +11732,7 @@ fi
#################################################
# check for the DFS auth system
echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6
-echo "configure:11690: checking whether to use DCE/DFS auth" >&5
+echo "configure:11736: checking whether to use DCE/DFS auth" >&5
# Check whether --with-dfs or --without-dfs was given.
if test "${with_dfs+set}" = set; then
withval="$with_dfs"
@@ -11711,7 +11757,7 @@ fi
#################################################
# check for Kerberos IV auth system
echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
-echo "configure:11715: checking whether to use Kerberos IV" >&5
+echo "configure:11761: 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"
@@ -11723,7 +11769,7 @@ if test "${with_krb4+set}" = set; then
EOF
echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
-echo "configure:11727: checking for dn_expand in -lresolv" >&5
+echo "configure:11773: 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
@@ -11731,7 +11777,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11735 "configure"
+#line 11781 "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
@@ -11742,7 +11788,7 @@ int main() {
dn_expand()
; return 0; }
EOF
-if { (eval echo configure:11746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11792: \"$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
@@ -11786,7 +11832,7 @@ fi
#################################################
# check for Kerberos 5 auth system
echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
-echo "configure:11790: checking whether to use Kerberos 5" >&5
+echo "configure:11836: 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"
@@ -11814,7 +11860,7 @@ fi
#################################################
# check for automount support
echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
-echo "configure:11818: checking whether to use AUTOMOUNT" >&5
+echo "configure:11864: 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"
@@ -11839,7 +11885,7 @@ fi
#################################################
# check for smbmount support
echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
-echo "configure:11843: checking whether to use SMBMOUNT" >&5
+echo "configure:11889: 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"
@@ -11876,7 +11922,7 @@ fi
# check for a PAM password database
with_pam_for_crypt=no
echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
-echo "configure:11880: checking whether to use PAM password database" >&5
+echo "configure:11926: 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"
@@ -11902,7 +11948,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:11906: checking for pam_get_data in -lpam" >&5
+echo "configure:11952: 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
@@ -11910,7 +11956,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpam $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11914 "configure"
+#line 11960 "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
@@ -11921,7 +11967,7 @@ int main() {
pam_get_data()
; return 0; }
EOF
-if { (eval echo configure:11925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11971: \"$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
@@ -11948,7 +11994,7 @@ fi
#################################################
# check for pam_smbpass support
echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
-echo "configure:11952: checking whether to use pam_smbpass" >&5
+echo "configure:11998: 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"
@@ -11990,12 +12036,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:11994: checking for $ac_func" >&5
+echo "configure:12040: 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 11999 "configure"
+#line 12045 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -12018,7 +12064,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:12022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12068: \"$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
@@ -12044,7 +12090,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:12048: checking for crypt in -lcrypt" >&5
+echo "configure:12094: 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
@@ -12052,7 +12098,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 12056 "configure"
+#line 12102 "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
@@ -12063,7 +12109,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:12067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12113: \"$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
@@ -12098,7 +12144,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:12102: checking for a crypt that needs truncated salt" >&5
+echo "configure:12148: 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
@@ -12107,11 +12153,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_TRUNCATED_SALT=cross
else
cat > conftest.$ac_ext <<EOF
-#line 12111 "configure"
+#line 12157 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/crypttest.c"
EOF
-if { (eval echo configure:12115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12161: \"$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
@@ -12149,7 +12195,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:12153: checking whether to use TDB SAM database" >&5
+echo "configure:12199: 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"
@@ -12175,7 +12221,7 @@ fi
#################################################
# check for a LDAP password database
echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
-echo "configure:12179: checking whether to use LDAP SAM database" >&5
+echo "configure:12225: 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"
@@ -12188,7 +12234,7 @@ EOF
LDAPLIBS="-lldap"
echo $ac_n "checking for ber_bvfree in -llber""... $ac_c" 1>&6
-echo "configure:12192: checking for ber_bvfree in -llber" >&5
+echo "configure:12238: checking for ber_bvfree in -llber" >&5
ac_lib_var=`echo lber'_'ber_bvfree | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -12196,7 +12242,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-llber $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 12200 "configure"
+#line 12246 "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
@@ -12207,7 +12253,7 @@ int main() {
ber_bvfree()
; return 0; }
EOF
-if { (eval echo configure:12211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12257: \"$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
@@ -12233,12 +12279,12 @@ fi
for ac_func in ldap_start_tls_s
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12237: checking for $ac_func" >&5
+echo "configure:12283: 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 12242 "configure"
+#line 12288 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -12261,7 +12307,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:12265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12311: \"$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
@@ -12302,7 +12348,7 @@ fi
#################################################
# check for a NISPLUS password database
echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
-echo "configure:12306: checking whether to use NISPLUS SAM database" >&5
+echo "configure:12352: 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"
@@ -12330,7 +12376,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:12334: checking whether to use traditional smbpasswd file" >&5
+echo "configure:12380: 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
@@ -12352,7 +12398,7 @@ fi
#################################################
# check for a NISPLUS_HOME support
echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
-echo "configure:12356: checking whether to use NISPLUS_HOME" >&5
+echo "configure:12402: 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"
@@ -12377,7 +12423,7 @@ fi
#################################################
# check for the secure socket layer
echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
-echo "configure:12381: checking whether to use SSL" >&5
+echo "configure:12427: 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"
@@ -12451,7 +12497,7 @@ fi
#################################################
# check for syslog logging
echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
-echo "configure:12455: checking whether to use syslog logging" >&5
+echo "configure:12501: 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"
@@ -12476,7 +12522,7 @@ fi
#################################################
# check for a shared memory profiling support
echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
-echo "configure:12480: checking whether to use profiling" >&5
+echo "configure:12526: 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"
@@ -12504,7 +12550,7 @@ fi
QUOTAOBJS=smbd/noquotas.o
echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
-echo "configure:12508: checking whether to support disk-quotas" >&5
+echo "configure:12554: 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"
@@ -12528,7 +12574,7 @@ fi
# check for experimental utmp accounting
echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
-echo "configure:12532: checking whether to support utmp accounting" >&5
+echo "configure:12578: 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"
@@ -12554,7 +12600,7 @@ fi
# check for MS Dfs support
echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
-echo "configure:12558: checking whether to support Microsoft Dfs" >&5
+echo "configure:12604: 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"
@@ -12582,7 +12628,7 @@ fi
LIBSMBCLIENT_SHARED=
LIBSMBCLIENT=
echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
-echo "configure:12586: checking whether to build the libsmbclient shared library" >&5
+echo "configure:12632: checking whether to build the libsmbclient shared library" >&5
# Check whether --with-libsmbclient or --without-libsmbclient was given.
if test "${with_libsmbclient+set}" = set; then
withval="$with_libsmbclient"
@@ -12609,14 +12655,14 @@ fi
#################################################
# these tests are taken from the GNU fileutils package
echo "checking how to get filesystem space usage" 1>&6
-echo "configure:12613: checking how to get filesystem space usage" >&5
+echo "configure:12659: 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:12620: checking statvfs64 function (SVR4)" >&5
+echo "configure:12666: 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
@@ -12624,7 +12670,7 @@ else
fu_cv_sys_stat_statvfs64=cross
else
cat > conftest.$ac_ext <<EOF
-#line 12628 "configure"
+#line 12674 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -12638,7 +12684,7 @@ else
exit (statvfs64 (".", &fsd));
}
EOF
-if { (eval echo configure:12642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12688: \"$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
@@ -12671,12 +12717,12 @@ fi
if test $space = no; then
# SVR4
echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
-echo "configure:12675: checking statvfs function (SVR4)" >&5
+echo "configure:12721: 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 12680 "configure"
+#line 12726 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statvfs.h>
@@ -12684,7 +12730,7 @@ int main() {
struct statvfs fsd; statvfs (0, &fsd);
; return 0; }
EOF
-if { (eval echo configure:12688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12734: \"$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
@@ -12709,7 +12755,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:12713: checking for 3-argument statfs function (DEC OSF/1)" >&5
+echo "configure:12759: 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
@@ -12717,7 +12763,7 @@ else
fu_cv_sys_stat_statfs3_osf1=no
else
cat > conftest.$ac_ext <<EOF
-#line 12721 "configure"
+#line 12767 "configure"
#include "confdefs.h"
#include <sys/param.h>
@@ -12730,7 +12776,7 @@ else
exit (statfs (".", &fsd, sizeof (struct statfs)));
}
EOF
-if { (eval echo configure:12734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12780: \"$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
@@ -12757,7 +12803,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:12761: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
+echo "configure:12807: 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
@@ -12765,7 +12811,7 @@ else
fu_cv_sys_stat_statfs2_bsize=no
else
cat > conftest.$ac_ext <<EOF
-#line 12769 "configure"
+#line 12815 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_PARAM_H
@@ -12784,7 +12830,7 @@ else
exit (statfs (".", &fsd));
}
EOF
-if { (eval echo configure:12788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12834: \"$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
@@ -12811,7 +12857,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:12815: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
+echo "configure:12861: 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
@@ -12819,7 +12865,7 @@ else
fu_cv_sys_stat_statfs4=no
else
cat > conftest.$ac_ext <<EOF
-#line 12823 "configure"
+#line 12869 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statfs.h>
@@ -12829,7 +12875,7 @@ else
exit (statfs (".", &fsd, sizeof fsd, 0));
}
EOF
-if { (eval echo configure:12833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12879: \"$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
@@ -12856,7 +12902,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:12860: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
+echo "configure:12906: 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
@@ -12864,7 +12910,7 @@ else
fu_cv_sys_stat_statfs2_fsize=no
else
cat > conftest.$ac_ext <<EOF
-#line 12868 "configure"
+#line 12914 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
@@ -12880,7 +12926,7 @@ else
exit (statfs (".", &fsd));
}
EOF
-if { (eval echo configure:12884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12930: \"$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
@@ -12907,7 +12953,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:12911: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
+echo "configure:12957: 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
@@ -12915,7 +12961,7 @@ else
fu_cv_sys_stat_fs_data=no
else
cat > conftest.$ac_ext <<EOF
-#line 12919 "configure"
+#line 12965 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
@@ -12935,7 +12981,7 @@ else
exit (statfs (".", &fsd) != 1);
}
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:12985: \"$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
@@ -12968,9 +13014,9 @@ fi
# file support.
#
echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
-echo "configure:12972: checking if large file support can be enabled" >&5
+echo "configure:13018: checking if large file support can be enabled" >&5
cat > conftest.$ac_ext <<EOF
-#line 12974 "configure"
+#line 13020 "configure"
#include "confdefs.h"
#if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
@@ -12983,7 +13029,7 @@ int main() {
int i
; return 0; }
EOF
-if { (eval echo configure:12987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:13033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
else
@@ -13050,7 +13096,7 @@ fi
# check for ACL support
echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
-echo "configure:13054: checking whether to support ACLs" >&5
+echo "configure:13100: 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"
@@ -13103,7 +13149,7 @@ EOF
;;
*)
echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
-echo "configure:13107: checking for acl_get_file in -lacl" >&5
+echo "configure:13153: 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
@@ -13111,7 +13157,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lacl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 13115 "configure"
+#line 13161 "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
@@ -13122,7 +13168,7 @@ int main() {
acl_get_file()
; return 0; }
EOF
-if { (eval echo configure:13126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13172: \"$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
@@ -13150,13 +13196,13 @@ else
fi
echo $ac_n "checking for ACL support""... $ac_c" 1>&6
-echo "configure:13154: checking for ACL support" >&5
+echo "configure:13200: 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 13160 "configure"
+#line 13206 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/acl.h>
@@ -13164,7 +13210,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:13168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13214: \"$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
@@ -13184,13 +13230,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:13188: checking for acl_get_perm_np" >&5
+echo "configure:13234: 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 13194 "configure"
+#line 13240 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/acl.h>
@@ -13198,7 +13244,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:13202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13248: \"$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
@@ -13253,7 +13299,7 @@ fi
# (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
-echo "configure:13257: checking whether to build winbind" >&5
+echo "configure:13303: checking whether to build winbind" >&5
# Initially, the value of $host_os decides whether winbind is supported
@@ -13313,7 +13359,7 @@ if test x"$HAVE_WINBIND" = x"yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking whether to enable winbind auth challenge/response code""... $ac_c" 1>&6
-echo "configure:13317: checking whether to enable winbind auth challenge/response code" >&5
+echo "configure:13363: checking whether to enable winbind auth challenge/response code" >&5
# Check whether --with-winbind-auth-challenge or --without-winbind-auth-challenge was given.
if test "${with_winbind_auth_challenge+set}" = set; then
withval="$with_winbind_auth_challenge"
@@ -13369,7 +13415,7 @@ fi
# It returns EGID too many times in the list of groups
# and causes a security problem
echo $ac_n "checking whether or not getgroups returns EGID too many times""... $ac_c" 1>&6
-echo "configure:13373: checking whether or not getgroups returns EGID too many times" >&5
+echo "configure:13419: checking whether or not getgroups returns EGID too many times" >&5
if eval "test \"`echo '$''{'samba_cv_have_getgroups_too_many_egids'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -13377,7 +13423,7 @@ else
samba_cv_have_getgroups_too_many_egids=cross
else
cat > conftest.$ac_ext <<EOF
-#line 13381 "configure"
+#line 13427 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -13393,7 +13439,7 @@ int main(int argc, char *argv[])
exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0);
}
EOF
-if { (eval echo configure:13397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_have_getgroups_too_many_egids=no
else
@@ -13434,20 +13480,20 @@ fi
# [#include <pwd.h>])
echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
-echo "configure:13438: checking whether struct passwd has pw_comment" >&5
+echo "configure:13484: checking whether struct passwd has pw_comment" >&5
if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 13444 "configure"
+#line 13490 "configure"
#include "confdefs.h"
#include <pwd.h>
int main() {
struct passwd p; p.pw_comment;
; return 0; }
EOF
-if { (eval echo configure:13451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:13497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_passwd_pw_comment=yes
else
@@ -13472,20 +13518,20 @@ fi
# [#include <pwd.h>])
echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
-echo "configure:13476: checking whether struct passwd has pw_age" >&5
+echo "configure:13522: checking whether struct passwd has pw_age" >&5
if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 13482 "configure"
+#line 13528 "configure"
#include "confdefs.h"
#include <pwd.h>
int main() {
struct passwd p; p.pw_age;
; return 0; }
EOF
-if { (eval echo configure:13489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:13535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_passwd_pw_age=yes
else
@@ -13524,7 +13570,7 @@ fi
if test x"$INCLUDED_POPT" != x"yes"; then
echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
-echo "configure:13528: checking for poptGetContext in -lpopt" >&5
+echo "configure:13574: 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
@@ -13532,7 +13578,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpopt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 13536 "configure"
+#line 13582 "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
@@ -13543,7 +13589,7 @@ int main() {
poptGetContext()
; return 0; }
EOF
-if { (eval echo configure:13547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13593: \"$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
@@ -13567,7 +13613,7 @@ fi
fi
echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
-echo "configure:13571: checking whether to use included popt" >&5
+echo "configure:13617: 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)'
@@ -13582,16 +13628,16 @@ fi
#################################################
# final configure stuff
echo $ac_n "checking configure summary""... $ac_c" 1>&6
-echo "configure:13586: checking configure summary" >&5
+echo "configure:13632: checking configure summary" >&5
if test "$cross_compiling" = yes; then
echo "configure: warning: cannot run when cross-compiling" 1>&2
else
cat > conftest.$ac_ext <<EOF
-#line 13591 "configure"
+#line 13637 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/summary.c"
EOF
-if { (eval echo configure:13595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13641: \"$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
diff --git a/source/configure.in b/source/configure.in
index 8c12dff9428..93f8b4a3beb 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -880,7 +880,14 @@ case "$host_os" in
SONAMEFLAG="-Wl,-h,"
PICFLAG="-KPIC" # Is this correct for SunOS
;;
- *bsd*) BLDSHARED="true"
+ *freebsd*) BLDSHARED="true"
+ LDSHFLAGS="-shared"
+ DYNEXP="-Wl,--export-dynamic"
+ SONAMEFLAG="-Wl,-soname,"
+ PICFLAG="-fPIC"
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+ ;;
+ *openbsd*) BLDSHARED="true"
LDSHFLAGS="-shared"
DYNEXP="-Wl,-Bdynamic"
SONAMEFLAG="-Wl,-soname,"
@@ -1763,6 +1770,16 @@ if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
AC_DEFINE(HAVE_STAT_ST_BLOCKS)
fi
+AC_CACHE_CHECK([for st_blksize in struct stat],samba_cv_HAVE_STAT_ST_BLKSIZE,[
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>],
+[struct stat st; st.st_blksize = 0;],
+samba_cv_HAVE_STAT_ST_BLKSIZE=yes,samba_cv_HAVE_STAT_ST_BLKSIZE=no,samba_cv_HAVE_STAT_ST_BLKSIZE=cross)])
+if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then
+ AC_DEFINE(HAVE_STAT_ST_BLKSIZE)
+fi
+
case "$host_os" in
*linux*)
AC_CACHE_CHECK([for broken RedHat 7.2 system header files],samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[
diff --git a/source/include/config.h.in b/source/include/config.h.in
index 3a1db41954b..0c15be649f4 100644
--- a/source/include/config.h.in
+++ b/source/include/config.h.in
@@ -85,7 +85,6 @@
#undef HAVE_CONNECT
#undef HAVE_SHORT_INO_T
#undef WITH_SMBWRAPPER
-#undef WITH_WINBIND_AUTH_CRAP
#undef WITH_AFS
#undef WITH_DFS
#undef SUNOS5
@@ -126,6 +125,9 @@
#undef WITH_SYSLOG
#undef WITH_PROFILE
#undef WITH_SSL
+#undef WITH_LDAP
+#undef WITH_NISPLUS
+#undef WITH_TDBPWD
#undef WITH_PAM
#undef WITH_PAM_SMBPASS
#undef WITH_NISPLUS_HOME
@@ -139,8 +141,10 @@
#undef HAVE_VA_COPY
#undef HAVE_SETRESUID_DECL
#undef HAVE_SETRESUID
+#undef WITH_NETATALK
#undef WITH_UTMP
#undef WITH_MSDFS
+#undef WITH_VFS
#undef HAVE_INO64_T
#undef HAVE_DEV64_T
#undef HAVE_STRUCT_FLOCK64
@@ -242,6 +246,9 @@
#undef HAVE_GETGROUPS_TOO_MANY_EGIDS
#undef HAVE_PASSWD_PW_COMMENT
#undef HAVE_PASSWD_PW_AGE
+#undef HAVE_STAT_ST_BLKSIZE
+#undef WITH_WINBIND_AUTH_CRAP
+
/*
* Add these definitions to allow VFS modules to
* see the CPPFLAGS defines.
diff --git a/source/include/includes.h b/source/include/includes.h
index 74f9c4af257..83e9073d9ee 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -661,6 +661,7 @@ extern int errno;
#include "hash.h"
#include "trans2.h"
#include "nterr.h"
+#include "ntioctl.h"
#include "secrets.h"
#include "messages.h"
@@ -752,6 +753,14 @@ typedef struct smb_wpasswd {
#define SYSV 1
#endif
+/*
+ * Veritas File System. Often in addition to native.
+ * Quotas different.
+ */
+#if defined(HAVE_SYS_FS_VX_QUOTA_H)
+#define VXFS_QUOTA
+#endif
+
#ifndef DEFAULT_PRINTING
#ifdef HAVE_CUPS
#define DEFAULT_PRINTING PRINT_CUPS
diff --git a/source/include/local.h b/source/include/local.h
index b41eb7b2078..76a2ae15d7e 100644
--- a/source/include/local.h
+++ b/source/include/local.h
@@ -118,7 +118,6 @@
#define IDLE_CLOSED_TIMEOUT (60)
#define DPTR_IDLE_TIMEOUT (120)
#define SMBD_SELECT_TIMEOUT (60)
-#define SMBD_SELECT_TIMEOUT_WITH_PENDING_LOCKS (10)
#define NMBD_SELECT_LOOP (10)
#define BROWSE_INTERVAL (60)
#define REGISTRATION_INTERVAL (10*60)
diff --git a/source/include/proto.h b/source/include/proto.h
index d7dbf980843..cdf5bbdf1f1 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -181,533 +181,8 @@ void CatchSignal(int signum,void (*handler)(int ));
void CatchChild(void);
void CatchChildLeaveStatus(void);
-<<<<<<< proto.h
-<<<<<<< proto.h
/* The following definitions come from libsmb/cliconnect.c */
-=======
-/* The following definitions come from lib/smbrun.c */
-
-int smbrun(char *cmd, int *outfd);
-
-/* The following definitions come from lib/snprintf.c */
-
-
-/* The following definitions come from lib/substitute.c */
-
-void standard_sub_basic(char *str, int len);
-void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str, int len);
-void standard_sub_conn(connection_struct *conn, char *str, int len);
-void standard_sub_home(int snum, char *user, char *str, int len);
-void standard_sub_snum(int snum, char *str, int len);
-void standard_sub_vuser(char *str, int len, user_struct *vuser);
-void standard_sub_vsnum(char *str, int len, user_struct *vuser, int snum);
-
-/* The following definitions come from lib/sysacls.c */
-
-int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p);
-int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p);
-int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
-void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d);
-SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type);
-SMB_ACL_T sys_acl_get_fd(int fd);
-int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset);
-int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
-int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
-char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen);
-SMB_ACL_T sys_acl_init( int count);
-int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry);
-int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype);
-int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual);
-int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
-int sys_acl_valid( SMB_ACL_T theacl );
-int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
-int sys_acl_set_fd( int fd, SMB_ACL_T theacl);
-int sys_acl_delete_def_file(const char *name);
-int sys_acl_free_text(char *text);
-int sys_acl_free_acl(SMB_ACL_T the_acl) ;
-int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
-int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p);
-int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p);
-int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
-void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d);
-SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type);
-SMB_ACL_T sys_acl_get_fd(int fd);
-int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset);
-int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
-int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
-char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen);
-SMB_ACL_T sys_acl_init( int count);
-int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry);
-int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype);
-int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual);
-int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
-int sys_acl_valid( SMB_ACL_T theacl );
-int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
-int sys_acl_set_fd( int fd, SMB_ACL_T theacl);
-int sys_acl_delete_def_file(const char *name);
-int sys_acl_free_text(char *text);
-int sys_acl_free_acl(SMB_ACL_T the_acl) ;
-int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
-int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p);
-int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p);
-int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
-void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d);
-SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type);
-SMB_ACL_T sys_acl_get_fd(int fd);
-int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d);
-int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm);
-int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm);
-char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p);
-SMB_ACL_T sys_acl_init(int count);
-int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p);
-int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type);
-int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p);
-int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d);
-int sys_acl_valid(SMB_ACL_T acl_d);
-int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
-int sys_acl_set_fd(int fd, SMB_ACL_T acl_d);
-int sys_acl_delete_def_file(const char *path);
-int sys_acl_free_text(char *text);
-int sys_acl_free_acl(SMB_ACL_T acl_d) ;
-int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
-int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p);
-int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p);
-int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
-void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d);
-SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type);
-SMB_ACL_T sys_acl_get_fd(int fd);
-int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d);
-int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm);
-int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm);
-char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p);
-SMB_ACL_T sys_acl_init(int count);
-int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p);
-int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type);
-int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p);
-int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d);
-int sys_acl_valid(SMB_ACL_T acl_d);
-int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
-int sys_acl_set_fd(int fd, SMB_ACL_T acl_d);
-int sys_acl_delete_def_file(const char *path);
-int sys_acl_free_text(char *text);
-int sys_acl_free_acl(SMB_ACL_T acl_d) ;
-int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
-int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p);
-int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p);
-int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
-void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d);
-SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type);
-SMB_ACL_T sys_acl_get_fd(int fd);
-int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d);
-int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm);
-int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm);
-char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p);
-SMB_ACL_T sys_acl_init(int count);
-int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p);
-int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type);
-int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p);
-int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d);
-int sys_acl_valid(SMB_ACL_T acl_d);
-int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
-int sys_acl_set_fd(int fd, SMB_ACL_T acl_d);
-int sys_acl_delete_def_file(const char *name);
-int sys_acl_free_text(char *text);
-int sys_acl_free_acl(SMB_ACL_T acl_d) ;
-int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
-int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p);
-int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p);
-int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
-void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d);
-SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type);
-SMB_ACL_T sys_acl_get_fd(int fd);
-int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset);
-int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
-char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen);
-SMB_ACL_T sys_acl_init( int count);
-int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry);
-int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype);
-int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual);
-int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
-int sys_acl_valid( SMB_ACL_T theacl );
-int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
-int sys_acl_set_fd( int fd, SMB_ACL_T theacl);
-int sys_acl_delete_def_file(const char *name);
-int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
-int sys_acl_free_text(char *text);
-int sys_acl_free_acl(SMB_ACL_T posix_acl);
-int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
-int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p);
-int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p);
-int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
-void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d);
-SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type);
-SMB_ACL_T sys_acl_get_fd(int fd);
-int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset);
-int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
-int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
-char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen);
-int sys_acl_free_text(char *text);
-SMB_ACL_T sys_acl_init( int count);
-int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry);
-int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype);
-int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual);
-int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
-int sys_acl_valid( SMB_ACL_T theacl );
-int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
-int sys_acl_set_fd( int fd, SMB_ACL_T theacl);
-int sys_acl_delete_def_file(const char *name);
-int sys_acl_free_acl(SMB_ACL_T the_acl) ;
-int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
-
-/* The following definitions come from lib/system.c */
-
-int sys_usleep(long usecs);
-ssize_t sys_read(int fd, void *buf, size_t count);
-ssize_t sys_write(int fd, const void *buf, size_t count);
-ssize_t sys_send(int s, const void *msg, size_t len, int flags);
-ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
-ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
-int sys_fcntl_ptr(int fd, int cmd, void *arg);
-int sys_fcntl_long(int fd, int cmd, long arg);
-int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf);
-int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf);
-int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf);
-int sys_ftruncate(int fd, SMB_OFF_T offset);
-SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence);
-int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence);
-SMB_OFF_T sys_ftell(FILE *fp);
-int sys_creat(const char *path, mode_t mode);
-int sys_open(const char *path, int oflag, mode_t mode);
-FILE *sys_fopen(const char *path, const char *type);
-SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp);
-int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev);
-char *sys_realpath(const char *path, char *resolved_path);
-int sys_waitpid(pid_t pid,int *status,int options);
-char *sys_getwd(char *s);
-int sys_symlink(const char *oldpath, const char *newpath);
-int sys_readlink(const char *path, char *buf, size_t bufsiz);
-int sys_link(const char *oldpath, const char *newpath);
-int sys_chown(const char *fname,uid_t uid,gid_t gid);
-int sys_chroot(const char *dname);
-struct hostent *sys_gethostbyname(const char *name);
-void oplock_set_capability(BOOL this_process, BOOL inherit);
-long sys_random(void);
-void sys_srandom(unsigned int seed);
-int groups_max(void);
-int sys_getgroups(int setlen, gid_t *gidset);
-int sys_setgroups(int setlen, gid_t *gidset);
-void sys_setpwent(void);
-struct passwd *sys_getpwent(void);
-void sys_endpwent(void);
-struct passwd *sys_getpwnam(const char *name);
-struct passwd *sys_getpwuid(uid_t uid);
-int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf);
-int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf);
-int wsys_creat(const smb_ucs2_t *wfname, mode_t mode);
-int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode);
-FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type);
-DIR *wsys_opendir(const smb_ucs2_t *wfname);
-smb_ucs2_t *wsys_getwd(smb_ucs2_t *s);
-int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid);
-int wsys_chroot(const smb_ucs2_t *wfname);
-pid_t sys_fork(void);
-pid_t sys_getpid(void);
-int sys_popen(const char *command);
-int sys_pclose(int fd);
-void *sys_dlopen(const char *name, int flags);
-void *sys_dlsym(void *handle, char *symbol);
-int sys_dlclose (void *handle);
-const char *sys_dlerror(void);
-void sys_adminlog(int priority, const char *format_str, ...);
-
-/* The following definitions come from lib/talloc.c */
-
-TALLOC_CTX *talloc_init(void);
-void *talloc(TALLOC_CTX *t, size_t size);
-void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size);
-void talloc_destroy_pool(TALLOC_CTX *t);
-void talloc_destroy(TALLOC_CTX *t);
-size_t talloc_pool_size(TALLOC_CTX *t);
-const char * talloc_pool_name(TALLOC_CTX const *t);
-void *talloc_zero(TALLOC_CTX *t, size_t size);
-void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size);
-char *talloc_strdup(TALLOC_CTX *t, const char *p);
-char *talloc_describe_all(TALLOC_CTX *rt);
-void talloc_get_allocation(TALLOC_CTX *t,
- size_t *total_bytes,
- int *n_chunks);
-
-/* The following definitions come from lib/time.c */
-
-time_t get_time_t_min(void);
-time_t get_time_t_max(void);
-void GetTimeOfDay(struct timeval *tval);
-void TimeInit(void);
-void get_process_uptime(struct timeval *ret_time);
-int TimeDiff(time_t t);
-struct tm *LocalTime(time_t *t);
-time_t nt_time_to_unix(NTTIME *nt);
-time_t nt_time_to_unix_abs(NTTIME *nt);
-time_t interpret_long_date(char *p);
-void unix_to_nt_time(NTTIME *nt, time_t t);
-void unix_to_nt_time_abs(NTTIME *nt, time_t t);
-void put_long_date(char *p,time_t t);
-BOOL null_mtime(time_t mtime);
-void put_dos_date(char *buf,int offset,time_t unixdate);
-void put_dos_date2(char *buf,int offset,time_t unixdate);
-void put_dos_date3(char *buf,int offset,time_t unixdate);
-time_t make_unix_date(void *date_ptr);
-time_t make_unix_date2(void *date_ptr);
-time_t make_unix_date3(void *date_ptr);
-char *http_timestring(time_t t);
-char *timestring(BOOL hires);
-time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs);
-void init_nt_time(NTTIME *nt);
-
-/* The following definitions come from lib/ufc.c */
-
-char *ufc_crypt(const char *key,const char *salt);
-/* The following definitions come from lib/username.c */
-
-BOOL name_is_local(const char *name);
-char *get_user_home_dir(char *user);
-char *get_user_service_home_dir(char *user);
-BOOL map_username(char *user);
-struct passwd *Get_Pwnam(char *user,BOOL allow_change);
-BOOL user_in_group_list(char *user,char *gname);
-BOOL user_in_list(char *user,char *list);
-struct passwd *smb_getpwnam(char *user, BOOL allow_change);
-
-/* The following definitions come from lib/util.c */
-
-char *tmpdir(void);
-BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups);
-char *Atoic(char *p, int *n, char *c);
-char *get_numlist(char *p, uint32 **num, int *count);
-BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf);
-time_t file_modtime(char *fname);
-BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st);
-SMB_OFF_T get_file_size(char *file_name);
-char *attrib_string(uint16 mode);
-void show_msg(char *buf);
-void smb_setlen(char *buf,int len);
-int set_message(char *buf,int num_words,int num_bytes,BOOL zero);
-int set_message_bcc(char *buf,int num_bytes);
-int set_message_end(void *outbuf,void *end_ptr);
-void dos_clean_name(char *s);
-void unix_clean_name(char *s);
-void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date);
-void close_low_fds(void);
-int set_blocking(int fd, BOOL set);
-ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t),
- ssize_t (*write_fn)(int, const void *, size_t));
-SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n);
-void msleep(unsigned int t);
-void become_daemon(void);
-BOOL yesno(char *p);
-void *Realloc(void *p,size_t size);
-void safe_free(void *p);
-BOOL get_myname(char *my_name);
-int interpret_protocol(char *str,int def);
-BOOL is_ipaddress(const char *str);
-uint32 interpret_addr(const char *str);
-struct in_addr *interpret_addr2(const char *str);
-BOOL is_zero_ip(struct in_addr ip);
-void zero_ip(struct in_addr *ip);
-char *automount_lookup(char *user_name);
-char *automount_lookup(char *user_name);
-BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
-BOOL process_exists(pid_t pid);
-char *uidtoname(uid_t uid);
-char *gidtoname(gid_t gid);
-uid_t nametouid(char *name);
-gid_t nametogid(char *name);
-void smb_panic(char *why);
-char *readdirname(DIR *p);
-BOOL is_in_path(char *name, name_compare_entry *namelist);
-void set_namearray(name_compare_entry **ppname_array, char *namelist);
-void free_namearray(name_compare_entry *name_array);
-BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
-BOOL is_myname(char *s);
-const char* get_my_primary_ip (void);
-BOOL is_myname_or_ipaddr(char *s);
-void set_remote_arch(enum remote_arch_types type);
-enum remote_arch_types get_remote_arch(void);
-void out_ascii(FILE *f, unsigned char *buf,int len);
-void out_data(FILE *f,char *buf1,int len, int per_line);
-void print_asc(int level, unsigned char *buf,int len);
-void dump_data(int level,char *buf1,int len);
-char *tab_depth(int depth);
-int str_checksum(const char *s);
-void zero_free(void *p, size_t size);
-int set_maxfiles(int requested_max);
-BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name);
-int smb_mkstemp(char *template);
-void *smb_xmalloc(size_t size);
-void *smb_xmemdup(const void *p, size_t size);
-char *smb_xstrdup(const char *s);
-int smb_xvasprintf(char **ptr, const char *format, va_list ap);
-void *memdup(void *p, size_t size);
-char *myhostname(void);
-char *lock_path(char *name);
-char *pid_path(char *name);
-char *parent_dirname(const char *path);
-BOOL ms_has_wild(char *s);
-BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive);
-BOOL unix_wild_match(char *pattern, char *string);
-DATA_BLOB data_blob(const void *p, size_t length);
-DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length);
-void data_blob_free(DATA_BLOB *d);
-void data_blob_clear(DATA_BLOB *d);
-int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6);
-
-/* The following definitions come from lib/util_file.c */
-
-BOOL do_file_lock(int fd, int waitsecs, int type);
-BOOL file_lock(int fd, int type, int secs, int *plock_depth);
-BOOL file_unlock(int fd, int *plock_depth);
-void *startfilepwent(char *pfile, char *s_readbuf, int bufsize,
- int *file_lock_depth, BOOL update);
-void endfilepwent(void *vp, int *file_lock_depth);
-SMB_BIG_UINT getfilepwpos(void *vp);
-BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok);
-int getfileline(void *vp, char *linebuf, int linebuf_size);
-char *fgets_slash(char *s2,int maxlen,FILE *f);
-char *file_pload(char *syscmd, size_t *size);
-char *fd_load(int fd, size_t *size);
-char *file_load(char *fname, size_t *size);
-char **file_lines_load(char *fname, int *numlines, BOOL convert);
-char **fd_lines_load(int fd, int *numlines, BOOL convert);
-char **file_lines_pload(char *syscmd, int *numlines, BOOL convert);
-void file_lines_free(char **lines);
-void file_lines_slashcont(char **lines);
-
-/* The following definitions come from lib/util_getent.c */
-
-struct sys_grent * getgrent_list(void);
-void grent_free (struct sys_grent *glist);
-struct sys_pwent * getpwent_list(void);
-void pwent_free (struct sys_pwent *plist);
-struct sys_userlist *get_users_in_group(const char *gname);
-void free_userlist(struct sys_userlist *list_head);
-
-/* The following definitions come from lib/util_seaccess.c */
-
-void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping);
-void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping);
-BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token,
- uint32 acc_desired, uint32 *acc_granted,
- NTSTATUS *status);
-SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr,
- BOOL child_container);
-
-/* The following definitions come from lib/util_sec.c */
-
-void sec_init(void);
-uid_t sec_initial_uid(void);
-gid_t sec_initial_gid(void);
-BOOL non_root_mode(void);
-void gain_root_privilege(void);
-void gain_root_group_privilege(void);
-void set_effective_uid(uid_t uid);
-void set_effective_gid(gid_t gid);
-void save_re_uid(void);
-void restore_re_uid(void);
-int set_re_uid(void);
-void become_user_permanently(uid_t uid, gid_t gid);
-BOOL is_setuid_root(void) ;
-
-/* The following definitions come from lib/util_sid.c */
-=======
-/* The following definitions come from libsmb/cliconnect.c */
->>>>>>> 1.900.2.381
-
-<<<<<<< proto.h
-void generate_wellknown_sids(void);
-BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain);
-BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use);
-BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain);
-void split_domain_name(const char *fullname, char *domain, char *name);
-char *sid_to_string(fstring sidstr_out, DOM_SID *sid);
-const char *sid_string_static(DOM_SID *sid);
-BOOL string_to_sid(DOM_SID *sidout, const char *sidstr);
-BOOL sid_append_rid(DOM_SID *sid, uint32 rid);
-BOOL sid_split_rid(DOM_SID *sid, uint32 *rid);
-BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid);
-void sid_copy(DOM_SID *dst, const DOM_SID *src);
-DOM_SID *sid_dup(DOM_SID *src);
-BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid);
-BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid);
-int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2);
-int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2);
-int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2);
-BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2);
-BOOL sid_check_is_domain(const DOM_SID *sid);
-BOOL sid_check_is_builtin(const DOM_SID *sid);
-BOOL sid_check_is_in_our_domain(const DOM_SID *sid);
-BOOL sid_check_is_in_builtin(const DOM_SID *sid);
-size_t sid_size(DOM_SID *sid);
-BOOL non_mappable_sid(DOM_SID *sid);
-char *sid_binstring(DOM_SID *sid);
-
-/* The following definitions come from lib/util_sock.c */
-
-BOOL is_a_socket(int fd);
-void set_socket_options(int fd, char *options);
-ssize_t read_udp_socket(int fd,char *buf,size_t len);
-ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out);
-BOOL send_keepalive(int client);
-ssize_t read_data(int fd,char *buffer,size_t N);
-ssize_t write_data(int fd,char *buffer,size_t N);
-ssize_t write_socket_data(int fd,char *buffer,size_t N);
-ssize_t write_socket(int fd,char *buf,size_t len);
-ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout);
-BOOL receive_smb(int fd,char *buffer, unsigned int timeout);
-BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout);
-BOOL send_smb(int fd,char *buffer);
-BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type);
-int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind );
-int open_socket_out(int type, struct in_addr *addr, int port ,int timeout);
-void client_setfd(int fd);
-char *client_name(void);
-char *client_addr(void);
-char *get_socket_name(int fd);
-char *get_socket_addr(int fd);
-int create_pipe_sock(const char *socket_dir,
- const char *socket_name,
- mode_t dir_perms);
-int sock_exec(const char *prog);
->>>>>>> 1.900.2.380
-
-BOOL cli_session_setup(struct cli_state *cli,
- char *user,
- char *pass, int passlen,
- char *ntpass, int ntpasslen,
- char *workgroup);
-BOOL cli_ulogoff(struct cli_state *cli);
-BOOL cli_send_tconX(struct cli_state *cli,
- const char *share, const char *dev, const char *pass, int passlen);
-BOOL cli_tdis(struct cli_state *cli);
-void cli_negprot_send(struct cli_state *cli);
-BOOL cli_negprot(struct cli_state *cli);
-BOOL cli_session_request(struct cli_state *cli,
- struct nmb_name *calling, struct nmb_name *called);
-BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip);
-BOOL cli_establish_connection(struct cli_state *cli,
- char *dest_host, struct in_addr *dest_ip,
- struct nmb_name *calling, struct nmb_name *called,
- char *service, char *service_type,
- BOOL do_shutdown, BOOL do_tcon);
-NTSTATUS cli_full_connection(struct cli_state **output_cli,
- const char *my_name, const char *dest_host,
- struct in_addr *dest_ip, int port,
- char *service, char *service_type,
- char *user, char *domain,
- char *password, int pass_len) ;
-BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost,
- struct in_addr *pdest_ip);
-=======
BOOL cli_session_setup(struct cli_state *cli,
char *user,
char *pass, int passlen,
@@ -735,7 +210,6 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli,
char *password, int pass_len) ;
BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost,
struct in_addr *pdest_ip);
->>>>>>> 1.900.2.381
/* The following definitions come from libsmb/cli_dfs.c */
@@ -1343,15 +817,6 @@ struct packet_struct *receive_unexpected(enum packet_type packet_type, int id,
/* The following definitions come from lib/substitute.c */
-<<<<<<< proto.h
-void standard_sub_basic(char *str);
-void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str);
-void standard_sub_conn(connection_struct *conn, char *str);
-void standard_sub_home(int snum, char *user, char *str);
-void standard_sub_snum(int snum, char *str);
-void standard_sub_vuser(char *str, user_struct *vuser);
-void standard_sub_vsnum(char *str, user_struct *vuser, int snum);
-=======
void standard_sub_basic(char *str, int len);
void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str, int len);
void standard_sub_conn(connection_struct *conn, char *str, int len);
@@ -1359,7 +824,6 @@ void standard_sub_home(int snum, char *user, char *str, int len);
void standard_sub_snum(int snum, char *str, int len);
void standard_sub_vuser(char *str, int len, user_struct *vuser);
void standard_sub_vsnum(char *str, int len, user_struct *vuser, int snum);
->>>>>>> 1.900.2.381
/* The following definitions come from lib/sysacls.c */
@@ -1763,21 +1227,6 @@ SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr,
/* The following definitions come from lib/util_sec.c */
-<<<<<<< proto.h
-void sec_init(void);
-uid_t sec_initial_uid(void);
-gid_t sec_initial_gid(void);
-BOOL non_root_mode(void);
-void gain_root_privilege(void);
-void gain_root_group_privilege(void);
-void set_effective_uid(uid_t uid);
-void set_effective_gid(gid_t gid);
-void save_re_uid(void);
-void restore_re_uid(void);
-int set_re_uid(void);
-void become_user_permanently(uid_t uid, gid_t gid);
-BOOL is_setuid_root(void) ;
-=======
void sec_init(void);
uid_t sec_initial_uid(void);
gid_t sec_initial_gid(void);
@@ -1793,7 +1242,6 @@ void restore_re_gid(void);
int set_re_uid(void);
void become_user_permanently(uid_t uid, gid_t gid);
BOOL is_setuid_root(void) ;
->>>>>>> 1.900.2.381
/* The following definitions come from lib/util_sid.c */
@@ -2975,7 +2423,8 @@ WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
fstring printername, fstring architecture, uint32 version);
uint32 free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level);
BOOL printer_driver_in_use (char *arch, char *driver);
-WERROR delete_printer_driver (NT_PRINTER_DRIVER_INFO_LEVEL_3 *i);
+WERROR delete_printer_driver (NT_PRINTER_DRIVER_INFO_LEVEL_3 *i, struct current_user *user,
+ uint32 version, BOOL delete_files );
BOOL get_specific_param_by_index(NT_PRINTER_INFO_LEVEL printer, uint32 level, uint32 param_index,
fstring value, uint8 **data, uint32 *type, uint32 *len);
BOOL get_specific_param(NT_PRINTER_INFO_LEVEL printer, uint32 level,
@@ -4839,7 +4288,7 @@ NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INF
BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num);
void remove_pending_lock_requests_by_fid(files_struct *fsp);
void remove_pending_lock_requests_by_mid(int mid);
-BOOL blocking_locks_pending(void);
+BOOL blocking_locks_timeout(unsigned default_timeout);
void process_blocking_lock_queue(time_t t);
/* The following definitions come from smbd/chgpasswd.c */
@@ -5279,6 +4728,7 @@ BOOL reset_stat_cache( void );
/* The following definitions come from smbd/trans2.c */
+SMB_OFF_T get_allocation_size(files_struct *fsp, SMB_STRUCT_STAT *sbuf);
time_t interpret_long_unix_date(char *p);
NTSTATUS set_bad_path_error(int err, BOOL bad_path);
NTSTATUS set_delete_on_close_internal(files_struct *fsp, BOOL delete_on_close);
diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h
index ce137858df0..7e29f3f2437 100755
--- a/source/include/rpc_spoolss.h
+++ b/source/include/rpc_spoolss.h
@@ -5,6 +5,7 @@
Copyright (C) Andrew Tridgell 1992-2000,
Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
Copyright (C) Jean Francois Micouleau 1998-2000.
+ Copyright (C) Gerald Carter 2001-2002.
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
@@ -396,6 +397,8 @@ PRINTER_MESSAGE_INFO;
#define PRINTER_ENUM_ICON7 0x00400000
#define PRINTER_ENUM_ICON8 0x00800000
+#define DRIVER_ANY_VERSION 0xffffffff
+#define DRIVER_MAX_VERSION 4
/* this struct is undocumented */
/* thanks to the ddk ... */
typedef struct spool_user_1
diff --git a/source/include/smb.h b/source/include/smb.h
index 248f0bf5cbe..cd7693b3b71 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -402,6 +402,7 @@ typedef struct files_struct
BOOL delete_on_close;
SMB_OFF_T pos;
SMB_OFF_T size;
+ SMB_OFF_T initial_allocation_size; /* Faked up initial allocation on disk. */
mode_t mode;
uint16 vuid;
write_bmpx_struct *wbmpx_ptr;
@@ -755,13 +756,15 @@ struct bitmap {
int n;
};
-#define FLAG_BASIC 0x01 /* fundamental options */
-#define FLAG_SHARE 0x02 /* file sharing options */
-#define FLAG_PRINT 0x04 /* printing options */
-#define FLAG_GLOBAL 0x08 /* local options that should be globally settable in SWAT */
-#define FLAG_DEPRECATED 0x10 /* options that should no longer be used */
-#define FLAG_HIDE 0x20 /* options that should be hidden in SWAT */
-#define FLAG_DOS_STRING 0x40 /* convert from UNIX to DOS codepage when reading this string. */
+#define FLAG_BASIC 0x0001 /* fundamental options */
+#define FLAG_SHARE 0x0002 /* file sharing options */
+#define FLAG_PRINT 0x0004 /* printing options */
+#define FLAG_GLOBAL 0x0008 /* local options that should be globally settable in SWAT */
+#define FLAG_WIZARD 0x0010 /* Parameters that the wizard will operate on */
+#define FLAG_ADVANCED 0x0020 /* Parameters that the wizard will operate on */
+#define FLAG_DEPRECATED 0x1000 /* options that should no longer be used */
+#define FLAG_HIDE 0x2000 /* options that should be hidden in SWAT */
+#define FLAG_DOS_STRING 0x4000 /* convert from UNIX to DOS codepage when reading this string. */
#ifndef LOCKING_VERSION
#define LOCKING_VERSION 4
@@ -1113,17 +1116,17 @@ struct bitmap {
#define FILE_SHARE_DELETE 4
/* FileAttributesField */
-#define FILE_ATTRIBUTE_READONLY aRONLY
-#define FILE_ATTRIBUTE_HIDDEN aHIDDEN
-#define FILE_ATTRIBUTE_SYSTEM aSYSTEM
-#define FILE_ATTRIBUTE_DIRECTORY aDIR
-#define FILE_ATTRIBUTE_ARCHIVE aARCH
-#define FILE_ATTRIBUTE_NORMAL 0x80L
-#define FILE_ATTRIBUTE_TEMPORARY 0x100L
-#define FILE_ATTRIBUTE_SPARSE 0x200L
-#define FILE_ATTRIBUTE_COMPRESSED 0x800L
-#define FILE_ATTRIBUTE_NONINDEXED 0x2000L
-#define SAMBA_ATTRIBUTES_MASK 0x7F
+#define FILE_ATTRIBUTE_READONLY 0x001L
+#define FILE_ATTRIBUTE_HIDDEN 0x002L
+#define FILE_ATTRIBUTE_SYSTEM 0x004L
+#define FILE_ATTRIBUTE_DIRECTORY 0x010L
+#define FILE_ATTRIBUTE_ARCHIVE 0x020L
+#define FILE_ATTRIBUTE_NORMAL 0x080L
+#define FILE_ATTRIBUTE_TEMPORARY 0x100L
+#define FILE_ATTRIBUTE_SPARSE 0x200L
+#define FILE_ATTRIBUTE_COMPRESSED 0x800L
+#define FILE_ATTRIBUTE_NONINDEXED 0x2000L
+#define SAMBA_ATTRIBUTES_MASK 0x7F
/* Flags - combined with attributes. */
#define FILE_FLAG_WRITE_THROUGH 0x80000000L
@@ -1151,6 +1154,7 @@ struct bitmap {
#define FILE_EIGHT_DOT_THREE_ONLY 0x0400
#define FILE_RANDOM_ACCESS 0x0800
#define FILE_DELETE_ON_CLOSE 0x1000
+#define FILE_OPEN_BY_FILE_ID 0x2000
/* Responses when opening a file. */
#define FILE_WAS_OPENED 1
@@ -1285,7 +1289,7 @@ char *strdup(char *s);
*/
#define DEFAULT_MAJOR_VERSION 0x04
-#define DEFAULT_MINOR_VERSION 0x05
+#define DEFAULT_MINOR_VERSION 0x09
/* Browser Election Values */
#define BROWSER_ELECTION_VERSION 0x010f
diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h
index 79bca5d7029..13b833afbbf 100644
--- a/source/include/smb_macros.h
+++ b/source/include/smb_macros.h
@@ -161,8 +161,7 @@
/* this is how errors are generated */
#define UNIXERROR(defclass,deferror) unix_error_packet(outbuf,defclass,deferror,__LINE__,__FILE__)
-#define SMB_ROUNDUP(x,g) (((x)+((g)-1))&~((g)-1))
-#define SMB_ROUNDUP_ALLOCATION(s) ((s) ? (SMB_ROUNDUP((SMB_OFF_T)((s)+1), ((SMB_OFF_T)SMB_ROUNDUP_ALLOCATION_SIZE))) : 0 )
+#define SMB_ROUNDUP(x,r) ( ((x)%(r)) ? ( (((x)+(r))/(r))*(r) ) : (x))
/* Extra macros added by Ying Chen at IBM - speed increase by inlining. */
#define smb_buf(buf) (((char *)(buf)) + smb_size + CVAL(buf,smb_wct)*2)
diff --git a/source/include/version.h b/source/include/version.h
index fb12926950a..aafe2b6c015 100644
--- a/source/include/version.h
+++ b/source/include/version.h
@@ -1 +1 @@
-#define VERSION "2.2.6pre1"
+#define VERSION "2.2.6pre2"
diff --git a/source/lib/error.c b/source/lib/error.c
index 5fbc9a7f4fa..f97a0e51ae5 100644
--- a/source/lib/error.c
+++ b/source/lib/error.c
@@ -47,6 +47,9 @@ struct unix_error_map unix_dos_nt_errmap[] = {
#ifdef EROFS
{ EROFS, ERRHRD, ERRnowrite, NT_STATUS_ACCESS_DENIED },
#endif
+#ifdef ENAMETOOLONG
+ { ENAMETOOLONG, ERRDOS, 206, NT_STATUS_OBJECT_NAME_INVALID },
+#endif
{ 0, 0, 0, NT_STATUS_OK }
};
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c
index dca80289e1f..8f5efcab786 100644
--- a/source/lib/util_sock.c
+++ b/source/lib/util_sock.c
@@ -606,7 +606,7 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout)
len = read_smb_length_return_keepalive(fd,buffer,timeout);
if (len < 0) {
- DEBUG(10,("receive_smb: length < 0!\n"));
+ DEBUG(10,("receive_smb: length < 0 !\n"));
/*
* Correct fix. smb_read_error may have already been
diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c
index 8ef9a103a2a..643d8424f23 100644
--- a/source/libsmb/cliconnect.c
+++ b/source/libsmb/cliconnect.c
@@ -998,7 +998,7 @@ again:
DEBUG(1,("session request to %s failed (%s)\n",
called.name, cli_errstr(cli)));
cli_shutdown(cli);
- if ((p=strchr(called.name, '.'))) {
+ if ((p=strchr(called.name, '.')) && !is_ipaddress(called.name)) {
*p = 0;
goto again;
}
diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c
index ad0861e84f6..f052f83e1ff 100644
--- a/source/libsmb/libsmbclient.c
+++ b/source/libsmb/libsmbclient.c
@@ -328,7 +328,7 @@ struct smbc_server *smbc_server(char *server, char *share,
fstring remote_name;
struct in_addr rem_ip;
- if (!inet_aton(server, &rem_ip)) {
+ if ((rem_ip.s_addr=inet_addr(server)) == INADDR_NONE) {
DEBUG(4, ("Could not convert IP address %s to struct in_addr\n", server));
errno = ENOENT;
return NULL;
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index b6b6e03e23f..52655a77fe3 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -712,18 +712,18 @@ static struct parm_struct parm_table[] = {
{"comment", P_STRING, P_LOCAL, &sDefault.comment, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT | FLAG_DOS_STRING},
{"path", P_STRING, P_LOCAL, &sDefault.szPath, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT | FLAG_DOS_STRING},
{"directory", P_STRING, P_LOCAL, &sDefault.szPath, NULL, NULL, FLAG_DOS_STRING},
- {"workgroup", P_USTRING, P_GLOBAL, &Globals.szWorkGroup, NULL, NULL, FLAG_BASIC | FLAG_DOS_STRING},
- {"netbios name", P_UGSTRING, P_GLOBAL, global_myname, handle_netbios_name, NULL, FLAG_BASIC | FLAG_DOS_STRING},
+ {"workgroup", P_USTRING, P_GLOBAL, &Globals.szWorkGroup, NULL, NULL, FLAG_BASIC | FLAG_DOS_STRING | FLAG_WIZARD},
+ {"netbios name", P_UGSTRING, P_GLOBAL, global_myname, handle_netbios_name, NULL, FLAG_BASIC | FLAG_DOS_STRING | FLAG_WIZARD},
{"netbios aliases", P_STRING, P_GLOBAL, &Globals.szNetbiosAliases, NULL, NULL, FLAG_DOS_STRING},
{"netbios scope", P_UGSTRING, P_GLOBAL, global_scope, NULL, NULL, FLAG_DOS_STRING},
{"server string", P_STRING, P_GLOBAL, &Globals.szServerString, NULL, NULL, FLAG_BASIC | FLAG_DOS_STRING},
- {"interfaces", P_STRING, P_GLOBAL, &Globals.szInterfaces, NULL, NULL, FLAG_BASIC},
- {"bind interfaces only", P_BOOL, P_GLOBAL, &Globals.bBindInterfacesOnly, NULL, NULL, 0},
+ {"interfaces", P_STRING, P_GLOBAL, &Globals.szInterfaces, NULL, NULL, FLAG_BASIC | FLAG_WIZARD},
+ {"bind interfaces only", P_BOOL, P_GLOBAL, &Globals.bBindInterfacesOnly, NULL, NULL, FLAG_WIZARD},
{"Security Options", P_SEP, P_SEPARATOR},
- {"security", P_ENUM, P_GLOBAL, &Globals.security, NULL, enum_security, FLAG_BASIC},
- {"encrypt passwords", P_BOOL, P_GLOBAL, &Globals.bEncryptPasswords, NULL, NULL, FLAG_BASIC},
+ {"security", P_ENUM, P_GLOBAL, &Globals.security, NULL, enum_security, FLAG_BASIC | FLAG_WIZARD},
+ {"encrypt passwords", P_BOOL, P_GLOBAL, &Globals.bEncryptPasswords, NULL, NULL, FLAG_BASIC | FLAG_WIZARD},
{"update encrypted", P_BOOL, P_GLOBAL, &Globals.bUpdateEncrypt, NULL, NULL, FLAG_BASIC},
{"allow trusted domains", P_BOOL, P_GLOBAL, &Globals.bAllowTrustedDomains, NULL, NULL, 0},
{"alternate permissions", P_BOOL, P_LOCAL, &sDefault.bAlternatePerm, NULL, NULL, FLAG_GLOBAL | FLAG_DEPRECATED},
@@ -733,7 +733,7 @@ static struct parm_struct parm_table[] = {
{"map to guest", P_ENUM, P_GLOBAL, &Globals.map_to_guest, NULL, enum_map_to_guest, 0},
{"null passwords", P_BOOL, P_GLOBAL, &Globals.bNullPasswords, NULL, NULL, 0},
{"obey pam restrictions", P_BOOL, P_GLOBAL, &Globals.bObeyPamRestrictions, NULL, NULL, 0},
- {"password server", P_STRING, P_GLOBAL, &Globals.szPasswordServer, NULL, NULL, 0},
+ {"password server", P_STRING, P_GLOBAL, &Globals.szPasswordServer, NULL, NULL, FLAG_WIZARD},
#ifdef WITH_TDB_SAM
{"tdb passwd file", P_STRING, P_GLOBAL, &Globals.szTDBPasswdFile, NULL, NULL, 0},
#else
@@ -991,8 +991,8 @@ static struct parm_struct parm_table[] = {
{"dns proxy", P_BOOL, P_GLOBAL, &Globals.bDNSproxy, NULL, NULL, 0},
{"wins proxy", P_BOOL, P_GLOBAL, &Globals.bWINSproxy, NULL, NULL, 0},
- {"wins server", P_STRING, P_GLOBAL, &Globals.szWINSserver, handle_wins_server_list, NULL, FLAG_BASIC},
- {"wins support", P_BOOL, P_GLOBAL, &Globals.bWINSsupport, NULL, NULL, FLAG_BASIC},
+ {"wins server", P_STRING, P_GLOBAL, &Globals.szWINSserver, handle_wins_server_list, NULL, FLAG_BASIC | FLAG_WIZARD},
+ {"wins support", P_BOOL, P_GLOBAL, &Globals.bWINSsupport, NULL, NULL, FLAG_BASIC | FLAG_WIZARD},
{"wins hook", P_STRING, P_GLOBAL, &Globals.szWINSHook, NULL, NULL, 0},
{"Locking Options", P_SEP, P_SEPARATOR},
diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c
index 512735fdd8d..a79522d5e58 100644
--- a/source/passdb/passdb.c
+++ b/source/passdb/passdb.c
@@ -541,6 +541,20 @@ BOOL local_lookup_rid(uint32 rid, char *name, enum SID_NAME_USE *psid_name_use)
gr ? "succeeded" : "failed" ));
if(!gr) {
+ switch (rid) {
+ case DOMAIN_GROUP_RID_ADMINS:
+ fstrcpy(name, "Domain Admins");
+ return True;
+ case DOMAIN_GROUP_RID_USERS:
+ fstrcpy(name, "Domain Users");
+ return True;
+ case DOMAIN_GROUP_RID_GUESTS:
+ fstrcpy(name, "Domain Guests");
+ return True;
+ case BUILTIN_ALIAS_RID_USERS:
+ fstrcpy(name, "Users");
+ return True;
+ }
slprintf(name, sizeof(fstring)-1, "unix_group.%u", (unsigned int)gid);
return True;
}
diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c
index 2289a7070ee..a4258347178 100644
--- a/source/passdb/pdb_ldap.c
+++ b/source/passdb/pdb_ldap.c
@@ -1104,6 +1104,7 @@ BOOL pdb_add_sam_account(SAM_ACCOUNT * newpwd)
if (ldap_op == LDAP_MOD_REPLACE) {
rc = ldap_modify_s(ldap_struct, dn, mods);
} else {
+ make_a_mod(&mods, LDAP_MOD_ADD, "objectclass", "account");
rc = ldap_add_s(ldap_struct, dn, mods);
}
diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c
index 195028dc8a8..768373e5ad3 100644
--- a/source/printing/nt_printing.c
+++ b/source/printing/nt_printing.c
@@ -3527,31 +3527,102 @@ BOOL printer_driver_in_use (char *arch, char *driver)
Remove a printer driver from the TDB. This assumes that the the driver was
previously looked up.
***************************************************************************/
-WERROR delete_printer_driver (NT_PRINTER_DRIVER_INFO_LEVEL_3 *i)
+
+static WERROR delete_printer_driver_internal( NT_PRINTER_DRIVER_INFO_LEVEL_3 *i, struct current_user *user,
+ uint32 version, BOOL delete_files )
{
pstring key;
fstring arch;
- TDB_DATA kbuf;
+ TDB_DATA kbuf, dbuf;
+ NT_PRINTER_DRIVER_INFO_LEVEL ctr;
+ /* delete the tdb data first */
get_short_archi(arch, i->environment);
slprintf(key, sizeof(key)-1, "%s%s/%d/%s", DRIVERS_PREFIX,
- arch, i->cversion, i->name);
- DEBUG(5,("delete_printer_driver: key = [%s]\n", key));
+ arch, version, i->name);
+
+ DEBUG(5,("delete_printer_driver: key = [%s] delete_files = %s\n",
+ key, delete_files ? "TRUE" : "FALSE" ));
+
+ ctr.info_3 = i;
+ dump_a_printer_driver( ctr, 3 );
kbuf.dptr=key;
kbuf.dsize=strlen(key)+1;
+ /* check if the driver actually exists for this environment */
+
+ dbuf = tdb_fetch( tdb_drivers, kbuf );
+ if ( !dbuf.dptr ) {
+ DEBUG(8,("delete_printer_driver_internal: Driver unknown [%s]\n", key));
+ return WERR_UNKNOWN_PRINTER_DRIVER;
+ }
+
+ SAFE_FREE( dbuf.dptr );
+
+ /* ok... the driver exists so the delete should return success */
+
if (tdb_delete(tdb_drivers, kbuf) == -1) {
- DEBUG (0,("delete_printer_driver: fail to delete %s!\n", key));
+ DEBUG (0,("delete_printer_driver_internal: fail to delete %s!\n", key));
return WERR_ACCESS_DENIED;
}
+
+#if 0 /* JERRY - no used in Samba 2.2.x */
+ /*
+ * now delete any associated files if delete_files == True
+ * even if this part failes, we return succes because the
+ * driver doesn not exist any more
+ */
+
+ if ( delete_files )
+ delete_driver_files( i, user );
+
+#endif
+
+ DEBUG(5,("delete_printer_driver_internal: driver delete successful [%s]\n", key));
+
+ return WERR_OK;
+}
+
+/****************************************************************************
+ Remove a printer driver from the TDB. This assumes that the the driver was
+ previously looked up.
+ ***************************************************************************/
+
+WERROR delete_printer_driver (NT_PRINTER_DRIVER_INFO_LEVEL_3 *i, struct current_user *user,
+ uint32 version, BOOL delete_files )
+
+{
+ WERROR err;
+
+ /*
+ * see if we should delete all versions of this driver
+ * (DRIVER_ANY_VERSION uis only set for "Windows NT x86")
+ */
+
+ if ( version == DRIVER_ANY_VERSION )
+ {
+ /* Windows NT 4.0 */
+
+ err = delete_printer_driver_internal(i, user, 2, delete_files );
+ if ( !W_ERROR_IS_OK(err) && (W_ERROR_V(err) != ERRunknownprinterdriver ) )
+ return err;
+
+ /* Windows 2000/XP */
+
+ err = delete_printer_driver_internal(i, user, 3, delete_files );
+ if ( !W_ERROR_IS_OK(err) && (W_ERROR_V(err) != ERRunknownprinterdriver ) )
+ return err;
+
+ return WERR_OK;
+ }
- DEBUG(5,("delete_printer_driver: [%s] driver delete successful.\n",
- i->name));
+ /* just delete what they asked for */
- return WERR_OK;
+ return delete_printer_driver_internal(i, user, version, delete_files );
}
+
/****************************************************************************
****************************************************************************/
BOOL get_specific_param_by_index(NT_PRINTER_INFO_LEVEL printer, uint32 level, uint32 param_index,
diff --git a/source/profile/profile.c b/source/profile/profile.c
index 8f76b5a0465..e6ad610d89f 100644
--- a/source/profile/profile.c
+++ b/source/profile/profile.c
@@ -22,7 +22,9 @@
#include "includes.h"
+#ifdef WITH_PROFILE
#define IPC_PERMS ((SHM_R | SHM_W) | (SHM_R>>3) | (SHM_R>>6))
+#endif /* WITH_PROFILE */
static int shm_id;
static BOOL read_only;
@@ -46,6 +48,7 @@ void profile_message(int msg_type, pid_t src, void *buf, size_t len)
int level;
memcpy(&level, buf, sizeof(int));
+#ifdef WITH_PROFILE
switch (level) {
case 0: /* turn off profiling */
do_profile_flag = False;
@@ -67,6 +70,9 @@ void profile_message(int msg_type, pid_t src, void *buf, size_t len)
DEBUG(1,("INFO: Profiling values cleared from pid %d\n", (int)src));
break;
}
+#else /* ndef WITH_PROFILE */
+ DEBUG(1,("INFO: Profiling support unavailable in this build.\n"));
+#endif /* WITH_PROFILE */
}
/****************************************************************************
@@ -88,6 +94,8 @@ void reqprofile_message(int msg_type, pid_t src, void *buf, size_t len)
/*******************************************************************
open the profiling shared memory area
******************************************************************/
+
+#ifdef WITH_PROFILE
BOOL profile_setup(BOOL rdonly)
{
struct shmid_ds shm_ds;
@@ -157,4 +165,4 @@ BOOL profile_setup(BOOL rdonly)
message_register(MSG_REQ_PROFILELEVEL, reqprofile_message);
return True;
}
-
+#endif /* WITH_PROFILE */
diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c
index 62275b38205..2b865c7f3cb 100644
--- a/source/rpc_parse/parse_spoolss.c
+++ b/source/rpc_parse/parse_spoolss.c
@@ -3484,7 +3484,7 @@ uint32 spoolss_size_printer_enum_values(PRINTER_ENUM_VALUES *p)
/* uint32(offset) + uint32(length) + length) */
size += (size_of_uint32(&p->value_len)*2) + p->value_len;
- size += (size_of_uint32(&p->data_len)*2) + p->data_len;
+ size += (size_of_uint32(&p->data_len)*2) + p->data_len + (p->data_len%2) ;
size += size_of_uint32(&p->type);
@@ -6833,8 +6833,10 @@ static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps,
if (!prs_uint32("size", ps, depth, &ctr->size))
return False;
- /* offset data begins at 20 bytes per structure * size_of_array.
- Don't forget the uint32 at the beginning */
+ /*
+ * offset data begins at 20 bytes per structure * size_of_array.
+ * Don't forget the uint32 at the beginning
+ * */
current_offset = basic_unit * ctr->size_of_array;
@@ -6853,18 +6855,22 @@ static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps,
return False;
data_offset = ctr->values[i].value_len + valuename_offset;
+
if (!prs_uint32("data_offset", ps, depth, &data_offset))
return False;
if (!prs_uint32("data_len", ps, depth, &ctr->values[i].data_len))
return False;
- current_offset = data_offset + ctr->values[i].data_len - basic_unit;
+ current_offset = data_offset + ctr->values[i].data_len - basic_unit;
+ /* account for 2 byte alignment */
+ current_offset += (current_offset % 2);
}
- /* loop #2 for writing the dynamically size objects
- while viewing conversations between Win2k -> Win2k,
- 4-byte alignment does not seem to matter here --jerry */
+ /*
+ * loop #2 for writing the dynamically size objects; pay
+ * attention to 2-byte alignment here....
+ */
for (i=0; i<ctr->size_of_array; i++)
{
@@ -6874,10 +6880,11 @@ static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps,
if (!prs_uint8s(False, "data", ps, depth, ctr->values[i].data, ctr->values[i].data_len))
return False;
+
+ if ( !prs_align_uint16(ps) )
+ return False;
}
-
-
return True;
}
diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index 08eddcaf983..75a3c33c542 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/rpc_server/srv_samr_nt.c
@@ -227,7 +227,7 @@ static int setup_fake_group_map(GROUP_MAP **ret_map)
static_map[0].gid = (gid_t)-1;
sid_copy(&static_map[0].sid, &global_sam_sid);
- sid_append_rid(&static_map[1].sid, DOMAIN_GROUP_RID_ADMINS);
+ sid_append_rid(&static_map[0].sid, DOMAIN_GROUP_RID_ADMINS);
static_map[0].sid_name_use = SID_NAME_DOM_GRP;
fstrcpy(static_map[0].nt_name, "Domain Admins");
fstrcpy(static_map[0].comment, "Administrators for the domain");
diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c
index b964767a05b..396883ca5bb 100644
--- a/source/rpc_server/srv_spoolss_nt.c
+++ b/source/rpc_server/srv_spoolss_nt.c
@@ -968,7 +968,58 @@ WERROR _spoolss_open_printer(pipes_struct *p, SPOOL_Q_OPEN_PRINTER *q_u, SPOOL_R
/********************************************************************
* spoolss_open_printer
*
- * called from the spoolss dispatcher
+ * If the openprinterex rpc call contains a devmode,
+ * it's a per-user one. This per-user devmode is derivated
+ * from the global devmode. Openprinterex() contains a per-user
+ * devmode for when you do EMF printing and spooling.
+ * In the EMF case, the NT workstation is only doing half the job
+ * of rendering the page. The other half is done by running the printer
+ * driver on the server.
+ * The EMF file doesn't contain the page description (paper size, orientation, ...).
+ * The EMF file only contains what is to be printed on the page.
+ * So in order for the server to know how to print, the NT client sends
+ * a devicemode attached to the openprinterex call.
+ * But this devicemode is short lived, it's only valid for the current print job.
+ *
+ * If Samba would have supported EMF spooling, this devicemode would
+ * have been attached to the handle, to sent it to the driver to correctly
+ * rasterize the EMF file.
+ *
+ * As Samba only supports RAW spooling, we only receive a ready-to-print file,
+ * we just act as a pass-thru between windows and the printer.
+ *
+ * In order to know that Samba supports only RAW spooling, NT has to call
+ * getprinter() at level 2 (attribute field) or NT has to call startdoc()
+ * and until NT sends a RAW job, we refuse it.
+ *
+ * But to call getprinter() or startdoc(), you first need a valid handle,
+ * and to get an handle you have to call openprintex(). Hence why you have
+ * a devicemode in the openprinterex() call.
+ *
+ *
+ * Differences between NT4 and NT 2000.
+ * NT4:
+ * ---
+ * On NT4, you only have a global devicemode. This global devicemode can be changed
+ * by the administrator (or by a user with enough privs). Everytime a user
+ * wants to print, the devicemode is resetted to the default. In Word, everytime
+ * you print, the printer's characteristics are always reset to the global devicemode.
+ *
+ * NT 2000:
+ * -------
+ * In W2K, there is the notion of per-user devicemode. The first time you use
+ * a printer, a per-user devicemode is build from the global devicemode.
+ * If you change your per-user devicemode, it is saved in the registry, under the
+ * H_KEY_CURRENT_KEY sub_tree. So that everytime you print, you have your default
+ * printer preferences available.
+ *
+ * To change the per-user devicemode: it's the "Printing Preferences ..." button
+ * on the General Tab of the printer properties windows.
+ *
+ * To change the global devicemode: it's the "Printing Defaults..." button
+ * on the Advanced Tab of the printer properties window.
+ *
+ * JFM.
********************************************************************/
WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u)
@@ -1007,39 +1058,36 @@ Can't find printer handle we created for printer %s\n", name ));
return WERR_INVALID_PRINTER_NAME;
}
- /*
- First case: the user is opening the print server:
-
- Disallow MS AddPrinterWizard if parameter disables it. A Win2k
- client 1st tries an OpenPrinterEx with access==0, MUST be allowed.
-
- Then both Win2k and WinNT clients try an OpenPrinterEx with
- SERVER_ALL_ACCESS, which we allow only if the user is root (uid=0)
- or if the user is listed in the smb.conf printer admin parameter.
-
- Then they try OpenPrinterEx with SERVER_READ which we allow. This lets the
- client view printer folder, but does not show the MSAPW.
-
- Note: this test needs code to check access rights here too. Jeremy
- could you look at this?
-
-
- Second case: the user is opening a printer:
- NT doesn't let us connect to a printer if the connecting user
- doesn't have print permission.
-
- */
-
get_current_user(&user, p);
- if (Printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER) {
+ /*
+ * First case: the user is opening the print server:
+ *
+ * Disallow MS AddPrinterWizard if parameter disables it. A Win2k
+ * client 1st tries an OpenPrinterEx with access==0, MUST be allowed.
+ *
+ * Then both Win2k and WinNT clients try an OpenPrinterEx with
+ * SERVER_ALL_ACCESS, which we allow only if the user is root (uid=0)
+ * or if the user is listed in the smb.conf printer admin parameter.
+ *
+ * Then they try OpenPrinterEx with SERVER_READ which we allow. This lets the
+ * client view printer folder, but does not show the MSAPW.
+ *
+ * Note: this test needs code to check access rights here too. Jeremy
+ * could you look at this?
+ *
+ * Second case: the user is opening a printer:
+ * NT doesn't let us connect to a printer if the connecting user
+ * doesn't have print permission.
+ */
+ if (Printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER)
+ {
/* Printserver handles use global struct... */
snum = -1;
- /* Map standard access rights to object specific access
- rights */
+ /* Map standard access rights to object specific access rights */
se_map_standard(&printer_default->access_required,
&printserver_std_mapping);
@@ -1058,23 +1106,32 @@ Can't find printer handle we created for printer %s\n", name ));
/* Allow admin access */
- if (printer_default->access_required &
- SERVER_ACCESS_ADMINISTER) {
-
+ if ( printer_default->access_required & SERVER_ACCESS_ADMINISTER )
+ {
if (!lp_ms_add_printer_wizard()) {
close_printer_handle(p, handle);
return WERR_ACCESS_DENIED;
}
- if (user.uid == 0 ||
- user_in_list(uidtoname(user.uid),
- lp_printer_admin(snum)))
- return WERR_OK;
+ /* if the user is not root and not a printer admin, then fail */
- close_printer_handle(p, handle);
- return WERR_ACCESS_DENIED;
+ if ( user.uid != 0
+ && !user_in_list(uidtoname(user.uid), lp_printer_admin(snum)) )
+ {
+ close_printer_handle(p, handle);
+ return WERR_ACCESS_DENIED;
+ }
+
+ printer_default->access_required = SERVER_ACCESS_ADMINISTER;
+ }
+ else
+ {
+ printer_default->access_required = SERVER_ACCESS_ENUMERATE;
}
+ DEBUG(4,("Setting print server access = %s\n", (printer_default->access_required == SERVER_ACCESS_ADMINISTER)
+ ? "SERVER_ACCESS_ADMINISTER" : "SERVER_ACCESS_ENUMERATE" ));
+
/* We fall through to return WERR_OK */
}
@@ -1123,84 +1180,11 @@ Can't find printer handle we created for printer %s\n", name ));
else
printer_default->access_required = PRINTER_ACCESS_USE;
- DEBUG(4,("Setting printer access=%x\n", printer_default->access_required));
- Printer->access_granted = printer_default->access_required;
-
- /*
- * If we have a default device pointer in the
- * printer_default struct, then we need to get
- * the printer info from the tdb and if there is
- * no default devicemode there then we do a *SET*
- * here ! This is insanity.... JRA.
- */
-
- /*
- * If the openprinterex rpc call contains a devmode,
- * it's a per-user one. This per-user devmode is derivated
- * from the global devmode. Openprinterex() contains a per-user
- * devmode for when you do EMF printing and spooling.
- * In the EMF case, the NT workstation is only doing half the job
- * of rendering the page. The other half is done by running the printer
- * driver on the server.
- * The EMF file doesn't contain the page description (paper size, orientation, ...).
- * The EMF file only contains what is to be printed on the page.
- * So in order for the server to know how to print, the NT client sends
- * a devicemode attached to the openprinterex call.
- * But this devicemode is short lived, it's only valid for the current print job.
- *
- * If Samba would have supported EMF spooling, this devicemode would
- * have been attached to the handle, to sent it to the driver to correctly
- * rasterize the EMF file.
- *
- * As Samba only supports RAW spooling, we only receive a ready-to-print file,
- * we just act as a pass-thru between windows and the printer.
- *
- * In order to know that Samba supports only RAW spooling, NT has to call
- * getprinter() at level 2 (attribute field) or NT has to call startdoc()
- * and until NT sends a RAW job, we refuse it.
- *
- * But to call getprinter() or startdoc(), you first need a valid handle,
- * and to get an handle you have to call openprintex(). Hence why you have
- * a devicemode in the openprinterex() call.
- *
- *
- * Differences between NT4 and NT 2000.
- * NT4:
- * ---
- * On NT4, you only have a global devicemode. This global devicemode can be changed
- * by the administrator (or by a user with enough privs). Everytime a user
- * wants to print, the devicemode is resetted to the default. In Word, everytime
- * you print, the printer's characteristics are always reset to the global devicemode.
- *
- * NT 2000:
- * -------
- * In W2K, there is the notion of per-user devicemode. The first time you use
- * a printer, a per-user devicemode is build from the global devicemode.
- * If you change your per-user devicemode, it is saved in the registry, under the
- * H_KEY_CURRENT_KEY sub_tree. So that everytime you print, you have your default
- * printer preferences available.
- *
- * To change the per-user devicemode: it's the "Printing Preferences ..." button
- * on the General Tab of the printer properties windows.
- *
- * To change the global devicemode: it's the "Printing Defaults..." button
- * on the Advanced Tab of the printer properties window.
- *
- * JFM.
- */
-
-
-
-#if 0
- if (printer_default->devmode_cont.devmode != NULL) {
- result = printer_write_default_dev( snum, printer_default);
- if (result != 0) {
- close_printer_handle(p, handle);
- return result;
- }
- }
-#endif
+ DEBUG(4,("Setting printer access = %s\n", (printer_default->access_required == PRINTER_ACCESS_ADMINISTER)
+ ? "PRINTER_ACCESS_ADMINISTER" : "PRINTER_ACCESS_USE" ));
}
+
+ Printer->access_granted = printer_default->access_required;
return WERR_OK;
}
@@ -1449,6 +1433,11 @@ WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER
return WERR_INVALID_ENVIRONMENT;
}
+ /* if they said "Windows NT x86", then try for version 2 & 3 */
+
+ if ( version == 2 )
+ version = DRIVER_ANY_VERSION;
+
ZERO_STRUCT(info);
if (!W_ERROR_IS_OK(get_a_printer_driver(&info, 3, driver, arch, version))) {
return WERR_UNKNOWN_PRINTER_DRIVER;
@@ -1460,7 +1449,7 @@ WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER
return WERR_PRINTER_DRIVER_IN_USE;
}
- return delete_printer_driver(info.info_3);
+ return delete_printer_driver(info.info_3, NULL, version, False);
}
/********************************************************************
@@ -7107,40 +7096,52 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM
DEBUG(2,("_spoolss_addform: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
return WERR_BADFID;
}
+
+
+ /* forms can be added on printer of on the print server handle */
+
+ if ( Printer->printer_type == PRINTER_HANDLE_IS_PRINTER )
+ {
+ if (!get_printer_snum(p,handle, &snum))
+ return WERR_BADFID;
+
+ status = get_a_printer(&printer, 2, lp_servicename(snum));
+ if (!W_ERROR_IS_OK(status))
+ goto done;
+ }
- if (!get_printer_snum(p,handle, &snum))
- return WERR_BADFID;
-
- if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
+ if ( !(Printer->access_granted & (PRINTER_ACCESS_ADMINISTER|SERVER_ACCESS_ADMINISTER)) ) {
DEBUG(2,("_spoolss_addform: denied by handle permissions.\n"));
status = WERR_ACCESS_DENIED;
goto done;
}
-
+
/* can't add if builtin */
+
if (get_a_builtin_ntform(&form->name,&tmpForm)) {
- return WERR_ALREADY_EXISTS;
+ status = WERR_ALREADY_EXISTS;
+ goto done;
}
- count=get_ntforms(&list);
- if(!add_a_form(&list, form, &count))
- return WERR_NOMEM;
+ count = get_ntforms(&list);
+
+ if(!add_a_form(&list, form, &count)) {
+ status = WERR_NOMEM;
+ goto done;
+ }
+
write_ntforms(&list, count);
/*
- * ChangeID must always be set
+ * ChangeID must always be set if this is a printer
*/
- status = get_a_printer(&printer, 2, lp_servicename(snum));
- if (!W_ERROR_IS_OK(status))
- goto done;
-
- status = mod_a_printer(*printer, 2);
- if (!W_ERROR_IS_OK(status))
- goto done;
+ if ( Printer->printer_type == PRINTER_HANDLE_IS_PRINTER )
+ status = mod_a_printer(*printer, 2);
done:
- free_a_printer(&printer, 2);
+ if ( printer )
+ free_a_printer(&printer, 2);
SAFE_FREE(list);
return status;
@@ -7155,7 +7156,6 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE
UNISTR2 *form_name = &q_u->name;
nt_forms_struct tmpForm;
int count=0;
- WERROR ret = WERR_OK;
nt_forms_struct *list=NULL;
Printer_entry *Printer = find_printer_index_by_hnd(p, handle);
int snum;
@@ -7169,40 +7169,49 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE
return WERR_BADFID;
}
- if (!get_printer_snum(p, handle, &snum))
- return WERR_BADFID;
+ /* forms can be deleted on printer of on the print server handle */
+
+ if ( Printer->printer_type == PRINTER_HANDLE_IS_PRINTER )
+ {
+ if (!get_printer_snum(p,handle, &snum))
+ return WERR_BADFID;
+
+ status = get_a_printer(&printer, 2, lp_servicename(snum));
+ if (!W_ERROR_IS_OK(status))
+ goto done;
+ }
- if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
- DEBUG(2,("_spoolss_deleteform: denied by handle permissions\n"));
- return WERR_ACCESS_DENIED;
+ if ( !(Printer->access_granted & (PRINTER_ACCESS_ADMINISTER|SERVER_ACCESS_ADMINISTER)) ) {
+ DEBUG(2,("_spoolss_deleteform: denied by handle permissions.\n"));
+ status = WERR_ACCESS_DENIED;
+ goto done;
}
/* can't delete if builtin */
+
if (get_a_builtin_ntform(form_name,&tmpForm)) {
- return WERR_INVALID_PARAM;
+ status = WERR_INVALID_PARAM;
+ goto done;
}
count = get_ntforms(&list);
- if(!delete_a_form(&list, form_name, &count, &ret))
- return WERR_INVALID_PARAM;
+
+ if ( !delete_a_form(&list, form_name, &count, &status ))
+ goto done;
/*
- * ChangeID must always be set
+ * ChangeID must always be set if this is a printer
*/
- status = get_a_printer(&printer, 2, lp_servicename(snum));
- if (!W_ERROR_IS_OK(status))
- goto done;
-
- status = mod_a_printer(*printer, 2);
- if (!W_ERROR_IS_OK(status))
- goto done;
+ if ( Printer->printer_type == PRINTER_HANDLE_IS_PRINTER )
+ status = mod_a_printer(*printer, 2);
done:
- free_a_printer(&printer, 2);
+ if ( printer )
+ free_a_printer(&printer, 2);
SAFE_FREE(list);
- return ret;
+ return status;
}
/****************************************************************************
@@ -7230,40 +7239,48 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *
return WERR_BADFID;
}
- if (!get_printer_snum(p, handle, &snum))
- return WERR_BADFID;
+ /* forms can be modified on printer of on the print server handle */
+
+ if ( Printer->printer_type == PRINTER_HANDLE_IS_PRINTER )
+ {
+ if (!get_printer_snum(p,handle, &snum))
+ return WERR_BADFID;
+
+ status = get_a_printer(&printer, 2, lp_servicename(snum));
+ if (!W_ERROR_IS_OK(status))
+ goto done;
+ }
- if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
+ if ( !(Printer->access_granted & (PRINTER_ACCESS_ADMINISTER|SERVER_ACCESS_ADMINISTER)) ) {
DEBUG(2,("_spoolss_setform: denied by handle permissions\n"));
- return WERR_ACCESS_DENIED;
+ status = WERR_ACCESS_DENIED;
+ goto done;
}
/* can't set if builtin */
if (get_a_builtin_ntform(&form->name,&tmpForm)) {
- return WERR_INVALID_PARAM;
+ status = WERR_INVALID_PARAM;
+ goto done;
}
- count=get_ntforms(&list);
+ count = get_ntforms(&list);
update_a_form(&list, form, count);
write_ntforms(&list, count);
/*
- * ChangeID must always be set
+ * ChangeID must always be set if this is a printer
*/
- status = get_a_printer(&printer, 2, lp_servicename(snum));
- if (!W_ERROR_IS_OK(status))
- goto done;
+ if ( Printer->printer_type == PRINTER_HANDLE_IS_PRINTER )
+ status = mod_a_printer(*printer, 2);
- status = mod_a_printer(*printer, 2);
- if (!W_ERROR_IS_OK(status))
- goto done;
done:
- free_a_printer(&printer, 2);
+ if ( printer )
+ free_a_printer(&printer, 2);
SAFE_FREE(list);
- return WERR_OK;
+ return status;
}
/****************************************************************************
@@ -7914,7 +7931,6 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_
while (get_specific_param_by_index(*printer, 2, param_index, value, &data, &type, &data_len))
{
PRINTER_ENUM_VALUES *ptr;
- uint32 add_len = 0;
DEBUG(10,("retrieved value number [%d] [%s]\n", num_entries, value));
@@ -7925,19 +7941,26 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_
goto done;
}
enum_values = ptr;
+
+ ZERO_STRUCTP( &enum_values[num_entries] );
/* copy the data */
+
init_unistr(&enum_values[num_entries].valuename, value);
enum_values[num_entries].value_len = (strlen(value)+1) * 2;
enum_values[num_entries].type = type;
- if (!(enum_values[num_entries].data=talloc_zero(p->mem_ctx, data_len+add_len))) {
- DEBUG(0,("talloc_realloc failed to allocate more memory for data!\n"));
- result = WERR_NOMEM;
- goto done;
+ if ( data_len )
+ {
+ if ( !(enum_values[num_entries].data = talloc_zero(p->mem_ctx, data_len)) ) {
+ DEBUG(0,("talloc_realloc failed to allocate more memory [data_len=%d] for data!\n", data_len ));
+ result = WERR_NOMEM;
+ goto done;
+ }
+ memcpy(enum_values[num_entries].data, data, data_len);
}
- memcpy(enum_values[num_entries].data, data, data_len);
- enum_values[num_entries].data_len = data_len + add_len;
+
+ enum_values[num_entries].data_len = data_len;
/* keep track of the size of the array in bytes */
diff --git a/source/smbd/blocking.c b/source/smbd/blocking.c
index d4a53d9a6d9..c5fe1ff5f1b 100644
--- a/source/smbd/blocking.c
+++ b/source/smbd/blocking.c
@@ -282,9 +282,10 @@ static BOOL process_lockread(blocking_lock_record *blr)
status = do_lock_spin( fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)numtoread,
(SMB_BIG_UINT)startpos, READ_LOCK);
if (NT_STATUS_V(status)) {
- if ((errno != EACCES) && (errno != EAGAIN)) {
+ if (!NT_STATUS_EQUAL(status,NT_STATUS_LOCK_NOT_GRANTED) &&
+ !NT_STATUS_EQUAL(status,NT_STATUS_FILE_LOCK_CONFLICT)) {
/*
- * We have other than a "can't get lock" POSIX
+ * We have other than a "can't get lock"
* error. Send an error.
* Return True so we get dequeued.
*/
@@ -348,9 +349,10 @@ static BOOL process_lock(blocking_lock_record *blr)
status = do_lock_spin(fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)count,
(SMB_BIG_UINT)offset, WRITE_LOCK);
if (NT_STATUS_IS_ERR(status)) {
- if((errno != EACCES) && (errno != EAGAIN)) {
+ if (!NT_STATUS_EQUAL(status,NT_STATUS_LOCK_NOT_GRANTED) &&
+ !NT_STATUS_EQUAL(status,NT_STATUS_FILE_LOCK_CONFLICT)) {
/*
- * We have other than a "can't get lock" POSIX
+ * We have other than a "can't get lock"
* error. Send an error.
* Return True so we get dequeued.
*/
@@ -432,12 +434,13 @@ static BOOL process_lockingX(blocking_lock_record *blr)
reply_lockingX_success(blr);
return True;
- } else if ((errno != EACCES) && (errno != EAGAIN)) {
- /*
- * We have other than a "can't get lock" POSIX
- * error. Free any locks we had and return an error.
- * Return True so we get dequeued.
- */
+ } else if (!NT_STATUS_EQUAL(status,NT_STATUS_LOCK_NOT_GRANTED) &&
+ !NT_STATUS_EQUAL(status,NT_STATUS_FILE_LOCK_CONFLICT)) {
+ /*
+ * We have other than a "can't get lock"
+ * error. Free any locks we had and return an error.
+ * Return True so we get dequeued.
+ */
blocking_lock_reply_error(blr, status);
return True;
@@ -528,13 +531,34 @@ file %s fnum = %d\n", blr->com_type, fsp->fsp_name, fsp->fnum ));
}
/****************************************************************************
- Return True if the blocking lock queue has entries.
+ Return the number of seconds to the next blocking locks timeout, or default_timeout.
*****************************************************************************/
-BOOL blocking_locks_pending(void)
+BOOL blocking_locks_timeout(unsigned default_timeout)
{
- blocking_lock_record *blr = (blocking_lock_record *)ubi_slFirst( &blocking_lock_queue );
- return (blr == NULL ? False : True);
+ unsigned timeout = default_timeout;
+ time_t t;
+ blocking_lock_record *blr = (blocking_lock_record *)ubi_slFirst(&blocking_lock_queue);
+
+ /* note that we avoid the time() syscall if there are no blocking locks */
+ if (!blr) {
+ return timeout;
+ }
+
+ t = time(NULL);
+
+ while (blr) {
+ if (timeout > (blr->expire_time - t)) {
+ timeout = blr->expire_time - t;
+ }
+ blr = (blocking_lock_record *)ubi_slNext(blr);
+ }
+
+ if (timeout < 1) {
+ timeout = 1;
+ }
+
+ return timeout;
}
/****************************************************************************
@@ -573,7 +597,7 @@ void process_blocking_lock_queue(time_t t)
DEBUG(5,("process_blocking_lock_queue: examining pending lock fnum = %d for file %s\n",
fsp->fnum, fsp->fsp_name ));
- if((blr->expire_time != -1) && (blr->expire_time > t)) {
+ if((blr->expire_time != -1) && (blr->expire_time <= t)) {
/*
* Lock expired - throw away all previously
* obtained locks and return lock error.
@@ -581,7 +605,7 @@ void process_blocking_lock_queue(time_t t)
DEBUG(5,("process_blocking_lock_queue: pending lock fnum = %d for file %s timed out.\n",
fsp->fnum, fsp->fsp_name ));
- blocking_lock_reply_error(blr,NT_STATUS_ACCESS_DENIED);
+ blocking_lock_reply_error(blr,NT_STATUS_FILE_LOCK_CONFLICT);
free_blocking_lock_record((blocking_lock_record *)ubi_slRemNext( &blocking_lock_queue, prev));
blr = (blocking_lock_record *)(prev ? ubi_slNext(prev) : ubi_slFirst(&blocking_lock_queue));
continue;
diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index eaa86cec0e6..8cd43d88ba0 100644
--- a/source/smbd/nttrans.c
+++ b/source/smbd/nttrans.c
@@ -448,7 +448,7 @@ static int map_share_mode( char *fname, uint32 create_options,
if (smb_open_mode == -1) {
- if(*desired_access & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|
+ if(*desired_access & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS|
FILE_EXECUTE|FILE_READ_ATTRIBUTES|
FILE_READ_EA|FILE_WRITE_EA|SYSTEM_SECURITY_ACCESS|
FILE_WRITE_ATTRIBUTES|READ_CONTROL_ACCESS)) {
@@ -629,6 +629,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
uint32 fname_len = MIN(((uint32)SVAL(inbuf,smb_ntcreate_NameLength)),
((uint32)sizeof(fname)-1));
uint16 root_dir_fid = (uint16)IVAL(inbuf,smb_ntcreate_RootDirectoryFid);
+ SMB_OFF_T allocation_size = 0;
int smb_ofun;
int smb_open_mode;
int smb_attr = (file_attributes & SAMBA_ATTRIBUTES_MASK);
@@ -644,8 +645,16 @@ int reply_ntcreate_and_X(connection_struct *conn,
files_struct *fsp=NULL;
char *p = NULL;
time_t c_time;
+ BOOL extended_oplock_granted = False;
+
START_PROFILE(SMBntcreateX);
+ DEBUG(10,("reply_ntcreateX: flags = 0x%x, desired_access = 0x%x \
+file_attributes = 0x%x, share_access = 0x%x, create_disposition = 0x%x \
+create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attributes,
+ share_access, create_disposition,
+ root_dir_fid, create_options ));
+
/* If it's an IPC, use the pipe handler. */
if (IS_IPC(conn)) {
@@ -654,10 +663,14 @@ int reply_ntcreate_and_X(connection_struct *conn,
return do_ntcreate_pipe_open(conn,inbuf,outbuf,length,bufsize);
} else {
END_PROFILE(SMBntcreateX);
- return(ERROR_DOS(ERRDOS,ERRbadaccess));
+ return(ERROR_DOS(ERRDOS,ERRnoaccess));
}
}
+ if (create_options & FILE_OPEN_BY_FILE_ID) {
+ END_PROFILE(SMBntcreateX);
+ return ERROR_NT(NT_STATUS_NOT_SUPPORTED);
+ }
/*
* We need to construct the open_and_X ofun value from the
@@ -666,7 +679,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
if((smb_ofun = map_create_disposition( create_disposition )) == -1) {
END_PROFILE(SMBntcreateX);
- return(ERROR_DOS(ERRDOS,ERRbadaccess));
+ return(ERROR_DOS(ERRDOS,ERRnoaccess));
}
/*
@@ -756,7 +769,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
share_access,
file_attributes)) == -1) {
END_PROFILE(SMBntcreateX);
- return ERROR_DOS(ERRDOS,ERRbadaccess);
+ return ERROR_DOS(ERRDOS,ERRnoaccess);
}
oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
@@ -785,6 +798,12 @@ int reply_ntcreate_and_X(connection_struct *conn,
if(create_options & FILE_DIRECTORY_FILE) {
oplock_request = 0;
+ /* Can't open a temp directory. IFS kit test. */
+ if (file_attributes & FILE_ATTRIBUTE_TEMPORARY) {
+ END_PROFILE(SMBntcreateX);
+ return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
+ }
+
fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action);
restore_case_semantics(file_attributes);
@@ -884,6 +903,22 @@ int reply_ntcreate_and_X(connection_struct *conn,
return ERROR_DOS(ERRDOS,ERRnoaccess);
}
+ /* Save the requested allocation size. */
+ allocation_size = IVAL(inbuf,smb_ntcreate_AllocationSize);
+#ifdef LARGE_SMB_OFF_T
+ allocation_size |= (((SMB_OFF_T)IVAL(inbuf,smb_ntcreate_AllocationSize + 4)) << 32);
+#endif
+ if (allocation_size && (allocation_size > file_len)) {
+ fsp->initial_allocation_size = SMB_ROUNDUP(allocation_size,SMB_ROUNDUP_ALLOCATION_SIZE);
+ if (vfs_allocate_file_space(fsp, fsp->initial_allocation_size) == -1) {
+ close_file(fsp,False);
+ END_PROFILE(SMBntcreateX);
+ return ERROR_NT(NT_STATUS_DISK_FULL);
+ }
+ } else {
+ fsp->initial_allocation_size = SMB_ROUNDUP(file_len,SMB_ROUNDUP_ALLOCATION_SIZE);
+ }
+
/*
* If the caller set the extended oplock request bit
* and we granted one (by whatever means) - set the
@@ -891,10 +926,10 @@ int reply_ntcreate_and_X(connection_struct *conn,
*/
if (oplock_request && lp_fake_oplocks(SNUM(conn)))
- smb_action |= EXTENDED_OPLOCK_GRANTED;
+ extended_oplock_granted = True;
if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type))
- smb_action |= EXTENDED_OPLOCK_GRANTED;
+ extended_oplock_granted = True;
#if 0
/* W2K sends back 42 words here ! If we do the same it breaks offline sync. Go figure... ? JRA. */
@@ -910,7 +945,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
* exclusive & batch here.
*/
- if (smb_action & EXTENDED_OPLOCK_GRANTED) {
+ if (extended_oplock_granted) {
if (flags & REQUEST_BATCH_OPLOCK) {
SCVAL(p,0, BATCH_OPLOCK_RETURN);
} else {
@@ -948,7 +983,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
p += 8;
SIVAL(p,0,fmode); /* File Attributes. */
p += 4;
- SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len));
+ SOFF_T(p, 0, get_allocation_size(fsp, &sbuf));
p += 8;
SOFF_T(p,0,file_len);
p += 12;
@@ -984,7 +1019,7 @@ static int do_nt_transact_create_pipe( connection_struct *conn,
if(total_parameter_count < 54) {
DEBUG(0,("do_nt_transact_create_pipe - insufficient parameters (%u)\n", (unsigned int)total_parameter_count));
- return ERROR_DOS(ERRDOS,ERRbadaccess);
+ return ERROR_DOS(ERRDOS,ERRnoaccess);
}
fname_len = MIN(((uint32)IVAL(params,44)),((uint32)sizeof(fname)-1));
@@ -1129,6 +1164,7 @@ static int call_nt_transact_create(connection_struct *conn,
BOOL bad_path = False;
files_struct *fsp = NULL;
char *p = NULL;
+ BOOL extended_oplock_granted = False;
uint32 flags;
uint32 desired_access;
uint32 file_attributes;
@@ -1138,6 +1174,7 @@ static int call_nt_transact_create(connection_struct *conn,
uint32 fname_len;
uint32 sd_len;
uint16 root_dir_fid;
+ SMB_OFF_T allocation_size;
int smb_ofun;
int smb_open_mode;
int smb_attr;
@@ -1156,7 +1193,7 @@ static int call_nt_transact_create(connection_struct *conn,
return do_nt_transact_create_pipe(conn, inbuf, outbuf, length,
bufsize, ppsetup, ppparams, ppdata);
else
- return ERROR_DOS(ERRDOS,ERRbadaccess);
+ return ERROR_DOS(ERRDOS,ERRnoaccess);
}
/*
@@ -1165,7 +1202,7 @@ static int call_nt_transact_create(connection_struct *conn,
if(total_parameter_count < 54) {
DEBUG(0,("call_nt_transact_create - insufficient parameters (%u)\n", (unsigned int)total_parameter_count));
- return ERROR_DOS(ERRDOS,ERRbadaccess);
+ return ERROR_DOS(ERRDOS,ERRnoaccess);
}
flags = IVAL(params,0);
@@ -1179,6 +1216,11 @@ static int call_nt_transact_create(connection_struct *conn,
root_dir_fid = (uint16)IVAL(params,4);
smb_attr = (file_attributes & SAMBA_ATTRIBUTES_MASK);
+ if (create_options & FILE_OPEN_BY_FILE_ID) {
+ END_PROFILE(SMBntcreateX);
+ return ERROR_NT(NT_STATUS_NOT_SUPPORTED);
+ }
+
/*
* We need to construct the open_and_X ofun value from the
* NT values, as that's what our code is structured to accept.
@@ -1262,7 +1304,7 @@ static int call_nt_transact_create(connection_struct *conn,
if((smb_open_mode = map_share_mode( fname, create_options, &desired_access,
share_access, file_attributes)) == -1)
- return ERROR_DOS(ERRDOS,ERRbadaccess);
+ return ERROR_DOS(ERRDOS,ERRnoaccess);
oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0;
@@ -1285,6 +1327,12 @@ static int call_nt_transact_create(connection_struct *conn,
if(create_options & FILE_DIRECTORY_FILE) {
+ /* Can't open a temp directory. IFS kit test. */
+ if (file_attributes & FILE_ATTRIBUTE_TEMPORARY) {
+ END_PROFILE(SMBntcreateX);
+ return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
+ }
+
oplock_request = 0;
/*
@@ -1359,10 +1407,10 @@ static int call_nt_transact_create(connection_struct *conn,
*/
if (oplock_request && lp_fake_oplocks(SNUM(conn)))
- smb_action |= EXTENDED_OPLOCK_GRANTED;
+ extended_oplock_granted = True;
if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type))
- smb_action |= EXTENDED_OPLOCK_GRANTED;
+ extended_oplock_granted = True;
}
/*
@@ -1377,6 +1425,22 @@ static int call_nt_transact_create(connection_struct *conn,
restore_case_semantics(file_attributes);
+ /* Save the requested allocation size. */
+ allocation_size = IVAL(params,12);
+#ifdef LARGE_SMB_OFF_T
+ allocation_size |= (((SMB_OFF_T)IVAL(params,16)) << 32);
+#endif
+ if (allocation_size && (allocation_size > file_len)) {
+ fsp->initial_allocation_size = SMB_ROUNDUP(allocation_size,SMB_ROUNDUP_ALLOCATION_SIZE);
+ if (vfs_allocate_file_space(fsp, fsp->initial_allocation_size) == -1) {
+ close_file(fsp,False);
+ END_PROFILE(SMBntcreateX);
+ return ERROR_NT(NT_STATUS_DISK_FULL);
+ }
+ } else {
+ fsp->initial_allocation_size = SMB_ROUNDUP(file_len,SMB_ROUNDUP_ALLOCATION_SIZE);
+ }
+
/* Realloc the size of parameters and data we will return */
params = Realloc(*ppparams, 69);
if(params == NULL)
@@ -1387,7 +1451,7 @@ static int call_nt_transact_create(connection_struct *conn,
memset((char *)params,'\0',69);
p = params;
- if (smb_action & EXTENDED_OPLOCK_GRANTED)
+ if (extended_oplock_granted)
SCVAL(p,0, BATCH_OPLOCK_RETURN);
else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type))
SCVAL(p,0, LEVEL_II_OPLOCK_RETURN);
@@ -1420,7 +1484,7 @@ static int call_nt_transact_create(connection_struct *conn,
p += 8;
SIVAL(p,0,fmode); /* File Attributes. */
p += 4;
- SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len));
+ SOFF_T(p, 0, get_allocation_size(fsp,&sbuf));
p += 8;
SOFF_T(p,0,file_len);
@@ -1435,6 +1499,7 @@ static int call_nt_transact_create(connection_struct *conn,
/****************************************************************************
Reply to a NT CANCEL request.
****************************************************************************/
+
int reply_ntcancel(connection_struct *conn,
char *inbuf,char *outbuf,int length,int bufsize)
{
@@ -1456,6 +1521,7 @@ int reply_ntcancel(connection_struct *conn,
/****************************************************************************
Reply to an unsolicited SMBNTtranss - just ignore it!
****************************************************************************/
+
int reply_nttranss(connection_struct *conn,
char *inbuf,char *outbuf,int length,int bufsize)
{
@@ -1708,7 +1774,7 @@ static int call_nt_transact_set_security_desc(connection_struct *conn,
(unsigned int)security_info_sent ));
if (total_data_count == 0)
- return ERROR_DOS(ERRDOS, ERRbadaccess);
+ return ERROR_DOS(ERRDOS, ERRnoaccess);
if (!set_sd( fsp, data, total_data_count, security_info_sent, &error_class, &error_code))
return ERROR_DOS(error_class, error_code);
@@ -1720,20 +1786,47 @@ static int call_nt_transact_set_security_desc(connection_struct *conn,
}
/****************************************************************************
- Reply to IOCTL - not implemented - no plans.
+ Reply to IOCTL.
****************************************************************************/
+
static int call_nt_transact_ioctl(connection_struct *conn,
- char *inbuf, char *outbuf, int length,
- int bufsize,
- char **ppsetup, char **ppparams, char **ppdata)
+ char *inbuf, char *outbuf, int length,
+ int bufsize,
+ char **ppsetup, int setup_count,
+ char **ppparams, int parameter_count,
+ char **ppdata, int data_count)
{
- static BOOL logged_message = False;
-
- if(!logged_message) {
- DEBUG(2,("call_nt_transact_ioctl: Currently not implemented.\n"));
- logged_message = True; /* Only print this once... */
+ unsigned fnum, control;
+ static BOOL logged_message;
+
+ if (setup_count != 8) {
+ DEBUG(3,("call_nt_transact_ioctl: invalid setup count %d\n", setup_count));
+ return ERROR_NT(NT_STATUS_NOT_SUPPORTED);
}
- return ERROR_DOS(ERRSRV,ERRnosupport);
+
+ fnum = SVAL(*ppsetup, 4);
+ control = IVAL(*ppsetup, 0);
+
+ DEBUG(6,("call_nt_transact_ioctl: fnum=%d control=0x%x\n",
+ fnum, control));
+
+ switch (control) {
+ case NTIOCTL_SET_SPARSE:
+ /* pretend this succeeded - tho strictly we should
+ mark the file sparse (if the local fs supports it)
+ so we can know if we need to pre-allocate or not */
+ send_nt_replies(inbuf, outbuf, bufsize, NT_STATUS_OK, NULL, 0, NULL, 0);
+ return -1;
+
+ default:
+ if (!logged_message) {
+ logged_message = True; /* Only print this once... */
+ DEBUG(3,("call_nt_transact_ioctl(0x%x): Currently not implemented.\n",
+ control));
+ }
+ }
+
+ return ERROR_NT(NT_STATUS_NOT_SUPPORTED);
}
/****************************************************************************
@@ -1892,9 +1985,11 @@ due to being in oplock break state.\n", (unsigned int)function_code ));
break;
case NT_TRANSACT_IOCTL:
START_PROFILE_NESTED(NT_transact_ioctl);
- outsize = call_nt_transact_ioctl(conn,
- inbuf, outbuf, length, bufsize,
- &setup, &params, &data);
+ outsize = call_nt_transact_ioctl(conn, inbuf, outbuf,
+ length, bufsize,
+ &setup, setup_count,
+ &params, parameter_count,
+ &data, data_count);
END_PROFILE_NESTED(NT_transact_ioctl);
break;
case NT_TRANSACT_SET_SECURITY_DESC:
diff --git a/source/smbd/process.c b/source/smbd/process.c
index 491e7f4b5e6..996cad7cf49 100644
--- a/source/smbd/process.c
+++ b/source/smbd/process.c
@@ -46,8 +46,8 @@ extern int last_message;
extern int global_oplock_break;
extern userdom_struct current_user_info;
extern int smb_read_error;
-SIG_ATOMIC_T reload_after_sighup;
-SIG_ATOMIC_T got_sig_term;
+extern SIG_ATOMIC_T reload_after_sighup;
+extern SIG_ATOMIC_T got_sig_term;
extern BOOL global_machine_password_needs_changing;
extern fstring global_myworkgroup;
extern pstring global_myname;
@@ -640,8 +640,9 @@ static void smb_dump(char *name, int type, char *data, ssize_t len)
/****************************************************************************
-do a switch on the message type, and return the response size
+ Do a switch on the message type, and return the response size.
****************************************************************************/
+
static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize)
{
static pid_t pid= (pid_t)-1;
@@ -657,9 +658,9 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
last_message = type;
/* make sure this is an SMB packet */
- if (strncmp(smb_base(inbuf),"\377SMB",4) != 0)
- {
- DEBUG(2,("Non-SMB packet of length %d\n",smb_len(inbuf)));
+ if ((strncmp(smb_base(inbuf),"\377SMB",4) != 0) || (size - 4 < smb_size)) {
+ DEBUG(0,("Non-SMB packet of length %d. Terminating server\n",smb_len(inbuf)));
+ exit_server("Non-SMB packet");
return(-1);
}
@@ -1052,13 +1053,8 @@ static int setup_select_timeout(void)
int select_timeout;
int t;
- /*
- * Increase the select timeout back to SMBD_SELECT_TIMEOUT if we
- * have removed any blocking locks. JRA.
- */
-
- select_timeout = blocking_locks_pending() ? SMBD_SELECT_TIMEOUT_WITH_PENDING_LOCKS*1000 :
- SMBD_SELECT_TIMEOUT*1000;
+ select_timeout = blocking_locks_timeout(SMBD_SELECT_TIMEOUT);
+ select_timeout *= 1000;
t = change_notify_timeout();
if (t != -1) select_timeout = MIN(select_timeout, t*1000);
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 78294952c18..50b31d7d681 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -922,7 +922,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
/* Work out who's who */
slprintf(dom_user, sizeof(dom_user) - 1,"%s%s%s",
- dos_to_unix_static(domain), lp_winbind_separator(), user);
+ domain, lp_winbind_separator(), user);
if (sys_getpwnam(dom_user) != NULL) {
pstrcpy(user, dom_user);
@@ -3470,6 +3470,8 @@ int reply_mkdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size,
pstrcpy(directory,smb_buf(inbuf) + 1);
+ RESOLVE_DFSPATH(directory, conn, inbuf, outbuf);
+
status = mkdir_internal(conn, directory);
if (!NT_STATUS_IS_OK(status))
return ERROR_NT(status);
@@ -4550,7 +4552,7 @@ no oplock granted on this file (%s).\n", fsp->fnum, fsp->fsp_name));
/* Setup the timeout in seconds. */
- lock_timeout = ((lock_timeout == -1) ? -1 : lock_timeout/1000);
+ lock_timeout = ((lock_timeout == -1) ? -1 : (lock_timeout+999)/1000);
/* Now do any requested locks */
data += ((large_file_format ? 20 : 10)*num_ulocks);
diff --git a/source/smbd/server.c b/source/smbd/server.c
index bfee036dc5a..14105342755 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -64,7 +64,7 @@ void smbd_set_server_fd(int fd)
Terminate signal.
****************************************************************************/
-SIG_ATOMIC_T got_sig_term = 0;
+SIG_ATOMIC_T got_sig_term;
static void sig_term(void)
{
@@ -76,7 +76,7 @@ static void sig_term(void)
Catch a sighup.
****************************************************************************/
-SIG_ATOMIC_T reload_after_sighup = 0;
+SIG_ATOMIC_T reload_after_sighup;
static void sig_hup(int sig)
{
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 3518ba023c6..5d1e21cb2e1 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -30,6 +30,27 @@ extern int global_oplock_break;
extern uint32 global_client_caps;
extern pstring global_myname;
+#define get_file_size(sbuf) (sbuf.st_size)
+
+/* given a stat buffer return the allocated size on disk, taking into
+ account sparse files */
+
+SMB_OFF_T get_allocation_size(files_struct *fsp, SMB_STRUCT_STAT *sbuf)
+{
+ SMB_OFF_T ret;
+#if defined(HAVE_STAT_ST_BLKSIZE) && defined(HAVE_STAT_ST_BLOCKS)
+ ret = sbuf->st_blksize * (SMB_OFF_T)sbuf->st_blocks;
+#elif defined(HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE)
+ ret = (SMB_OFF_T)STAT_ST_BLOCKSIZE * (SMB_OFF_T)sbuf->st_blocks;
+#else
+ ret = get_file_size(*sbuf);
+#endif
+ if (!ret && fsp && fsp->initial_allocation_size)
+ ret = fsp->initial_allocation_size;
+ ret = SMB_ROUNDUP(ret,SMB_ROUNDUP_ALLOCATION_SIZE);
+ return ret;
+}
+
/****************************************************************************
Send the required number of replies back.
We assume all fields other than the data fields are
@@ -257,7 +278,7 @@ static int call_trans2open(connection_struct *conn, char *inbuf, char *outbuf, i
return(UNIXERROR(ERRDOS,ERRnoaccess));
}
- size = sbuf.st_size;
+ size = get_file_size(sbuf);
fmode = dos_mode(conn,fname,&sbuf);
mtime = sbuf.st_mtime;
inode = sbuf.st_ino;
@@ -565,8 +586,8 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn,
continue;
}
- size = sbuf.st_size;
- allocation_size = SMB_ROUNDUP_ALLOCATION(sbuf.st_size);
+ size = get_file_size(sbuf);
+ allocation_size = get_allocation_size(NULL,&sbuf);
mdate = sbuf.st_mtime;
adate = sbuf.st_atime;
cdate = get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn)));
@@ -678,11 +699,18 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn,
SIVAL(p,0,nt_extmode); p += 4;
SIVAL(p,0,strlen(fname)); p += 4;
SIVAL(p,0,0); p += 4;
+ /* Clear the short name buffer. This is
+ * IMPORTANT as not doing so will trigger
+ * a Win2k client bug. JRA.
+ */
+ memset(p,'\0',26);
if (!was_8_3) {
- fstrcpy(p+2,fname);
- mangle_map(p+2,True,True,SNUM(conn));
- strupper(p+2);
- SSVAL(p, 0, strlen(p+2));
+ fstring tmpname;
+ fstrcpy(tmpname,fname);
+ mangle_map(tmpname,True,True,SNUM(conn));
+ strupper(tmpname);
+ fstrcpy(p+2,tmpname);
+ SSVAL(p, 0, strlen(tmpname));
} else {
SSVAL(p,0,0);
*(p+2) = 0;
@@ -751,15 +779,10 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn,
SIVAL(p,0,reskey); p+= 4; /* Used for continuing search. */
/* Begin of SMB_QUERY_FILE_UNIX_BASIC */
- SOFF_T(p,0,sbuf.st_size); /* File size 64 Bit */
+ SOFF_T(p,0,get_file_size(sbuf)); /* File size 64 Bit */
p+= 8;
-#if defined(HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE)
- SOFF_T(p,0,sbuf.st_blocks*STAT_ST_BLOCKSIZE); /* Number of bytes used on disk - 64 Bit */
-#else
- /* Can't get the value - fake it using size. */
- SOFF_T(p,0,sbuf.st_size); /* Number of bytes used on disk - 64 Bit */
-#endif
+ SOFF_T(p,0,get_allocation_size(NULL,&sbuf)); /* Number of bytes used on disk - 64 Bit */
p+= 8;
put_long_date(p,sbuf.st_ctime); /* Creation Time 64 Bit */
@@ -1592,7 +1615,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
uint16 info_level;
int mode=0;
SMB_OFF_T size=0;
- SMB_OFF_T allocation_size=0;
+ SMB_OFF_T allocation_size = 0;
unsigned int data_size;
SMB_STRUCT_STAT sbuf;
pstring fname1;
@@ -1605,13 +1628,12 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
BOOL bad_path = False;
BOOL delete_pending = False;
time_t c_time;
+ files_struct *fsp = NULL;
if (!params)
return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
if (tran_call == TRANSACT2_QFILEINFO) {
- files_struct *fsp;
-
if (total_params < 4)
return(ERROR_DOS(ERRDOS,ERRinvalidparam));
@@ -1715,8 +1737,8 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
l = strlen(p);
mode = dos_mode(conn,fname,&sbuf);
fullpathname = fname;
- size = sbuf.st_size;
- allocation_size = SMB_ROUNDUP_ALLOCATION(sbuf.st_size);
+ size = get_file_size(sbuf);
+ allocation_size = get_allocation_size(fsp,&sbuf);
if (mode & aDIR)
size = 0;
@@ -2045,15 +2067,10 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
DEBUG(4,("call_trans2qfilepathinfo: st_mode=%o\n",(int)sbuf.st_mode));
- SOFF_T(pdata,0,sbuf.st_size); /* File size 64 Bit */
+ SOFF_T(pdata,0,get_file_size(sbuf)); /* File size 64 Bit */
pdata += 8;
-#if defined(HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE)
- SOFF_T(pdata,0,sbuf.st_blocks*STAT_ST_BLOCKSIZE); /* Number of bytes used on disk - 64 Bit */
-#else
- /* Can't get the value - fake it using size. */
- SOFF_T(pdata,0,sbuf.st_size); /* Number of bytes used on disk - 64 Bit */
-#endif
+ SOFF_T(pdata,0,get_allocation_size(fsp,&sbuf)); /* Number of bytes used on disk - 64 Bit */
pdata += 8;
put_long_date(pdata,sbuf.st_ctime); /* Creation Time 64 Bit */
@@ -2409,7 +2426,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char
sbuf.st_mtime = fsp->pending_modtime;
}
- size = sbuf.st_size;
+ size = get_file_size(sbuf);
tvs.modtime = sbuf.st_mtime;
tvs.actime = sbuf.st_atime;
dosmode = dos_mode(conn,fname,&sbuf);
@@ -2514,7 +2531,10 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char
DEBUG(10,("call_trans2setfilepathinfo: Set file allocation info for file %s to %.0f\n",
fname, (double)allocation_size ));
- if(allocation_size != sbuf.st_size) {
+ if (allocation_size)
+ allocation_size = SMB_ROUNDUP(allocation_size,SMB_ROUNDUP_ALLOCATION_SIZE);
+
+ if(allocation_size != get_file_size(sbuf)) {
SMB_STRUCT_STAT new_sbuf;
DEBUG(10,("call_trans2setfilepathinfo: file %s : setting new allocation size to %.0f\n",
@@ -2559,7 +2579,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char
return ERROR_NT(NT_STATUS_DISK_FULL);
/* Allocate can trucate size... */
- size = new_sbuf.st_size;
+ size = get_file_size(new_sbuf);
}
break;
@@ -2819,7 +2839,7 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
* changing the size of a file.
*/
if (!size)
- size = sbuf.st_size;
+ size = get_file_size(sbuf);
}
/*
@@ -2864,7 +2884,7 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
}
}
- if(size != sbuf.st_size) {
+ if(size != get_file_size(sbuf)) {
int ret;
diff --git a/source/utils/status.c b/source/utils/status.c
index ff45bb97961..9195426231e 100644
--- a/source/utils/status.c
+++ b/source/utils/status.c
@@ -165,6 +165,7 @@ static void print_brl(SMB_DEV_T dev, SMB_INO_T ino, int pid,
******************************************************************/
static int profile_dump(void)
{
+#ifdef WITH_PROFILE
if (!profile_setup(True)) {
fprintf(stderr,"Failed to initialise profile memory\n");
return -1;
@@ -502,6 +503,9 @@ static int profile_dump(void)
printf("election_count: %u\n", profile_p->election_count);
printf("election_time: %u\n", profile_p->election_time);
+#else /* ndef WITH_PROFILE */
+ fprintf(stderr,"Profile data unavailable\n");
+#endif /* WITH_PROFILE */
return 0;
}
diff --git a/source/utils/testparm.c b/source/utils/testparm.c
index 9cef1d9ac85..26068fcbf37 100644
--- a/source/utils/testparm.c
+++ b/source/utils/testparm.c
@@ -174,6 +174,7 @@ static void usage(char *pname)
{
printf("Usage: %s [-sh] [-L servername] [configfilename] [hostname hostIP]\n", pname);
printf("\t-s Suppress prompt for enter\n");
+ printf("\t-x Print only smb.conf parameters with values that are non-default\n");
printf("\t-h Print usage\n");
printf("\t-L servername Set %%L macro to servername\n");
printf("\t-t encoding Print parameters with encoding\n");
@@ -192,6 +193,7 @@ int main(int argc, char *argv[])
pstring configfile;
int opt;
int s;
+ BOOL show_defaults=True;
BOOL silent_mode = False;
int ret = 0;
pstring term_code;
@@ -204,7 +206,7 @@ int main(int argc, char *argv[])
charset_initialise();
- while ((opt = getopt(argc, argv,"shL:t:")) != EOF) {
+ while ((opt = getopt(argc, argv,"shL:t:x")) != EOF) {
switch (opt) {
case 's':
silent_mode = True;
@@ -219,6 +221,9 @@ int main(int argc, char *argv[])
case 't':
pstrcpy(term_code,optarg);
break;
+ case 'x':
+ show_defaults=False;
+ break;
default:
printf("Incorrect program usage\n");
usage(argv[0]);
@@ -298,7 +303,7 @@ Level II oplocks can only be set if oplocks are also set.\n",
getc(stdin);
}
memcpy(DEBUGLEVEL_CLASS,parsed_debuglevel_class,sizeof(parsed_debuglevel_class));
- lp_dump(stdout,True, lp_numservices(), _dos_to_unix_static);
+ lp_dump(stdout,show_defaults, lp_numservices(), _dos_to_unix_static);
}
if (argc >= 3) {
diff --git a/source/web/swat.c b/source/web/swat.c
index 9184ed21e7f..c5c211672ed 100644
--- a/source/web/swat.c
+++ b/source/web/swat.c
@@ -1,8 +1,9 @@
/*
Unix SMB/Netbios implementation.
- Version 1.9.
+ Version 2.2.6
Samba Web Administration Tool
- Copyright (C) Andrew Tridgell 1997-1998
+ Copyright (C) Andrew Tridgell 1997-2002
+ Copyright (C) John H Terpstra 2002
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
@@ -320,7 +321,7 @@ static void show_parameter(int snum, struct parm_struct *parm)
/****************************************************************************
display a set of parameters for a service
****************************************************************************/
-static void show_parameters(int snum, int allparameters, int advanced, int printers)
+static void show_parameters(int snum, int allparameters, unsigned int parm_filter, int printers)
{
int i = 0;
struct parm_struct *parm;
@@ -339,7 +340,7 @@ static void show_parameters(int snum, int allparameters, int advanced, int print
if (printers & !(parm->flags & FLAG_PRINT)) continue;
if (!printers & !(parm->flags & FLAG_SHARE)) continue;
}
- if (!advanced) {
+ if (parm_filter == FLAG_BASIC) {
if (!(parm->flags & FLAG_BASIC)) {
void *ptr = parm->ptr;
@@ -384,6 +385,9 @@ static void show_parameters(int snum, int allparameters, int advanced, int print
}
if (printers && !(parm->flags & FLAG_PRINT)) continue;
}
+ if (parm_filter == FLAG_WIZARD) {
+ if (!((parm->flags & FLAG_WIZARD))) continue;
+ }
if (heading && heading != last_heading) {
printf("<tr><td></td></tr><tr><td><b><u>%s</u></b></td></tr>\n", heading);
last_heading = heading;
@@ -415,7 +419,7 @@ static void write_config(FILE *f, BOOL show_defaults, char *(*dos_to_ext)(const
}
/****************************************************************************
- save and reoad the smb.conf config file
+ save and reload the smb.conf config file
****************************************************************************/
static int save_reload(int snum)
{
@@ -523,6 +527,7 @@ static void show_main_buttons(void)
image_link("Globals", "globals", "images/globals.gif");
image_link("Shares", "shares", "images/shares.gif");
image_link("Printers", "printers", "images/printers.gif");
+ image_link("Wizard", "wizard", "images/wizard.gif");
}
if (have_read_access) {
image_link("Status", "status", "images/status.gif");
@@ -568,16 +573,215 @@ static void viewconfig_page(void)
}
/****************************************************************************
+ second screen of the wizard ... Fetch Configuration Parameters
+****************************************************************************/
+static void wizard_params_page(void)
+{
+ unsigned int parm_filter = FLAG_WIZARD;
+
+ /* Here we first set and commit all the parameters that were selected
+ in the previous screen. */
+
+ printf("<H2>Wizard Parameter Edit Page ...</H2>\n");
+
+ if (cgi_variable("Commit")) {
+ commit_parameters(GLOBALS_SNUM);
+ save_reload(0);
+ }
+
+ printf("<form name=\"swatform\" method=post action=wizard_params>\n");
+
+ if (have_write_access) {
+ printf("<input type=submit name=\"Commit\" value=\"Commit Changes\">\n");
+ }
+
+ printf("<input type=reset name=\"Reset Values\" value=\"Reset\">\n");
+ printf("<p>\n");
+
+ printf("<table>\n");
+ show_parameters(GLOBALS_SNUM, 1, parm_filter, 0);
+ printf("</table>\n");
+ printf("</form>\n");
+}
+
+/****************************************************************************
+ Utility to just rewrite the smb.conf file - effectively just cleans it up
+****************************************************************************/
+static void rewritecfg_file(void)
+{
+ commit_parameters(GLOBALS_SNUM);
+ save_reload(0);
+ printf("<H2>Note: smb.conf file has been read and rewritten</H2>\n");
+}
+
+/****************************************************************************
+ wizard to create/modify the smb.conf file
+****************************************************************************/
+static void wizard_page(void)
+{
+ /* Set some variables to collect data from smb.conf */
+ int role = 0;
+ int winstype = 0;
+ int have_home = -1;
+ int HomeExpo = 0;
+ int SerType = 0;
+
+ if (cgi_variable("Rewrite")) {
+ (void) rewritecfg_file();
+ return;
+ }
+
+ if (cgi_variable("GetWizardParams")){
+ (void) wizard_params_page();
+ return;
+ }
+
+ if (cgi_variable("Commit")){
+ SerType = atoi(cgi_variable("ServerType"));
+ winstype = atoi(cgi_variable("WINSType"));
+ have_home = lp_servicenumber(HOMES_NAME);
+ HomeExpo = atoi(cgi_variable("HomeExpo"));
+
+ /* Plain text passwords are too badly broken - use encrypted passwords only */
+ lp_do_parameter( GLOBALS_SNUM, "encrypt passwords", "Yes");
+
+ switch ( SerType ){
+ case 0:
+ /* Stand-alone Server */
+ lp_do_parameter( GLOBALS_SNUM, "security", "USER" );
+ lp_do_parameter( GLOBALS_SNUM, "domain logons", "No" );
+ break;
+ case 1:
+ /* Domain Member */
+ lp_do_parameter( GLOBALS_SNUM, "security", "DOMAIN" );
+ lp_do_parameter( GLOBALS_SNUM, "domain logons", "No" );
+ break;
+ case 2:
+ /* Domain Controller */
+ lp_do_parameter( GLOBALS_SNUM, "security", "USER" );
+ lp_do_parameter( GLOBALS_SNUM, "domain logons", "Yes" );
+ break;
+ }
+ switch ( winstype ) {
+ case 0:
+ lp_do_parameter( GLOBALS_SNUM, "wins support", "No" );
+ lp_do_parameter( GLOBALS_SNUM, "wins server", "" );
+ break;
+ case 1:
+ lp_do_parameter( GLOBALS_SNUM, "wins support", "Yes" );
+ lp_do_parameter( GLOBALS_SNUM, "wins server", "" );
+ break;
+ case 2:
+ lp_do_parameter( GLOBALS_SNUM, "wins support", "No" );
+ lp_do_parameter( GLOBALS_SNUM, "wins server", cgi_variable("WINSAddr"));
+ break;
+ }
+
+ /* Have to create Homes share? */
+ if ((HomeExpo == 1) && (have_home == -1)) {
+ pstring unix_share;
+
+ pstrcpy(unix_share, dos_to_unix_static(HOMES_NAME));
+ load_config(False);
+ lp_copy_service(GLOBALS_SNUM, unix_share);
+ iNumNonAutoPrintServices = lp_numservices();
+ have_home = lp_servicenumber(HOMES_NAME);
+ lp_do_parameter( have_home, "read only", "No");
+ lp_do_parameter( have_home, "valid users", "%S");
+ lp_do_parameter( have_home, "browseable", "No");
+ commit_parameters(have_home);
+ }
+
+ /* Need to Delete Homes share? */
+ if ((HomeExpo == 0) && (have_home != -1)) {
+ lp_remove_service(have_home);
+ have_home = -1;
+ }
+
+ commit_parameters(GLOBALS_SNUM);
+ save_reload(0);
+ }
+ else
+ {
+ /* Now determine smb.conf WINS settings */
+ if (lp_wins_support())
+ winstype = 1;
+ if (strlen(lp_wins_server()) != 0 )
+ winstype = 2;
+
+ /* Do we have a homes share? */
+ have_home = lp_servicenumber(HOMES_NAME);
+ }
+ if ((winstype == 2) && lp_wins_support())
+ winstype = 3;
+
+ role = lp_server_role();
+
+ /* Here we go ... */
+ printf("<H2>Samba Configuration Wizard</H2>\n");
+ printf("<form method=post action=wizard>\n");
+
+ if (have_write_access) {
+ printf("The \"Rewrite smb.conf file\" button will clear the smb.conf file of all default values and of comments.\n");
+ printf("The same will happen if you press the commit button.");
+ printf("<br><br>");
+ printf("<center>");
+ printf("<input type=submit name=\"Rewrite\" value=\"Rewrite smb.conf file\"> &nbsp;&nbsp;");
+ printf("<input type=submit name=\"Commit\" value=\"Commit\"> &nbsp;&nbsp;");
+ printf("<input type=submit name=\"GetWizardParams\" value=\"Edit Parameter Values\">");
+ printf("</center>");
+ }
+
+ printf("<hr>");
+ printf("<center><table border=0>");
+ printf("<tr><td><b>%s</b></td>\n", "Server Type:&nbsp;");
+ printf("<td><input type=radio name=\"ServerType\" value=0 %s> Stand Alone&nbsp;</td>", (role == ROLE_STANDALONE) ? "checked" : "");
+ printf("<td><input type=radio name=\"ServerType\" value=1 %s> Domain Member&nbsp;</td>", (role == ROLE_DOMAIN_MEMBER) ? "checked" : "");
+ printf("<td><input type=radio name=\"ServerType\" value=2 %s> Domain Controller&nbsp;</td>", (role == ROLE_DOMAIN_PDC) ? "checked" : "");
+ printf("</tr>");
+ if (role == ROLE_DOMAIN_BDC) {
+ printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">Unusual Type in smb.conf - Please Select New Mode</font></td></tr>");
+ }
+ printf("<tr><td><b>%s</b></td>\n", "Configure WINS As:&nbsp;");
+ printf("<td><input type=radio name=\"WINSType\" value=0 %s> Not Used&nbsp;</td>", (winstype == 0) ? "checked" : "");
+ printf("<td><input type=radio name=\"WINSType\" value=1 %s> Server for client use&nbsp;</td>", (winstype == 1) ? "checked" : "");
+ printf("<td><input type=radio name=\"WINSType\" value=2 %s> Client of another WINS server&nbsp;</td>", (winstype == 2) ? "checked" : "");
+ printf("<tr><td></td><td></td><td></td><td>Remote WINS Server&nbsp;<input type=text size=\"16\" name=\"WINSAddr\" value=\"\%s\"></td></tr>",lp_wins_server());
+ if (winstype == 3) {
+ printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">Error: WINS Server Mode and WINS Support both set in smb.conf</font></td></tr>");
+ printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">Please Select desired WINS mode above.</font></td></tr>");
+ }
+ printf("</tr>");
+ printf("<tr><td><b>%s</b></td>\n","Expose Home Directories:&nbsp;");
+ printf("<td><input type=radio name=\"HomeExpo\" value=1 %s> Yes</td>", (have_home == -1) ? "" : "checked ");
+ printf("<td><input type=radio name=\"HomeExpo\" value=0 %s> No</td>", (have_home == -1 ) ? "checked" : "");
+ printf("<td></td></tr>");
+
+ /* Enable this when we are ready ....
+ * printf("<tr><td><b>%s</b></td>\n","Is Print Server:&nbsp;");
+ * printf("<td><input type=radio name=\"PtrSvr\" value=1 %s> Yes</td>");
+ * printf("<td><input type=radio name=\"PtrSvr\" value=0 %s> No</td>");
+ * printf("<td></td></tr>");
+ */
+
+ printf("</table></center>");
+ printf("<hr>");
+
+ printf("The above configuration options will set multiple parameters and will generally assist with rapid Samba deployment.\n");
+ printf("</form>\n");
+}
+
+/****************************************************************************
display a globals editing page
****************************************************************************/
static void globals_page(void)
{
- int advanced = 0;
+ unsigned int parm_filter = FLAG_BASIC;
printf("<H2>Global Variables</H2>\n");
if (cgi_variable("Advanced") && !cgi_variable("Basic"))
- advanced = 1;
+ parm_filter = FLAG_ADVANCED;
if (cgi_variable("Commit")) {
commit_parameters(GLOBALS_SNUM);
@@ -591,7 +795,7 @@ static void globals_page(void)
}
printf("<input type=reset name=\"Reset Values\" value=\"Reset Values\">\n");
- if (advanced == 0) {
+ if (parm_filter != FLAG_ADVANCED) {
printf("<input type=submit name=\"Advanced\" value=\"Advanced View\">\n");
} else {
printf("<input type=submit name=\"Basic\" value=\"Basic View\">\n");
@@ -599,10 +803,10 @@ static void globals_page(void)
printf("<p>\n");
printf("<table>\n");
- show_parameters(GLOBALS_SNUM, 1, advanced, 0);
+ show_parameters(GLOBALS_SNUM, 1, parm_filter, 0);
printf("</table>\n");
- if (advanced) {
+ if (parm_filter == FLAG_ADVANCED) {
printf("<input type=hidden name=\"Advanced\" value=1>\n");
}
@@ -619,7 +823,7 @@ static void shares_page(void)
char *s;
int snum=-1;
int i;
- int advanced = 0;
+ unsigned int parm_filter = FLAG_BASIC;
if (share)
snum = lp_servicenumber(share);
@@ -627,7 +831,7 @@ static void shares_page(void)
printf("<H2>Share Parameters</H2>\n");
if (cgi_variable("Advanced") && !cgi_variable("Basic"))
- advanced = 1;
+ parm_filter = FLAG_ADVANCED;
if (cgi_variable("Commit") && snum >= 0) {
commit_parameters(snum);
@@ -690,7 +894,7 @@ static void shares_page(void)
}
printf("<input type=reset name=\"Reset Values\" value=\"Reset Values\">\n");
- if (advanced == 0) {
+ if (parm_filter != FLAG_ADVANCED) {
printf("<input type=submit name=\"Advanced\" value=\"Advanced View\">\n");
} else {
printf("<input type=submit name=\"Basic\" value=\"Basic View\">\n");
@@ -700,11 +904,11 @@ static void shares_page(void)
if (snum >= 0) {
printf("<table>\n");
- show_parameters(snum, 1, advanced, 0);
+ show_parameters(snum, 1, parm_filter, 0);
printf("</table>\n");
}
- if (advanced) {
+ if (parm_filter == FLAG_ADVANCED) {
printf("<input type=hidden name=\"Advanced\" value=1>\n");
}
@@ -949,7 +1153,7 @@ static void printers_page(void)
char *s;
int snum=-1;
int i;
- int advanced = 0;
+ unsigned int parm_filter = FLAG_BASIC;
if (share)
snum = lp_servicenumber(share);
@@ -963,7 +1167,7 @@ static void printers_page(void)
printf("Attempting to delete these printers from SWAT will have no effect.\n");
if (cgi_variable("Advanced") && !cgi_variable("Basic"))
- advanced = 1;
+ parm_filter = FLAG_ADVANCED;
if (cgi_variable("Commit") && snum >= 0) {
commit_parameters(snum);
@@ -1034,7 +1238,7 @@ static void printers_page(void)
printf("<input type=submit name=\"Commit\" value=\"Commit Changes\">\n");
}
printf("<input type=reset name=\"Reset Values\" value=\"Reset Values\">\n");
- if (advanced == 0) {
+ if (parm_filter != FLAG_ADVANCED) {
printf("<input type=submit name=\"Advanced\" value=\"Advanced View\">\n");
} else {
printf("<input type=submit name=\"Basic\" value=\"Basic View\">\n");
@@ -1044,11 +1248,11 @@ static void printers_page(void)
if (snum >= 0) {
printf("<table>\n");
- show_parameters(snum, 1, advanced, 1);
+ show_parameters(snum, 1, parm_filter, 1);
printf("</table>\n");
}
- if (advanced) {
+ if (parm_filter == FLAG_ADVANCED) {
printf("<input type=hidden name=\"Advanced\" value=1>\n");
}
@@ -1093,10 +1297,10 @@ static void printers_page(void)
break;
case 'a':
demo_mode = True;
- break;
+ break;
}
}
-
+
setup_logging(argv[0],False);
charset_initialise();
load_config(True);
@@ -1135,10 +1339,16 @@ static void printers_page(void)
shares_page();
} else if (have_read_access && strcmp(page,"printers")==0) {
printers_page();
+ } else if (have_read_access && strcmp(page,"wizard")==0) {
+ wizard_page();
+ } else if (have_read_access && strcmp(page,"wizard_params")==0) {
+ wizard_params_page();
} else if (have_read_access && strcmp(page,"status")==0) {
status_page();
} else if (have_read_access && strcmp(page,"viewconfig")==0) {
viewconfig_page();
+ } else if (have_read_access && strcmp(page,"rewritecfg")==0) {
+ rewritecfg_file();
} else if (strcmp(page,"passwd")==0) {
passwd_page();
} else {