]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
sync with SAMBA_2_2 for 2.2.6rc1
authorGerald Carter <jerry@samba.org>
Wed, 9 Oct 2002 19:50:33 +0000 (19:50 +0000)
committerGerald Carter <jerry@samba.org>
Wed, 9 Oct 2002 19:50:33 +0000 (19:50 +0000)
129 files changed:
WHATSNEW.txt
docs/Samba-HOWTO-Collection.pdf
docs/docbook/manpages/smb.conf.5.sgml
docs/htmldocs/smb.conf.5.html
docs/manpages/findsmb.1
docs/manpages/lmhosts.5
docs/manpages/make_smbcodepage.1
docs/manpages/make_unicodemap.1
docs/manpages/nmbd.8
docs/manpages/nmblookup.1
docs/manpages/pdbedit.8
docs/manpages/rpcclient.1
docs/manpages/samba.7
docs/manpages/smb.conf.5
docs/manpages/smbcacls.1
docs/manpages/smbclient.1
docs/manpages/smbcontrol.1
docs/manpages/smbd.8
docs/manpages/smbmnt.8
docs/manpages/smbmount.8
docs/manpages/smbpasswd.5
docs/manpages/smbpasswd.8
docs/manpages/smbsh.1
docs/manpages/smbspool.8
docs/manpages/smbstatus.1
docs/manpages/smbtar.1
docs/manpages/smbumount.8
docs/manpages/swat.8
docs/manpages/testparm.1
docs/manpages/testprns.1
docs/manpages/wbinfo.1
docs/manpages/winbindd.8
examples/LDAP/samba.schema
examples/VFS/audit.c
examples/VFS/block/block.c
examples/VFS/recycle/recycle.c
examples/VFS/skel.c
packaging/Mandrake/samba.xinetd
packaging/Mandrake/samba2.spec.tmpl
source/Makefile.in
source/acconfig.h
source/client/client.c
source/client/smbumount.c
source/configure
source/configure.in
source/include/client.h
source/include/config.h.in
source/include/includes.h
source/include/local.h
source/include/printing.h
source/include/profile.h
source/include/proto.h
source/include/rpc_netlogon.h
source/include/smb.h
source/include/smb_macros.h
source/include/trans2.h
source/include/vfs.h
source/lib/messages.c
source/lib/substitute.c
source/lib/username.c
source/lib/util_sid.c
source/lib/util_str.c
source/libsmb/cli_netlogon.c
source/libsmb/cliconnect.c
source/libsmb/clientgen.c
source/libsmb/clierror.c
source/libsmb/clilist.c
source/libsmb/namequery.c
source/locking/locking.c
source/nmbd/nmbd_logonnames.c
source/nmbd/nmbd_synclists.c
source/nsswitch/wb_client.c
source/nsswitch/wbinfo.c
source/nsswitch/winbind_nss_config.h
source/nsswitch/winbindd.c
source/nsswitch/winbindd.h
source/nsswitch/winbindd_cache.c
source/nsswitch/winbindd_cm.c
source/nsswitch/winbindd_group.c
source/nsswitch/winbindd_misc.c
source/nsswitch/winbindd_nss.h
source/nsswitch/winbindd_pam.c
source/nsswitch/winbindd_proto.h
source/nsswitch/winbindd_rpc.c
source/nsswitch/winbindd_user.c
source/nsswitch/winbindd_util.c
source/param/loadparm.c
source/passdb/secrets.c
source/printing/nt_printing.c
source/printing/pcap.c
source/printing/print_cups.c
source/printing/printing.c
source/profile/profile.c
source/rpc_client/cli_login.c
source/rpc_client/cli_pipe.c
source/rpc_client/cli_spoolss_notify.c
source/rpc_client/cli_trust.c
source/rpc_parse/parse_net.c
source/rpc_parse/parse_prs.c
source/rpc_parse/parse_spoolss.c
source/rpc_server/srv_spoolss_nt.c
source/rpc_server/srv_srvsvc_nt.c
source/rpcclient/rpcclient.c
source/rpcclient/samsync.c
source/smbd/dir.c
source/smbd/fileio.c
source/smbd/mangle_hash.c
source/smbd/mangle_map.c
source/smbd/open.c
source/smbd/password.c
source/smbd/posix_acls.c
source/smbd/process.c
source/smbd/reply.c
source/smbd/service.c
source/smbd/trans2.c
source/smbd/vfs-wrap.c
source/smbd/vfs.c
source/tdb/spinlock.c
source/tdb/tdb.c
source/tdb/tdb.h
source/tdb/tdbbackup.c
source/tdb/tdbdump.c
source/tdb/tdbtest.c
source/tdb/tdbtool.c
source/tdb/tdbutil.c
source/utils/smbcacls.c
source/utils/smbpasswd.c
source/utils/status.c
source/web/swat.c

index d35c8912849a102c64bbefe0cd2802459e764fa9..471db3a4eca9e89ee59d2a06a5e9254f485a8d41 100644 (file)
@@ -1,9 +1,56 @@
-            WHAT'S NEW IN Samba 2.2.6pre2  - 29th August 2002
-            =================================================
+            WHAT'S NEW IN Samba 2.2.6rc1  - 30th Sept. 2002
+            ===============================================
 
 This is a prelease snapshot of SAMBA_2_2 cvs branch.  This is a non-production
 release provided for testing purposes only.
 
+Changes since 2.2.6pre2
+-----------------------
+1)  Merge in freelist unlock on error fix
+2)  Correctly fail opens with mismatching SYSTEM or HIDDEN attributes
+    if we are mapping system or hidden
+3)  Fix bug with stat mode open being done on read-only open with truncate
+4)  Fix crashbug discovered where cli struct was being deallocated in a
+    called function
+5)  Ensure we open UNIX fifo's non-blocking
+6)  Fix DeletePrinterDriver() (hopefully for the last time...yeah right....)
+7)  only lowercase global_myname in the %L substitution, not the whole string
+8)  Merged Steve French's fix for OS/2 EA return error being removed
+9)  Patch from Steve French to fix difference in responses to smbclient
+    //server/share ls / on Samba and Windows 2000
+10) Print error and exit if smb.conf doesn't have security=domain and 
+    encrypt passwords=yes when joining domain
+11) Added final Steve French patch for "required" attributes with old dir 
+    listings
+12) Initialise user_rid value in WINBIND_USERINFO structure returned by 
+    the rpc version of query_user()
+13) Ensure we've failed a lock with a lock denied message before automatically 
+    pushing it onto the        blocking queue
+14) Add experiemental --with-sendfile code
+15) alignment fix in printing code merged from HEAD
+16) Merge fix for other sids in token from HEAD
+17) Merge winbindd with current (more advanced) state of play in APPLIANCE_HEAD
+18) fix smbclient / Win98 off by one bug
+19) Never, *ever* hold a mutex lock in the message database where there may be
+    traversals being attempted
+20) Add LDAP hack for retrieving the SAM sequence number whe a member of a 
+    Windows 2000 native mode domain
+21) Fix race condition when changing a machine acount password as we were 
+    no longer locking the secrets entry
+22) Allow '@' as a valid character in domain names
+23) remove jobs from the spool directory when using cups
+24) removed -lresolv for --enable-ldapsam
+25) Memory leak fix and correct use of negative caching in winbindd
+26) Updated spoolss parsing code with known good state of APPLIANCE_HEAD
+27) Delete printer security check was reversed
+28) Windows allows delete printer on a handle opened by an admin user, then 
+    used on a pipe handle created by an anonymous user...We do to now...
+29) Make explicit the difference between a tdb key with no data attached, and 
+    a non existent entry
+30)
+
+
+
 
 Changes since 2.2.6pre1
 -----------------------
index 92ab4c71d327130ba0bcb339e5f1079a2eb95164..327e99c78dfd75f0ac0c24361f930a533284dd56 100644 (file)
@@ -1,6 +1,6 @@
 %PDF-1.2
 %âãÏÓ
-1 0 obj<</Producer(htmldoc 1.8.11 Copyright 1997-2001 Easy Software Products, All Rights Reserved.)/CreationDate(D:20020829040213Z)/Title(SAMBA Project Documentation)/Creator(Modular DocBook HTML Stylesheet Version 1.57)>>endobj
+1 0 obj<</Producer(htmldoc 1.8.11 Copyright 1997-2001 Easy Software Products, All Rights Reserved.)/CreationDate(D:20020903132854Z)/Title(SAMBA Project Documentation)/Creator(Modular DocBook HTML Stylesheet Version 1.57)>>endobj
 2 0 obj<</Type/Encoding/Differences[ 32/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle/parenleft/parenright/asterisk/plus/comma/minus/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde 128/Euro 130/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl/circumflex/perthousand/Scaron/guilsinglleft/OE 145/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash/tilde/trademark/scaron/guilsinglright/oe 159/Ydieresis/space/exclamdown/cent/sterling/currency/yen/brokenbar/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]>>endobj
 3 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier/Encoding 2 0 R>>endobj
 4 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier-Bold/Encoding 2 0 R>>endobj
@@ -3666,7 +3666,7 @@ xref
 0000256429 00000 n 
 0000256524 00000 n 
 trailer
-<</Size 1124/Root 1123 0 R/Info 1 0 R/ID[<94579745ca18c91b3922074b18e6ef4d><94579745ca18c91b3922074b18e6ef4d>]>>
+<</Size 1124/Root 1123 0 R/Info 1 0 R/ID[<eacf19d5fa8a3a7bae628bbfc9ff9dc8><eacf19d5fa8a3a7bae628bbfc9ff9dc8>]>>
 startxref
 256739
 %%EOF
index cff2afdcaca0c43ab0bbbe9e73f0669585318014..22a5dfa3998c7522304eba5406fe2a25621c1a81 100644 (file)
        <computeroutput>
        [foo]
                path = /home/bar
-               writeable = true
+               read only = no
        </computeroutput>
        </screen>
 
        <computeroutput>
        [aprinter]
                path = /usr/spool/public
-               writeable = false
-               printable = true
-               guest ok = true
+               read only = yes
+               printable = yes
+               guest ok = yes
        </computeroutput>
        </screen>
 </refsect1>
                <screen>
                <computeroutput>
                [homes]
-                       writeable = yes
+                       read only = no
                </computeroutput>
                </screen>
        
                <listitem><para><link linkend="PRINTERDRIVERLOCATION"><parameter>printer driver location</parameter></link></para></listitem>
                <listitem><para><link linkend="PRINTERNAME"><parameter>printer name</parameter></link></para></listitem>
                <listitem><para><link linkend="PRINTING"><parameter>printing</parameter></link></para></listitem>
+               <listitem><para><link linkend="PROFILEACLS"><parameter>profile acls</parameter></link></para></listitem>
                <listitem><para><link linkend="PUBLIC"><parameter>public</parameter></link></para></listitem>
                <listitem><para><link linkend="QUEUEPAUSECOMMAND"><parameter>queuepause command</parameter></link></para></listitem>
                <listitem><para><link linkend="QUEUERESUMECOMMAND"><parameter>queueresume command</parameter></link></para></listitem>
                <listitem><para><link linkend="STRICTSYNC"><parameter>strict sync</parameter></link></para></listitem>
                <listitem><para><link linkend="SYNCALWAYS"><parameter>sync always</parameter></link></para></listitem>
                <listitem><para><link linkend="USECLIENTDRIVER"><parameter>use client driver</parameter></link></para></listitem>
+               <listitem><para><link linkend="USESENDFILE"><parameter>use sendfile</parameter></link></para></listitem>
                <listitem><para><link linkend="USER"><parameter>user</parameter></link></para></listitem>
                <listitem><para><link linkend="USERNAME"><parameter>username</parameter></link></para></listitem>
                <listitem><para><link linkend="USERS"><parameter>users</parameter></link></para></listitem>
                queue the lock request, and periodically attempt to obtain 
                the lock until the timeout period expires.</para>
 
-               <para>If this parameter is set to <constant>false</constant>, then 
+               <para>If this parameter is set to <constant>no</constant>, then 
                Samba 2.2 will behave as previous versions of Samba would and 
                will fail the lock request immediately if the lock range 
                cannot be obtained.</para>
                <listitem><para>This controls whether <ulink url="smbd.8.html">
                <command>smbd(8)</command></ulink> will serve a browse list to 
                a client doing a <command>NetServerEnum</command> call. Normally 
-               set to <constant>true</constant>. You should never need to change 
+               set to <constant>yes</constant>. You should never need to change 
                this.</para>
                
                <para>Default: <command>browse list = yes</command></para></listitem>
                <listitem><para>This option is used when Samba is attempting to 
                delete a directory that contains one or more vetoed directories 
                (see the <link linkend="VETOFILES"><parameter>veto files</parameter></link>
-               option).  If this option is set to <constant>false</constant> (the default) then if a vetoed 
+               option).  If this option is set to <constant>no</constant> (the default) then if a vetoed 
                directory contains any non-vetoed files or directories then the 
                directory delete will fail. This is usually what you want.</para>
 
-               <para>If this option is set to <constant>true</constant>, then Samba 
+               <para>If this option is set to <constant>yes</constant>, then Samba 
                will attempt to recursively delete any files and directories within 
                the vetoed directory. This can be useful for integration with file 
                serving systems such as NetAtalk which create meta-files within 
 
                <varlistentry>
                <term><anchor id="DOMAINLOGONS">domain logons (G)</term>
-               <listitem><para>If set to <constant>true</constant>, the Samba server will serve 
+               <listitem><para>If set to <constant>yes</constant>, the Samba server will serve 
                Windows 95/98 Domain logons for the <link linkend="WORKGROUP">
                <parameter>workgroup</parameter></link> it is in. Samba 2.2 also 
                has limited capability to act as a domain controller for Windows 
                default, Samba runs with POSIX semantics and refuses to change the 
                timestamp on a file if the user <command>smbd</command> is acting 
                on behalf of is not the file owner. Setting this option to <constant>
-               true</constant> allows DOS semantics and <ulink url="smbd.8.html">smbd</ulink> will change the file 
+               yes</constant> allows DOS semantics and <ulink url="smbd.8.html">smbd</ulink> will change the file 
                timestamp as DOS requires.</para>
 
                <para>Default: <command>dos filetimes = no</command></para></listitem>
                caching algorithm will be used to reduce the time taken for getwd() 
                calls. This can have a significant impact on performance, especially 
                when the <link linkend="WIDELINKS"><parameter>wide links</parameter>
-               </link>parameter is set to <constant>false</constant>.</para>
+               </link>parameter is set to <constant>no</constant>.</para>
 
                <para>Default: <command>getwd cache = yes</command></para>
                </listitem>
                <varlistentry>
                <term><anchor id="HOMEDIRMAP">homedir map (G)</term>
                <listitem><para>If<link linkend="NISHOMEDIR"><parameter>nis homedir
-               </parameter></link> is <constant>true</constant>, and <ulink 
+               </parameter></link> is <constant>yes</constant>, and <ulink 
                url="smbd.8.html"><command>smbd(8)</command></ulink> is also acting 
                as a Win95/98 <parameter>logon server</parameter> then this parameter 
                specifies the NIS (or YP) map from which the server for the user's 
                oplocks</parameter></link> are supported then level2 oplocks are 
                not granted (even if this parameter is set to <constant>yes</constant>). 
                Note also, the <link linkend="OPLOCKS"><parameter>oplocks</parameter>
-               </link> parameter must be set to <constant>true</constant> on this share in order for 
+               </link> parameter must be set to <constant>yes</constant> on this share in order for 
                this parameter to have any effect.</para>
 
                <para>See also the <link linkend="OPLOCKS"><parameter>oplocks</parameter>
                <command>nmbd(8)</command></ulink> will produce Lanman announce 
                broadcasts that are needed by OS/2 clients in order for them to see 
                the Samba server in their browse list. This parameter can have three 
-               values, <constant>true</constant>, <constant>false</constant>, or
+               values, <constant>yes</constant>, <constant>no</constant>, or
                <constant>auto</constant>. The default is <constant>auto</constant>.  
-               If set to <constant>false</constant> Samba will never produce these 
-               broadcasts. If set to <constant>true</constant> Samba will produce 
+               If set to <constant>no</constant> Samba will never produce these 
+               broadcasts. If set to <constant>yes</constant> Samba will produce 
                Lanman announce broadcasts at a frequency set by the parameter 
                <parameter>lm interval</parameter>. If set to <constant>auto</constant> 
                Samba will not send Lanman announce broadcasts by default but will 
                <term><anchor id="LOCALMASTER">local master (G)</term>
                <listitem><para>This option allows <ulink url="nmbd.8.html"><command>
                nmbd(8)</command></ulink> to try and become a local master browser 
-               on a subnet. If set to <constant>false</constant> then <command>
+               on a subnet. If set to <constant>no</constant> then <command>
                nmbd</command> will not attempt to become a local master browser 
                on a subnet and will also lose in all browsing elections. By
-               default this value is set to <constant>true</constant>. Setting this value to <constant>true</constant> doesn't
+               default this value is set to <constant>yes</constant>. Setting this value to <constant>yes</constant> doesn't
                mean that Samba will <emphasis>become</emphasis> the local master 
                browser on a subnet, just that <command>nmbd</command> will <emphasis>
                participate</emphasis> in elections for local master browser.</para>
 
-               <para>Setting this value to <constant>false</constant> will cause <command>nmbd</command>
+               <para>Setting this value to <constant>no</constant> will cause <command>nmbd</command>
                <emphasis>never</emphasis> to become a local master browser.</para>
 
                <para>Default: <command>local master = yes</command></para>
                if the expect string is a full stop then no string is expected.</para>
 
                <para>If the <link linkend="PAMPASSWORDCHANGE"><parameter>pam
-               password change</parameter></link> parameter is set to true, the chat pairs
+               password change</parameter></link> parameter is set to <constant>yes</constant>, the chat pairs
                 may be matched in any order, and success is determined by the PAM result, 
                 not any particular output. The \n macro is ignored for PAM conversions.
                </para>
                it.</para>
 
                <para><emphasis>Note</emphasis> that if the <parameter>unix 
-               password sync</parameter> parameter is set to <constant>true
+               password sync</parameter> parameter is set to <constant>yes
                </constant> then this program is called <emphasis>AS ROOT</emphasis> 
                before the SMB password in the <ulink url="smbpasswd.5.html">smbpasswd(5)
                </ulink> file is changed. If this UNIX password change fails, then 
                is set this parameter <emphasis>MUST USE ABSOLUTE PATHS</emphasis> 
                for <emphasis>ALL</emphasis> programs called, and must be examined 
                for security implications. Note that by default <parameter>unix 
-               password sync</parameter> is set to <constant>false</constant>.</para>
+               password sync</parameter> is set to <constant>no</constant>.</para>
 
                <para>See also <link linkend="UNIXPASSWORDSYNC"><parameter>unix 
                password sync</parameter></link>.</para>
                url="nmbd.8.html">nmbd(8)</ulink> is a preferred master browser 
                for its workgroup.</para>
 
-               <para>If this is set to <constant>true</constant>, on startup, <command>nmbd</command> 
+               <para>If this is set to <constant>yes</constant>, on startup, <command>nmbd</command> 
                will force an election, and it will have a slight advantage in 
                winning the election.  It is recommended that this parameter is 
                used in conjunction with <command><link linkend="DOMAINMASTER"><parameter>
                
                <para>Note that a printable service will ALWAYS allow writing 
                to the service path (user privileges permitting) via the spooling 
-               of print data. The <link linkend="WRITEABLE"><parameter>writeable
+               of print data. The <link linkend="READONLY"><parameter>read only
                </parameter></link> parameter controls only non-printing access to 
                the resource.</para>
 
                </listitem>
                </varlistentry>
                
+
+
                                
+               <varlistentry>
+               <term><anchor id="PROFILEACLS">profile acls (S)</term>
+               <listitem><para>
+               This boolean parameter was added to fix the problems that people have been
+               having with storing user profiles on Samba shares from Windows 2000 or
+               Windows XP clients. New versions of Windows 2000 or Windows XP service
+               packs do security ACL checking on the owner and ability to write of the
+               profile directory stored on a local workstation when copied from a Samba
+               share. When not in domain mode with winbindd then the security info copied
+               onto the local workstation has no meaning to the logged in user (SID) on
+               that workstation so the profile storing fails. Adding this parameter
+               onto a share used for profile storage changes two things about the
+               returned Windows ACL. Firstly it changes the owner and group owner
+               of all reported files and directories to be BUILTIN\Administrators,
+               BUILTIN\Users respectively (SIDs S-1-5-32-544, S-1-5-32-545). Secondly
+               it adds an ACE entry of "Full Control" to the SID BUILTIN\Users to
+               every returned ACL. This will allow any Windows 2000 or XP workstation
+               user to access the profile. Note that if you have multiple users logging
+               on to a workstation then in order to prevent them from being able to access
+               each others profiles you must remove the "Bypass traverse checking" advanced
+               user right. This will prevent access to other users profile directories as
+               the top level profile directory (named after the user) is created by the
+               workstation profile code and has an ACL restricting entry to the directory
+               tree to the owning user.</para>
+               <para>If you didn't understand the above text, you probably should not set
+               this parameter :-).</para>
+               <para>Default <command>profile acls = no</command></para>
+               </listitem>
+               </varlistentry>
+
+
                
                
                <varlistentry>
                <listitem><para>This is a list of users that are given read-only 
                access to a service. If the connecting user is in this list then 
                they will not be given write access, no matter what the <link 
-               linkend="WRITEABLE"><parameter>writeable</parameter></link>
+               linkend="READONLY"><parameter>read only</parameter></link>
                option is set to. The list can include group names using the 
                syntax described in the <link linkend="INVALIDUSERS"><parameter>
                invalid users</parameter></link> parameter.</para>
 
                <varlistentry>
                <term><anchor id="READONLY">read only (S)</term>
-               <listitem><para>Note that this is an inverted synonym for <link 
-               linkend="WRITEABLE"><parameter>writeable</parameter></link>.</para>
+               <listitem><para>An inverted synonym is <link linkend="WRITEABLE">
+               <parameter>writeable</parameter></link>.</para>
+
+               <para>If this parameter is <constant>yes</constant>, then users 
+               of a service may not create or modify files in the service's 
+               directory.</para>
+
+               <para>Note that a printable service (<command>printable = yes</command>)
+               will <emphasis>ALWAYS</emphasis> allow writing to the directory 
+               (user privileges permitting), but only via spooling operations.</para>
+
+               <para>Default: <command>read only = yes</command></para>
                </listitem>
                </varlistentry>
 
 
                <varlistentry>
                <term><anchor id="RESTRICTANONYMOUS">restrict anonymous (G)</term>
-               <listitem><para>This is a boolean parameter.  If it is <constant>true</constant>, then 
+               <listitem><para>This is a boolean parameter.  If it is <constant>yes</constant>, then 
                anonymous access to the server will be restricted, namely in the 
                case where the server is expecting the client to send a username, 
-               but it doesn't.  Setting it to <constant>true</constant> will force these anonymous 
+               but it doesn't.  Setting it to <constant>yes</constant> will force these anonymous 
                connections to be denied, and the client will be required to always 
                supply a username and password when connecting. Use of this parameter 
                is only recommended for homogeneous NT client environments.</para>
                likes to use anonymous connections when refreshing the share list, 
                and this is a way to work around that.</para>
 
-               <para>When restrict anonymous is <constant>true</constant>, all anonymous connections 
+               <para>When restrict anonymous is <constant>yes</constant>, all anonymous connections 
                are denied no matter what they are for.  This can effect the ability 
                of a machine to access the Samba Primary Domain Controller to revalidate 
                its machine account after someone else has logged on the client 
                url="smbpasswd.8.html">smbpasswd(8)</ulink> has been used to add this 
                machine into a Windows NT Domain. It expects the <link 
                linkend="ENCRYPTPASSWORDS"><parameter>encrypted passwords</parameter>
-               </link> parameter to be set to <constant>true</constant>. In this 
+               </link> parameter to be set to <constant>yes</constant>. In this 
                mode Samba will try to validate the username/password by passing
                it to a Windows NT Primary or Backup Domain Controller, in exactly 
                the same way that a Windows NT Server would do.</para>
                <term><anchor id="SYNCALWAYS">sync always (S)</term>
                <listitem><para>This is a boolean parameter that controls 
                whether writes will always be written to stable storage before 
-               the write call returns. If this is <constant>false</constant> then the server will be 
+               the write call returns. If this is <constant>no</constant> then the server will be 
                guided by the client's request in each write call (clients can 
                set a bit indicating that a particular write should be synchronous). 
-               If this is <constant>true</constant> then every write will be followed by a <command>fsync()
+               If this is <constant>yes</constant> then every write will be followed by a <command>fsync()
                </command> call to ensure the data is written to disk. Note that 
                the <parameter>strict sync</parameter> parameter must be set to
                <constant>yes</constant> in order for this parameter to have 
                <listitem><para>This boolean parameter controls whether Samba 
                attempts to synchronize the UNIX password with the SMB password 
                when the encrypted SMB password in the smbpasswd file is changed. 
-               If this is set to <constant>true</constant> the program specified in the <parameter>passwd
+               If this is set to <constant>yes</constant> the program specified in the <parameter>passwd
                program</parameter>parameter is called <emphasis>AS ROOT</emphasis> - 
                to allow the new UNIX password to be set without access to the 
                old UNIX password (as the SMB password change code has no 
                <listitem><para>This global parameter determines if the tdb internals of Samba can
                depend on mmap working correctly on the running system. Samba requires a coherent
                mmap/read-write system memory cache. Currently only HPUX does not have such a
-               coherent cache, and so this parameter is set to <constant>false</constant> by
+               coherent cache, and so this parameter is set to <constant>no</constant> by
                default on HPUX. On all other systems this parameter should be left alone. This
                parameter is provided to help the Samba developers track down problems with
                the tdb internal code.
 
                <varlistentry>
                <term><anchor id="USERHOSTS">use rhosts (G)</term>
-               <listitem><para>If this global parameter is <constant>true</constant>, it specifies 
+               <listitem><para>If this global parameter is <constant>yes</constant>, it specifies 
                that the UNIX user's <filename>.rhosts</filename> file in their home directory 
                will be read to find the names of hosts and users who will be allowed 
                access without specifying a password.</para>
                </varlistentry>
 
 
-
                <varlistentry>
                <term><anchor id="USER">user (S)</term>
                <listitem><para>Synonym for <link linkend="USERNAME"><parameter>
                can use the <link linkend="VALIDUSERS"><parameter>valid users
                </parameter></link> parameter.</para>
 
-               <para>If any of the usernames begin with a '@' then the name 
+               <para>If any of the usernames begin with a '@' then the name
                will be looked up first in the NIS netgroups list (if Samba 
                is compiled with netgroup support), followed by a lookup in 
                the UNIX groups database and will expand to a list of all users 
                </varlistentry>
 
 
+               <varlistentry>
+               <term><anchor id="USESENDFILE">use sendfile (S)</term>
+               <listitem><para>If this parameter is <constant>yes</constant>, and Samba
+               was built with the --with-sendfile-support option, and the underlying operating
+               system supports sendfile system call, then some SMB read calls (mainly ReadAndX
+               and ReadRaw) will use the more efficient sendfile system call for files that
+               are exclusively oplocked. This may make more efficient use of the system CPU's
+               and cause Samba to be faster. This is off by default as it's effects are unknown
+               as yet.
+               </para>
+
+               <para>Default: <command>use sendfile = no</command></para>
+               </listitem>
+               </varlistentry>
+
+
 
+               
+               
                <varlistentry>
                <term><anchor id="UTMP">utmp (G)</term>
                <listitem><para>This boolean parameter is only available if 
                Samba has been configured and compiled  with the option <command>
-               --with-utmp</command>. If set to <constant>true</constant> then Samba will attempt
+               --with-utmp</command>. If set to <constant>yes</constant> then Samba will attempt
                to add utmp or utmpx records (depending on the UNIX system) whenever a
                connection is made to a Samba server. Sites may use this to record the
                user connecting to a Samba share.</para>
@@ -8380,7 +8442,7 @@ veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
                <command>getpwent()</command> and
                <command>endpwent()</command> group of system calls.  If
                the <parameter>winbind enum users</parameter> parameter is
-               false, calls to the <command>getpwent</command> system call
+               <constant>no</constant>, calls to the <command>getpwent</command> system call
                will not return any data. </para>
 
                <para><emphasis>Warning:</emphasis> Turning off user
@@ -8402,7 +8464,7 @@ veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
                <command>getgrent()</command> and
                <command>endgrent()</command> group of system calls.  If
                the <parameter>winbind enum groups</parameter> parameter is
-               false, calls to the <command>getgrent()</command> system
+               <constant>no</constant>, calls to the <command>getgrent()</command> system
                call will not return any data. </para>
 
                <para><emphasis>Warning:</emphasis> Turning off group
@@ -8478,9 +8540,9 @@ veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
                 own domain.  While this does not benifit Windows users, it makes SSH, FTP and e-mail 
                 function in a way much closer to the way they would in a native unix system.</para>
                
-               <para>Default: <command>winbind use default domain = &lt;falseg&gt; 
+               <para>Default: <command>winbind use default domain = &lt;no&gt; 
                </command></para>
-               <para>Example: <command>winbind use default domain = true</command></para>
+               <para>Example: <command>winbind use default domain = yes</command></para>
                </listitem>
                </varlistentry>
 
@@ -8575,9 +8637,9 @@ veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
                <term><anchor id="WINSSUPPORT">wins support (G)</term>
                <listitem><para>This boolean controls if the <ulink url="nmbd.8.html">          
                nmbd(8)</ulink> process in Samba will act as a WINS server. You should 
-               not set this to <constant>true</constant> unless you have a multi-subnetted network and 
+               not set this to <constant>yes</constant> unless you have a multi-subnetted network and 
                you wish a particular <command>nmbd</command> to be your WINS server. 
-               Note that you should <emphasis>NEVER</emphasis> set this to <constant>true</constant>
+               Note that you should <emphasis>NEVER</emphasis> set this to <constant>yes</constant>
                on more than one machine in your network.</para>
 
                <para>Default: <command>wins support = no</command></para>
@@ -8648,7 +8710,7 @@ veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
                <listitem><para>This is a list of users that are given read-write 
                access to a service. If the connecting user is in this list then 
                they will be given write access, no matter what the <link
-               linkend="WRITEABLE"><parameter>writeable</parameter></link>
+               linkend="READONLY"><parameter>read only</parameter></link>
                option is set to. The list can include group names using the 
                @group syntax.</para>
 
@@ -8672,8 +8734,8 @@ veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
 
                <varlistentry>
                <term><anchor id="WRITEOK">write ok (S)</term>
-               <listitem><para>Synonym for <link linkend="WRITEABLE"><parameter>
-               writeable</parameter></link>.</para>
+               <listitem><para>Inverted synonym for <link linkend="READONLY"><parameter>
+               read only</parameter></link>.</para>
                </listitem>
                </varlistentry>
 
@@ -8693,18 +8755,8 @@ veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
 
                <varlistentry>
                <term><anchor id="WRITEABLE">writeable (S)</term>
-               <listitem><para>An inverted synonym is <link linkend="READONLY">
-               <parameter>read only</parameter></link>.</para>
-
-               <para>If this parameter is <constant>no</constant>, then users 
-               of a service may not create or modify files in the service's 
-               directory.</para>
-
-               <para>Note that a printable service (<command>printable = yes</command>)
-               will <emphasis>ALWAYS</emphasis> allow writing to the directory 
-               (user privileges permitting), but only via spooling operations.</para>
-
-               <para>Default: <command>writeable = no</command></para>
+               <listitem><para>Inverted synonym for <link linkend="READONLY"><parameter>
+               read only</parameter></link>.</para>
                </listitem>
                </varlistentry>
 
index 8567b9988bd68e11503a27c6367835be21c1778f..b6798c5552bcb99fd8a7c3633a24acb79da17667 100644 (file)
@@ -177,7 +177,7 @@ CLASS="SCREEN"
 CLASS="COMPUTEROUTPUT"
 >      [foo]
                path = /home/bar
-               writeable = true
+               read only = no
        </TT
 >
        </PRE
@@ -205,9 +205,9 @@ CLASS="SCREEN"
 CLASS="COMPUTEROUTPUT"
 >      [aprinter]
                path = /usr/spool/public
-               writeable = false
-               printable = true
-               guest ok = true
+               read only = yes
+               printable = yes
+               guest ok = yes
        </TT
 >
        </PRE
@@ -312,7 +312,7 @@ CLASS="SCREEN"
 >              <TT
 CLASS="COMPUTEROUTPUT"
 >              [homes]
-                       writeable = yes
+                       read only = no
                </TT
 >
                </PRE
@@ -4173,6 +4173,18 @@ CLASS="PARAMETER"
 ><LI
 ><P
 ><A
+HREF="#PROFILEACLS"
+><TT
+CLASS="PARAMETER"
+><I
+>profile acls</I
+></TT
+></A
+></P
+></LI
+><LI
+><P
+><A
 HREF="#PUBLIC"
 ><TT
 CLASS="PARAMETER"
@@ -4389,6 +4401,18 @@ CLASS="PARAMETER"
 ><LI
 ><P
 ><A
+HREF="#USESENDFILE"
+><TT
+CLASS="PARAMETER"
+><I
+>use sendfile</I
+></TT
+></A
+></P
+></LI
+><LI
+><P
+><A
 HREF="#USER"
 ><TT
 CLASS="PARAMETER"
@@ -4571,7 +4595,7 @@ CLASS="PARAMETER"
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN1492"
+NAME="AEN1500"
 ></A
 ><H2
 >EXPLANATION OF EACH PARAMETER</H2
@@ -5490,7 +5514,7 @@ TARGET="_top"
 ><P
 >If this parameter is set to <TT
 CLASS="CONSTANT"
->false</TT
+>no</TT
 >, then 
                Samba 2.2 will behave as previous versions of Samba would and 
                will fail the lock request immediately if the lock range 
@@ -5539,7 +5563,7 @@ CLASS="COMMAND"
 > call. Normally 
                set to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 >. You should never need to change 
                this.</P
 ><P
@@ -7237,14 +7261,14 @@ CLASS="PARAMETER"
 >
                option).  If this option is set to <TT
 CLASS="CONSTANT"
->false</TT
+>no</TT
 > (the default) then if a vetoed 
                directory contains any non-vetoed files or directories then the 
                directory delete will fail. This is usually what you want.</P
 ><P
 >If this option is set to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 >, then Samba 
                will attempt to recursively delete any files and directories within 
                the vetoed directory. This can be useful for integration with file 
@@ -7780,7 +7804,7 @@ NAME="DOMAINLOGONS"
 ><P
 >If set to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 >, the Samba server will serve 
                Windows 95/98 Domain logons for the <A
 HREF="#WORKGROUP"
@@ -8029,7 +8053,7 @@ CLASS="COMMAND"
 > is acting 
                on behalf of is not the file owner. Setting this option to <TT
 CLASS="CONSTANT"
->              true</TT
+>              yes</TT
 > allows DOS semantics and <A
 HREF="smbd.8.html"
 TARGET="_top"
@@ -8801,7 +8825,7 @@ CLASS="PARAMETER"
                </A
 >parameter is set to <TT
 CLASS="CONSTANT"
->false</TT
+>no</TT
 >.</P
 ><P
 >Default: <B
@@ -9086,7 +9110,7 @@ CLASS="PARAMETER"
 ></A
 > is <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 >, and <A
 HREF="smbd.8.html"
 TARGET="_top"
@@ -10203,7 +10227,7 @@ CLASS="PARAMETER"
                </A
 > parameter must be set to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 > on this share in order for 
                this parameter to have any effect.</P
 ><P
@@ -10251,10 +10275,10 @@ CLASS="COMMAND"
                the Samba server in their browse list. This parameter can have three 
                values, <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 >, <TT
 CLASS="CONSTANT"
->false</TT
+>no</TT
 >, or
                <TT
 CLASS="CONSTANT"
@@ -10265,11 +10289,11 @@ CLASS="CONSTANT"
 >.  
                If set to <TT
 CLASS="CONSTANT"
->false</TT
+>no</TT
 > Samba will never produce these 
                broadcasts. If set to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 > Samba will produce 
                Lanman announce broadcasts at a frequency set by the parameter 
                <TT
@@ -10397,7 +10421,7 @@ CLASS="COMMAND"
 > to try and become a local master browser 
                on a subnet. If set to <TT
 CLASS="CONSTANT"
->false</TT
+>no</TT
 > then <B
 CLASS="COMMAND"
 >              nmbd</B
@@ -10405,10 +10429,10 @@ CLASS="COMMAND"
                on a subnet and will also lose in all browsing elections. By
                default this value is set to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 >. Setting this value to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 > doesn't
                mean that Samba will <EM
 >become</EM
@@ -10422,7 +10446,7 @@ CLASS="COMMAND"
 ><P
 >Setting this value to <TT
 CLASS="CONSTANT"
->false</TT
+>no</TT
 > will cause <B
 CLASS="COMMAND"
 >nmbd</B
@@ -13574,7 +13598,10 @@ CLASS="PARAMETER"
                password change</I
 ></TT
 ></A
-> parameter is set to true, the chat pairs
+> parameter is set to <TT
+CLASS="CONSTANT"
+>yes</TT
+>, the chat pairs
                 may be matched in any order, and success is determined by the PAM result, 
                 not any particular output. The \n macro is ignored for PAM conversions.
                </P
@@ -13751,7 +13778,7 @@ CLASS="PARAMETER"
 ></TT
 > parameter is set to <TT
 CLASS="CONSTANT"
->true
+>yes
                </TT
 > then this program is called <EM
 >AS ROOT</EM
@@ -13788,7 +13815,7 @@ CLASS="PARAMETER"
 ></TT
 > is set to <TT
 CLASS="CONSTANT"
->false</TT
+>no</TT
 >.</P
 ><P
 >See also <A
@@ -14326,7 +14353,7 @@ TARGET="_top"
 ><P
 >If this is set to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 >, on startup, <B
 CLASS="COMMAND"
 >nmbd</B
@@ -14654,11 +14681,11 @@ CLASS="CONSTANT"
 >Note that a printable service will ALWAYS allow writing 
                to the service path (user privileges permitting) via the spooling 
                of print data. The <A
-HREF="#WRITEABLE"
+HREF="#READONLY"
 ><TT
 CLASS="PARAMETER"
 ><I
->writeable
+>read only
                </I
 ></TT
 ></A
@@ -15146,6 +15173,43 @@ HREF="#AEN79"
 ></DD
 ><DT
 ><A
+NAME="PROFILEACLS"
+></A
+>profile acls (S)</DT
+><DD
+><P
+>              This boolean parameter was added to fix the problems that people have been
+               having with storing user profiles on Samba shares from Windows 2000 or
+               Windows XP clients. New versions of Windows 2000 or Windows XP service
+               packs do security ACL checking on the owner and ability to write of the
+               profile directory stored on a local workstation when copied from a Samba
+               share. When not in domain mode with winbindd then the security info copied
+               onto the local workstation has no meaning to the logged in user (SID) on
+               that workstation so the profile storing fails. Adding this parameter
+               onto a share used for profile storage changes two things about the
+               returned Windows ACL. Firstly it changes the owner and group owner
+               of all reported files and directories to be BUILTIN\Administrators,
+               BUILTIN\Users respectively (SIDs S-1-5-32-544, S-1-5-32-545). Secondly
+               it adds an ACE entry of "Full Control" to the SID BUILTIN\Users to
+               every returned ACL. This will allow any Windows 2000 or XP workstation
+               user to access the profile. Note that if you have multiple users logging
+               on to a workstation then in order to prevent them from being able to access
+               each others profiles you must remove the "Bypass traverse checking" advanced
+               user right. This will prevent access to other users profile directories as
+               the top level profile directory (named after the user) is created by the
+               workstation profile code and has an ACL restricting entry to the directory
+               tree to the owning user.</P
+><P
+>If you didn't understand the above text, you probably should not set
+               this parameter :-).</P
+><P
+>Default <B
+CLASS="COMMAND"
+>profile acls = no</B
+></P
+></DD
+><DT
+><A
 NAME="PROTOCOL"
 ></A
 >protocol (G)</DT
@@ -15319,11 +15383,11 @@ NAME="READLIST"
 >This is a list of users that are given read-only 
                access to a service. If the connecting user is in this list then 
                they will not be given write access, no matter what the <A
-HREF="#WRITEABLE"
+HREF="#READONLY"
 ><TT
 CLASS="PARAMETER"
 ><I
->writeable</I
+>read only</I
 ></TT
 ></A
 >
@@ -15374,15 +15438,36 @@ NAME="READONLY"
 >read only (S)</DT
 ><DD
 ><P
->Note that this is an inverted synonym for <A
+>An inverted synonym is <A
 HREF="#WRITEABLE"
-><TT
+>              <TT
 CLASS="PARAMETER"
 ><I
 >writeable</I
 ></TT
 ></A
 >.</P
+><P
+>If this parameter is <TT
+CLASS="CONSTANT"
+>yes</TT
+>, then users 
+               of a service may not create or modify files in the service's 
+               directory.</P
+><P
+>Note that a printable service (<B
+CLASS="COMMAND"
+>printable = yes</B
+>)
+               will <EM
+>ALWAYS</EM
+> allow writing to the directory 
+               (user privileges permitting), but only via spooling operations.</P
+><P
+>Default: <B
+CLASS="COMMAND"
+>read only = yes</B
+></P
 ></DD
 ><DT
 ><A
@@ -15582,13 +15667,13 @@ NAME="RESTRICTANONYMOUS"
 ><P
 >This is a boolean parameter.  If it is <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 >, then 
                anonymous access to the server will be restricted, namely in the 
                case where the server is expecting the client to send a username, 
                but it doesn't.  Setting it to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 > will force these anonymous 
                connections to be denied, and the client will be required to always 
                supply a username and password when connecting. Use of this parameter 
@@ -15601,7 +15686,7 @@ CLASS="CONSTANT"
 ><P
 >When restrict anonymous is <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 >, all anonymous connections 
                are denied no matter what they are for.  This can effect the ability 
                of a machine to access the Samba Primary Domain Controller to revalidate 
@@ -16294,7 +16379,7 @@ CLASS="PARAMETER"
                </A
 > parameter to be set to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 >. In this 
                mode Samba will try to validate the username/password by passing
                it to a Windows NT Primary or Backup Domain Controller, in exactly 
@@ -17739,13 +17824,13 @@ NAME="SYNCALWAYS"
                whether writes will always be written to stable storage before 
                the write call returns. If this is <TT
 CLASS="CONSTANT"
->false</TT
+>no</TT
 > then the server will be 
                guided by the client's request in each write call (clients can 
                set a bit indicating that a particular write should be synchronous). 
                If this is <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 > then every write will be followed by a <B
 CLASS="COMMAND"
 >fsync()
@@ -18014,7 +18099,7 @@ NAME="UNIXPASSWORDSYNC"
                when the encrypted SMB password in the smbpasswd file is changed. 
                If this is set to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 > the program specified in the <TT
 CLASS="PARAMETER"
 ><I
@@ -18169,7 +18254,7 @@ NAME="USEMMAP"
                mmap/read-write system memory cache. Currently only HPUX does not have such a
                coherent cache, and so this parameter is set to <TT
 CLASS="CONSTANT"
->false</TT
+>no</TT
 > by
                default on HPUX. On all other systems this parameter should be left alone. This
                parameter is provided to help the Samba developers track down problems with
@@ -18190,7 +18275,7 @@ NAME="USERHOSTS"
 ><P
 >If this global parameter is <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 >, it specifies 
                that the UNIX user's <TT
 CLASS="FILENAME"
@@ -18316,7 +18401,7 @@ CLASS="PARAMETER"
 ></A
 > parameter.</P
 ><P
->If any of the usernames begin with a '@' then the name 
+>If any of the usernames begin with a '@' then the name
                will be looked up first in the NIS netgroups list (if Samba 
                is compiled with netgroup support), followed by a lookup in 
                the UNIX groups database and will expand to a list of all users 
@@ -18544,6 +18629,30 @@ CLASS="COMMAND"
 ></DD
 ><DT
 ><A
+NAME="USESENDFILE"
+></A
+>use sendfile (S)</DT
+><DD
+><P
+>If this parameter is <TT
+CLASS="CONSTANT"
+>yes</TT
+>, and Samba
+               was built with the --with-sendfile-support option, and the underlying operating
+               system supports sendfile system call, then some SMB read calls (mainly ReadAndX
+               and ReadRaw) will use the more efficient sendfile system call for files that
+               are exclusively oplocked. This may make more efficient use of the system CPU's
+               and cause Samba to be faster. This is off by default as it's effects are unknown
+               as yet.
+               </P
+><P
+>Default: <B
+CLASS="COMMAND"
+>use sendfile = no</B
+></P
+></DD
+><DT
+><A
 NAME="UTMP"
 ></A
 >utmp (G)</DT
@@ -18555,7 +18664,7 @@ CLASS="COMMAND"
 >              --with-utmp</B
 >. If set to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 > then Samba will attempt
                to add utmp or utmpx records (depending on the UNIX system) whenever a
                connection is made to a Samba server. Sites may use this to record the
@@ -19073,7 +19182,10 @@ CLASS="PARAMETER"
 >winbind enum users</I
 ></TT
 > parameter is
-               false, calls to the <B
+               <TT
+CLASS="CONSTANT"
+>no</TT
+>, calls to the <B
 CLASS="COMMAND"
 >getpwent</B
 > system call
@@ -19124,7 +19236,10 @@ CLASS="PARAMETER"
 >winbind enum groups</I
 ></TT
 > parameter is
-               false, calls to the <B
+               <TT
+CLASS="CONSTANT"
+>no</TT
+>, calls to the <B
 CLASS="COMMAND"
 >getgrent()</B
 > system
@@ -19259,13 +19374,13 @@ TARGET="_top"
 ><P
 >Default: <B
 CLASS="COMMAND"
->winbind use default domain = &#60;falseg&#62; 
+>winbind use default domain = &#60;no&#62; 
                </B
 ></P
 ><P
 >Example: <B
 CLASS="COMMAND"
->winbind use default domain = true</B
+>winbind use default domain = yes</B
 ></P
 ></DD
 ><DT
@@ -19410,7 +19525,7 @@ TARGET="_top"
 > process in Samba will act as a WINS server. You should 
                not set this to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 > unless you have a multi-subnetted network and 
                you wish a particular <B
 CLASS="COMMAND"
@@ -19420,7 +19535,7 @@ CLASS="COMMAND"
 >NEVER</EM
 > set this to <TT
 CLASS="CONSTANT"
->true</TT
+>yes</TT
 >
                on more than one machine in your network.</P
 ><P
@@ -19523,11 +19638,11 @@ NAME="WRITELIST"
 >This is a list of users that are given read-write 
                access to a service. If the connecting user is in this list then 
                they will be given write access, no matter what the <A
-HREF="#WRITEABLE"
+HREF="#READONLY"
 ><TT
 CLASS="PARAMETER"
 ><I
->writeable</I
+>read only</I
 ></TT
 ></A
 >
@@ -19567,12 +19682,12 @@ NAME="WRITEOK"
 >write ok (S)</DT
 ><DD
 ><P
->Synonym for <A
-HREF="#WRITEABLE"
+>Inverted synonym for <A
+HREF="#READONLY"
 ><TT
 CLASS="PARAMETER"
 ><I
->              writeable</I
+>              read only</I
 ></TT
 ></A
 >.</P
@@ -19600,36 +19715,15 @@ NAME="WRITEABLE"
 >writeable (S)</DT
 ><DD
 ><P
->An inverted synonym is <A
+>Inverted synonym for <A
 HREF="#READONLY"
->              <TT
+><TT
 CLASS="PARAMETER"
 ><I
->read only</I
+>              read only</I
 ></TT
 ></A
 >.</P
-><P
->If this parameter is <TT
-CLASS="CONSTANT"
->no</TT
->, then users 
-               of a service may not create or modify files in the service's 
-               directory.</P
-><P
->Note that a printable service (<B
-CLASS="COMMAND"
->printable = yes</B
->)
-               will <EM
->ALWAYS</EM
-> allow writing to the directory 
-               (user privileges permitting), but only via spooling operations.</P
-><P
->Default: <B
-CLASS="COMMAND"
->writeable = no</B
-></P
 ></DD
 ></DL
 ></DIV
@@ -19637,7 +19731,7 @@ CLASS="COMMAND"
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN6208"
+NAME="AEN6235"
 ></A
 ><H2
 >WARNINGS</H2
@@ -19667,7 +19761,7 @@ TARGET="_top"
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN6214"
+NAME="AEN6241"
 ></A
 ><H2
 >VERSION</H2
@@ -19678,7 +19772,7 @@ NAME="AEN6214"
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN6217"
+NAME="AEN6244"
 ></A
 ><H2
 >SEE ALSO</H2
@@ -19757,7 +19851,7 @@ CLASS="COMMAND"
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN6237"
+NAME="AEN6264"
 ></A
 ><H2
 >AUTHOR</H2
index 72cc193c3deeacc36a592a4a50bfdcf28bfda439..59d1a2df28256b7594580c99acf6957987d5cc11 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "FINDSMB" "1" "28 August 2002" "" ""
+.TH "FINDSMB" "1" "03 September 2002" "" ""
 .SH NAME
 findsmb \- list info about machines that respond to SMB  name queries on a subnet
 .SH SYNOPSIS
index 93b56b00db785dbcb781316ac7943eb32a5a748b..96efef5e98c7ffce4c85e86f6877057897ae649f 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "LMHOSTS" "5" "28 August 2002" "" ""
+.TH "LMHOSTS" "5" "03 September 2002" "" ""
 .SH NAME
 lmhosts \- The Samba NetBIOS hosts file
 .SH SYNOPSIS
index 04c43673fade1998c60e59ecd1ef9bd91f536b4a..73f5b096ab801a3209dae7292c0845a03c10286c 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "MAKE_SMBCODEPAGE" "1" "28 August 2002" "" ""
+.TH "MAKE_SMBCODEPAGE" "1" "03 September 2002" "" ""
 .SH NAME
 make_smbcodepage \- construct a codepage file for Samba
 .SH SYNOPSIS
index 9795531c41b8535dbf3f76d61461acc4c60cd7e2..f24e1025d8ce0b72d904ee7474d4c032ef15f16b 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "MAKE_UNICODEMAP" "1" "28 August 2002" "" ""
+.TH "MAKE_UNICODEMAP" "1" "03 September 2002" "" ""
 .SH NAME
 make_unicodemap \- construct a unicode map file for Samba
 .SH SYNOPSIS
index 46b29f1f959a4fb30215b81af087f5f6e98784b4..61ce3ae194475e9a900b304a7c4b177943534746 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "NMBD" "8" "28 August 2002" "" ""
+.TH "NMBD" "8" "03 September 2002" "" ""
 .SH NAME
 nmbd \- NetBIOS name server to provide NetBIOS  over IP naming services to clients
 .SH SYNOPSIS
index f91dc2c4ba11bd4d1860adc0cd71da01efb20237..463795b79f49a13b6643801ae4a3aa9f2165ca14 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "NMBLOOKUP" "1" "28 August 2002" "" ""
+.TH "NMBLOOKUP" "1" "03 September 2002" "" ""
 .SH NAME
 nmblookup \- NetBIOS over TCP/IP client used to lookup NetBIOS  names
 .SH SYNOPSIS
index 8e59ba336cdd6b3c541579e9ccb33224db32de2a..8a240a17038a4d5afe63aabf9ff28642fb552200 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "PDBEDIT" "8" "28 August 2002" "" ""
+.TH "PDBEDIT" "8" "03 September 2002" "" ""
 .SH NAME
 pdbedit \- manage the SAM database
 .SH SYNOPSIS
index efc90487d8c82dc0fb7efa296d40561823e95099..66227b4e8eb285c6b4453928c75ecce9096468bb 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "RPCCLIENT" "1" "28 August 2002" "" ""
+.TH "RPCCLIENT" "1" "03 September 2002" "" ""
 .SH NAME
 rpcclient \- tool for executing client side  MS-RPC functions
 .SH SYNOPSIS
index e0401f35ef592f3ebb041e0da585c9d0cae36b00..c1895814e7b5671aa7cb992e93bd01a185a68976 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SAMBA" "7" "28 August 2002" "" ""
+.TH "SAMBA" "7" "03 September 2002" "" ""
 .SH NAME
 SAMBA \- A Windows SMB/CIFS fileserver for UNIX
 .SH SYNOPSIS
index 8760ccc56e21cedcb701cda67d1750ac792bde44..90c371fee76b136eaf9d283ede24ab178a139f4a 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMB.CONF" "5" "28 August 2002" "" ""
+.TH "SMB.CONF" "5" "09 October 2002" "" ""
 .SH NAME
 smb.conf \- The configuration file for the Samba suite
 .SH "SYNOPSIS"
@@ -94,7 +94,7 @@ The share is accessed via the share name "foo":
 .nf
                [foo]
                path = /home/bar
-               writeable = true
+               read only = no
        
        
 .sp
@@ -110,9 +110,9 @@ elsewhere):
 .nf
                [aprinter]
                path = /usr/spool/public
-               writeable = false
-               printable = true
-               guest ok = true
+               read only = yes
+               printable = yes
+               guest ok = yes
        
        
 .sp
@@ -180,7 +180,7 @@ section:
 .sp
 .nf
                                [homes]
-                       writeable = yes
+                       read only = no
                
                
 .sp
@@ -1342,6 +1342,9 @@ each parameter for details. Note that some are synonyms.
 \fIprinting\fR
 .TP 0.2i
 \(bu
+\fIprofile acls\fR
+.TP 0.2i
+\(bu
 \fIpublic\fR
 .TP 0.2i
 \(bu
@@ -1396,6 +1399,9 @@ each parameter for details. Note that some are synonyms.
 \fIuse client driver\fR
 .TP 0.2i
 \(bu
+\fIuse sendfile\fR
+.TP 0.2i
+\(bu
 \fIuser\fR
 .TP 0.2i
 \(bu
@@ -1754,7 +1760,7 @@ cannot be immediately satisfied, Samba 2.2 will internally
 queue the lock request, and periodically attempt to obtain 
 the lock until the timeout period expires.
 
-If this parameter is set to false, then 
+If this parameter is set to no, then 
 Samba 2.2 will behave as previous versions of Samba would and 
 will fail the lock request immediately if the lock range 
 cannot be obtained.
@@ -1767,7 +1773,7 @@ See the \fI browseable\fR.
 \fBbrowse list (G)\fR
 This controls whether  \fBsmbd(8)\fR will serve a browse list to 
 a client doing a \fBNetServerEnum\fR call. Normally 
-set to true. You should never need to change 
+set to yes. You should never need to change 
 this.
 
 Default: \fBbrowse list = yes\fR
@@ -2416,11 +2422,11 @@ Example: \fBdelete user script = /usr/local/samba/bin/del_user
 This option is used when Samba is attempting to 
 delete a directory that contains one or more vetoed directories 
 (see the \fIveto files\fR
-option). If this option is set to false (the default) then if a vetoed 
+option). If this option is set to no (the default) then if a vetoed 
 directory contains any non-vetoed files or directories then the 
 directory delete will fail. This is usually what you want.
 
-If this option is set to true, then Samba 
+If this option is set to yes, then Samba 
 will attempt to recursively delete any files and directories within 
 the vetoed directory. This can be useful for integration with file 
 serving systems such as NetAtalk which create meta-files within 
@@ -2642,7 +2648,7 @@ Default: \fBno domain guests\fR
 Example: \fBdomain guest group = nobody @guest\fR
 .TP
 \fBdomain logons (G)\fR
-If set to true, the Samba server will serve 
+If set to yes, the Samba server will serve 
 Windows 95/98 Domain logons for the  \fIworkgroup\fR it is in. Samba 2.2 also 
 has limited capability to act as a domain controller for Windows 
 NT 4 Domains. For more details on setting up this feature see 
@@ -2739,7 +2745,7 @@ file they can change the timestamp on it. Under POSIX semantics,
 only the owner of the file or root may change the timestamp. By 
 default, Samba runs with POSIX semantics and refuses to change the 
 timestamp on a file if the user \fBsmbd\fR is acting 
-on behalf of is not the file owner. Setting this option to  true allows DOS semantics and smbd will change the file 
+on behalf of is not the file owner. Setting this option to  yes allows DOS semantics and smbd will change the file 
 timestamp as DOS requires.
 
 Default: \fBdos filetimes = no\fR
@@ -3080,7 +3086,7 @@ This is a tuning option. When this is enabled a
 caching algorithm will be used to reduce the time taken for getwd() 
 calls. This can have a significant impact on performance, especially 
 when the \fIwide links\fR
-parameter is set to false.
+parameter is set to no.
 
 Default: \fBgetwd cache = yes\fR
 .TP
@@ -3179,7 +3185,7 @@ Default: \fBhide unreadable = no\fR
 .TP
 \fBhomedir map (G)\fR
 If\fInis homedir
-\fRis true, and \fBsmbd(8)\fR is also acting 
+\fRis yes, and \fBsmbd(8)\fR is also acting 
 as a Win95/98 \fIlogon server\fR then this parameter 
 specifies the NIS (or YP) map from which the server for the user's 
 home directory should be extracted. At present, only the Sun 
@@ -3616,7 +3622,7 @@ Currently, if \fIkernel
 oplocks\fR are supported then level2 oplocks are 
 not granted (even if this parameter is set to yes). 
 Note also, the \fIoplocks\fR
-parameter must be set to true on this share in order for 
+parameter must be set to yes on this share in order for 
 this parameter to have any effect.
 
 See also the \fIoplocks\fR
@@ -3629,10 +3635,10 @@ Default: \fBlevel2 oplocks = yes\fR
 This parameter determines if  \fBnmbd(8)\fR will produce Lanman announce 
 broadcasts that are needed by OS/2 clients in order for them to see 
 the Samba server in their browse list. This parameter can have three 
-values, true, false, or
+values, yes, no, or
 auto. The default is auto. 
-If set to false Samba will never produce these 
-broadcasts. If set to true Samba will produce 
+If set to no Samba will never produce these 
+broadcasts. If set to yes Samba will produce 
 Lanman announce broadcasts at a frequency set by the parameter 
 \fIlm interval\fR. If set to auto 
 Samba will not send Lanman announce broadcasts by default but will 
@@ -3672,13 +3678,13 @@ Default: \fBload printers = yes\fR
 .TP
 \fBlocal master (G)\fR
 This option allows \fB nmbd(8)\fR to try and become a local master browser 
-on a subnet. If set to false then \fB nmbd\fR will not attempt to become a local master browser 
+on a subnet. If set to no then \fB nmbd\fR will not attempt to become a local master browser 
 on a subnet and will also lose in all browsing elections. By
-default this value is set to true. Setting this value to true doesn't
+default this value is set to yes. Setting this value to yes doesn't
 mean that Samba will \fBbecome\fR the local master 
 browser on a subnet, just that \fBnmbd\fR will \fB participate\fR in elections for local master browser.
 
-Setting this value to false will cause \fBnmbd\fR
+Setting this value to no will cause \fBnmbd\fR
 \fBnever\fR to become a local master browser.
 
 Default: \fBlocal master = yes\fR
@@ -5023,7 +5029,7 @@ is a full stop ".", then no string is sent. Similarly,
 if the expect string is a full stop then no string is expected.
 
 If the \fIpam
-password change\fR parameter is set to true, the chat pairs
+password change\fR parameter is set to yes, the chat pairs
 may be matched in any order, and success is determined by the PAM result, 
 not any particular output. The \\n macro is ignored for PAM conversions.
 
@@ -5071,7 +5077,7 @@ of mixed case chars and digits. This can pose a problem as some clients
 it.
 
 \fBNote\fR that if the \fIunix 
-password sync\fR parameter is set to true
+password sync\fR parameter is set to yes
 then this program is called \fBAS ROOT\fR 
 before the SMB password in the smbpasswd(5)
  file is changed. If this UNIX password change fails, then 
@@ -5082,7 +5088,7 @@ If the \fIunix password sync\fR parameter
 is set this parameter \fBMUST USE ABSOLUTE PATHS\fR 
 for \fBALL\fR programs called, and must be examined 
 for security implications. Note that by default \fIunix 
-password sync\fR is set to false.
+password sync\fR is set to no.
 
 See also \fIunix 
 password sync\fR.
@@ -5324,7 +5330,7 @@ Default: \fBpreexec close = no\fR
 This boolean parameter controls if nmbd(8) is a preferred master browser 
 for its workgroup.
 
-If this is set to true, on startup, \fBnmbd\fR 
+If this is set to yes, on startup, \fBnmbd\fR 
 will force an election, and it will have a slight advantage in 
 winning the election. It is recommended that this parameter is 
 used in conjunction with \fB\fI domain master\fB = yes\fR, so that \fB nmbd\fR can guarantee becoming a domain master.
@@ -5463,7 +5469,7 @@ specified for the service.
 
 Note that a printable service will ALWAYS allow writing 
 to the service path (user privileges permitting) via the spooling 
-of print data. The \fIwriteable
+of print data. The \fIread only
 \fRparameter controls only non-printing access to 
 the resource.
 
@@ -5647,6 +5653,34 @@ This option can be set on a per printer basis
 
 See also the discussion in the  [printers] section.
 .TP
+\fBprofile acls (S)\fR
+This boolean parameter was added to fix the problems that people have been
+having with storing user profiles on Samba shares from Windows 2000 or
+Windows XP clients. New versions of Windows 2000 or Windows XP service
+packs do security ACL checking on the owner and ability to write of the
+profile directory stored on a local workstation when copied from a Samba
+share. When not in domain mode with winbindd then the security info copied
+onto the local workstation has no meaning to the logged in user (SID) on
+that workstation so the profile storing fails. Adding this parameter
+onto a share used for profile storage changes two things about the
+returned Windows ACL. Firstly it changes the owner and group owner
+of all reported files and directories to be BUILTIN\\Administrators,
+BUILTIN\\Users respectively (SIDs S-1-5-32-544, S-1-5-32-545). Secondly
+it adds an ACE entry of "Full Control" to the SID BUILTIN\\Users to
+every returned ACL. This will allow any Windows 2000 or XP workstation
+user to access the profile. Note that if you have multiple users logging
+on to a workstation then in order to prevent them from being able to access
+each others profiles you must remove the "Bypass traverse checking" advanced
+user right. This will prevent access to other users profile directories as
+the top level profile directory (named after the user) is created by the
+workstation profile code and has an ACL restricting entry to the directory
+tree to the owning user.
+
+If you didn't understand the above text, you probably should not set
+this parameter :-).
+
+Default \fBprofile acls = no\fR
+.TP
 \fBprotocol (G)\fR
 Synonym for  \fImax protocol\fR.
 .TP
@@ -5714,7 +5748,7 @@ Default: \fBread bmpx = no\fR
 \fBread list (S)\fR
 This is a list of users that are given read-only 
 access to a service. If the connecting user is in this list then 
-they will not be given write access, no matter what the \fIwriteable\fR
+they will not be given write access, no matter what the \fIread only\fR
 option is set to. The list can include group names using the 
 syntax described in the \fI invalid users\fR parameter.
 
@@ -5726,7 +5760,17 @@ Default: \fBread list = <empty string>\fR
 Example: \fBread list = mary, @students\fR
 .TP
 \fBread only (S)\fR
-Note that this is an inverted synonym for \fIwriteable\fR.
+An inverted synonym is  \fIwriteable\fR.
+
+If this parameter is yes, then users 
+of a service may not create or modify files in the service's 
+directory.
+
+Note that a printable service (\fBprintable = yes\fR)
+will \fBALWAYS\fR allow writing to the directory 
+(user privileges permitting), but only via spooling operations.
+
+Default: \fBread only = yes\fR
 .TP
 \fBread raw (G)\fR
 This parameter controls whether or not the server 
@@ -5828,10 +5872,10 @@ is in fact the browse master on its segment.
 Default: \fBremote browse sync = <empty string>
 \fR.TP
 \fBrestrict anonymous (G)\fR
-This is a boolean parameter. If it is true, then 
+This is a boolean parameter. If it is yes, then 
 anonymous access to the server will be restricted, namely in the 
 case where the server is expecting the client to send a username, 
-but it doesn't. Setting it to true will force these anonymous 
+but it doesn't. Setting it to yes will force these anonymous 
 connections to be denied, and the client will be required to always 
 supply a username and password when connecting. Use of this parameter 
 is only recommended for homogeneous NT client environments.
@@ -5841,7 +5885,7 @@ on the username (%U, %G, etc) consistent. NT 4.0
 likes to use anonymous connections when refreshing the share list, 
 and this is a way to work around that.
 
-When restrict anonymous is true, all anonymous connections 
+When restrict anonymous is yes, all anonymous connections 
 are denied no matter what they are for. This can effect the ability 
 of a machine to access the Samba Primary Domain Controller to revalidate 
 its machine account after someone else has logged on the client 
@@ -6098,7 +6142,7 @@ parameter.
 .PP
 This mode will only work correctly if smbpasswd(8) has been used to add this 
 machine into a Windows NT Domain. It expects the \fIencrypted passwords\fR
-parameter to be set to true. In this 
+parameter to be set to yes. In this 
 mode Samba will try to validate the username/password by passing
 it to a Windows NT Primary or Backup Domain Controller, in exactly 
 the same way that a Windows NT Server would do.
@@ -6743,10 +6787,10 @@ Default: \fBstrip dot = no\fR
 \fBsync always (S)\fR
 This is a boolean parameter that controls 
 whether writes will always be written to stable storage before 
-the write call returns. If this is false then the server will be 
+the write call returns. If this is no then the server will be 
 guided by the client's request in each write call (clients can 
 set a bit indicating that a particular write should be synchronous). 
-If this is true then every write will be followed by a \fBfsync()
+If this is yes then every write will be followed by a \fBfsync()
 \fRcall to ensure the data is written to disk. Note that 
 the \fIstrict sync\fR parameter must be set to
 yes in order for this parameter to have 
@@ -6845,7 +6889,7 @@ Default: \fBunix extensions = no\fR
 This boolean parameter controls whether Samba 
 attempts to synchronize the UNIX password with the SMB password 
 when the encrypted SMB password in the smbpasswd file is changed. 
-If this is set to true the program specified in the \fIpasswd
+If this is set to yes the program specified in the \fIpasswd
 program\fRparameter is called \fBAS ROOT\fR - 
 to allow the new UNIX password to be set without access to the 
 old UNIX password (as the SMB password change code has no 
@@ -6918,7 +6962,7 @@ Default: \fBuse client driver = no\fR
 This global parameter determines if the tdb internals of Samba can
 depend on mmap working correctly on the running system. Samba requires a coherent
 mmap/read-write system memory cache. Currently only HPUX does not have such a
-coherent cache, and so this parameter is set to false by
+coherent cache, and so this parameter is set to no by
 default on HPUX. On all other systems this parameter should be left alone. This
 parameter is provided to help the Samba developers track down problems with
 the tdb internal code.
@@ -6926,7 +6970,7 @@ the tdb internal code.
 Default: \fBuse mmap = yes\fR
 .TP
 \fBuse rhosts (G)\fR
-If this global parameter is true, it specifies 
+If this global parameter is yes, it specifies 
 that the UNIX user's \fI.rhosts\fR file in their home directory 
 will be read to find the names of hosts and users who will be allowed 
 access without specifying a password.
@@ -6976,7 +7020,7 @@ To restrict a service to a particular set of users you
 can use the \fIvalid users
 \fRparameter.
 
-If any of the usernames begin with a '@' then the name 
+If any of the usernames begin with a '@' then the name
 will be looked up first in the NIS netgroups list (if Samba 
 is compiled with netgroup support), followed by a lookup in 
 the UNIX groups database and will expand to a list of all users 
@@ -7111,9 +7155,20 @@ Default: \fBno username map\fR
 
 Example: \fBusername map = /usr/local/samba/lib/users.map
 \fR.TP
+\fBuse sendfile (S)\fR
+If this parameter is yes, and Samba
+was built with the --with-sendfile-support option, and the underlying operating
+system supports sendfile system call, then some SMB read calls (mainly ReadAndX
+and ReadRaw) will use the more efficient sendfile system call for files that
+are exclusively oplocked. This may make more efficient use of the system CPU's
+and cause Samba to be faster. This is off by default as it's effects are unknown
+as yet.
+
+Default: \fBuse sendfile = no\fR
+.TP
 \fButmp (G)\fR
 This boolean parameter is only available if 
-Samba has been configured and compiled with the option \fB --with-utmp\fR. If set to true then Samba will attempt
+Samba has been configured and compiled with the option \fB --with-utmp\fR. If set to yes then Samba will attempt
 to add utmp or utmpx records (depending on the UNIX system) whenever a
 connection is made to a Samba server. Sites may use this to record the
 user connecting to a Samba share.
@@ -7329,7 +7384,7 @@ necessary to suppress the enumeration of users through the
 \fBgetpwent()\fR and
 \fBendpwent()\fR group of system calls. If
 the \fIwinbind enum users\fR parameter is
-false, calls to the \fBgetpwent\fR system call
+no, calls to the \fBgetpwent\fR system call
 will not return any data. 
 
 \fBWarning:\fR Turning off user
@@ -7348,7 +7403,7 @@ necessary to suppress the enumeration of groups through the
 \fBgetgrent()\fR and
 \fBendgrent()\fR group of system calls. If
 the \fIwinbind enum groups\fR parameter is
-false, calls to the \fBgetgrent()\fR system
+no, calls to the \fBgetgrent()\fR system
 call will not return any data. 
 
 \fBWarning:\fR Turning off group
@@ -7400,9 +7455,9 @@ Users without a domain component are treated as is part of the winbindd server's
 own domain. While this does not benifit Windows users, it makes SSH, FTP and e-mail 
 function in a way much closer to the way they would in a native unix system.
 
-Default: \fBwinbind use default domain = <falseg
+Default: \fBwinbind use default domain = <no
 \fR
-Example: \fBwinbind use default domain = true\fR
+Example: \fBwinbind use default domain = yes\fR
 .TP
 \fBwins hook (G)\fR
 When Samba is running as a WINS server this 
@@ -7479,9 +7534,9 @@ Example: \fBwins server = 192.9.200.1\fR
 \fBwins support (G)\fR
 This boolean controls if the  
 nmbd(8) process in Samba will act as a WINS server. You should 
-not set this to true unless you have a multi-subnetted network and 
+not set this to yes unless you have a multi-subnetted network and 
 you wish a particular \fBnmbd\fR to be your WINS server. 
-Note that you should \fBNEVER\fR set this to true
+Note that you should \fBNEVER\fR set this to yes
 on more than one machine in your network.
 
 Default: \fBwins support = no\fR
@@ -7528,7 +7583,7 @@ for a 256k cache size per file.
 \fBwrite list (S)\fR
 This is a list of users that are given read-write 
 access to a service. If the connecting user is in this list then 
-they will be given write access, no matter what the \fIwriteable\fR
+they will be given write access, no matter what the \fIread only\fR
 option is set to. The list can include group names using the 
 @group syntax.
 
@@ -7543,7 +7598,7 @@ Default: \fBwrite list = <empty string>
 Example: \fBwrite list = admin, root, @staff
 \fR.TP
 \fBwrite ok (S)\fR
-Synonym for \fI writeable\fR.
+Inverted synonym for \fI read only\fR.
 .TP
 \fBwrite raw (G)\fR
 This parameter controls whether or not the server 
@@ -7553,17 +7608,7 @@ You should never need to change this parameter.
 Default: \fBwrite raw = yes\fR
 .TP
 \fBwriteable (S)\fR
-An inverted synonym is  \fIread only\fR.
-
-If this parameter is no, then users 
-of a service may not create or modify files in the service's 
-directory.
-
-Note that a printable service (\fBprintable = yes\fR)
-will \fBALWAYS\fR allow writing to the directory 
-(user privileges permitting), but only via spooling operations.
-
-Default: \fBwriteable = no\fR
+Inverted synonym for \fI read only\fR.
 .SH "WARNINGS"
 .PP
 Although the configuration file permits service names 
index ea7eb57737edc45bf7263fe7ab6c7b0817d29192..ee36e48ef0df58874975032ca513261131e2ef41 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBCACLS" "1" "28 August 2002" "" ""
+.TH "SMBCACLS" "1" "03 September 2002" "" ""
 .SH NAME
 smbcacls \- Set or get ACLs on an NT file or directory names
 .SH SYNOPSIS
index 8ad27aad69f430bdda973283006b05cbe96532b9..bcc6a9185b5001b5c20878dcff340e06b0308157 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBCLIENT" "1" "28 August 2002" "" ""
+.TH "SMBCLIENT" "1" "03 September 2002" "" ""
 .SH NAME
 smbclient \- ftp-like client to access SMB/CIFS resources  on servers
 .SH SYNOPSIS
index 13af47fa01669668bd1fbc04333bf325388bcee8..2214b6f7ee5ae31589d741151043742fde181405 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBCONTROL" "1" "28 August 2002" "" ""
+.TH "SMBCONTROL" "1" "03 September 2002" "" ""
 .SH NAME
 smbcontrol \- send messages to smbd, nmbd or winbindd processes
 .SH SYNOPSIS
index b6fd01e1886550065147b5262ec670ca5d69979c..8b5a2b49d4a569337e0ae86826c317d4ac69599d 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBD" "8" "28 August 2002" "" ""
+.TH "SMBD" "8" "03 September 2002" "" ""
 .SH NAME
 smbd \- server to provide SMB/CIFS services to clients
 .SH SYNOPSIS
index e3d90cfa1a00e23aa430663dc2b675d355b8f3f6..c27e1b71991ec24810eadfa002b04d225a0d8a1a 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBMNT" "8" "28 August 2002" "" ""
+.TH "SMBMNT" "8" "03 September 2002" "" ""
 .SH NAME
 smbmnt \- helper utility for mounting SMB filesystems
 .SH SYNOPSIS
index a53606321f758a2fb4dbab5f007b061d187b2d51..6801c56383da04b3b2918498514f8f7cb5b33b5f 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBMOUNT" "8" "28 August 2002" "" ""
+.TH "SMBMOUNT" "8" "03 September 2002" "" ""
 .SH NAME
 smbmount \- mount an smbfs filesystem
 .SH SYNOPSIS
index 6d92f0f42f25e96c8e8669e4ce0b96d2baaa8693..58d918b17a2f9f051001a8299f6be57994be5a4b 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBPASSWD" "5" "28 August 2002" "" ""
+.TH "SMBPASSWD" "5" "03 September 2002" "" ""
 .SH NAME
 smbpasswd \- The Samba encrypted password file
 .SH SYNOPSIS
index a1341ed4d34adfd635ee4c8889c9a9a2014ccec8..9f7999fee405bcbf7e46c89f4fd01c37498564d3 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBPASSWD" "8" "28 August 2002" "" ""
+.TH "SMBPASSWD" "8" "03 September 2002" "" ""
 .SH NAME
 smbpasswd \- change a user's SMB password
 .SH SYNOPSIS
index a3e5fa205e7ebbaf2a92c739ca91b790dd2845dc..bf486aacdc37e2f59a304c9017db5a4942ce3009 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBSH" "1" "28 August 2002" "" ""
+.TH "SMBSH" "1" "03 September 2002" "" ""
 .SH NAME
 smbsh \- Allows access to Windows NT filesystem  using UNIX commands
 .SH SYNOPSIS
index 6c979f3ec8219fbf5663cf3e42c6c91e6d07617b..a734eb57aab2c9b110ba9bfb5a923118fd2b24f8 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBSPOOL" "8" "28 August 2002" "" ""
+.TH "SMBSPOOL" "8" "03 September 2002" "" ""
 .SH NAME
 smbspool \- send print file to an SMB printer
 .SH SYNOPSIS
index c0badbb348b5252ef2e40c688c695d743fc11547..5a1675f3f9fc9ddc3e60e0e3ed877c662523cced 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBSTATUS" "1" "28 August 2002" "" ""
+.TH "SMBSTATUS" "1" "03 September 2002" "" ""
 .SH NAME
 smbstatus \- report on current Samba connections
 .SH SYNOPSIS
index 833b0d358cd2ef53d56df04477f35b5e9c8ccddb..fe395d218b3d895d4fa6b930a0f397d6a40f80a6 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBTAR" "1" "28 August 2002" "" ""
+.TH "SMBTAR" "1" "03 September 2002" "" ""
 .SH NAME
 smbtar \- shell script for backing up SMB/CIFS shares  directly to UNIX tape drives
 .SH SYNOPSIS
index 32ef9c2f27f87f8106a70454ffa4d22763ec1584..d39303569153915eb59ceb9e99a39665452a083d 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBUMOUNT" "8" "28 August 2002" "" ""
+.TH "SMBUMOUNT" "8" "03 September 2002" "" ""
 .SH NAME
 smbumount \- smbfs umount for normal users
 .SH SYNOPSIS
index e328ee0ba9ab178a45f5a6da216a1e45c346927c..3c8e1e3a561b3735e202ae131ef856d36615ee1f 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SWAT" "8" "28 August 2002" "" ""
+.TH "SWAT" "8" "03 September 2002" "" ""
 .SH NAME
 swat \- Samba Web Administration Tool
 .SH SYNOPSIS
index dbc36175dd80c983ece6d5f6dc48902d2dc8924a..4bb60dcc43693c307e0a5f0d26c1d4031ce01396 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "TESTPARM" "1" "28 August 2002" "" ""
+.TH "TESTPARM" "1" "03 September 2002" "" ""
 .SH NAME
 testparm \- check an smb.conf configuration file for  internal correctness
 .SH SYNOPSIS
index 1337e090d55c3b38893f2dfffa6775ccb095cd7c..1183ecd3a391473ff419095b30d3fe0ff3adf918 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "TESTPRNS" "1" "28 August 2002" "" ""
+.TH "TESTPRNS" "1" "03 September 2002" "" ""
 .SH NAME
 testprns \- check printer name for validity with smbd
 .SH SYNOPSIS
index 9c1e44ea9dd1a9fb5e7a738c3e05f70a55cce372..0c176b17530b30e0525fa04364373e741e034235 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "WBINFO" "1" "28 August 2002" "" ""
+.TH "WBINFO" "1" "03 September 2002" "" ""
 .SH NAME
 wbinfo \- Query information from winbind daemon
 .SH SYNOPSIS
index a71a25febba1edb02d24b780c83959af268878d7..d47b3fb686c71f30fb93aa1195738ff25ee1f7f6 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "WINBINDD" "8" "28 August 2002" "" ""
+.TH "WINBINDD" "8" "03 September 2002" "" ""
 .SH NAME
 winbindd \- Name Service Switch daemon for resolving names  from NT servers
 .SH SYNOPSIS
index 61dface0a202d587b3af286273a867d8b95c0d14..f71c344e067607aadd2ef5c1171bcc1108d1630a 100644 (file)
@@ -142,11 +142,11 @@ objectclass ( 1.3.6.1.4.1.7165.2.2.3 NAME 'sambaAccount' SUP top AUXILIARY
 ##
 ## Used for Winbind experimentation
 ##
-objectclass ( 1.3.6.1.4.1.7165.1.2.2.3 NAME 'uidPool' SUP top AUXILIARY
-       DESC 'Pool for allocating UNIX uids'
-       MUST ( uidNumber $ cn ) )
+#objectclass ( 1.3.6.1.4.1.7165.1.2.2.3 NAME 'uidPool' SUP top AUXILIARY
+#      DESC 'Pool for allocating UNIX uids'
+#      MUST ( uidNumber $ cn ) )
 
-objectclass ( 1.3.6.1.4.1.7165.1.2.2.4 NAME 'gidPool' SUP top AUXILIARY
-       DESC 'Pool for allocating UNIX gids'
-       MUST ( gidNumber $ cn ) )
+#objectclass ( 1.3.6.1.4.1.7165.1.2.2.4 NAME 'gidPool' SUP top AUXILIARY
+#      DESC 'Pool for allocating UNIX gids'
+#      MUST ( gidNumber $ cn ) )
 
index aad483c295ae5ce12b3384e05e188ecb31a1e931..e2feedf83ba1ac284bbd44a2a3d8450fc5be4e44 100644 (file)
@@ -88,6 +88,7 @@ struct vfs_ops audit_ops = {
        NULL,                     /* read  */
        NULL,                     /* write */
        NULL,                     /* lseek */
+       NULL,                     /* sendfile */
        audit_rename,
        NULL,                     /* fsync */
        NULL,                     /* stat  */
index 7ced065bad69357a63e9d654fc86a2e123c6edc9..bdcc0b62c71383f7366ad8b46c4ffb6c3fdf0ddc 100644 (file)
@@ -81,6 +81,7 @@ struct vfs_ops execute_vfs_ops = {
        NULL,                                   /* read  */
        NULL,                                   /* write */
        NULL,                                   /* lseek */
+       NULL,                                   /* sendfile */
        NULL,                                   /* rename */
        NULL,                                   /* fsync */
        NULL,                                   /* stat  */
index 4d793395ce3a60788e2c44c3b8b7e6e56f3306d2..dc4cb1e855ab3945b74ad9330d8f2d006ac05ed6 100644 (file)
@@ -90,6 +90,7 @@ struct vfs_ops recycle_ops = {
        NULL,                           /* read  */
        NULL,                           /* write */
        NULL,                           /* lseek */
+       NULL,                           /* sendfile */
        NULL,                           /* rename */
        NULL,                           /* fsync */
        NULL,                           /* stat  */
@@ -154,8 +155,6 @@ static BOOL do_parameter(char *pszParmName, char *pszParmValue)
                if (current->recycle_bin == NULL)
                        return False;
                current->recycle_bin = safe_strcpy(current->recycle_bin,pszParmValue,sizeof(pstring));
-               standard_sub_basic(current->recycle_bin, strlen(current->recycle_bin));
-               trim_string(current->recycle_bin,"/","/");
                DEBUG(10, ("name=%s\n", current->recycle_bin));
        } else if (StrCaseCmp("mode",pszParmName)==0) {
                if (checkparam(pszParmValue,"KEEP_DIRECTORIES") == True)
@@ -256,6 +255,8 @@ static int recycle_connect(struct connection_struct *conn, const char *service,
                rc=pm_process( conf_file, do_section, do_parameter);
                DEBUG(10, ("pm_process returned %d\n", rc));
        }
+       standard_sub_conn( conn , current->recycle_bin,sizeof(pstring));
+       trim_string(current->recycle_bin,"/","/");
        conn->vfs_private= (void *)current;
        return 0;
 }
index bb5486e690b17ce7d886febbcd02e330894b72ef..e784ce8f1255f5e366bbd61b0e235dc4305f06c6 100644 (file)
@@ -104,6 +104,12 @@ static ssize_t skel_write(struct files_struct *fsp, int fd, const void *data, si
        return default_vfs_ops.write(fsp, fd, data, n);
 }
 
+static ssize_t skel_sendfile(int tofd, struct files_struct *fsp, int fromfd, const DATA_BLOB *hdr,
+               SMB_OFF_T offset, size_t n)
+{
+       return default_vfs_ops.sendfile(tofd, fsp, fromfd, hdr, offset, n);
+}
+
 static SMB_OFF_T skel_lseek(struct files_struct *fsp, int filedes, SMB_OFF_T offset, int whence)
 {
        return default_vfs_ops.lseek(fsp, filedes, offset, whence);
@@ -379,6 +385,7 @@ struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops)
        tmp_ops.read = skel_read;
        tmp_ops.write = skel_write;
        tmp_ops.lseek = skel_lseek;
+       tmp_ops.sendfile = skel_sendfile;
        tmp_ops.rename = skel_rename;
        tmp_ops.fsync = skel_fsync;
        tmp_ops.stat = skel_stat;
@@ -462,6 +469,7 @@ struct vfs_ops skel_ops = {
        skel_read,
        skel_write,
        skel_lseek,
+       skel_sendfile,
        skel_rename,
        skel_fsync,
        skel_stat,
index a6dea1f7405b4550df0abf4fda6d25578ec1436e..59910336bbac72d03d1e88c49f0ddb40b80a5666 100644 (file)
@@ -7,7 +7,7 @@ service swat
        port    = 901
        socket_type     = stream
        wait    = no
-       only_from = localhost
+       only_from = 127.0.0.1
        user    = root
        server  = /usr/sbin/swat
        log_on_failure  += USERID
index 5c0037388fc9cd1c44f630162da801aeb5b4cff1..42bb495cbc3fff09db66059d3267c8a39bcae9b3 100644 (file)
@@ -1,5 +1,5 @@
 %define ver 2.2.5
-%define rel 16mdk
+%define rel 17mdk
 %define vscanver 0.2.5c
 
 # 2.2.4 and 1 replace by samba-team at release
 %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)
 
+# We might have a prerelease:
+%define have_pre %(echo %pversion|awk '{p=0} /pre/ {p=1} {print p}')
+%if %have_pre
+%define pre_ver %(echo %pversion|sed -e 's/pre[0-9]//')
+%define pre_pre %(echo %pversion|sed -e 's/[0-9].[0-9].[0-9]//')
+%endif
+
+
 # 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).
 
 Summary: Samba SMB server.
 Name: samba
-%if %have_pversion
+%if %have_pversion && %have_pre
+Version: %{pre_ver}
+%define source_ver %{pversion}
+%endif
+%if %have_pversion && !%have_pre
 Version: %{pversion}
-%else
+%define source_ver %{pversion}
+%endif
+%if !%have_pversion
 Version: %{ver}
+%define source_ver %{ver}
 %endif
-%if %have_prelease
+%if %have_prelease && !%have_pre
 Release: 1.%{prelease}mdk
-%else
+%endif
+%if %have_prelease && %have_pre
+Release: 1.0.%{pre_pre}.%{prelease}mdk
+%endif
+%if !%have_prelease
 Release: %{rel}
 %endif
 License: GPL
 Group: System/Servers
-Source: ftp://samba.org/pub/samba/samba-%{version}.tar.bz2
+Source: ftp://samba.org/pub/samba/samba-%{source_ver}.tar.bz2
 Source1: samba.log
 Source2: mount.smb
 Source3: samba.xinetd
@@ -210,7 +229,7 @@ docs directory for implementation details.
 
 %if %build_non_default
 WARNING: This RPM was built with command-line options. Please
-see README.samba-%{ver}-%{rel} in the documentation for
+see README.samba-%{version}-%{release} in the documentation for
 more information.
 %endif
 
@@ -491,9 +510,9 @@ echo "This rpm was built with default options">%{SOURCE7}
 %endif
 
 %if %build_vscan
-%setup -q -a 8
+%setup -q -a 8 -n %{name}-%{source_ver}
 %else
-%setup -q
+%setup -q -n %{name}-%{source_ver}
 %endif
 #%patch111 -p1
 %patch1 -p1 -b .smbw
@@ -1102,7 +1121,7 @@ fi
 %defattr(-,root,root)
 %doc README COPYING Manifest Read-Manifest-Now
 %doc WHATSNEW.txt Roadmap
-%doc README.samba-%{ver}-%{rel}
+%doc README.samba-%{version}-%{release}
 %doc docs
 %doc examples
 %doc swat/README
@@ -1263,6 +1282,10 @@ fi
 %endif
 
 %changelog
+* Thu Sep 05 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.5-17mdk
+- changed localhost entry in /etc/xinetd.d/swat to 127.0.0.1
+  for resolving issue.
+
 * 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
index b30d479cacaf868716e5c5d9684f9ee70bd2c9a1..7339742957c96c6f3d21b3dd56857439a49bfa00 100644 (file)
@@ -117,7 +117,7 @@ TDB_OBJ = $(TDBBASE_OBJ) tdb/tdbutil.o
 LIB_OBJ = lib/charcnv.o lib/charset.o lib/debug.o lib/fault.o \
           lib/getsmbpass.o lib/interface.o lib/kanji.o lib/md4.o \
           lib/interfaces.o lib/pidfile.o lib/replace.o \
-          lib/signal.o lib/system.o lib/time.o \
+          lib/signal.o lib/system.o lib/sendfile.o lib/time.o \
          lib/ufc.o lib/genrand.o lib/username.o lib/util_getent.o lib/access.o lib/smbrun.o \
          lib/bitmap.o lib/crc32.o lib/snprintf.o lib/wins_srv.o \
          lib/util_str.o lib/util_sid.o \
@@ -142,7 +142,8 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
                libsmb/nterr.o libsmb/smbdes.o libsmb/smbencrypt.o \
                libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \
                libsmb/clioplock.o libsmb/errormap.o libsmb/doserr.o \
-               libsmb/passchange.o libsmb/unexpected.o $(RPC_PARSE_OBJ1)
+               libsmb/passchange.o libsmb/unexpected.o $(RPC_PARSE_OBJ1) \
+               libsmb/namecache.o
 
 LIBMSRPC_OBJ = libsmb/cli_lsarpc.o libsmb/cli_samr.o libsmb/cli_spoolss.o \
                                libsmb/cli_netlogon.o libsmb/cli_srvsvc.o libsmb/cli_dfs.o \
index 6fa2f96b26ac4098a73ff3510aa7b28b0dcdd1e1..5ec7ad2c5d07386f1fc14e1ed608888970d9943d 100644 (file)
 #undef HAVE_PASSWD_PW_AGE
 #undef HAVE_STAT_ST_BLKSIZE
 #undef WITH_WINBIND_AUTH_CRAP
+#undef WITH_HORRIBLE_LDAP_NATIVE_MODE_HACK
 
 /*
  * Add these definitions to allow VFS modules to
 #ifndef _GNU_SOURCE
 #undef _GNU_SOURCE
 #endif
+#undef HAVE_SENDFILE
+#undef HAVE_SENDFILE64
+#undef LINUX_SENDFILE_API
+#undef LINUX_BROKEN_SENDFILE_API
+#undef WITH_SENDFILE
+#undef FREEBSD_SENDFILE_API
+#undef HPUX_SENDFILE_API
+#undef HAVE_SENDFILEV
+#undef HAVE_SENDFILEV64
+#undef SOLARIS_SENDFILE_API
index b620064195c06b5b4f0f3155fe172942595a2445..3c586fa2d3abea9c2569b2c1d6890a87e1631a5a 100644 (file)
@@ -2422,8 +2422,9 @@ static int do_tar_op(char *base_directory)
 }
 
 /****************************************************************************
-handle a message operation
+ Handle a message operation.
 ****************************************************************************/
+
 static int do_message_op(void)
 {
        struct in_addr ip;
@@ -2435,7 +2436,15 @@ static int do_message_op(void)
        make_nmb_name(&called , desthost, name_type);
 
        zero_ip(&ip);
-       if (have_ip) ip = dest_ip;
+       if (have_ip)
+               ip = dest_ip;
+       else if (name_type != 0x20) {
+               /* We must do our own resolve name here as the nametype is #0x3, not #0x20. */
+               if (!resolve_name(desthost, &ip, name_type)) {
+                       DEBUG(0,("Cannot resolve name %s#0x%x\n", desthost, name_type));
+                       return 1;
+               }
+       }
 
        if (!(cli=cli_initialise(NULL)) || (cli_set_port(cli, port) == 0) || !cli_connect(cli, desthost, &ip)) {
                DEBUG(0,("Connection to %s failed\n", desthost));
index 983ad44fa0f6619cfdf72877e54640f6d43cdb4b..20b6820fb761a8eeb0baa398a909eb3cd63ac507 100644 (file)
@@ -31,6 +31,7 @@ static void
 usage(void)
 {
         printf("usage: smbumount mountpoint\n");
+       printf("Version: %s\n", VERSION);
 }
 
 static int
index b3bbea962ec5a1334a7a8f0a5cdab80262afd43d..e139d52cab8501442df85ff7901b6763efa94184 100755 (executable)
@@ -80,10 +80,14 @@ ac_help="$ac_help
   --with-spinlocks        Use spin locks instead of fcntl locks (default=no)"
 ac_help="$ac_help
   --with-acl-support      Include ACL support (default=no)"
+ac_help="$ac_help
+  --with-sendfile-support      Check for sendfile support (default=no)"
 ac_help="$ac_help
   --with-winbind          Build winbind (default, if supported by OS)"
 ac_help="$ac_help
   --with-winbind-auth-challenge   Enable winbindd_pam_auth_crap() functionality (default no)"
+ac_help="$ac_help
+  --with-winbind-ldap-hack   Enable winbindd_ldap_hack() functionality (default no)"
 ac_help="$ac_help
   --with-included-popt    use bundled popt library, not from system"
 
@@ -804,7 +808,7 @@ fi
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:808: checking for $ac_word" >&5
+echo "configure:812: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -834,7 +838,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:838: checking for $ac_word" >&5
+echo "configure:842: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -885,7 +889,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:889: checking for $ac_word" >&5
+echo "configure:893: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -917,7 +921,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:921: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:925: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -928,12 +932,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 932 "configure"
+#line 936 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -959,12 +963,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:963: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:967: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:968: checking whether we are using GNU C" >&5
+echo "configure:972: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -973,7 +977,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -992,7 +996,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:996: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1000: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1054,7 +1058,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1058: checking for a BSD compatible install" >&5
+echo "configure:1062: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1111,7 +1115,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1115: checking for $ac_word" >&5
+echo "configure:1119: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1142,7 +1146,7 @@ done
 
 LD=ld
 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1146: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1150: checking if the linker ($LD) is GNU ld" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1159,7 +1163,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
 # Extract the first word of "passwd", so it can be a program name with args.
 set dummy passwd; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1163: checking for $ac_word" >&5
+echo "configure:1167: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_passwd_program'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1196,10 +1200,10 @@ fi
 
 if test "x$CC" != xcc; then
   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
-echo "configure:1200: checking whether $CC and cc understand -c and -o together" >&5
+echo "configure:1204: checking whether $CC and cc understand -c and -o together" >&5
 else
   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:1203: checking whether cc understands -c and -o together" >&5
+echo "configure:1207: checking whether cc understands -c and -o together" >&5
 fi
 set dummy $CC; ac_cc="`echo $2 |
                       sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
@@ -1211,16 +1215,16 @@ else
 # We do the test twice because some compilers refuse to overwrite an
 # existing .o file with -o, though they will create one.
 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
-if { (eval echo configure:1215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
-   test -f conftest.o && { (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+if { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+   test -f conftest.o && { (eval echo configure:1220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
 then
   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
   if test "x$CC" != xcc; then
     # Test first that cc exists at all.
-    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
       ac_try='cc -c conftest.c -o conftest.o 1>&5'
-      if { (eval echo configure:1223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
-        test -f conftest.o && { (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+      if { (eval echo configure:1227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+        test -f conftest.o && { (eval echo configure:1228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
       then
         # cc works too.
         :
@@ -1254,20 +1258,20 @@ fi
 
 
 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
-echo "configure:1258: checking that the C compiler understands volatile" >&5
+echo "configure:1262: checking that the C compiler understands volatile" >&5
 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 1264 "configure"
+#line 1268 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int main() {
 volatile int i = 0
 ; return 0; }
 EOF
-if { (eval echo configure:1271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_volatile=yes
 else
@@ -1317,7 +1321,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1321: checking host system type" >&5
+echo "configure:1325: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1338,7 +1342,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1342: checking target system type" >&5
+echo "configure:1346: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1356,7 +1360,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1360: checking build system type" >&5
+echo "configure:1364: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1390,7 +1394,7 @@ esac
 
     
     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
-echo "configure:1394: checking config.cache system type" >&5
+echo "configure:1398: checking config.cache system type" >&5
     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
          test x"$ac_cv_host_system_type" != x"$host"; } ||
        { test x"${ac_cv_build_system_type+set}" = x"set" &&
@@ -1417,7 +1421,7 @@ case "$host_os" in
 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
     *hpux*)
       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
-echo "configure:1421: checking whether ${CC-cc} accepts -Ae" >&5
+echo "configure:1425: checking whether ${CC-cc} accepts -Ae" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1579,14 +1583,14 @@ EOF
     *sysv4*)
       if test $host = mips-sni-sysv4 ; then
         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
-echo "configure:1583: checking for LFS support" >&5
+echo "configure:1587: checking for LFS support" >&5
         old_CPPFLAGS="$CPPFLAGS"
         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
         if test "$cross_compiling" = yes; then
   SINIX_LFS_SUPPORT=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 1590 "configure"
+#line 1594 "configure"
 #include "confdefs.h"
 
 #include <unistd.h>
@@ -1598,7 +1602,7 @@ exit(1);
 #endif
 }
 EOF
-if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   SINIX_LFS_SUPPORT=yes
 else
@@ -1629,14 +1633,14 @@ EOF
 #
     *linux*)
         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
-echo "configure:1633: checking for LFS support" >&5
+echo "configure:1637: checking for LFS support" >&5
         old_CPPFLAGS="$CPPFLAGS"
         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
        if test "$cross_compiling" = yes; then
   LINUX_LFS_SUPPORT=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 1640 "configure"
+#line 1644 "configure"
 #include "confdefs.h"
 
 #include <unistd.h>
@@ -1674,7 +1678,7 @@ main() {
 }
 
 EOF
-if { (eval echo configure:1678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   LINUX_LFS_SUPPORT=yes
 else
@@ -1707,14 +1711,14 @@ EOF
 
     *hurd*)
         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
-echo "configure:1711: checking for LFS support" >&5
+echo "configure:1715: checking for LFS support" >&5
         old_CPPFLAGS="$CPPFLAGS"
         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
         if test "$cross_compiling" = yes; then
   GLIBC_LFS_SUPPORT=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 1718 "configure"
+#line 1722 "configure"
 #include "confdefs.h"
 
 #include <unistd.h>
@@ -1726,7 +1730,7 @@ exit(1);
 #endif
 }
 EOF
-if { (eval echo configure:1730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   GLIBC_LFS_SUPPORT=yes
 else
@@ -1756,21 +1760,21 @@ EOF
 esac
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1760: checking for inline" >&5
+echo "configure:1764: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 1767 "configure"
+#line 1771 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1796,7 +1800,7 @@ EOF
 esac
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1800: checking how to run the C preprocessor" >&5
+echo "configure:1804: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1811,13 +1815,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1815 "configure"
+#line 1819 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1828,13 +1832,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1832 "configure"
+#line 1836 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1845,13 +1849,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1849 "configure"
+#line 1853 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1876,12 +1880,12 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1880: checking for ANSI C header files" >&5
+echo "configure:1884: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1885 "configure"
+#line 1889 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1889,7 +1893,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1906,7 +1910,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1910 "configure"
+#line 1914 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1924,7 +1928,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1928 "configure"
+#line 1932 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1945,7 +1949,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1949 "configure"
+#line 1953 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1956,7 +1960,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1984,12 +1988,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1988: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1992: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1993 "configure"
+#line 1997 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -1997,7 +2001,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -2022,7 +2026,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:2026: checking for opendir in -ldir" >&5
+echo "configure:2030: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2030,7 +2034,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2034 "configure"
+#line 2038 "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
@@ -2041,7 +2045,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:2045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2049: \"$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
@@ -2063,7 +2067,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:2067: checking for opendir in -lx" >&5
+echo "configure:2071: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2071,7 +2075,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2075 "configure"
+#line 2079 "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
@@ -2082,7 +2086,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2090: \"$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
@@ -2105,12 +2109,12 @@ fi
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2109: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2113: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2114 "configure"
+#line 2118 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2119,7 +2123,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:2123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -2140,12 +2144,12 @@ EOF
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:2144: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:2148: checking for sys/wait.h that is POSIX.1 compatible" >&5
 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2149 "configure"
+#line 2153 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -2161,7 +2165,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:2165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -2185,17 +2189,17 @@ for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2189: checking for $ac_hdr" >&5
+echo "configure:2193: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2194 "configure"
+#line 2198 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2225,17 +2229,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2229: checking for $ac_hdr" >&5
+echo "configure:2233: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2234 "configure"
+#line 2238 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2265,17 +2269,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2269: checking for $ac_hdr" >&5
+echo "configure:2273: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2274 "configure"
+#line 2278 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2305,17 +2309,17 @@ for ac_hdr in stdlib.h string.h strings.h syslog.h sys/file.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2309: checking for $ac_hdr" >&5
+echo "configure:2313: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2314 "configure"
+#line 2318 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2345,17 +2349,17 @@ for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_hdr" >&5
+echo "configure:2353: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2354 "configure"
+#line 2358 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2385,17 +2389,17 @@ for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h sys/socket.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2389: checking for $ac_hdr" >&5
+echo "configure:2393: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2394 "configure"
+#line 2398 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2425,17 +2429,17 @@ for ac_hdr in syslog.h sys/syslog.h sys/mount.h sys/vfs.h sys/fs/s5param.h sys/f
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2429: checking for $ac_hdr" >&5
+echo "configure:2433: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2434 "configure"
+#line 2438 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2465,17 +2469,17 @@ for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2469: checking for $ac_hdr" >&5
+echo "configure:2473: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2474 "configure"
+#line 2478 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2505,17 +2509,17 @@ for ac_hdr in security/pam_modules.h security/_pam_macros.h dlfcn.h synch.h pthr
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2509: checking for $ac_hdr" >&5
+echo "configure:2513: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2514 "configure"
+#line 2518 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2549,14 +2553,14 @@ done
 case "$host_os" in
     *hpux*)
                cat > conftest.$ac_ext <<EOF
-#line 2553 "configure"
+#line 2557 "configure"
 #include "confdefs.h"
 #include <shadow.h>
 int main() {
 struct spwd testme
 ; return 0; }
 EOF
-if { (eval echo configure:2560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_shadow_h=yes
 else
@@ -2578,17 +2582,17 @@ for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2582: checking for $ac_hdr" >&5
+echo "configure:2586: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2587 "configure"
+#line 2591 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2618,17 +2622,17 @@ for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h sec
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2622: checking for $ac_hdr" >&5
+echo "configure:2626: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2627 "configure"
+#line 2631 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2658,17 +2662,17 @@ for ac_hdr in stropts.h poll.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2662: checking for $ac_hdr" >&5
+echo "configure:2666: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2667 "configure"
+#line 2671 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2698,17 +2702,17 @@ for ac_hdr in sys/capability.h syscall.h sys/syscall.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2702: checking for $ac_hdr" >&5
+echo "configure:2706: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2707 "configure"
+#line 2711 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2738,17 +2742,17 @@ for ac_hdr in sys/acl.h sys/cdefs.h glob.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2742: checking for $ac_hdr" >&5
+echo "configure:2746: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2747 "configure"
+#line 2751 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2780,17 +2784,17 @@ for ac_hdr in utmp.h utmpx.h lastlog.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2784: checking for $ac_hdr" >&5
+echo "configure:2788: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2789 "configure"
+#line 2793 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2822,17 +2826,17 @@ for ac_hdr in sys/fs/vx_quota.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2826: checking for $ac_hdr" >&5
+echo "configure:2830: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2831 "configure"
+#line 2835 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2864,17 +2868,17 @@ for ac_hdr in linux/xqm.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2868: checking for $ac_hdr" >&5
+echo "configure:2872: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2873 "configure"
+#line 2877 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2902,7 +2906,7 @@ done
 
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:2906: checking size of int" >&5
+echo "configure:2910: checking size of int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2910,7 +2914,7 @@ else
   ac_cv_sizeof_int=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 2914 "configure"
+#line 2918 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main()
@@ -2921,7 +2925,7 @@ int main()
   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
+if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -2941,7 +2945,7 @@ EOF
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2945: checking size of long" >&5
+echo "configure:2949: checking size of long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2949,7 +2953,7 @@ else
   ac_cv_sizeof_long=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 2953 "configure"
+#line 2957 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main()
@@ -2960,7 +2964,7 @@ int main()
   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
+if { (eval echo configure:2968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -2980,7 +2984,7 @@ EOF
 
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:2984: checking size of short" >&5
+echo "configure:2988: checking size of short" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2988,7 +2992,7 @@ else
   ac_cv_sizeof_short=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 2992 "configure"
+#line 2996 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main()
@@ -2999,7 +3003,7 @@ int main()
   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
+if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -3020,12 +3024,12 @@ EOF
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3024: checking for working const" >&5
+echo "configure:3028: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3029 "configure"
+#line 3033 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -3074,7 +3078,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:3078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -3095,21 +3099,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3099: checking for inline" >&5
+echo "configure:3103: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 3106 "configure"
+#line 3110 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:3113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -3135,14 +3139,14 @@ EOF
 esac
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3139: checking whether byte ordering is bigendian" >&5
+echo "configure:3143: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 3146 "configure"
+#line 3150 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3153,11 +3157,11 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 3161 "configure"
+#line 3165 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3168,7 +3172,7 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3188,7 +3192,7 @@ if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3192 "configure"
+#line 3196 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3201,7 +3205,7 @@ main () {
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -3225,14 +3229,14 @@ EOF
 fi
 
 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:3229: checking whether char is unsigned" >&5
+echo "configure:3233: checking whether char is unsigned" >&5
 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$GCC" = yes; then
   # GCC predefines this symbol on systems where it applies.
 cat > conftest.$ac_ext <<EOF
-#line 3236 "configure"
+#line 3240 "configure"
 #include "confdefs.h"
 #ifdef __CHAR_UNSIGNED__
   yes
@@ -3254,7 +3258,7 @@ if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3258 "configure"
+#line 3262 "configure"
 #include "confdefs.h"
 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
 #if !defined(__STDC__) || __STDC__ != 1
@@ -3264,7 +3268,7 @@ main() {
   volatile char c = 255; exit(c < 0);
 }
 EOF
-if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_char_unsigned=yes
 else
@@ -3289,12 +3293,12 @@ fi
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3293: checking return type of signal handlers" >&5
+echo "configure:3297: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3298 "configure"
+#line 3302 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3311,7 +3315,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3330,12 +3334,12 @@ EOF
 
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3334: checking for uid_t in sys/types.h" >&5
+echo "configure:3338: checking for uid_t in sys/types.h" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3339 "configure"
+#line 3343 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -3364,12 +3368,12 @@ EOF
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3368: checking for mode_t" >&5
+echo "configure:3372: checking for mode_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3373 "configure"
+#line 3377 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3397,12 +3401,12 @@ EOF
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3401: checking for off_t" >&5
+echo "configure:3405: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3406 "configure"
+#line 3410 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3430,12 +3434,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3434: checking for size_t" >&5
+echo "configure:3438: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3439 "configure"
+#line 3443 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3463,12 +3467,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3467: checking for pid_t" >&5
+echo "configure:3471: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3472 "configure"
+#line 3476 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3496,12 +3500,12 @@ EOF
 fi
 
 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:3500: checking for st_rdev in struct stat" >&5
+echo "configure:3504: checking for st_rdev in struct stat" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3505 "configure"
+#line 3509 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -3509,7 +3513,7 @@ int main() {
 struct stat s; s.st_rdev;
 ; return 0; }
 EOF
-if { (eval echo configure:3513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_st_rdev=yes
 else
@@ -3530,12 +3534,12 @@ EOF
 fi
 
 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
-echo "configure:3534: checking for d_off in dirent" >&5
+echo "configure:3538: checking for d_off in dirent" >&5
 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3539 "configure"
+#line 3543 "configure"
 #include "confdefs.h"
 
 #include <unistd.h>
@@ -3545,7 +3549,7 @@ int main() {
 struct dirent d; d.d_off;
 ; return 0; }
 EOF
-if { (eval echo configure:3549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_dirent_d_off=yes
 else
@@ -3566,12 +3570,12 @@ EOF
 fi
 
 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
-echo "configure:3570: checking for ino_t" >&5
+echo "configure:3574: checking for ino_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3575 "configure"
+#line 3579 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3599,12 +3603,12 @@ EOF
 fi
 
 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
-echo "configure:3603: checking for loff_t" >&5
+echo "configure:3607: checking for loff_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3608 "configure"
+#line 3612 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3632,12 +3636,12 @@ EOF
 fi
 
 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
-echo "configure:3636: checking for offset_t" >&5
+echo "configure:3640: checking for offset_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3641 "configure"
+#line 3645 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3665,12 +3669,12 @@ EOF
 fi
 
 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:3669: checking for ssize_t" >&5
+echo "configure:3673: checking for ssize_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3674 "configure"
+#line 3678 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3698,12 +3702,12 @@ EOF
 fi
 
 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
-echo "configure:3702: checking for wchar_t" >&5
+echo "configure:3706: checking for wchar_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3707 "configure"
+#line 3711 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3745,7 +3749,7 @@ if test x$enable_cups != xno; then
        # Extract the first word of "cups-config", so it can be a program name with args.
 set dummy cups-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3749: checking for $ac_word" >&5
+echo "configure:3753: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3794,12 +3798,12 @@ fi
 for ac_func in dlopen
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3798: checking for $ac_func" >&5
+echo "configure:3802: 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 3803 "configure"
+#line 3807 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3822,7 +3826,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3830: \"$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
@@ -3848,7 +3852,7 @@ done
 
 if test x"$ac_cv_func_dlopen" = x"no"; then
        echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:3852: checking for dlopen in -ldl" >&5
+echo "configure:3856: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3856,7 +3860,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3860 "configure"
+#line 3864 "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
@@ -3867,7 +3871,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:3871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3875: \"$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
@@ -3897,13 +3901,13 @@ fi
 ############################################
 # check if the compiler can do immediate structures
 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
-echo "configure:3901: checking for immediate structures" >&5
+echo "configure:3905: checking for immediate structures" >&5
 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 3907 "configure"
+#line 3911 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -3921,7 +3925,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_immediate_structures=yes
 else
@@ -3944,13 +3948,13 @@ fi
 ############################################
 # check for unix domain sockets
 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
-echo "configure:3948: checking for unix domain sockets" >&5
+echo "configure:3952: checking for unix domain sockets" >&5
 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 3954 "configure"
+#line 3958 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -3965,7 +3969,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_unixsocket=yes
 else
@@ -3986,13 +3990,13 @@ EOF
 fi
 
 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
-echo "configure:3990: checking for socklen_t type" >&5
+echo "configure:3994: checking for socklen_t type" >&5
 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 3996 "configure"
+#line 4000 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4005,7 +4009,7 @@ int main() {
 socklen_t i = 0
 ; return 0; }
 EOF
-if { (eval echo configure:4009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_socklen_t=yes
 else
@@ -4026,13 +4030,13 @@ EOF
 fi
 
 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
-echo "configure:4030: checking for sig_atomic_t type" >&5
+echo "configure:4034: checking for sig_atomic_t type" >&5
 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 4036 "configure"
+#line 4040 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4045,7 +4049,7 @@ int main() {
 sig_atomic_t i = 0
 ; return 0; }
 EOF
-if { (eval echo configure:4049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_sig_atomic_t=yes
 else
@@ -4068,20 +4072,20 @@ fi
 # stupid headers have the functions but no declaration. grrrr.
 
  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
-echo "configure:4072: checking for errno declaration" >&5
+echo "configure:4076: checking for errno declaration" >&5
 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 4078 "configure"
+#line 4082 "configure"
 #include "confdefs.h"
 #include <errno.h>
 int main() {
 int i = (int)errno
 ; return 0; }
 EOF
-if { (eval echo configure:4085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_errno_decl=yes
 else
@@ -4103,20 +4107,20 @@ EOF
 
 
  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
-echo "configure:4107: checking for setresuid declaration" >&5
+echo "configure:4111: checking for setresuid declaration" >&5
 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 4113 "configure"
+#line 4117 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 int main() {
 int i = (int)setresuid
 ; return 0; }
 EOF
-if { (eval echo configure:4120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_setresuid_decl=yes
 else
@@ -4138,20 +4142,20 @@ EOF
 
 
  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
-echo "configure:4142: checking for setresgid declaration" >&5
+echo "configure:4146: checking for setresgid declaration" >&5
 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 4148 "configure"
+#line 4152 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 int main() {
 int i = (int)setresgid
 ; return 0; }
 EOF
-if { (eval echo configure:4155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_setresgid_decl=yes
 else
@@ -4173,20 +4177,20 @@ EOF
 
 
  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
-echo "configure:4177: checking for asprintf declaration" >&5
+echo "configure:4181: checking for asprintf declaration" >&5
 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 4183 "configure"
+#line 4187 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 int i = (int)asprintf
 ; return 0; }
 EOF
-if { (eval echo configure:4190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_asprintf_decl=yes
 else
@@ -4208,20 +4212,20 @@ EOF
 
 
  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
-echo "configure:4212: checking for vasprintf declaration" >&5
+echo "configure:4216: checking for vasprintf declaration" >&5
 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 4218 "configure"
+#line 4222 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 int i = (int)vasprintf
 ; return 0; }
 EOF
-if { (eval echo configure:4225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_vasprintf_decl=yes
 else
@@ -4243,20 +4247,20 @@ EOF
 
 
  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
-echo "configure:4247: checking for vsnprintf declaration" >&5
+echo "configure:4251: checking for vsnprintf declaration" >&5
 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 4253 "configure"
+#line 4257 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 int i = (int)vsnprintf
 ; return 0; }
 EOF
-if { (eval echo configure:4260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_vsnprintf_decl=yes
 else
@@ -4278,20 +4282,20 @@ EOF
 
 
  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
-echo "configure:4282: checking for snprintf declaration" >&5
+echo "configure:4286: checking for snprintf declaration" >&5
 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 4288 "configure"
+#line 4292 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 int i = (int)snprintf
 ; return 0; }
 EOF
-if { (eval echo configure:4295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_snprintf_decl=yes
 else
@@ -4315,7 +4319,7 @@ EOF
 # and glibc has setresuid under linux but the function does
 # nothing until kernel 2.1.44! very dumb.
 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
-echo "configure:4319: checking for real setresuid" >&5
+echo "configure:4323: checking for real setresuid" >&5
 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4324,12 +4328,12 @@ else
   samba_cv_have_setresuid=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 4328 "configure"
+#line 4332 "configure"
 #include "confdefs.h"
 #include <errno.h>
 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
 EOF
-if { (eval echo configure:4333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   samba_cv_have_setresuid=yes
 else
@@ -4354,7 +4358,7 @@ fi
 # Do the same check for setresguid...
 #
 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
-echo "configure:4358: checking for real setresgid" >&5
+echo "configure:4362: checking for real setresgid" >&5
 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4363,13 +4367,13 @@ else
   samba_cv_have_setresgid=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 4367 "configure"
+#line 4371 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 #include <errno.h>
 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
 EOF
-if { (eval echo configure:4373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   samba_cv_have_setresgid=yes
 else
@@ -4392,7 +4396,7 @@ EOF
 fi
 
 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:4396: checking for 8-bit clean memcmp" >&5
+echo "configure:4400: checking for 8-bit clean memcmp" >&5
 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4400,7 +4404,7 @@ else
   ac_cv_func_memcmp_clean=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 4404 "configure"
+#line 4408 "configure"
 #include "confdefs.h"
 
 main()
@@ -4410,7 +4414,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:4414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_memcmp_clean=yes
 else
@@ -4434,7 +4438,7 @@ test "${with_readline+set}" != "set" && with_readline=yes
 
 # test for where we get readline() from
 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
-echo "configure:4438: checking whether to use readline" >&5
+echo "configure:4442: checking whether to use readline" >&5
 # Check whether --with-readline or --without-readline was given.
 if test "${with_readline+set}" = set; then
   withval="$with_readline"
@@ -4446,17 +4450,17 @@ if test "${with_readline+set}" = set; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4450: checking for $ac_hdr" >&5
+echo "configure:4454: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4455 "configure"
+#line 4459 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4486,17 +4490,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4490: checking for $ac_hdr" >&5
+echo "configure:4494: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4495 "configure"
+#line 4499 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4527,17 +4531,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4531: checking for $ac_hdr" >&5
+echo "configure:4535: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4536 "configure"
+#line 4540 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4560,7 +4564,7 @@ EOF
  
       for termlib in ncurses curses termcap terminfo termlib; do
        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
-echo "configure:4564: checking for tgetent in -l${termlib}" >&5
+echo "configure:4568: checking for tgetent in -l${termlib}" >&5
 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4568,7 +4572,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l${termlib}  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4572 "configure"
+#line 4576 "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
@@ -4579,7 +4583,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:4583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4587: \"$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
@@ -4601,7 +4605,7 @@ fi
 
       done
       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
-echo "configure:4605: checking for rl_callback_handler_install in -lreadline" >&5
+echo "configure:4609: checking for rl_callback_handler_install in -lreadline" >&5
 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4609,7 +4613,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lreadline $TERMLIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4613 "configure"
+#line 4617 "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
@@ -4620,7 +4624,7 @@ int main() {
 rl_callback_handler_install()
 ; return 0; }
 EOF
-if { (eval echo configure:4624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4628: \"$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
@@ -4671,17 +4675,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4675: checking for $ac_hdr" >&5
+echo "configure:4679: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4680 "configure"
+#line 4684 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4711,17 +4715,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4715: checking for $ac_hdr" >&5
+echo "configure:4719: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4720 "configure"
+#line 4724 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4752,17 +4756,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4756: checking for $ac_hdr" >&5
+echo "configure:4760: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4761 "configure"
+#line 4765 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4785,7 +4789,7 @@ EOF
  
       for termlib in ncurses curses termcap terminfo termlib; do
        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
-echo "configure:4789: checking for tgetent in -l${termlib}" >&5
+echo "configure:4793: checking for tgetent in -l${termlib}" >&5
 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4793,7 +4797,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l${termlib}  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4797 "configure"
+#line 4801 "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
@@ -4804,7 +4808,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4812: \"$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
@@ -4826,7 +4830,7 @@ fi
 
       done
       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
-echo "configure:4830: checking for rl_callback_handler_install in -lreadline" >&5
+echo "configure:4834: checking for rl_callback_handler_install in -lreadline" >&5
 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4834,7 +4838,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lreadline $TERMLIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4838 "configure"
+#line 4842 "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
@@ -4845,7 +4849,7 @@ int main() {
 rl_callback_handler_install()
 ; return 0; }
 EOF
-if { (eval echo configure:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4853: \"$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
@@ -4900,12 +4904,12 @@ fi
 for ac_func in connect
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4904: checking for $ac_func" >&5
+echo "configure:4908: 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 4909 "configure"
+#line 4913 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4928,7 +4932,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4936: \"$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
@@ -4956,7 +4960,7 @@ if test x"$ac_cv_func_connect" = x"no"; then
     case "$LIBS" in
     *-lnsl*) ;;
     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
-echo "configure:4960: checking for printf in -lnsl_s" >&5
+echo "configure:4964: checking for printf in -lnsl_s" >&5
 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4964,7 +4968,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl_s  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4968 "configure"
+#line 4972 "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
@@ -4975,7 +4979,7 @@ int main() {
 printf()
 ; return 0; }
 EOF
-if { (eval echo configure:4979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4983: \"$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
@@ -5006,7 +5010,7 @@ fi
     case "$LIBS" in
     *-lnsl*) ;;
     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
-echo "configure:5010: checking for printf in -lnsl" >&5
+echo "configure:5014: checking for printf in -lnsl" >&5
 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5014,7 +5018,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5018 "configure"
+#line 5022 "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
@@ -5025,7 +5029,7 @@ int main() {
 printf()
 ; return 0; }
 EOF
-if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5033: \"$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
@@ -5056,7 +5060,7 @@ fi
     case "$LIBS" in
     *-lsocket*) ;;
     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:5060: checking for connect in -lsocket" >&5
+echo "configure:5064: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5064,7 +5068,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5068 "configure"
+#line 5072 "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
@@ -5075,7 +5079,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:5079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5083: \"$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
@@ -5106,7 +5110,7 @@ fi
     case "$LIBS" in
     *-linet*) ;;
     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
-echo "configure:5110: checking for connect in -linet" >&5
+echo "configure:5114: checking for connect in -linet" >&5
 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5114,7 +5118,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-linet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5118 "configure"
+#line 5122 "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
@@ -5125,7 +5129,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:5129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5133: \"$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
@@ -5169,12 +5173,12 @@ fi
 for ac_func in yp_get_default_domain
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5173: checking for $ac_func" >&5
+echo "configure:5177: 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 5178 "configure"
+#line 5182 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5197,7 +5201,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5205: \"$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
@@ -5223,7 +5227,7 @@ done
 
 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
        echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
-echo "configure:5227: checking for yp_get_default_domain in -lnsl" >&5
+echo "configure:5231: checking for yp_get_default_domain in -lnsl" >&5
 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5231,7 +5235,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5235 "configure"
+#line 5239 "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
@@ -5242,7 +5246,7 @@ int main() {
 yp_get_default_domain()
 ; return 0; }
 EOF
-if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5250: \"$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
@@ -5272,12 +5276,12 @@ fi
 for ac_func in execl
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5276: checking for $ac_func" >&5
+echo "configure:5280: 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 5281 "configure"
+#line 5285 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5300,7 +5304,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5308: \"$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
@@ -5333,12 +5337,12 @@ fi
 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5337: checking for $ac_func" >&5
+echo "configure:5341: 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 5342 "configure"
+#line 5346 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5361,7 +5365,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5369: \"$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
@@ -5388,12 +5392,12 @@ done
 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid mknod mknod64
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5392: checking for $ac_func" >&5
+echo "configure:5396: 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 5397 "configure"
+#line 5401 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5416,7 +5420,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5424: \"$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
@@ -5443,12 +5447,12 @@ done
 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5447: checking for $ac_func" >&5
+echo "configure:5451: 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 5452 "configure"
+#line 5456 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5471,7 +5475,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5479: \"$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
@@ -5498,12 +5502,12 @@ done
 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5502: checking for $ac_func" >&5
+echo "configure:5506: 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 5507 "configure"
+#line 5511 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5526,7 +5530,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5534: \"$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
@@ -5553,12 +5557,12 @@ done
 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5557: checking for $ac_func" >&5
+echo "configure:5561: 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 5562 "configure"
+#line 5566 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5581,7 +5585,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5589: \"$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
@@ -5608,12 +5612,12 @@ done
 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5612: checking for $ac_func" >&5
+echo "configure:5616: 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 5617 "configure"
+#line 5621 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5636,7 +5640,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5644: \"$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
@@ -5663,12 +5667,12 @@ done
 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5667: checking for $ac_func" >&5
+echo "configure:5671: 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 5672 "configure"
+#line 5676 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5691,7 +5695,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5699: \"$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
@@ -5718,12 +5722,12 @@ done
 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5722: checking for $ac_func" >&5
+echo "configure:5726: 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 5727 "configure"
+#line 5731 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5746,7 +5750,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5754: \"$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
@@ -5773,12 +5777,12 @@ done
 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5777: checking for $ac_func" >&5
+echo "configure:5781: 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 5782 "configure"
+#line 5786 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5801,7 +5805,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5809: \"$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
@@ -5828,12 +5832,12 @@ done
 for ac_func in syslog vsyslog
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5832: checking for $ac_func" >&5
+echo "configure:5836: 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 5837 "configure"
+#line 5841 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5856,7 +5860,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5864: \"$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
@@ -5885,12 +5889,12 @@ done
 for ac_func in syscall
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5889: checking for $ac_func" >&5
+echo "configure:5893: 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 5894 "configure"
+#line 5898 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5913,7 +5917,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5921: \"$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
@@ -5941,12 +5945,12 @@ done
 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5945: checking for $ac_func" >&5
+echo "configure:5949: 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 5950 "configure"
+#line 5954 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5969,7 +5973,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5977: \"$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
@@ -5996,12 +6000,12 @@ done
 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6000: checking for $ac_func" >&5
+echo "configure:6004: 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 6005 "configure"
+#line 6009 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6024,7 +6028,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6032: \"$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
@@ -6051,12 +6055,12 @@ done
 for ac_func in __getcwd _getcwd
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6055: checking for $ac_func" >&5
+echo "configure:6059: 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 6060 "configure"
+#line 6064 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6079,7 +6083,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6087: \"$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
@@ -6106,12 +6110,12 @@ done
 for ac_func in __xstat __fxstat __lxstat
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6110: checking for $ac_func" >&5
+echo "configure:6114: 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 6115 "configure"
+#line 6119 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6134,7 +6138,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6142: \"$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
@@ -6161,12 +6165,12 @@ done
 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6165: checking for $ac_func" >&5
+echo "configure:6169: 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 6170 "configure"
+#line 6174 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6189,7 +6193,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6197: \"$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
@@ -6216,12 +6220,12 @@ done
 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6220: checking for $ac_func" >&5
+echo "configure:6224: 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 6225 "configure"
+#line 6229 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6244,7 +6248,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6252: \"$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
@@ -6271,12 +6275,12 @@ done
 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6275: checking for $ac_func" >&5
+echo "configure:6279: 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 6280 "configure"
+#line 6284 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6299,7 +6303,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6307: \"$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
@@ -6326,12 +6330,12 @@ done
 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6330: checking for $ac_func" >&5
+echo "configure:6334: 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 6335 "configure"
+#line 6339 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6354,7 +6358,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6362: \"$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
@@ -6381,12 +6385,12 @@ done
 for ac_func in _write __write _fork __fork
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6385: checking for $ac_func" >&5
+echo "configure:6389: 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 6390 "configure"
+#line 6394 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6409,7 +6413,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6417: \"$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
@@ -6436,12 +6440,12 @@ done
 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6440: checking for $ac_func" >&5
+echo "configure:6444: 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 6445 "configure"
+#line 6449 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6464,7 +6468,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6472: \"$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
@@ -6491,12 +6495,12 @@ done
 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6495: checking for $ac_func" >&5
+echo "configure:6499: 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 6500 "configure"
+#line 6504 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6519,7 +6523,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6527: \"$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
@@ -6546,12 +6550,12 @@ done
 for ac_func in pread _pread __pread pread64 _pread64 __pread64
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6550: checking for $ac_func" >&5
+echo "configure:6554: 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 6555 "configure"
+#line 6559 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6574,7 +6578,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6582: \"$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
@@ -6601,12 +6605,12 @@ done
 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6605: checking for $ac_func" >&5
+echo "configure:6609: 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 6610 "configure"
+#line 6614 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6629,7 +6633,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6637: \"$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
@@ -6656,12 +6660,12 @@ done
 for ac_func in open64 _open64 __open64 creat64
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6660: checking for $ac_func" >&5
+echo "configure:6664: 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 6665 "configure"
+#line 6669 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6684,7 +6688,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6692: \"$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
@@ -6715,9 +6719,9 @@ done
 
 if test x$ac_cv_func_stat64 = xno ; then
   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
-echo "configure:6719: checking for stat64 in <sys/stat.h>" >&5
+echo "configure:6723: checking for stat64 in <sys/stat.h>" >&5
   cat > conftest.$ac_ext <<EOF
-#line 6721 "configure"
+#line 6725 "configure"
 #include "confdefs.h"
 
 #if defined(HAVE_UNISTD_H)
@@ -6729,7 +6733,7 @@ int main() {
 struct stat64 st64; exit(stat64(".",&st64));
 ; return 0; }
 EOF
-if { (eval echo configure:6733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_stat64=yes
 else
@@ -6748,9 +6752,9 @@ fi
 
 if test x$ac_cv_func_lstat64 = xno ; then
   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
-echo "configure:6752: checking for lstat64 in <sys/stat.h>" >&5
+echo "configure:6756: checking for lstat64 in <sys/stat.h>" >&5
   cat > conftest.$ac_ext <<EOF
-#line 6754 "configure"
+#line 6758 "configure"
 #include "confdefs.h"
 
 #if defined(HAVE_UNISTD_H)
@@ -6762,7 +6766,7 @@ int main() {
 struct stat64 st64; exit(lstat64(".",&st64));
 ; return 0; }
 EOF
-if { (eval echo configure:6766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_lstat64=yes
 else
@@ -6781,9 +6785,9 @@ fi
 
 if test x$ac_cv_func_fstat64 = xno ; then
   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
-echo "configure:6785: checking for fstat64 in <sys/stat.h>" >&5
+echo "configure:6789: checking for fstat64 in <sys/stat.h>" >&5
   cat > conftest.$ac_ext <<EOF
-#line 6787 "configure"
+#line 6791 "configure"
 #include "confdefs.h"
 
 #if defined(HAVE_UNISTD_H)
@@ -6795,7 +6799,7 @@ int main() {
 struct stat64 st64; exit(fstat64(0,&st64));
 ; return 0; }
 EOF
-if { (eval echo configure:6799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_fstat64=yes
 else
@@ -6820,7 +6824,7 @@ fi
 
 if test x$ac_cv_func_strcasecmp = xno ; then
        echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
-echo "configure:6824: checking for strcasecmp in -lresolv" >&5
+echo "configure:6828: checking for strcasecmp in -lresolv" >&5
 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6828,7 +6832,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6832 "configure"
+#line 6836 "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
@@ -6839,7 +6843,7 @@ int main() {
 strcasecmp()
 ; return 0; }
 EOF
-if { (eval echo configure:6843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6847: \"$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
@@ -6875,12 +6879,12 @@ case "$LIBS" in
   *-lsecurity*) for ac_func in putprpwnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6879: checking for $ac_func" >&5
+echo "configure:6883: 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 6884 "configure"
+#line 6888 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6903,7 +6907,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6911: \"$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
@@ -6928,7 +6932,7 @@ fi
 done
  ;;
   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:6932: checking for putprpwnam in -lsecurity" >&5
+echo "configure:6936: checking for putprpwnam in -lsecurity" >&5
 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6936,7 +6940,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6940 "configure"
+#line 6944 "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
@@ -6947,7 +6951,7 @@ int main() {
 putprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:6951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6955: \"$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
@@ -6977,12 +6981,12 @@ fi
      for ac_func in putprpwnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6981: checking for $ac_func" >&5
+echo "configure:6985: 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 6986 "configure"
+#line 6990 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7005,7 +7009,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7013: \"$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
@@ -7036,12 +7040,12 @@ case "$LIBS" in
   *-lsec*) for ac_func in putprpwnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7040: checking for $ac_func" >&5
+echo "configure:7044: 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 7045 "configure"
+#line 7049 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7064,7 +7068,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7072: \"$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
@@ -7089,7 +7093,7 @@ fi
 done
  ;;
   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
-echo "configure:7093: checking for putprpwnam in -lsec" >&5
+echo "configure:7097: checking for putprpwnam in -lsec" >&5
 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7097,7 +7101,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7101 "configure"
+#line 7105 "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
@@ -7108,7 +7112,7 @@ int main() {
 putprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:7112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7116: \"$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
@@ -7138,12 +7142,12 @@ fi
      for ac_func in putprpwnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7142: checking for $ac_func" >&5
+echo "configure:7146: 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 7147 "configure"
+#line 7151 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7166,7 +7170,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7174: \"$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
@@ -7198,12 +7202,12 @@ case "$LIBS" in
   *-lsecurity*) for ac_func in set_auth_parameters
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7202: checking for $ac_func" >&5
+echo "configure:7206: 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 7207 "configure"
+#line 7211 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7226,7 +7230,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7234: \"$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
@@ -7251,7 +7255,7 @@ fi
 done
  ;;
   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
-echo "configure:7255: checking for set_auth_parameters in -lsecurity" >&5
+echo "configure:7259: checking for set_auth_parameters in -lsecurity" >&5
 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7259,7 +7263,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7263 "configure"
+#line 7267 "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
@@ -7270,7 +7274,7 @@ int main() {
 set_auth_parameters()
 ; return 0; }
 EOF
-if { (eval echo configure:7274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7278: \"$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
@@ -7300,12 +7304,12 @@ fi
      for ac_func in set_auth_parameters
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7304: checking for $ac_func" >&5
+echo "configure:7308: 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 7309 "configure"
+#line 7313 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7328,7 +7332,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7336: \"$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
@@ -7359,12 +7363,12 @@ case "$LIBS" in
   *-lsec*) for ac_func in set_auth_parameters
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7363: checking for $ac_func" >&5
+echo "configure:7367: 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 7368 "configure"
+#line 7372 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7387,7 +7391,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7395: \"$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
@@ -7412,7 +7416,7 @@ fi
 done
  ;;
   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
-echo "configure:7416: checking for set_auth_parameters in -lsec" >&5
+echo "configure:7420: checking for set_auth_parameters in -lsec" >&5
 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7420,7 +7424,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7424 "configure"
+#line 7428 "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
@@ -7431,7 +7435,7 @@ int main() {
 set_auth_parameters()
 ; return 0; }
 EOF
-if { (eval echo configure:7435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7439: \"$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
@@ -7461,12 +7465,12 @@ fi
      for ac_func in set_auth_parameters
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7465: checking for $ac_func" >&5
+echo "configure:7469: 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 7470 "configure"
+#line 7474 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7489,7 +7493,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7497: \"$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
@@ -7522,12 +7526,12 @@ case "$LIBS" in
   *-lgen*) for ac_func in getspnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7526: checking for $ac_func" >&5
+echo "configure:7530: 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 7531 "configure"
+#line 7535 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7550,7 +7554,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7558: \"$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
@@ -7575,7 +7579,7 @@ fi
 done
  ;;
   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
-echo "configure:7579: checking for getspnam in -lgen" >&5
+echo "configure:7583: checking for getspnam in -lgen" >&5
 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7583,7 +7587,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7587 "configure"
+#line 7591 "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
@@ -7594,7 +7598,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:7598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7602: \"$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
@@ -7624,12 +7628,12 @@ fi
      for ac_func in getspnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7628: checking for $ac_func" >&5
+echo "configure:7632: 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 7633 "configure"
+#line 7637 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7652,7 +7656,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7660: \"$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
@@ -7684,12 +7688,12 @@ case "$LIBS" in
   *-lsecurity*) for ac_func in getspnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7688: checking for $ac_func" >&5
+echo "configure:7692: 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 7693 "configure"
+#line 7697 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7712,7 +7716,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7720: \"$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
@@ -7737,7 +7741,7 @@ fi
 done
  ;;
   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:7741: checking for getspnam in -lsecurity" >&5
+echo "configure:7745: checking for getspnam in -lsecurity" >&5
 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7745,7 +7749,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7749 "configure"
+#line 7753 "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
@@ -7756,7 +7760,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:7760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7764: \"$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
@@ -7786,12 +7790,12 @@ fi
      for ac_func in getspnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7790: checking for $ac_func" >&5
+echo "configure:7794: 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 7795 "configure"
+#line 7799 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7814,7 +7818,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7822: \"$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
@@ -7845,12 +7849,12 @@ case "$LIBS" in
   *-lsec*) for ac_func in getspnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7849: checking for $ac_func" >&5
+echo "configure:7853: 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 7854 "configure"
+#line 7858 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7873,7 +7877,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7881: \"$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
@@ -7898,7 +7902,7 @@ fi
 done
  ;;
   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
-echo "configure:7902: checking for getspnam in -lsec" >&5
+echo "configure:7906: checking for getspnam in -lsec" >&5
 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7906,7 +7910,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7910 "configure"
+#line 7914 "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
@@ -7917,7 +7921,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:7921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7925: \"$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
@@ -7947,12 +7951,12 @@ fi
      for ac_func in getspnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7951: checking for $ac_func" >&5
+echo "configure:7955: 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 7956 "configure"
+#line 7960 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7975,7 +7979,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7983: \"$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
@@ -8007,12 +8011,12 @@ case "$LIBS" in
   *-lsecurity*) for ac_func in bigcrypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8011: checking for $ac_func" >&5
+echo "configure:8015: 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 8016 "configure"
+#line 8020 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8035,7 +8039,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8043: \"$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
@@ -8060,7 +8064,7 @@ fi
 done
  ;;
   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
-echo "configure:8064: checking for bigcrypt in -lsecurity" >&5
+echo "configure:8068: checking for bigcrypt in -lsecurity" >&5
 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8068,7 +8072,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8072 "configure"
+#line 8076 "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
@@ -8079,7 +8083,7 @@ int main() {
 bigcrypt()
 ; return 0; }
 EOF
-if { (eval echo configure:8083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8087: \"$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
@@ -8109,12 +8113,12 @@ fi
      for ac_func in bigcrypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8113: checking for $ac_func" >&5
+echo "configure:8117: 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 8118 "configure"
+#line 8122 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8137,7 +8141,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8145: \"$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
@@ -8168,12 +8172,12 @@ case "$LIBS" in
   *-lsec*) for ac_func in bigcrypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8172: checking for $ac_func" >&5
+echo "configure:8176: 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 8177 "configure"
+#line 8181 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8196,7 +8200,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8204: \"$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
@@ -8221,7 +8225,7 @@ fi
 done
  ;;
   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
-echo "configure:8225: checking for bigcrypt in -lsec" >&5
+echo "configure:8229: checking for bigcrypt in -lsec" >&5
 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8229,7 +8233,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8233 "configure"
+#line 8237 "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
@@ -8240,7 +8244,7 @@ int main() {
 bigcrypt()
 ; return 0; }
 EOF
-if { (eval echo configure:8244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8248: \"$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
@@ -8270,12 +8274,12 @@ fi
      for ac_func in bigcrypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8274: checking for $ac_func" >&5
+echo "configure:8278: 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 8279 "configure"
+#line 8283 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8298,7 +8302,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8306: \"$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
@@ -8330,12 +8334,12 @@ case "$LIBS" in
   *-lsecurity*) for ac_func in getprpwnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8334: checking for $ac_func" >&5
+echo "configure:8338: 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 8339 "configure"
+#line 8343 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8358,7 +8362,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8366: \"$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
@@ -8383,7 +8387,7 @@ fi
 done
  ;;
   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:8387: checking for getprpwnam in -lsecurity" >&5
+echo "configure:8391: checking for getprpwnam in -lsecurity" >&5
 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8391,7 +8395,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8395 "configure"
+#line 8399 "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
@@ -8402,7 +8406,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:8406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8410: \"$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
@@ -8432,12 +8436,12 @@ fi
      for ac_func in getprpwnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8436: checking for $ac_func" >&5
+echo "configure:8440: 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 8441 "configure"
+#line 8445 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8460,7 +8464,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8468: \"$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
@@ -8491,12 +8495,12 @@ case "$LIBS" in
   *-lsec*) for ac_func in getprpwnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8495: checking for $ac_func" >&5
+echo "configure:8499: 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 8500 "configure"
+#line 8504 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8519,7 +8523,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8527: \"$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
@@ -8544,7 +8548,7 @@ fi
 done
  ;;
   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
-echo "configure:8548: checking for getprpwnam in -lsec" >&5
+echo "configure:8552: checking for getprpwnam in -lsec" >&5
 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8552,7 +8556,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8556 "configure"
+#line 8560 "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
@@ -8563,7 +8567,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:8567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8571: \"$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
@@ -8593,12 +8597,12 @@ fi
      for ac_func in getprpwnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8597: checking for $ac_func" >&5
+echo "configure:8601: 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 8602 "configure"
+#line 8606 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8621,7 +8625,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8629: \"$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
@@ -8664,7 +8668,7 @@ SHLIBEXT="so"
 # Assume non-shared by default and override below
 BLDSHARED="false" 
 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
-echo "configure:8668: checking ability to build shared libraries" >&5
+echo "configure:8672: checking ability to build shared libraries" >&5
 
 # and these are for particular systems
 case "$host_os" in
@@ -8720,7 +8724,7 @@ EOF
                        LDSHFLAGS="-shared"
                        DYNEXP="-Wl,--export-dynamic"
                        SONAMEFLAG="-Wl,-soname,"
-                       PICFLAG="-fPIC"
+                       PICFLAG="-fPIC -DPIC"
                        cat >> confdefs.h <<\EOF
 #define STAT_ST_BLOCKSIZE 512
 EOF
@@ -8769,12 +8773,10 @@ EOF
                        BLDSHARED="true"
                        LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
                        DYNEXP="-Wl,-brtl,-bexpall"
-                       if test "${GCC}" = "yes"; then
-                               PICFLAG="-O2"
-                       else
-                               PICFLAG="-O2 -qmaxmem=6000"
+                       PICFLAG="-O2"
+                       if test "${GCC}" != "yes"; then
                                ## for funky AIX compiler using strncpy()
-                               CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
+                               CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
                        fi
 
                        cat >> confdefs.h <<\EOF
@@ -8834,7 +8836,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:8838: checking for $ac_word" >&5
+echo "configure:8840: 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
@@ -8890,16 +8892,16 @@ esac
 
 echo "$ac_t""$BLDSHARED" 1>&6
 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
-echo "configure:8894: checking linker flags for shared libraries" >&5
+echo "configure:8896: 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:8897: checking compiler flags for position-independent code" >&5
+echo "configure:8899: 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:8903: checking whether ${CC-cc} accepts -fpic" >&5
+echo "configure:8905: 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
@@ -8920,7 +8922,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:8924: checking whether ${CC-cc} accepts -KPIC" >&5
+echo "configure:8926: 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
@@ -8941,7 +8943,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:8945: checking whether ${CC-cc} accepts -Kpic" >&5
+echo "configure:8947: 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
@@ -8964,7 +8966,7 @@ fi
 ################
 
 echo $ac_n "checking for long long""... $ac_c" 1>&6
-echo "configure:8968: checking for long long" >&5
+echo "configure:8970: 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
@@ -8973,12 +8975,12 @@ if test "$cross_compiling" = yes; then
   samba_cv_have_longlong=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 8977 "configure"
+#line 8979 "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:8982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8984: \"$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
@@ -9005,20 +9007,20 @@ fi
 # AIX needs this.
 
 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
-echo "configure:9009: checking for LL suffix on long long integers" >&5
+echo "configure:9011: 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 9015 "configure"
+#line 9017 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 long long i = 0x8000000000LL
 ; return 0; }
 EOF
-if { (eval echo configure:9022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_compiler_supports_ll=yes
 else
@@ -9040,7 +9042,7 @@ fi
 
   
 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
-echo "configure:9044: checking for 64 bit off_t" >&5
+echo "configure:9046: 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
@@ -9049,13 +9051,13 @@ if test "$cross_compiling" = yes; then
   samba_cv_SIZEOF_OFF_T=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9053 "configure"
+#line 9055 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/stat.h>
 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
 EOF
-if { (eval echo configure:9059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9061: \"$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
@@ -9078,7 +9080,7 @@ EOF
 fi
 
 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:9082: checking for off64_t" >&5
+echo "configure:9084: 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
@@ -9087,7 +9089,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_OFF64_T=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9091 "configure"
+#line 9093 "configure"
 #include "confdefs.h"
 
 #if defined(HAVE_UNISTD_H)
@@ -9097,7 +9099,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:9101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9103: \"$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
@@ -9120,7 +9122,7 @@ EOF
 fi
 
 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
-echo "configure:9124: checking for 64 bit ino_t" >&5
+echo "configure:9126: 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
@@ -9129,13 +9131,13 @@ if test "$cross_compiling" = yes; then
   samba_cv_SIZEOF_INO_T=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9133 "configure"
+#line 9135 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/stat.h>
 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
 EOF
-if { (eval echo configure:9139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9141: \"$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
@@ -9158,7 +9160,7 @@ EOF
 fi
 
 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
-echo "configure:9162: checking for ino64_t" >&5
+echo "configure:9164: 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
@@ -9167,7 +9169,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_INO64_T=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9171 "configure"
+#line 9173 "configure"
 #include "confdefs.h"
 
 #if defined(HAVE_UNISTD_H)
@@ -9177,7 +9179,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:9181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9183: \"$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
@@ -9200,7 +9202,7 @@ EOF
 fi
 
 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
-echo "configure:9204: checking for dev64_t" >&5
+echo "configure:9206: 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
@@ -9209,7 +9211,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_DEV64_T=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9213 "configure"
+#line 9215 "configure"
 #include "confdefs.h"
 
 #if defined(HAVE_UNISTD_H)
@@ -9219,7 +9221,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:9223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9225: \"$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
@@ -9242,13 +9244,13 @@ EOF
 fi
 
 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:9246: checking for struct dirent64" >&5
+echo "configure:9248: 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 9252 "configure"
+#line 9254 "configure"
 #include "confdefs.h"
 
 #if defined(HAVE_UNISTD_H)
@@ -9260,7 +9262,7 @@ int main() {
 struct dirent64 de;
 ; return 0; }
 EOF
-if { (eval echo configure:9264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_STRUCT_DIRENT64=yes
 else
@@ -9281,7 +9283,7 @@ EOF
 fi
 
 echo $ac_n "checking for major macro""... $ac_c" 1>&6
-echo "configure:9285: checking for major macro" >&5
+echo "configure:9287: 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
@@ -9290,7 +9292,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9294 "configure"
+#line 9296 "configure"
 #include "confdefs.h"
 
 #if defined(HAVE_UNISTD_H)
@@ -9299,7 +9301,7 @@ else
 #include <sys/types.h>
 main() { dev_t dev; int i = major(dev); return 0; }
 EOF
-if { (eval echo configure:9303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9305: \"$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
@@ -9322,7 +9324,7 @@ EOF
 fi
 
 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
-echo "configure:9326: checking for minor macro" >&5
+echo "configure:9328: 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
@@ -9331,7 +9333,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_DEVICE_MINOR_FN=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9335 "configure"
+#line 9337 "configure"
 #include "confdefs.h"
 
 #if defined(HAVE_UNISTD_H)
@@ -9340,7 +9342,7 @@ else
 #include <sys/types.h>
 main() { dev_t dev; int i = minor(dev); return 0; }
 EOF
-if { (eval echo configure:9344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9346: \"$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
@@ -9363,7 +9365,7 @@ EOF
 fi
 
 echo $ac_n "checking for makedev macro""... $ac_c" 1>&6
-echo "configure:9367: checking for makedev macro" >&5
+echo "configure:9369: 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
@@ -9372,7 +9374,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_MAKEDEV_FN=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9376 "configure"
+#line 9378 "configure"
 #include "confdefs.h"
 
 #if defined(HAVE_UNISTD_H)
@@ -9381,7 +9383,7 @@ else
 #include <sys/types.h>
 main() { dev_t dev = makedev(1,2); return 0; }
 EOF
-if { (eval echo configure:9385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9387: \"$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
@@ -9404,7 +9406,7 @@ EOF
 fi
 
 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
-echo "configure:9408: checking for unsigned char" >&5
+echo "configure:9410: 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
@@ -9413,12 +9415,12 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_UNSIGNED_CHAR=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9417 "configure"
+#line 9419 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main() { char c; c=250; exit((c > 0)?0:1); }
 EOF
-if { (eval echo configure:9422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9424: \"$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
@@ -9441,13 +9443,13 @@ EOF
 fi
 
 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
-echo "configure:9445: checking for sin_len in sock" >&5
+echo "configure:9447: 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 9451 "configure"
+#line 9453 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -9456,7 +9458,7 @@ int main() {
 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
 ; return 0; }
 EOF
-if { (eval echo configure:9460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_SOCK_SIN_LEN=yes
 else
@@ -9477,13 +9479,13 @@ EOF
 fi
 
 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
-echo "configure:9481: checking whether seekdir returns void" >&5
+echo "configure:9483: 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 9487 "configure"
+#line 9489 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <dirent.h>
@@ -9492,7 +9494,7 @@ int main() {
 return 0;
 ; return 0; }
 EOF
-if { (eval echo configure:9496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_SEEKDIR_RETURNS_VOID=yes
 else
@@ -9513,20 +9515,20 @@ EOF
 fi
 
 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
-echo "configure:9517: checking for __FILE__ macro" >&5
+echo "configure:9519: 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 9523 "configure"
+#line 9525 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 printf("%s\n", __FILE__);
 ; return 0; }
 EOF
-if { (eval echo configure:9530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_FILE_MACRO=yes
 else
@@ -9547,20 +9549,20 @@ EOF
 fi
 
 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
-echo "configure:9551: checking for __FUNCTION__ macro" >&5
+echo "configure:9553: 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 9557 "configure"
+#line 9559 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 printf("%s\n", __FUNCTION__);
 ; return 0; }
 EOF
-if { (eval echo configure:9564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_FUNCTION_MACRO=yes
 else
@@ -9581,7 +9583,7 @@ EOF
 fi
 
 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
-echo "configure:9585: checking if gettimeofday takes tz argument" >&5
+echo "configure:9587: 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
@@ -9590,14 +9592,14 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9594 "configure"
+#line 9596 "configure"
 #include "confdefs.h"
 
 #include <sys/time.h>
 #include <unistd.h>
 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
 EOF
-if { (eval echo configure:9601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9603: \"$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
@@ -9620,13 +9622,13 @@ EOF
 fi
 
 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
-echo "configure:9624: checking for __va_copy" >&5
+echo "configure:9626: 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 9630 "configure"
+#line 9632 "configure"
 #include "confdefs.h"
 #include <stdarg.h>
 va_list ap1,ap2;
@@ -9634,7 +9636,7 @@ int main() {
 __va_copy(ap1,ap2);
 ; return 0; }
 EOF
-if { (eval echo configure:9638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9640: \"$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
@@ -9655,7 +9657,7 @@ EOF
 fi
 
 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
-echo "configure:9659: checking for C99 vsnprintf" >&5
+echo "configure:9661: 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
@@ -9664,7 +9666,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_C99_VSNPRINTF=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9668 "configure"
+#line 9670 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -9691,7 +9693,7 @@ void foo(const char *format, ...) {
 main() { foo("hello"); }
 
 EOF
-if { (eval echo configure:9695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9697: \"$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
@@ -9714,7 +9716,7 @@ EOF
 fi
 
 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
-echo "configure:9718: checking for broken readdir" >&5
+echo "configure:9720: 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
@@ -9723,7 +9725,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_BROKEN_READDIR=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9727 "configure"
+#line 9729 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <dirent.h>
@@ -9731,7 +9733,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:9735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9737: \"$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
@@ -9754,13 +9756,13 @@ EOF
 fi
 
 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
-echo "configure:9758: checking for utimbuf" >&5
+echo "configure:9760: 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 9764 "configure"
+#line 9766 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utime.h>
@@ -9768,7 +9770,7 @@ int main() {
 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
 ; return 0; }
 EOF
-if { (eval echo configure:9772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UTIMBUF=yes
 else
@@ -9792,12 +9794,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:9796: checking for $ac_func" >&5
+echo "configure:9798: 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 9801 "configure"
+#line 9803 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9820,7 +9822,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:9824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9826: \"$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
@@ -9846,13 +9848,13 @@ done
 
 
 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
-echo "configure:9850: checking for ut_name in utmp" >&5
+echo "configure:9852: 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 9856 "configure"
+#line 9858 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utmp.h>
@@ -9860,7 +9862,7 @@ int main() {
 struct utmp ut;  ut.ut_name[0] = 'a';
 ; return 0; }
 EOF
-if { (eval echo configure:9864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UT_UT_NAME=yes
 else
@@ -9881,13 +9883,13 @@ EOF
 fi 
 
 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
-echo "configure:9885: checking for ut_user in utmp" >&5
+echo "configure:9887: 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 9891 "configure"
+#line 9893 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utmp.h>
@@ -9895,7 +9897,7 @@ int main() {
 struct utmp ut;  ut.ut_user[0] = 'a';
 ; return 0; }
 EOF
-if { (eval echo configure:9899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UT_UT_USER=yes
 else
@@ -9916,13 +9918,13 @@ EOF
 fi 
 
 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
-echo "configure:9920: checking for ut_id in utmp" >&5
+echo "configure:9922: 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 9926 "configure"
+#line 9928 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utmp.h>
@@ -9930,7 +9932,7 @@ int main() {
 struct utmp ut;  ut.ut_id[0] = 'a';
 ; return 0; }
 EOF
-if { (eval echo configure:9934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UT_UT_ID=yes
 else
@@ -9951,13 +9953,13 @@ EOF
 fi 
 
 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
-echo "configure:9955: checking for ut_host in utmp" >&5
+echo "configure:9957: 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 9961 "configure"
+#line 9963 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utmp.h>
@@ -9965,7 +9967,7 @@ int main() {
 struct utmp ut;  ut.ut_host[0] = 'a';
 ; return 0; }
 EOF
-if { (eval echo configure:9969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UT_UT_HOST=yes
 else
@@ -9986,13 +9988,13 @@ EOF
 fi 
 
 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
-echo "configure:9990: checking for ut_time in utmp" >&5
+echo "configure:9992: 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 9996 "configure"
+#line 9998 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utmp.h>
@@ -10000,7 +10002,7 @@ int main() {
 struct utmp ut;  time_t t; ut.ut_time = t;
 ; return 0; }
 EOF
-if { (eval echo configure:10004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UT_UT_TIME=yes
 else
@@ -10021,13 +10023,13 @@ EOF
 fi 
 
 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
-echo "configure:10025: checking for ut_tv in utmp" >&5
+echo "configure:10027: 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 10031 "configure"
+#line 10033 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utmp.h>
@@ -10035,7 +10037,7 @@ int main() {
 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
 ; return 0; }
 EOF
-if { (eval echo configure:10039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UT_UT_TV=yes
 else
@@ -10056,13 +10058,13 @@ EOF
 fi 
 
 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
-echo "configure:10060: checking for ut_type in utmp" >&5
+echo "configure:10062: 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 10066 "configure"
+#line 10068 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utmp.h>
@@ -10070,7 +10072,7 @@ int main() {
 struct utmp ut;  ut.ut_type = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:10074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UT_UT_TYPE=yes
 else
@@ -10091,13 +10093,13 @@ EOF
 fi 
 
 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
-echo "configure:10095: checking for ut_pid in utmp" >&5
+echo "configure:10097: 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 10101 "configure"
+#line 10103 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utmp.h>
@@ -10105,7 +10107,7 @@ int main() {
 struct utmp ut;  ut.ut_pid = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:10109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UT_UT_PID=yes
 else
@@ -10126,13 +10128,13 @@ EOF
 fi 
 
 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
-echo "configure:10130: checking for ut_exit in utmp" >&5
+echo "configure:10132: 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 10136 "configure"
+#line 10138 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utmp.h>
@@ -10140,7 +10142,7 @@ int main() {
 struct utmp ut;  ut.ut_exit.e_exit = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:10144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UT_UT_EXIT=yes
 else
@@ -10161,13 +10163,13 @@ EOF
 fi 
 
 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
-echo "configure:10165: checking for ut_addr in utmp" >&5
+echo "configure:10167: 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 10171 "configure"
+#line 10173 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utmp.h>
@@ -10175,7 +10177,7 @@ int main() {
 struct utmp ut;  ut.ut_addr = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:10179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UT_UT_ADDR=yes
 else
 
 if test x$ac_cv_func_pututline = xyes ; then
   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
-echo "configure:10201: checking whether pututline returns pointer" >&5
+echo "configure:10203: 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 10207 "configure"
+#line 10209 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utmp.h>
@@ -10211,7 +10213,7 @@ int main() {
 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
 ; return 0; }
 EOF
-if { (eval echo configure:10215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
 else
@@ -10233,13 +10235,13 @@ EOF
 fi
 
 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
-echo "configure:10237: checking for ut_syslen in utmpx" >&5
+echo "configure:10239: 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 10243 "configure"
+#line 10245 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utmpx.h>
@@ -10247,7 +10249,7 @@ int main() {
 struct utmpx ux;  ux.ut_syslen = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:10251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UX_UT_SYSLEN=yes
 else
@@ -10268,7 +10270,7 @@ EOF
 fi 
 
 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
-echo "configure:10272: checking for Linux kernel oplocks" >&5
+echo "configure:10274: 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
@@ -10277,7 +10279,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 10281 "configure"
+#line 10283 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -10291,7 +10293,7 @@ main() {
 }
 
 EOF
-if { (eval echo configure:10295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10297: \"$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
@@ -10314,7 +10316,7 @@ EOF
 fi
 
 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
-echo "configure:10318: checking for kernel change notify support" >&5
+echo "configure:10320: 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
@@ -10323,7 +10325,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 10327 "configure"
+#line 10329 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -10337,7 +10339,7 @@ main() {
 }
 
 EOF
-if { (eval echo configure:10341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10343: \"$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
@@ -10360,7 +10362,7 @@ EOF
 fi
 
 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
-echo "configure:10364: checking for kernel share modes" >&5
+echo "configure:10366: 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
@@ -10369,7 +10371,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 10373 "configure"
+#line 10375 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -10385,7 +10387,7 @@ main() {
 }
 
 EOF
-if { (eval echo configure:10389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
 else
 
 
 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
-echo "configure:10415: checking for IRIX kernel oplock type definitions" >&5
+echo "configure:10417: 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 10421 "configure"
+#line 10423 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <fcntl.h>
@@ -10425,7 +10427,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:10429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
 else
@@ -10446,7 +10448,7 @@ EOF
 fi
 
 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
-echo "configure:10450: checking for irix specific capabilities" >&5
+echo "configure:10452: 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
@@ -10455,7 +10457,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 10459 "configure"
+#line 10461 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/capability.h>
@@ -10470,7 +10472,7 @@ main() {
 }
 
 EOF
-if { (eval echo configure:10474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10476: \"$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
 #
 
 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10502: checking for int16 typedef included by rpc/rpc.h" >&5
+echo "configure:10504: 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 10508 "configure"
+#line 10510 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if defined(HAVE_RPC_RPC_H)
@@ -10514,7 +10516,7 @@ int main() {
 int16 testvar;
 ; return 0; }
 EOF
-if { (eval echo configure:10518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
 else
@@ -10535,13 +10537,13 @@ EOF
 fi
 
 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10539: checking for uint16 typedef included by rpc/rpc.h" >&5
+echo "configure:10541: 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 10545 "configure"
+#line 10547 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if defined(HAVE_RPC_RPC_H)
@@ -10551,7 +10553,7 @@ int main() {
 uint16 testvar;
 ; return 0; }
 EOF
-if { (eval echo configure:10555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
 else
@@ -10572,13 +10574,13 @@ EOF
 fi
 
 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10576: checking for int32 typedef included by rpc/rpc.h" >&5
+echo "configure:10578: 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 10582 "configure"
+#line 10584 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if defined(HAVE_RPC_RPC_H)
@@ -10588,7 +10590,7 @@ int main() {
 int32 testvar;
 ; return 0; }
 EOF
-if { (eval echo configure:10592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
 else
@@ -10609,13 +10611,13 @@ EOF
 fi
 
 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10613: checking for uint32 typedef included by rpc/rpc.h" >&5
+echo "configure:10615: 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 10619 "configure"
+#line 10621 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if defined(HAVE_RPC_RPC_H)
@@ -10625,7 +10627,7 @@ int main() {
 uint32 testvar;
 ; return 0; }
 EOF
-if { (eval echo configure:10629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
 else
 
 
 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10651: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
+echo "configure:10653: 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 10657 "configure"
+#line 10659 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #ifdef HAVE_SYS_SECURITY_H
@@ -10667,7 +10669,7 @@ int main() {
 int testvar;
 ; return 0; }
 EOF
-if { (eval echo configure:10671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
 else
@@ -10688,16 +10690,16 @@ EOF
 fi
 
 echo $ac_n "checking for test routines""... $ac_c" 1>&6
-echo "configure:10692: checking for test routines" >&5
+echo "configure:10694: 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 10697 "configure"
+#line 10699 "configure"
 #include "confdefs.h"
 #include "${srcdir-.}/tests/trivial.c"
 EOF
-if { (eval echo configure:10701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10703: \"$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
@@ -10711,7 +10713,7 @@ fi
 
 
 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
-echo "configure:10715: checking for ftruncate extend" >&5
+echo "configure:10717: 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
@@ -10720,11 +10722,11 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 10724 "configure"
+#line 10726 "configure"
 #include "confdefs.h"
 #include "${srcdir-.}/tests/ftruncate.c"
 EOF
-if { (eval echo configure:10728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10730: \"$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
@@ -10747,7 +10749,7 @@ EOF
 fi
 
 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
-echo "configure:10751: checking for broken getgroups" >&5
+echo "configure:10753: 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
@@ -10756,11 +10758,11 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_BROKEN_GETGROUPS=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 10760 "configure"
+#line 10762 "configure"
 #include "confdefs.h"
 #include "${srcdir-.}/tests/getgroups.c"
 EOF
-if { (eval echo configure:10764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10766: \"$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
@@ -10783,7 +10785,7 @@ EOF
 fi
 
 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
-echo "configure:10787: checking whether getpass should be replaced" >&5
+echo "configure:10789: 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
@@ -10791,7 +10793,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 10795 "configure"
+#line 10797 "configure"
 #include "confdefs.h"
 
 #define REPLACE_GETPASS 1
@@ -10804,7 +10806,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:10808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_REPLACE_GETPASS=yes
 else
@@ -10827,7 +10829,7 @@ EOF
 fi
 
 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
-echo "configure:10831: checking for broken inet_ntoa" >&5
+echo "configure:10833: 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
@@ -10836,7 +10838,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_REPLACE_INET_NTOA=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 10840 "configure"
+#line 10842 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -10850,7 +10852,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:10854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10856: \"$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
@@ -10873,7 +10875,7 @@ EOF
 fi
 
 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
-echo "configure:10877: checking for secure mkstemp" >&5
+echo "configure:10879: 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
@@ -10882,7 +10884,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_SECURE_MKSTEMP=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 10886 "configure"
+#line 10888 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <sys/types.h>
@@ -10899,7 +10901,7 @@ main() {
   exit(0);
 }
 EOF
-if { (eval echo configure:10903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10905: \"$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
@@ -10922,7 +10924,7 @@ EOF
 fi
 
 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
-echo "configure:10926: checking for sysconf(_SC_NGROUPS_MAX)" >&5
+echo "configure:10928: 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
@@ -10931,12 +10933,12 @@ if test "$cross_compiling" = yes; then
   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 10935 "configure"
+#line 10937 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
 EOF
-if { (eval echo configure:10940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10942: \"$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
@@ -10959,7 +10961,7 @@ EOF
 fi
 
 echo $ac_n "checking for root""... $ac_c" 1>&6
-echo "configure:10963: checking for root" >&5
+echo "configure:10965: checking for root" >&5
 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -10968,11 +10970,11 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_ROOT=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 10972 "configure"
+#line 10974 "configure"
 #include "confdefs.h"
 main() { exit(getuid() != 0); }
 EOF
-if { (eval echo configure:10976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10978: \"$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
@@ -11000,7 +11002,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:11004: checking for iface AIX" >&5
+echo "configure:11006: 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
@@ -11009,7 +11011,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_IFACE_AIX=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 11013 "configure"
+#line 11015 "configure"
 #include "confdefs.h"
 
 #define HAVE_IFACE_AIX 1
@@ -11017,7 +11019,7 @@ else
 #include "confdefs.h"
 #include "${srcdir-.}/lib/interfaces.c"
 EOF
-if { (eval echo configure:11021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11023: \"$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
@@ -11041,7 +11043,7 @@ fi
 
 if test $iface = no; then
 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
-echo "configure:11045: checking for iface ifconf" >&5
+echo "configure:11047: 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
@@ -11050,7 +11052,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_IFACE_IFCONF=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 11054 "configure"
+#line 11056 "configure"
 #include "confdefs.h"
 
 #define HAVE_IFACE_IFCONF 1
@@ -11058,7 +11060,7 @@ else
 #include "confdefs.h"
 #include "${srcdir-.}/lib/interfaces.c"
 EOF
-if { (eval echo configure:11062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11064: \"$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
@@ -11083,7 +11085,7 @@ fi
 
 if test $iface = no; then
 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
-echo "configure:11087: checking for iface ifreq" >&5
+echo "configure:11089: 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
@@ -11092,7 +11094,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_IFACE_IFREQ=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 11096 "configure"
+#line 11098 "configure"
 #include "confdefs.h"
 
 #define HAVE_IFACE_IFREQ 1
@@ -11100,7 +11102,7 @@ else
 #include "confdefs.h"
 #include "${srcdir-.}/lib/interfaces.c"
 EOF
-if { (eval echo configure:11104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11106: \"$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
@@ -11129,7 +11131,7 @@ fi
 seteuid=no;
 if test $seteuid = no; then
 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
-echo "configure:11133: checking for setresuid" >&5
+echo "configure:11135: checking for setresuid" >&5
 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -11138,7 +11140,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_USE_SETRESUID=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 11142 "configure"
+#line 11144 "configure"
 #include "confdefs.h"
 
 #define AUTOCONF_TEST 1
@@ -11146,7 +11148,7 @@ else
 #include "confdefs.h"
 #include "${srcdir-.}/lib/util_sec.c"
 EOF
-if { (eval echo configure:11150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11152: \"$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
@@ -11172,7 +11174,7 @@ fi
 
 if test $seteuid = no; then
 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
-echo "configure:11176: checking for setreuid" >&5
+echo "configure:11178: checking for setreuid" >&5
 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -11181,7 +11183,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_USE_SETREUID=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 11185 "configure"
+#line 11187 "configure"
 #include "confdefs.h"
 
 #define AUTOCONF_TEST 1
@@ -11189,7 +11191,7 @@ else
 #include "confdefs.h"
 #include "${srcdir-.}/lib/util_sec.c"
 EOF
-if { (eval echo configure:11193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11195: \"$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
@@ -11214,7 +11216,7 @@ fi
 
 if test $seteuid = no; then
 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
-echo "configure:11218: checking for seteuid" >&5
+echo "configure:11220: checking for seteuid" >&5
 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -11223,7 +11225,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_USE_SETEUID=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 11227 "configure"
+#line 11229 "configure"
 #include "confdefs.h"
 
 #define AUTOCONF_TEST 1
@@ -11231,7 +11233,7 @@ else
 #include "confdefs.h"
 #include "${srcdir-.}/lib/util_sec.c"
 EOF
-if { (eval echo configure:11235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11237: \"$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
@@ -11256,7 +11258,7 @@ fi
 
 if test $seteuid = no; then
 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
-echo "configure:11260: checking for setuidx" >&5
+echo "configure:11262: checking for setuidx" >&5
 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -11265,7 +11267,7 @@ if test "$cross_compiling" = yes; then
   samba_cv_USE_SETUIDX=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 11269 "configure"
+#line 11271 "configure"
 #include "confdefs.h"
 
 #define AUTOCONF_TEST 1
@@ -11273,7 +11275,7 @@ else
 #include "confdefs.h"
 #include "${srcdir-.}/lib/util_sec.c"
 EOF
-if { (eval echo configure:11277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11279: \"$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
@@ -11298,7 +11300,7 @@ fi
 
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:11302: checking for working mmap" >&5
+echo "configure:11304: 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
@@ -11307,11 +11309,11 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_MMAP=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 11311 "configure"
+#line 11313 "configure"
 #include "confdefs.h"
 #include "${srcdir-.}/tests/shared_mmap.c"
 EOF
-if { (eval echo configure:11315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11317: \"$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
@@ -11334,7 +11336,7 @@ EOF
 fi
 
 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
-echo "configure:11338: checking for ftruncate needs root" >&5
+echo "configure:11340: 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
@@ -11343,11 +11345,11 @@ if test "$cross_compiling" = yes; then
   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 11347 "configure"
+#line 11349 "configure"
 #include "confdefs.h"
 #include "${srcdir-.}/tests/ftruncroot.c"
 EOF
-if { (eval echo configure:11351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11353: \"$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
@@ -11370,7 +11372,7 @@ EOF
 fi
 
 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
-echo "configure:11374: checking for fcntl locking" >&5
+echo "configure:11376: 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
@@ -11379,11 +11381,11 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_FCNTL_LOCK=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 11383 "configure"
+#line 11385 "configure"
 #include "confdefs.h"
 #include "${srcdir-.}/tests/fcntl_lock.c"
 EOF
-if { (eval echo configure:11387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11389: \"$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
@@ -11406,7 +11408,7 @@ EOF
 fi
 
 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
-echo "configure:11410: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
+echo "configure:11412: 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
@@ -11415,11 +11417,11 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 11419 "configure"
+#line 11421 "configure"
 #include "confdefs.h"
 #include "${srcdir-.}/tests/fcntl_lock64.c"
 EOF
-if { (eval echo configure:11423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11425: \"$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
@@ -11444,7 +11446,7 @@ else
 
 
   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
-echo "configure:11448: checking for 64 bit fcntl locking" >&5
+echo "configure:11450: 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
@@ -11453,7 +11455,7 @@ else
   samba_cv_HAVE_STRUCT_FLOCK64=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 11457 "configure"
+#line 11459 "configure"
 #include "confdefs.h"
 
 #if defined(HAVE_UNISTD_H)
@@ -11477,7 +11479,7 @@ exit(1);
 #endif
 }
 EOF
-if { (eval echo configure:11481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11483: \"$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
@@ -11502,13 +11504,13 @@ EOF
 fi
 
 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:11506: checking for st_blocks in struct stat" >&5
+echo "configure:11508: 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 11512 "configure"
+#line 11514 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -11517,7 +11519,7 @@ int main() {
 struct stat st;  st.st_blocks = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:11521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_STAT_ST_BLOCKS=yes
 else
@@ -11538,13 +11540,13 @@ 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
+echo "configure:11544: 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"
+#line 11550 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -11553,7 +11555,7 @@ 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
+if { (eval echo configure:11559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_STAT_ST_BLKSIZE=yes
 else
 case "$host_os" in
 *linux*)
 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
-echo "configure:11580: checking for broken RedHat 7.2 system header files" >&5
+echo "configure:11582: 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 11586 "configure"
+#line 11588 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_SYS_VFS_H
@@ -11596,7 +11598,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:11600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
 else
 esac
 
 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
-echo "configure:11623: checking for broken nisplus include files" >&5
+echo "configure:11625: 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 11629 "configure"
+#line 11631 "configure"
 #include "confdefs.h"
 #include <sys/acl.h>
 #if defined(HAVE_RPCSVC_NIS_H)
@@ -11635,7 +11637,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:11639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
 else
@@ -11659,7 +11661,7 @@ fi
 #################################################
 # check for smbwrapper support
 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
-echo "configure:11663: checking whether to use smbwrapper" >&5
+echo "configure:11665: 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"
@@ -11706,7 +11708,7 @@ fi
 #################################################
 # check for the AFS filesystem
 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
-echo "configure:11710: checking whether to use AFS" >&5
+echo "configure:11712: 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"
@@ -11732,7 +11734,7 @@ fi
 #################################################
 # check for the DFS auth system
 echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6
-echo "configure:11736: checking whether to use DCE/DFS auth" >&5
+echo "configure:11738: 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"
@@ -11757,7 +11759,7 @@ fi
 #################################################
 # check for Kerberos IV auth system
 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
-echo "configure:11761: checking whether to use Kerberos IV" >&5
+echo "configure:11763: 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"
@@ -11769,7 +11771,7 @@ if test "${with_krb4+set}" = set; then
 EOF
 
     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
-echo "configure:11773: checking for dn_expand in -lresolv" >&5
+echo "configure:11775: 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
@@ -11777,7 +11779,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11781 "configure"
+#line 11783 "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
@@ -11788,7 +11790,7 @@ int main() {
 dn_expand()
 ; return 0; }
 EOF
-if { (eval echo configure:11792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11794: \"$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
@@ -11832,7 +11834,7 @@ fi
 #################################################
 # check for Kerberos 5 auth system
 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
-echo "configure:11836: checking whether to use Kerberos 5" >&5
+echo "configure:11838: 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"
@@ -11860,7 +11862,7 @@ fi
 #################################################
 # check for automount support
 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
-echo "configure:11864: checking whether to use AUTOMOUNT" >&5
+echo "configure:11866: 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"
@@ -11885,7 +11887,7 @@ fi
 #################################################
 # check for smbmount support
 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
-echo "configure:11889: checking whether to use SMBMOUNT" >&5
+echo "configure:11891: 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"
@@ -11922,7 +11924,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:11926: checking whether to use PAM password database" >&5
+echo "configure:11928: 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"
@@ -11948,7 +11950,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:11952: checking for pam_get_data in -lpam" >&5
+echo "configure:11954: 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
@@ -11956,7 +11958,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpam  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11960 "configure"
+#line 11962 "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
@@ -11967,7 +11969,7 @@ int main() {
 pam_get_data()
 ; return 0; }
 EOF
-if { (eval echo configure:11971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11973: \"$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
@@ -11994,7 +11996,7 @@ fi
 #################################################
 # check for pam_smbpass support
 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
-echo "configure:11998: checking whether to use pam_smbpass" >&5
+echo "configure:12000: 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"
@@ -12036,12 +12038,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:12040: checking for $ac_func" >&5
+echo "configure:12042: 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 12045 "configure"
+#line 12047 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -12064,7 +12066,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:12068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12070: \"$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
@@ -12090,7 +12092,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:12094: checking for crypt in -lcrypt" >&5
+echo "configure:12096: 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
@@ -12098,7 +12100,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12102 "configure"
+#line 12104 "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
@@ -12109,7 +12111,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:12113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12115: \"$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
@@ -12144,7 +12146,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:12148: checking for a crypt that needs truncated salt" >&5
+echo "configure:12150: 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
@@ -12153,11 +12155,11 @@ if test "$cross_compiling" = yes; then
   samba_cv_HAVE_TRUNCATED_SALT=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 12157 "configure"
+#line 12159 "configure"
 #include "confdefs.h"
 #include "${srcdir-.}/tests/crypttest.c"
 EOF
-if { (eval echo configure:12161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12163: \"$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
@@ -12195,7 +12197,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:12199: checking whether to use TDB SAM database" >&5
+echo "configure:12201: 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"
@@ -12221,7 +12223,7 @@ fi
 #################################################
 # check for a LDAP password database
 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
-echo "configure:12225: checking whether to use LDAP SAM database" >&5
+echo "configure:12227: 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"
@@ -12234,7 +12236,7 @@ EOF
 
     LDAPLIBS="-lldap"
     echo $ac_n "checking for ber_bvfree in -llber""... $ac_c" 1>&6
-echo "configure:12238: checking for ber_bvfree in -llber" >&5
+echo "configure:12240: 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
@@ -12242,7 +12244,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-llber  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12246 "configure"
+#line 12248 "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
@@ -12253,7 +12255,7 @@ int main() {
 ber_bvfree()
 ; return 0; }
 EOF
-if { (eval echo configure:12257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12259: \"$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
@@ -12273,18 +12275,21 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
-    LDAPLIBS="-lresolv $LDAPLIBS"
+    ## remove -lresolv as this should be included by the -lsasl dependency 
+    ## in the OpenLDAP clients.  By not requiring it specifically, we avoid
+    ## issues on platforms that don't have it
+    LDAPLIBS="$LDAPLIBS"
     old_LDFLAGS="$LDFLAGS"
     LDFLAGS="$LDFLAGS $LDAPLIBS"
     for ac_func in ldap_start_tls_s
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12283: checking for $ac_func" >&5
+echo "configure:12288: 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 12288 "configure"
+#line 12293 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -12307,7 +12312,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:12311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12316: \"$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
@@ -12348,7 +12353,7 @@ fi
 #################################################
 # check for a NISPLUS password database
 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
-echo "configure:12352: checking whether to use NISPLUS SAM database" >&5
+echo "configure:12357: 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"
@@ -12376,7 +12381,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:12380: checking whether to use traditional smbpasswd file" >&5
+echo "configure:12385: 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
@@ -12398,7 +12403,7 @@ fi
 #################################################
 # check for a NISPLUS_HOME support 
 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
-echo "configure:12402: checking whether to use NISPLUS_HOME" >&5
+echo "configure:12407: 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"
@@ -12423,7 +12428,7 @@ fi
 #################################################
 # check for the secure socket layer
 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
-echo "configure:12427: checking whether to use SSL" >&5
+echo "configure:12432: 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"
@@ -12497,7 +12502,7 @@ fi
 #################################################
 # check for syslog logging
 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
-echo "configure:12501: checking whether to use syslog logging" >&5
+echo "configure:12506: 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"
@@ -12522,7 +12527,7 @@ fi
 #################################################
 # check for a shared memory profiling support
 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
-echo "configure:12526: checking whether to use profiling" >&5
+echo "configure:12531: 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"
@@ -12550,7 +12555,7 @@ fi
 QUOTAOBJS=smbd/noquotas.o
 
 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
-echo "configure:12554: checking whether to support disk-quotas" >&5
+echo "configure:12559: 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"
@@ -12574,7 +12579,7 @@ fi
 # check for experimental utmp accounting
 
 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
-echo "configure:12578: checking whether to support utmp accounting" >&5
+echo "configure:12583: 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"
@@ -12600,7 +12605,7 @@ fi
 # check for MS Dfs support
 
 echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
-echo "configure:12604: checking whether to support Microsoft Dfs" >&5
+echo "configure:12609: 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"
@@ -12628,7 +12633,7 @@ fi
 LIBSMBCLIENT_SHARED=
 LIBSMBCLIENT=
 echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
-echo "configure:12632: checking whether to build the libsmbclient shared library" >&5
+echo "configure:12637: 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"
 #################################################
 # these tests are taken from the GNU fileutils package
 echo "checking how to get filesystem space usage" 1>&6
-echo "configure:12659: checking how to get filesystem space usage" >&5
+echo "configure:12664: 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:12666: checking statvfs64 function (SVR4)" >&5
+echo "configure:12671: 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
@@ -12670,7 +12675,7 @@ else
   fu_cv_sys_stat_statvfs64=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 12674 "configure"
+#line 12679 "configure"
 #include "confdefs.h"
 
 #if defined(HAVE_UNISTD_H)
@@ -12684,7 +12689,7 @@ else
     exit (statvfs64 (".", &fsd));
   }
 EOF
-if { (eval echo configure:12688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12693: \"$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
 if test $space = no; then
   # SVR4
   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
-echo "configure:12721: checking statvfs function (SVR4)" >&5
+echo "configure:12726: 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 12726 "configure"
+#line 12731 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/statvfs.h>
@@ -12730,7 +12735,7 @@ int main() {
 struct statvfs fsd; statvfs (0, &fsd);
 ; return 0; }
 EOF
-if { (eval echo configure:12734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12739: \"$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
@@ -12755,7 +12760,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:12759: checking for 3-argument statfs function (DEC OSF/1)" >&5
+echo "configure:12764: 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
@@ -12763,7 +12768,7 @@ else
   fu_cv_sys_stat_statfs3_osf1=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 12767 "configure"
+#line 12772 "configure"
 #include "confdefs.h"
 
 #include <sys/param.h>
@@ -12776,7 +12781,7 @@ else
     exit (statfs (".", &fsd, sizeof (struct statfs)));
   }
 EOF
-if { (eval echo configure:12780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12785: \"$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
@@ -12803,7 +12808,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:12807: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
+echo "configure:12812: 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
@@ -12811,7 +12816,7 @@ else
   fu_cv_sys_stat_statfs2_bsize=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 12815 "configure"
+#line 12820 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_SYS_PARAM_H
@@ -12830,7 +12835,7 @@ else
   exit (statfs (".", &fsd));
   }
 EOF
-if { (eval echo configure:12834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12839: \"$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
@@ -12857,7 +12862,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:12861: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
+echo "configure:12866: 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
@@ -12865,7 +12870,7 @@ else
   fu_cv_sys_stat_statfs4=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 12869 "configure"
+#line 12874 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/statfs.h>
@@ -12875,7 +12880,7 @@ else
   exit (statfs (".", &fsd, sizeof fsd, 0));
   }
 EOF
-if { (eval echo configure:12879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12884: \"$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
@@ -12902,7 +12907,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:12906: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
+echo "configure:12911: 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
@@ -12910,7 +12915,7 @@ else
   fu_cv_sys_stat_statfs2_fsize=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 12914 "configure"
+#line 12919 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #ifdef HAVE_SYS_PARAM_H
@@ -12926,7 +12931,7 @@ else
   exit (statfs (".", &fsd));
   }
 EOF
-if { (eval echo configure:12930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12935: \"$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
@@ -12953,7 +12958,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:12957: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
+echo "configure:12962: 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
@@ -12961,7 +12966,7 @@ else
   fu_cv_sys_stat_fs_data=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 12965 "configure"
+#line 12970 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #ifdef HAVE_SYS_PARAM_H
@@ -12981,7 +12986,7 @@ else
   exit (statfs (".", &fsd) != 1);
   }
 EOF
-if { (eval echo configure:12985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12990: \"$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
@@ -13014,9 +13019,9 @@ fi
 # file support.
 #
 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
-echo "configure:13018: checking if large file support can be enabled" >&5
+echo "configure:13023: checking if large file support can be enabled" >&5
 cat > conftest.$ac_ext <<EOF
-#line 13020 "configure"
+#line 13025 "configure"
 #include "confdefs.h"
 
 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
@@ -13029,7 +13034,7 @@ int main() {
 int i
 ; return 0; }
 EOF
-if { (eval echo configure:13033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:13038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
 else
@@ -13096,7 +13101,7 @@ fi
 # check for ACL support
 
 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
-echo "configure:13100: checking whether to support ACLs" >&5
+echo "configure:13105: 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"
@@ -13149,7 +13154,7 @@ EOF
                        ;;
                *)
                    echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
-echo "configure:13153: checking for acl_get_file in -lacl" >&5
+echo "configure:13158: 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
@@ -13157,7 +13162,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lacl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13161 "configure"
+#line 13166 "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
@@ -13168,7 +13173,7 @@ int main() {
 acl_get_file()
 ; return 0; }
 EOF
-if { (eval echo configure:13172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13177: \"$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
@@ -13196,13 +13201,13 @@ else
 fi
 
                        echo $ac_n "checking for ACL support""... $ac_c" 1>&6
-echo "configure:13200: checking for ACL support" >&5
+echo "configure:13205: 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 13206 "configure"
+#line 13211 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/acl.h>
@@ -13210,7 +13215,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:13214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13219: \"$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
@@ -13230,13 +13235,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:13234: checking for acl_get_perm_np" >&5
+echo "configure:13239: 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 13240 "configure"
+#line 13245 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/acl.h>
@@ -13244,7 +13249,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:13248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13253: \"$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
@@ -13293,13 +13298,503 @@ if test "x$prefix" = xNONE -a "$sbindir" = "\${exec_prefix}/sbin"; then
        sbindir="$bindir"
 fi
 
+#################################################
+# check for sendfile support
+
+echo $ac_n "checking whether to check for support sendfile""... $ac_c" 1>&6
+echo "configure:13306: checking whether to check for support sendfile" >&5
+# Check whether --with-sendfile-support or --without-sendfile-support was given.
+if test "${with_sendfile_support+set}" = set; then
+  withval="$with_sendfile_support"
+   case "$withval" in
+  yes)
+
+       echo "$ac_t""yes" 1>&6;
+
+       case "$host_os" in
+       *linux*)
+               echo $ac_n "checking for linux sendfile64 support""... $ac_c" 1>&6
+echo "configure:13318: checking for linux sendfile64 support" >&5
+if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               cat > conftest.$ac_ext <<EOF
+#line 13324 "configure"
+#include "confdefs.h"
+#include <sys/sendfile.h>
+int main() {
+\
+int tofd, fromfd;
+off64_t offset;
+size_t total;
+ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total);
+
+; return 0; }
+EOF
+if { (eval echo configure:13336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILE64=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILE64=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6
+
+               echo $ac_n "checking for linux sendfile support""... $ac_c" 1>&6
+echo "configure:13351: checking for linux sendfile support" >&5
+if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               cat > conftest.$ac_ext <<EOF
+#line 13357 "configure"
+#include "confdefs.h"
+#include <sys/sendfile.h>
+int main() {
+\
+int tofd, fromfd;
+off_t offset;
+size_t total;
+ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
+
+; return 0; }
+EOF
+if { (eval echo configure:13369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILE=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILE=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
+
+# Try and cope with broken Linux sendfile....
+               echo $ac_n "checking for broken linux sendfile support""... $ac_c" 1>&6
+echo "configure:13385: checking for broken linux sendfile support" >&5
+if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_LINUX_SENDFILE'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               cat > conftest.$ac_ext <<EOF
+#line 13391 "configure"
+#include "confdefs.h"
+\
+#if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
+#undef _FILE_OFFSET_BITS
+#endif
+#include <sys/sendfile.h>
+int main() {
+\
+int tofd, fromfd;
+off_t offset;
+size_t total;
+ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
+
+; return 0; }
+EOF
+if { (eval echo configure:13407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" 1>&6
+
+       if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_SENDFILE64 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define LINUX_SENDFILE_API 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define WITH_SENDFILE 1
+EOF
+
+       elif test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_SENDFILE 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define LINUX_SENDFILE_API 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define WITH_SENDFILE 1
+EOF
+
+       elif test x"$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then
+               cat >> confdefs.h <<\EOF
+#define LINUX_BROKEN_SENDFILE_API 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define WITH_SENDFILE 1
+EOF
+
+       else
+               echo "$ac_t""no" 1>&6;
+       fi
+
+       ;;
+       *freebsd*)
+               echo $ac_n "checking for freebsd sendfile support""... $ac_c" 1>&6
+echo "configure:13463: checking for freebsd sendfile support" >&5
+if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               cat > conftest.$ac_ext <<EOF
+#line 13469 "configure"
+#include "confdefs.h"
+\
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
+int main() {
+\
+#define NULL (void *)0
+       int fromfd, tofd, ret, total;
+       off_t offset, nwritten;
+       struct sf_hdtr {
+                struct iovec *headers;
+                int hdr_cnt;
+                struct iovec *trailers;
+                int trl_cnt;
+       } hdr;
+       struct iovec hdtrl;
+       hdr.headers = &hdtrl;
+       hdr.hdr_cnt = 1;
+       hdr.trailers = NULL;
+       hdr.trl_cnt = 0;
+       hdtrl.iov_base = NULL;
+       hdtrl.iov_len = 0;
+       ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
+
+; return 0; }
+EOF
+if { (eval echo configure:13497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILE=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILE=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
+
+       if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_SENDFILE 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define FREEBSD_SENDFILE_API 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define WITH_SENDFILE 1
+EOF
+
+       else
+               echo "$ac_t""no" 1>&6;
+       fi
+       ;;
+
+       *hpux*)
+               echo $ac_n "checking for hpux sendfile64 support""... $ac_c" 1>&6
+echo "configure:13531: checking for hpux sendfile64 support" >&5
+if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               cat > conftest.$ac_ext <<EOF
+#line 13537 "configure"
+#include "confdefs.h"
+\
+#include <sys/socket.h>
+#include <sys/uio.h>
+int main() {
+\
+       int fromfd, tofd;
+       size_t total=0;
+       struct iovec hdtrl[2];
+       ssize_t nwritten;
+       off64_t offset;
+
+       hdtrl[0].iov_base = 0;
+       hdtrl[0].iov_len = 0;
+
+       nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0);
+
+; return 0; }
+EOF
+if { (eval echo configure:13557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILE64=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILE64=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6
+       if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_SENDFILE64 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define HPUX_SENDFILE_API 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define WITH_SENDFILE 1
+EOF
+
+       else
+               echo "$ac_t""no" 1>&6;
+       fi
+
+               echo $ac_n "checking for hpux sendfile support""... $ac_c" 1>&6
+echo "configure:13588: checking for hpux sendfile support" >&5
+if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               cat > conftest.$ac_ext <<EOF
+#line 13594 "configure"
+#include "confdefs.h"
+\
+#include <sys/socket.h>
+#include <sys/uio.h>
+int main() {
+\
+       int fromfd, tofd;
+       size_t total=0;
+       struct iovec hdtrl[2];
+       ssize_t nwritten;
+       off_t offset;
+
+       hdtrl[0].iov_base = 0;
+       hdtrl[0].iov_len = 0;
+
+       nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0);
+
+; return 0; }
+EOF
+if { (eval echo configure:13614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILE=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILE=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
+       if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_SENDFILE 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define HPUX_SENDFILE_API 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define WITH_SENDFILE 1
+EOF
+
+       else
+               echo "$ac_t""no" 1>&6;
+       fi
+       ;;
+
+       *solaris*)
+               LIBS="$LIBS -lsendfile"
+               echo $ac_n "checking for solaris sendfilev64 support""... $ac_c" 1>&6
+echo "configure:13648: checking for solaris sendfilev64 support" >&5
+if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV64'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               cat > conftest.$ac_ext <<EOF
+#line 13654 "configure"
+#include "confdefs.h"
+\
+#include <sys/sendfile.h>
+int main() {
+\
+        int sfvcnt;
+        size_t xferred;
+        struct sendfilevec vec[2];
+       ssize_t nwritten;
+       int tofd;
+
+       sfvcnt = 2;
+
+       vec[0].sfv_fd = SFV_FD_SELF;
+       vec[0].sfv_flag = 0;
+       vec[0].sfv_off = 0;
+       vec[0].sfv_len = 0;
+
+       vec[1].sfv_fd = 0;
+       vec[1].sfv_flag = 0;
+       vec[1].sfv_off = 0;
+       vec[1].sfv_len = 0;
+       nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred);
+
+; return 0; }
+EOF
+if { (eval echo configure:13681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILEV64=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILEV64=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$samba_cv_HAVE_SENDFILEV64" 1>&6
+
+       if test x"$samba_cv_HAVE_SENDFILEV64" = x"yes"; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_SENDFILEV64 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define SOLARIS_SENDFILE_API 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define WITH_SENDFILE 1
+EOF
+
+       else
+               echo "$ac_t""no" 1>&6;
+       fi
+
+               echo $ac_n "checking for solaris sendfilev support""... $ac_c" 1>&6
+echo "configure:13713: checking for solaris sendfilev support" >&5
+if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               cat > conftest.$ac_ext <<EOF
+#line 13719 "configure"
+#include "confdefs.h"
+\
+#include <sys/sendfile.h>
+int main() {
+\
+        int sfvcnt;
+        size_t xferred;
+        struct sendfilevec vec[2];
+       ssize_t nwritten;
+       int tofd;
+
+       sfvcnt = 2;
+
+       vec[0].sfv_fd = SFV_FD_SELF;
+       vec[0].sfv_flag = 0;
+       vec[0].sfv_off = 0;
+       vec[0].sfv_len = 0;
+
+       vec[1].sfv_fd = 0;
+       vec[1].sfv_flag = 0;
+       vec[1].sfv_off = 0;
+       vec[1].sfv_len = 0;
+       nwritten = sendfilev(tofd, vec, sfvcnt, &xferred);
+
+; return 0; }
+EOF
+if { (eval echo configure:13746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILEV=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  samba_cv_HAVE_SENDFILEV=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$samba_cv_HAVE_SENDFILEV" 1>&6
+
+       if test x"$samba_cv_HAVE_SENDFILEV" = x"yes"; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_SENDFILEV 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define SOLARIS_SENDFILE_API 1
+EOF
+
+               cat >> confdefs.h <<\EOF
+#define WITH_SENDFILE 1
+EOF
+
+       else
+               echo "$ac_t""no" 1>&6;
+       fi
+       ;;
+
+       *)
+       ;;
+        esac
+        ;;
+  *)
+    echo "$ac_t""no" 1>&6
+    ;;
+  esac 
+else
+  echo "$ac_t""no" 1>&6
+
+fi
+
+
 #################################################
 # Check whether winbind is supported on this platform.  If so we need to
 # build and install client programs (WINBIND_TARGETS), sbin programs
 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
 
 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
-echo "configure:13303: checking whether to build winbind" >&5
+echo "configure:13798: checking whether to build winbind" >&5
 
 # Initially, the value of $host_os decides whether winbind is supported
 
@@ -13359,7 +13854,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:13363: checking whether to enable winbind auth challenge/response code" >&5
+echo "configure:13858: 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"
                        WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
                ;;
        esac
+
+# Check for Horrible winbindd ldap hack.
+
+        echo $ac_n "checking whether to enable winbind ldap hack""... $ac_c" 1>&6
+echo "configure:13904: checking whether to enable winbind ldap hack" >&5
+        # Check whether --with-winbind-ldap-hack or --without-winbind-ldap-hack was given.
+if test "${with_winbind_ldap_hack+set}" = set; then
+  withval="$with_winbind_ldap_hack"
+  
+          case "$withval" in
+                yes)
+                        cat >> confdefs.h <<\EOF
+#define WITH_HORRIBLE_LDAP_NATIVE_MODE_HACK 1
+EOF
+
+                        LIBS="$LIBS -lldap";
+                        echo "$ac_t""yes" 1>&6
+                        ;;
+                no)
+                        echo "$ac_t""no" 1>&6
+                        ;;
+          esac 
+else
+  echo "$ac_t""no" 1>&6
+        
+fi
+
+
 else
         echo "$ac_t""no$winbind_no_reason" 1>&6
 
@@ -13415,7 +13938,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:13419: checking whether or not getgroups returns EGID too many times" >&5
+echo "configure:13942: 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
@@ -13423,7 +13946,7 @@ else
   samba_cv_have_getgroups_too_many_egids=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 13427 "configure"
+#line 13950 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -13439,7 +13962,7 @@ int main(int argc, char *argv[])
   exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0);
 }
 EOF
-if { (eval echo configure:13443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13966: \"$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
 #              [#include <pwd.h>])
 
 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
-echo "configure:13484: checking whether struct passwd has pw_comment" >&5
+echo "configure:14007: 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 13490 "configure"
+#line 14013 "configure"
 #include "confdefs.h"
 #include <pwd.h>
 int main() {
 struct passwd p; p.pw_comment;
 ; return 0; }
 EOF
-if { (eval echo configure:13497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_passwd_pw_comment=yes
 else
 #              [#include <pwd.h>])
 
 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
-echo "configure:13522: checking whether struct passwd has pw_age" >&5
+echo "configure:14045: 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 13528 "configure"
+#line 14051 "configure"
 #include "confdefs.h"
 #include <pwd.h>
 int main() {
 struct passwd p; p.pw_age;
 ; return 0; }
 EOF
-if { (eval echo configure:13535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   samba_cv_passwd_pw_age=yes
 else
@@ -13570,7 +14093,7 @@ fi
 
 if test x"$INCLUDED_POPT" != x"yes"; then
     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
-echo "configure:13574: checking for poptGetContext in -lpopt" >&5
+echo "configure:14097: 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
@@ -13578,7 +14101,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpopt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13582 "configure"
+#line 14105 "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
@@ -13589,7 +14112,7 @@ int main() {
 poptGetContext()
 ; return 0; }
 EOF
-if { (eval echo configure:13593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14116: \"$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
@@ -13613,7 +14136,7 @@ fi
 fi
 
 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
-echo "configure:13617: checking whether to use included popt" >&5
+echo "configure:14140: 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)'
 #################################################
 # final configure stuff
 echo $ac_n "checking configure summary""... $ac_c" 1>&6
-echo "configure:13632: checking configure summary" >&5
+echo "configure:14155: 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 13637 "configure"
+#line 14160 "configure"
 #include "confdefs.h"
 #include "${srcdir-.}/tests/summary.c"
 EOF
-if { (eval echo configure:13641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14164: \"$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
index 93f8b4a3beb03bbaa11e70861393116350325ec0..3adb5cc04809da311b5041c6a63ed332dbf1d694 100644 (file)
@@ -884,7 +884,7 @@ case "$host_os" in
                        LDSHFLAGS="-shared"
                        DYNEXP="-Wl,--export-dynamic"
                        SONAMEFLAG="-Wl,-soname,"
-                       PICFLAG="-fPIC"
+                       PICFLAG="-fPIC -DPIC"
                        AC_DEFINE(STAT_ST_BLOCKSIZE,512)
                ;;
                *openbsd*)  BLDSHARED="true"
@@ -915,12 +915,10 @@ case "$host_os" in
                        BLDSHARED="true"
                        LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
                        DYNEXP="-Wl,-brtl,-bexpall"
-                       if test "${GCC}" = "yes"; then
-                               PICFLAG="-O2"
-                       else
-                               PICFLAG="-O2 -qmaxmem=6000"
+                       PICFLAG="-O2"
+                       if test "${GCC}" != "yes"; then
                                ## for funky AIX compiler using strncpy()
-                               CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
+                               CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
                        fi
 
                        AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE)
@@ -2090,7 +2088,10 @@ AC_ARG_WITH(ldapsam,
     AC_DEFINE(WITH_LDAP_SAM)
     LDAPLIBS="-lldap"
     AC_CHECK_LIB(lber, ber_bvfree, [LDAPLIBS="$LDAPLIBS -llber"])
-    LDAPLIBS="-lresolv $LDAPLIBS"
+    ## remove -lresolv as this should be included by the -lsasl dependency 
+    ## in the OpenLDAP clients.  By not requiring it specifically, we avoid
+    ## issues on platforms that don't have it
+    LDAPLIBS="$LDAPLIBS"
     old_LDFLAGS="$LDFLAGS"
     LDFLAGS="$LDFLAGS $LDAPLIBS"
     AC_CHECK_FUNCS(ldap_start_tls_s)
@@ -2651,6 +2652,238 @@ if test "x$prefix" = xNONE -a "$sbindir" = "\${exec_prefix}/sbin"; then
        sbindir="$bindir"
 fi
 
+#################################################
+# check for sendfile support
+
+AC_MSG_CHECKING(whether to check for support sendfile)
+AC_ARG_WITH(sendfile-support,
+[  --with-sendfile-support      Check for sendfile support (default=no)],
+[ case "$withval" in
+  yes)
+
+       AC_MSG_RESULT(yes);
+
+       case "$host_os" in
+       *linux*)
+               AC_CACHE_CHECK([for linux sendfile64 support],samba_cv_HAVE_SENDFILE64,[
+               AC_TRY_LINK([#include <sys/sendfile.h>],
+[\
+int tofd, fromfd;
+off64_t offset;
+size_t total;
+ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total);
+],
+samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)])
+
+               AC_CACHE_CHECK([for linux sendfile support],samba_cv_HAVE_SENDFILE,[
+               AC_TRY_LINK([#include <sys/sendfile.h>],
+[\
+int tofd, fromfd;
+off_t offset;
+size_t total;
+ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
+],
+samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)])
+
+# Try and cope with broken Linux sendfile....
+               AC_CACHE_CHECK([for broken linux sendfile support],samba_cv_HAVE_BROKEN_LINUX_SENDFILE,[
+               AC_TRY_LINK([\
+#if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
+#undef _FILE_OFFSET_BITS
+#endif
+#include <sys/sendfile.h>],
+[\
+int tofd, fromfd;
+off_t offset;
+size_t total;
+ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
+],
+samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)])
+
+       if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
+               AC_DEFINE(HAVE_SENDFILE64)
+               AC_DEFINE(LINUX_SENDFILE_API)
+               AC_DEFINE(WITH_SENDFILE)
+       elif test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
+               AC_DEFINE(HAVE_SENDFILE)
+               AC_DEFINE(LINUX_SENDFILE_API)
+               AC_DEFINE(WITH_SENDFILE)
+       elif test x"$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then
+               AC_DEFINE(LINUX_BROKEN_SENDFILE_API)
+               AC_DEFINE(WITH_SENDFILE)
+       else
+               AC_MSG_RESULT(no);
+       fi
+
+       ;;
+       *freebsd*)
+               AC_CACHE_CHECK([for freebsd sendfile support],samba_cv_HAVE_SENDFILE,[
+               AC_TRY_LINK([\
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>],
+[\
+#define NULL (void *)0
+       int fromfd, tofd, ret, total;
+       off_t offset, nwritten;
+       struct sf_hdtr {
+                struct iovec *headers;
+                int hdr_cnt;
+                struct iovec *trailers;
+                int trl_cnt;
+       } hdr;
+       struct iovec hdtrl;
+       hdr.headers = &hdtrl;
+       hdr.hdr_cnt = 1;
+       hdr.trailers = NULL;
+       hdr.trl_cnt = 0;
+       hdtrl.iov_base = NULL;
+       hdtrl.iov_len = 0;
+       ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
+],
+samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)])
+
+       if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
+               AC_DEFINE(HAVE_SENDFILE)
+               AC_DEFINE(FREEBSD_SENDFILE_API)
+               AC_DEFINE(WITH_SENDFILE)
+       else
+               AC_MSG_RESULT(no);
+       fi
+       ;;
+
+       *hpux*)
+               AC_CACHE_CHECK([for hpux sendfile64 support],samba_cv_HAVE_SENDFILE64,[
+               AC_TRY_LINK([\
+#include <sys/socket.h>
+#include <sys/uio.h>],
+[\
+       int fromfd, tofd;
+       size_t total=0;
+       struct iovec hdtrl[2];
+       ssize_t nwritten;
+       off64_t offset;
+
+       hdtrl[0].iov_base = 0;
+       hdtrl[0].iov_len = 0;
+
+       nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0);
+],
+samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)])
+       if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
+               AC_DEFINE(HAVE_SENDFILE64)
+               AC_DEFINE(HPUX_SENDFILE_API)
+               AC_DEFINE(WITH_SENDFILE)
+       else
+               AC_MSG_RESULT(no);
+       fi
+
+               AC_CACHE_CHECK([for hpux sendfile support],samba_cv_HAVE_SENDFILE,[
+               AC_TRY_LINK([\
+#include <sys/socket.h>
+#include <sys/uio.h>],
+[\
+       int fromfd, tofd;
+       size_t total=0;
+       struct iovec hdtrl[2];
+       ssize_t nwritten;
+       off_t offset;
+
+       hdtrl[0].iov_base = 0;
+       hdtrl[0].iov_len = 0;
+
+       nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0);
+],
+samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)])
+       if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
+               AC_DEFINE(HAVE_SENDFILE)
+               AC_DEFINE(HPUX_SENDFILE_API)
+               AC_DEFINE(WITH_SENDFILE)
+       else
+               AC_MSG_RESULT(no);
+       fi
+       ;;
+
+       *solaris*)
+               LIBS="$LIBS -lsendfile"
+               AC_CACHE_CHECK([for solaris sendfilev64 support],samba_cv_HAVE_SENDFILEV64,[
+               AC_TRY_LINK([\
+#include <sys/sendfile.h>],
+[\
+        int sfvcnt;
+        size_t xferred;
+        struct sendfilevec vec[2];
+       ssize_t nwritten;
+       int tofd;
+
+       sfvcnt = 2;
+
+       vec[0].sfv_fd = SFV_FD_SELF;
+       vec[0].sfv_flag = 0;
+       vec[0].sfv_off = 0;
+       vec[0].sfv_len = 0;
+
+       vec[1].sfv_fd = 0;
+       vec[1].sfv_flag = 0;
+       vec[1].sfv_off = 0;
+       vec[1].sfv_len = 0;
+       nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred);
+],
+samba_cv_HAVE_SENDFILEV64=yes,samba_cv_HAVE_SENDFILEV64=no)])
+
+       if test x"$samba_cv_HAVE_SENDFILEV64" = x"yes"; then
+               AC_DEFINE(HAVE_SENDFILEV64)
+               AC_DEFINE(SOLARIS_SENDFILE_API)
+               AC_DEFINE(WITH_SENDFILE)
+       else
+               AC_MSG_RESULT(no);
+       fi
+
+               AC_CACHE_CHECK([for solaris sendfilev support],samba_cv_HAVE_SENDFILEV,[
+               AC_TRY_LINK([\
+#include <sys/sendfile.h>],
+[\
+        int sfvcnt;
+        size_t xferred;
+        struct sendfilevec vec[2];
+       ssize_t nwritten;
+       int tofd;
+
+       sfvcnt = 2;
+
+       vec[0].sfv_fd = SFV_FD_SELF;
+       vec[0].sfv_flag = 0;
+       vec[0].sfv_off = 0;
+       vec[0].sfv_len = 0;
+
+       vec[1].sfv_fd = 0;
+       vec[1].sfv_flag = 0;
+       vec[1].sfv_off = 0;
+       vec[1].sfv_len = 0;
+       nwritten = sendfilev(tofd, vec, sfvcnt, &xferred);
+],
+samba_cv_HAVE_SENDFILEV=yes,samba_cv_HAVE_SENDFILEV=no)])
+
+       if test x"$samba_cv_HAVE_SENDFILEV" = x"yes"; then
+               AC_DEFINE(HAVE_SENDFILEV)
+               AC_DEFINE(SOLARIS_SENDFILE_API)
+               AC_DEFINE(WITH_SENDFILE)
+       else
+               AC_MSG_RESULT(no);
+       fi
+       ;;
+
+       *)
+       ;;
+        esac
+        ;;
+  *)
+    AC_MSG_RESULT(no)
+    ;;
+  esac ],
+  AC_MSG_RESULT(no)
+)
+
 #################################################
 # Check whether winbind is supported on this platform.  If so we need to
 # build and install client programs (WINBIND_TARGETS), sbin programs
@@ -2748,6 +2981,26 @@ if test x"$HAVE_WINBIND" = x"yes"; then
                        WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
                ;;
        esac
+
+# Check for Horrible winbindd ldap hack.
+
+        AC_MSG_CHECKING(whether to enable winbind ldap hack)
+        AC_ARG_WITH(winbind-ldap-hack,
+        [  --with-winbind-ldap-hack   Enable winbindd_ldap_hack() functionality (default no)],
+        [
+          case "$withval" in
+                yes)
+                        AC_DEFINE(WITH_HORRIBLE_LDAP_NATIVE_MODE_HACK)
+                        LIBS="$LIBS -lldap";
+                        AC_MSG_RESULT(yes)
+                        ;;
+                no)
+                        AC_MSG_RESULT(no)
+                        ;;
+          esac ],
+          AC_MSG_RESULT(no)
+        )
+
 else
         AC_MSG_RESULT(no$winbind_no_reason)
 
index cb601c9335fce5aa4cc705b11e65825447a367ad..742bb34f58345d72f78ee8784231932be76530da 100644 (file)
@@ -60,6 +60,7 @@ struct print_job_info
 struct cli_state {
        int port;
        int fd;
+       int smb_rw_error; /* Copy of last read or write error. */
        uint16 cnum;
        uint16 pid;
        uint16 mid;
index 0c15be649f4d7e4ca69a27c41d8d30ad6b4d1e0b..b632d8bb5a79d278ff15d35e925d07d4b22bb918 100644 (file)
 #undef HAVE_PASSWD_PW_AGE
 #undef HAVE_STAT_ST_BLKSIZE
 #undef WITH_WINBIND_AUTH_CRAP
+#undef WITH_HORRIBLE_LDAP_NATIVE_MODE_HACK
 
 /*
  * Add these definitions to allow VFS modules to
 #ifndef _GNU_SOURCE
 #undef _GNU_SOURCE
 #endif
+#undef HAVE_SENDFILE
+#undef HAVE_SENDFILE64
+#undef LINUX_SENDFILE_API
+#undef LINUX_BROKEN_SENDFILE_API
+#undef WITH_SENDFILE
+#undef FREEBSD_SENDFILE_API
+#undef HPUX_SENDFILE_API
+#undef HAVE_SENDFILEV
+#undef HAVE_SENDFILEV64
+#undef SOLARIS_SENDFILE_API
 
 /* The number of bytes in a int.  */
 #undef SIZEOF_INT
index 83e9073d9ee1c272ea740674c3a586d8fbd5cd80..df2f9942c4f6dd1588483209469428f82ff62b7e 100644 (file)
@@ -731,7 +731,7 @@ typedef struct smb_wpasswd {
 #define UNI_XDIGIT   0x8
 #define UNI_SPACE    0x10
 
-#include "nsswitch/nss.h"
+#include "nsswitch/sys_nss.h"
 
 /***** automatically generated prototypes *****/
 #include "proto.h"
index 76a2ae15d7e9293666d141cc64f922e377d84cbf..6991a1100165a6ccbf5dd3a9e0fb6ab3cf971522 100644 (file)
 /* Allocation roundup. */
 #define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000
 
+/* Max number of jobs per print queue. */
+#define PRINT_MAX_JOBID 10000
+
 #endif
index 53a5df694846267aff7a22e9b9ca95c82fb77699..181adb344a57b215f1399b80691ea8269834b0bf 100644 (file)
@@ -65,7 +65,7 @@ extern struct printif generic_printif;
 extern struct printif  cups_printif;
 #endif /* HAVE_CUPS */
 
-#define PRINT_MAX_JOBID 10000
+/* PRINT_MAX_JOBID is now defined in local.h */
 #define UNIX_JOB_START PRINT_MAX_JOBID
 #define NEXT_JOBID(j) ((j+1) % PRINT_MAX_JOBID > 0 ? (j+1) % PRINT_MAX_JOBID : 1)
 
index 149c0a731576465e2e294038a24a61aaa7086266..e393c34815ce1cc8754553d5d63c3da49a4d4e76 100644 (file)
@@ -35,7 +35,7 @@ enum flush_reason_enum { SEEK_FLUSH, READ_FLUSH, WRITE_FLUSH, READRAW_FLUSH,
 
 #define PROF_SHMEM_KEY ((key_t)0x07021999)
 #define PROF_SHM_MAGIC 0x6349985
-#define PROF_SHM_VERSION 6
+#define PROF_SHM_VERSION 7
 
 /* time values in the following structure are in microseconds */
 
@@ -66,6 +66,9 @@ struct profile_stats {
        unsigned syscall_write_bytes;   /* bytes written with write syscall */
        unsigned syscall_lseek_count;
        unsigned syscall_lseek_time;
+       unsigned syscall_sendfile_count;
+       unsigned syscall_sendfile_time;
+       unsigned syscall_sendfile_bytes; /* bytes read with sendfile syscall */
        unsigned syscall_rename_count;
        unsigned syscall_rename_time;
        unsigned syscall_fsync_count;
index cdf5bbdf1f17c3b34691544629c0a768de7a6115..31c4fb73c1a3d16709d3675b57907aa4ea682dc2 100644 (file)
@@ -139,8 +139,6 @@ BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type,
                      const void *buf, size_t len,
                      BOOL duplicates_allowed,
                      int *n_sent);
-BOOL message_named_mutex(const char *name, unsigned int timeout);
-void message_named_mutex_release(char *name);
 
 /* The following definitions come from lib/ms_fnmatch.c  */
 
@@ -174,6 +172,15 @@ void sys_select_signal(void);
 int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval);
 int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval);
 
+/* The following definitions come from lib/sendfile.c  */
+
+ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
+ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
+ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
+ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
+ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
+ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
+
 /* The following definitions come from lib/signal.c  */
 
 void BlockSignals(BOOL block,int signum);
@@ -249,6 +256,7 @@ void cli_setup_packet(struct cli_state *cli);
 void cli_setup_bcc(struct cli_state *cli, void *p);
 void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr);
 struct cli_state *cli_initialise(struct cli_state *cli);
+void cli_close_connection(struct cli_state *cli);
 void cli_shutdown(struct cli_state *cli);
 void cli_sockopt(struct cli_state *cli, char *options);
 uint16 cli_setpid(struct cli_state *cli, uint16 pid);
@@ -388,10 +396,10 @@ NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx,
                                  SAM_DELTA_HDR **hdr_deltas, 
                                  SAM_DELTA_CTR **deltas);
 NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
-                                char *username, char *password,
-                                int logon_type);
+                               const char *unix_username, const char *unix_password,
+                               int logon_type);
 NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
-                                       const char *username, const char *domain, const char *workstation, 
+                                       const char *unix_username, const char *unix_domain, const char *workstation, 
                                        const uint8 chal[8],
                                        DATA_BLOB lm_response, DATA_BLOB nt_response,
                                        NET_USER_INFO_3 *info3);
@@ -687,6 +695,15 @@ void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode);
 NTSTATUS werror_to_ntstatus(WERROR error);
 WERROR ntstatus_to_werror(NTSTATUS error);
 
+/* The following definitions come from libsmb/namecache.c  */
+
+BOOL namecache_enable(void);
+void namecache_store(const char *name, int name_type,
+                    int num_names, struct in_addr *ip_list);
+BOOL namecache_fetch(const char *name, int name_type, struct in_addr **ip_list,
+                    int *num_names);
+void namecache_flush(void);
+
 /* The following definitions come from libsmb/namequery.c  */
 
 struct node_status *node_status_query(int fd,struct nmb_name *name,
@@ -1303,16 +1320,18 @@ int sock_exec(const char *prog);
 /* The following definitions come from lib/util_str.c  */
 
 void set_first_token(char *ptr);
-BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize);
+BOOL next_token(char **ptr,char *buff,const char *sep, size_t bufsize);
 char **toktocliplist(int *ctok, char *sep);
 int StrCaseCmp(const char *s, const char *t);
 int StrnCaseCmp(const char *s, const char *t, size_t n);
 BOOL strequal(const char *s1, const char *s2);
+BOOL strequal_unix(const char *s1, const char *s2);
 BOOL strnequal(const char *s1,const char *s2,size_t n);
 BOOL strcsequal(const char *s1,const char *s2);
 int strwicmp(char *psz1, char *psz2);
 void strlower(char *s);
 void strupper(char *s);
+char *strupper_static(const char *s);
 void strnorm(char *s);
 BOOL strisnormal(char *s);
 void string_replace(char *s,char oldc,char newc);
@@ -2041,6 +2060,7 @@ int lp_min_passwd_length(void);
 int lp_oplock_break_wait_time(void);
 int lp_lock_spin_count(void);
 int lp_lock_sleep_time(void);
+int lp_name_cache_timeout(void);
 char *lp_preexec(int );
 char *lp_postexec(int );
 char *lp_rootpreexec(int );
@@ -2128,6 +2148,8 @@ BOOL lp_use_client_driver(int );
 BOOL lp_default_devmode(int );
 BOOL lp_nt_acl_support(int );
 BOOL lp_force_unknown_acl_user(int );
+BOOL lp_use_sendfile(int );
+BOOL lp_profile_acls(int );
 int lp_create_mask(int );
 int lp_force_create_mode(int );
 int lp_security_mask(int );
@@ -2139,7 +2161,6 @@ int lp_force_dir_security_mode(int );
 int lp_max_connections(int );
 int lp_defaultcase(int );
 int lp_minprintspace(int );
-int lp_maxprintjobs(int );
 int lp_printing(int );
 int lp_oplock_contention_limit(int );
 int lp_csc_policy(int );
@@ -2185,6 +2206,7 @@ char *lp_printername(int snum);
 void get_private_directory(pstring priv_dir);
 void lp_set_logfile(const char *name);
 const char *get_called_name(void);
+int lp_maxprintjobs(int snum);
 
 /* The following definitions come from param/params.c  */
 
@@ -2361,6 +2383,7 @@ BOOL secrets_delete(char *key);
 BOOL secrets_store_domain_sid(char *domain, DOM_SID *sid);
 BOOL secrets_fetch_domain_sid(char *domain, DOM_SID *sid);
 char *trust_keystr(char *domain);
+BOOL secrets_lock_trust_account_password(char *domain, BOOL dolock);
 BOOL secrets_fetch_trust_account_password(char *domain, uint8 ret_pwd[16],
                                          time_t *pass_last_set_time);
 BOOL secrets_store_trust_account_password(char *domain, uint8 new_pwd[16]);
@@ -2368,6 +2391,8 @@ BOOL trust_password_delete(char *domain);
 void reset_globals_after_fork(void);
 BOOL secrets_store_ldap_pw(char* dn, char* pw);
 BOOL fetch_ldap_pw(char *dn, char* pw, int len);
+BOOL secrets_named_mutex(const char *name, unsigned int timeout);
+void secrets_named_mutex_release(char *name);
 
 /* The following definitions come from passdb/smbpassfile.c  */
 
@@ -2420,10 +2445,10 @@ WERROR get_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level, fstring s
 uint32 free_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level);
 uint32 add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level);
 WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
-                            fstring printername, fstring architecture, uint32 version);
+                            fstring drivername, 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, struct current_user *user,
+BOOL printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 );
+WERROR delete_printer_driver( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, 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);
@@ -2438,7 +2463,7 @@ WERROR printer_write_default_dev(int snum, const PRINTER_DEFAULT *printer_defaul
 
 /* The following definitions come from printing/pcap.c  */
 
-BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname);
+BOOL pcap_printername_ok(char *pszPrintername, const char *pszPrintcapname);
 void pcap_printer_fn(void (*fn)(char *, char *));
 
 /* The following definitions come from printing/print_cups.c  */
@@ -2492,13 +2517,13 @@ BOOL profile_setup(BOOL rdonly);
 
 NTSTATUS cli_nt_setup_creds(struct cli_state *cli, unsigned char mach_pwd[16]);
 BOOL cli_nt_srv_pwset(struct cli_state *cli, unsigned char *new_hashof_mach_pwd);
-NTSTATUS cli_nt_login_interactive(struct cli_state *cli, char *domain, char *username, 
-                              uint32 smb_userid_low, char *password,
-                              NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3);
-NTSTATUS cli_nt_login_network(struct cli_state *cli, char *domain, char *username, 
-                                                       uint32 smb_userid_low, const char lm_chal[8], 
-                                                       const char *lm_chal_resp, const char *nt_chal_resp,
-                                                       NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3);
+NTSTATUS cli_nt_login_interactive(struct cli_state *cli, char *unix_domain, char *unix_username, 
+                               uint32 smb_userid_low, char *unix_password,
+                               NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3);
+NTSTATUS cli_nt_login_network(struct cli_state *cli, char *unix_domain, char *unix_username, 
+                               uint32 smb_userid_low, const char lm_chal[8], 
+                               const char *lm_chal_resp, const char *nt_chal_resp,
+                               NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3);
 BOOL cli_nt_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr);
 
 /* The following definitions come from rpc_client/cli_netlogon.c  */
@@ -2891,6 +2916,7 @@ BOOL prs_append_data(prs_struct *dst, char *src, uint32 len);
 void prs_set_endian_data(prs_struct *ps, BOOL endian);
 BOOL prs_align(prs_struct *ps);
 BOOL prs_align_uint16(prs_struct *ps);
+BOOL prs_align_uint64(prs_struct *ps);
 BOOL prs_align_needed(prs_struct *ps, uint32 needed);
 char *prs_mem_get(prs_struct *ps, uint32 extra_size);
 void prs_switch_type(prs_struct *ps, BOOL io);
@@ -4630,9 +4656,13 @@ int reply_ctemp(connection_struct *conn, char *inbuf,char *outbuf, int dum_size,
 NTSTATUS unlink_internals(connection_struct *conn, int dirtype, char *name);
 int reply_unlink(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize);
 void fail_readraw(void);
+void send_file_readbraw(connection_struct *conn, files_struct *fsp, SMB_OFF_T startpos, size_t nread,
+               ssize_t mincount, char *outbuf);
 int reply_readbraw(connection_struct *conn, char *inbuf, char *outbuf, int dum_size, int dum_buffsize);
 int reply_lockread(connection_struct *conn, char *inbuf,char *outbuf, int length, int dum_buffsiz);
 int reply_read(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize);
+int send_file_readX(connection_struct *conn, char *inbuf,char *outbuf,int length, 
+               files_struct *fsp, SMB_OFF_T startpos, size_t smb_maxcnt);
 int reply_read_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize);
 int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize);
 int reply_writeunlock(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize);
@@ -4797,6 +4827,8 @@ int vfswrap_open(connection_struct *conn, const char *fname, int flags, mode_t m
 int vfswrap_close(files_struct *fsp, int fd);
 ssize_t vfswrap_read(files_struct *fsp, int fd, void *data, size_t n);
 ssize_t vfswrap_write(files_struct *fsp, int fd, const void *data, size_t n);
+ssize_t vfswrap_sendfile(int tofd, struct files_struct *fsp, int fromfd, const DATA_BLOB *hdr,
+                       SMB_OFF_T offset, size_t n);
 SMB_OFF_T vfswrap_lseek(files_struct *fsp, int filedes, SMB_OFF_T offset, int whence);
 int vfswrap_rename(connection_struct *conn, const char *oldname, const char *newname);
 int vfswrap_fsync(files_struct *fsp, int fd);
@@ -4937,6 +4969,7 @@ int tdb_clear_spinlocks(TDB_CONTEXT *tdb);
 
 /* The following definitions come from tdb/tdb.c  */
 
+void tdb_set_lock_alarm(sig_atomic_t *palarm);
 void tdb_dump_all(TDB_CONTEXT *tdb);
 int tdb_printfreelist(TDB_CONTEXT *tdb);
 enum TDB_ERROR tdb_error(TDB_CONTEXT *tdb);
@@ -4966,7 +4999,8 @@ int tdb_reopen_all(void);
 
 /* The following definitions come from tdb/tdbutil.c  */
 
-int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval);
+int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key, unsigned int timeout);
+int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval, unsigned int timeout);
 void tdb_unlock_bystring(TDB_CONTEXT *tdb, char *keyval);
 int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len);
 int32 tdb_fetch_int32(TDB_CONTEXT *tdb, char *keystr);
index e86c5230ed10f49e916a55d2248263664e79c3b2..e4e31b8ea8fbddbd48bc1289fc40069ce2ac1293 100644 (file)
@@ -156,8 +156,8 @@ typedef struct net_user_info_3
        uint32 buffer_dom_id; /* undocumented logon domain id pointer */
        uint8 padding[40];    /* unused padding bytes.  expansion room */
 
-       uint32 num_other_sids; /* 0 - num_sids */
-       uint32 buffer_other_sids; /* NULL - undocumented pointer to SIDs. */
+       uint32 num_other_sids; /* number of foreign/trusted domain sids */
+       uint32 buffer_other_sids;
        
        UNISTR2 uni_user_name;    /* username unicode string */
        UNISTR2 uni_full_name;    /* user's full name unicode string */
@@ -176,7 +176,7 @@ typedef struct net_user_info_3
 
        uint32 num_other_groups;        /* other groups */
        DOM_GID *other_gids; /* group info */
-       DOM_SID2 *other_sids; /* undocumented - domain SIDs */
+       DOM_SID2 *other_sids; /* foreign/trusted domain SIDs */
 
 } NET_USER_INFO_3;
 
index bb7807293257c10032e6326d71136a49aee55b7c..ab2e45aabd54d4513894bffdf1ead674de064bdc 100644 (file)
@@ -75,6 +75,8 @@ typedef int BOOL;
 #define READ_EOF 2
 #define READ_ERROR 3
 
+/* This error code can go into the client smb_rw_error. */
+#define WRITE_ERROR 4
 
 #define DIR_STRUCT_SIZE 43
 
index 13b833afbbf7d070a7d122a769dbeb5753f58d83..4d65a132b1907d35bf68b94a57c7035a469e59a2 100644 (file)
 #define FNUM_OK(fsp,c) (OPEN_FSP(fsp) && (c)==(fsp)->conn)
 
 #define CHECK_FSP(fsp,conn) if (!FNUM_OK(fsp,conn)) \
-                               return(ERROR_DOS(ERRDOS,ERRbadfid)); \
-                            else if((fsp)->fd == -1) \
-                               return(ERROR_DOS(ERRDOS,ERRbadaccess))
+                               return(ERROR_DOS(ERRDOS,ERRbadfid)); \
+                       else if((fsp)->fd == -1) \
+                               return(ERROR_DOS(ERRDOS,ERRbadaccess))
 
 #define CHECK_READ(fsp) if (!(fsp)->can_read) \
-                               return(ERROR_DOS(ERRDOS,ERRbadaccess))
+                               return(ERROR_DOS(ERRDOS,ERRbadaccess))
 #define CHECK_WRITE(fsp) if (!(fsp)->can_write) \
-                               return(ERROR_DOS(ERRDOS,ERRbadaccess))
+                               return(ERROR_DOS(ERRDOS,ERRbadaccess))
 
 #define CHECK_ERROR(fsp) if (HAS_CACHED_ERROR(fsp)) \
-                                                               return(CACHED_ERROR(fsp))
+                               return(CACHED_ERROR(fsp))
+
+#define ERROR_WAS_LOCK_DENIED(status) (NT_STATUS_EQUAL((status), NT_STATUS_LOCK_NOT_GRANTED) || \
+                               NT_STATUS_EQUAL((status), NT_STATUS_FILE_LOCK_CONFLICT) )
 
 /* translates a connection number into a service number */
 #define SNUM(conn)         ((conn)?(conn)->service:-1)
index 6b381d6c2cecd78e2e9e22336643ec6b28dd24a0..7f5cf1818bf82ac76f6943a6627acb3dbbb21876 100644 (file)
@@ -194,16 +194,19 @@ Byte offset   Type     name                description
 } FSINFO;
 *************************************************************/
 
-#define SMB_INFO_STANDARD               1
-#define SMB_INFO_QUERY_EA_SIZE          2
-#define SMB_INFO_QUERY_EAS_FROM_LIST    3
-#define SMB_INFO_QUERY_ALL_EAS          4
+#define SMB_INFO_STANDARD               1  /* FILESTATUS3 struct */
+#define SMB_INFO_SET_EA                 2  /* EAOP2 struct, only valid on set not query */
+#define SMB_INFO_QUERY_EA_SIZE          2  /* FILESTATUS4 struct, only valid on query not set */
+#define SMB_INFO_QUERY_EAS_FROM_LIST    3  /* only valid on query not set */
+#define SMB_INFO_QUERY_ALL_EAS          4  /* only valid on query not set */
 #define SMB_INFO_IS_NAME_VALID          6
-#define SMB_QUERY_FS_LABEL_INFO                        0x101
-#define SMB_QUERY_FS_VOLUME_INFO               0x102
-#define SMB_QUERY_FS_SIZE_INFO                 0x103
-#define SMB_QUERY_FS_DEVICE_INFO               0x104
-#define SMB_QUERY_FS_ATTRIBUTE_INFO            0x105
+#define SMB_INFO_STANDARD_LONG          11  /* similar to level 1, ie struct FileStatus3 */
+#define SMB_QUERY_EA_SIZE_LONG          12  /* similar to level 2, ie struct FileStatus4 */
+#define SMB_QUERY_FS_LABEL_INFO         0x101
+#define SMB_QUERY_FS_VOLUME_INFO        0x102
+#define SMB_QUERY_FS_SIZE_INFO          0x103
+#define SMB_QUERY_FS_DEVICE_INFO        0x104
+#define SMB_QUERY_FS_ATTRIBUTE_INFO     0x105
 
 
 #define l2_vol_fdateCreation 0
index bbbe2cb8b2d486d6f78fdccc2d0a5d7ba42175a7..9e5c8659526cf0217c29f3d52f8152a94660d8e4 100644 (file)
@@ -41,7 +41,8 @@
 
 /* Changed to version 2 for CIFS UNIX extensions (mknod and link added). JRA. */
 /* Changed to version 3 for POSIX acl extensions. JRA. */
-#define SMB_VFS_INTERFACE_VERSION 3
+/* Changed to version 4 for sendfile extension. JRA. */
+#define SMB_VFS_INTERFACE_VERSION 4
 
 /* VFS operations structure */
 
@@ -73,6 +74,7 @@ struct vfs_ops {
        ssize_t (*read)(struct files_struct *fsp, int fd, void *data, size_t n);
        ssize_t (*write)(struct files_struct *fsp, int fd, const void *data, size_t n);
        SMB_OFF_T (*lseek)(struct files_struct *fsp, int filedes, SMB_OFF_T offset, int whence);
+       ssize_t (*sendfile)(int tofd, files_struct *fsp, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
        int (*rename)(struct connection_struct *conn, const char *old, const char *new);
        int (*fsync)(struct files_struct *fsp, int fd);
        int (*stat)(struct connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf);
index 9d2d46e4114272d71e8de747e06461e08af6f893..7e6c2a75ac62a084845a88ade84fda19642a479c 100644 (file)
@@ -456,66 +456,3 @@ BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type,
                *n_sent = msg_all.n_sent;
        return True;
 }
-
-/** @} **/
-
-static SIG_ATOMIC_T gotalarm;
-
-/***************************************************************
- Signal function to tell us we timed out.
-****************************************************************/
-
-static void gotalarm_sig(void)
-{
-       gotalarm = 1;
-}
-
-/*
-  lock the messaging tdb based on a string - this is used as a primitive form of mutex
-  between smbd instances. 
-*/
-BOOL message_named_mutex(const char *name, unsigned int timeout)
-{
-       TDB_DATA key;
-       int ret;
-
-       if (!message_init())
-               return False;
-
-       key.dptr = (char *)name;
-       key.dsize = strlen(name)+1;
-
-       if (timeout) {
-               gotalarm = 0;
-               CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig);
-               alarm(timeout);
-       }
-
-       ret = tdb_chainlock(tdb, key);
-
-       if (timeout) {
-               alarm(0);
-               CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN);
-               if (gotalarm)
-                       return False;
-       }
-
-       if (ret == 0)
-               DEBUG(10,("message_named_mutex: got mutex for %s\n", name ));
-
-       return (ret == 0);
-}
-
-/*
-  unlock a named mutex
-*/
-void message_named_mutex_release(char *name)
-{
-       TDB_DATA key;
-
-       key.dptr = name;
-       key.dsize = strlen(name)+1;
-
-       tdb_chainunlock(tdb, key);
-       DEBUG(10,("message_named_mutex: released mutex for %s\n", name ));
-}
index e6c34d124f8dde56297688100fb099980bd98d61..95393a94ede7e799240edff1ea19bac6c79201df 100644 (file)
@@ -202,15 +202,11 @@ void standard_sub_basic(char *str, int len)
                        if (*local_machine)
                                string_sub(p,"%L", local_machine,l); 
                        else {
-                               char *ns = p;
-
-                               string_sub(p,"%L", global_myname,l); 
-                               while (*ns)
-                               {
-                                       if (isupper(*ns))
-                                               *ns = tolower(*ns);
-                                       ns++;
-                               }
+                               pstring temp_name;
+
+                               pstrcpy(temp_name, global_myname);
+                               strlower(temp_name);
+                               string_sub(p,"%L", temp_name,l); 
                        }
                        break;
                case 'M' : string_sub(p,"%M", client_name(),l); break;
index c28b28bf4e9f7fb9a26168cfd9fdcc1f6ae80c19..3cc90ee418eb0a646ee6834cea43bf1ac3b3a60f 100644 (file)
@@ -360,7 +360,9 @@ failed with error %s\n", strerror(errno) ));
  
        for (i = 0; i < num_groups; i++) {
                if (gid == groups[i]) {
-                       ret = True;
+                       ret = True;
+                       DEBUG(10,("user_in_winbind_group_list: user |%s| is in group |%s|\n",
+                               user, gname ));
                        break;
                }
        }
@@ -378,6 +380,7 @@ failed with error %s\n", strerror(errno) ));
  
 /****************************************************************************
  Check if a user is in a UNIX group.
+ Names are in UNIX character set format.
 ****************************************************************************/
 
 static BOOL user_in_unix_group_list(char *user,const char *gname)
@@ -394,7 +397,7 @@ static BOOL user_in_unix_group_list(char *user,const char *gname)
         */
  
        if (pass) {
-               if (strequal(gname, gidtoname(pass->pw_gid))) {
+               if (strequal_unix(gname, gidtoname(pass->pw_gid))) {
                        DEBUG(10,("user_in_unix_group_list: group %s is primary group.\n", gname ));
                        return True;
                }
@@ -409,8 +412,9 @@ static BOOL user_in_unix_group_list(char *user,const char *gname)
        for (member = user_list; member; member = member->next) {
                DEBUG(10,("user_in_unix_group_list: checking user %s against member %s\n",
                        user, member->unix_name ));
-               if (strequal(member->unix_name,user)) {
+               if (strequal_unix(member->unix_name,user)) {
                        free_userlist(user_list);
+                       DEBUG(10,("user_in_unix_group_list: user |%s| is in group |%s|\n", user, gname));
                        return(True);
                }
        }
@@ -421,6 +425,7 @@ static BOOL user_in_unix_group_list(char *user,const char *gname)
 
 /****************************************************************************
  Check if a user is in a group list. Ask winbind first, then use UNIX.
+ Names are in UNIX character set format.
 ****************************************************************************/
 
 BOOL user_in_group_list(char *user,char *gname)
@@ -440,6 +445,7 @@ BOOL user_in_group_list(char *user,char *gname)
 /****************************************************************************
  Check if a user is in a user list - can check combinations of UNIX
  and netgroup lists.
+ Names are in UNIX character set format.
 ****************************************************************************/
 
 BOOL user_in_list(char *user,char *list)
@@ -456,8 +462,10 @@ BOOL user_in_list(char *user,char *list)
                /*
                 * Check raw username.
                 */
-               if (strequal(user,tok))
+               if (strequal_unix(user,tok)) {
+                       DEBUG(10,("user_in_list: user |%s| matches |%s|\n", user, tok));
                        return(True);
+               }
 
                /*
                 * Now check to see if any combination
index 0004aa870334e37adb18f657ebd9e8ac7de741b2..fd1a64d77115efbf88bc70424354df93fbe99781 100644 (file)
@@ -33,7 +33,6 @@ extern fstring global_myworkgroup;
  * Some useful sids
  */
 
-DOM_SID global_sid_Builtin;                            /* Local well-known domain */
 DOM_SID global_sid_World_Domain;               /* Everyone domain */
 DOM_SID global_sid_World;                              /* Everyone */
 DOM_SID global_sid_Creator_Owner_Domain;    /* Creator Owner domain */
@@ -41,11 +40,15 @@ DOM_SID global_sid_Creator_Owner;                   /* Creator Owner */
 DOM_SID global_sid_Creator_Group;              /* Creator Group */
 DOM_SID global_sid_NT_Authority;               /* NT Authority */
 DOM_SID global_sid_NULL;                       /* NULL sid */
-DOM_SID global_sid_Builtin_Guests;                     /* Builtin guest users */
 DOM_SID global_sid_Authenticated_Users;                /* All authenticated rids */
 DOM_SID global_sid_Network;                                    /* Network rids */
 DOM_SID global_sid_Anonymous;                          /* Anonymous login */
 
+DOM_SID global_sid_Builtin;                            /* Local well-known domain */
+DOM_SID global_sid_Builtin_Administrators;
+DOM_SID global_sid_Builtin_Users;
+DOM_SID global_sid_Builtin_Guests;                     /* Builtin guest users */
+
 const DOM_SID *global_sid_everyone = &global_sid_World;
 
 typedef struct _known_sid_users {
@@ -175,6 +178,8 @@ static void init_sid_name_map (void)
 void generate_wellknown_sids(void)
 {
        string_to_sid(&global_sid_Builtin, "S-1-5-32");
+       string_to_sid(&global_sid_Builtin_Administrators, "S-1-5-32-544");
+       string_to_sid(&global_sid_Builtin_Users, "S-1-5-32-545");
        string_to_sid(&global_sid_Builtin_Guests, "S-1-5-32-546");
        string_to_sid(&global_sid_World_Domain, "S-1-1");
        string_to_sid(&global_sid_World, "S-1-1-0");
index 74bee94413a1c15ccf36f0cbe6c478fcf54ceb28..c5f1608141a457921aa55548711b928917777893 100644 (file)
@@ -34,42 +34,47 @@ void set_first_token(char *ptr)
 Based on a routine by GJC@VILLAGE.COM. 
 Extensively modified by Andrew.Tridgell@anu.edu.au
 ****************************************************************************/
-BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize)
-{
-  char *s;
-  BOOL quoted;
-  size_t len=1;
-
-  if (!ptr) ptr = &last_ptr;
-  if (!ptr) return(False);
-
-  s = *ptr;
-
-  /* default to simple separators */
-  if (!sep) sep = " \t\n\r";
-
-  /* find the first non sep char */
-  while(*s && strchr(sep,*s)) s++;
 
-  /* nothing left? */
-  if (! *s) return(False);
-
-  /* copy over the token */
-  for (quoted = False; len < bufsize && *s && (quoted || !strchr(sep,*s)); s++)
-    {
-           if (*s == '\"') {
-                   quoted = !quoted;
-           } else {
-                   len++;
-                   *buff++ = *s;
-           }
-    }
+BOOL next_token(char **ptr,char *buff,const char *sep, size_t bufsize)
+{
+       char *s;
+       BOOL quoted;
+       size_t len=1;
+
+       if (!ptr)
+               ptr = &last_ptr;
+       if (!ptr)
+               return(False);
+
+       s = *ptr;
+
+       /* default to simple separators */
+       if (!sep)
+               sep = " \t\n\r";
+
+       /* find the first non sep char */
+       while(*s && strchr(sep,*s))
+               s++;
+
+       /* nothing left? */
+       if (! *s)
+               return(False);
+
+       /* copy over the token */
+       for (quoted = False; len < bufsize && *s && (quoted || !strchr(sep,*s)); s++) {
+               if (*s == '\"') {
+                       quoted = !quoted;
+               } else {
+                       len++;
+                       *buff++ = *s;
+               }
+       }
 
-  *ptr = (*s) ? s+1 : s;  
-  *buff = 0;
-  last_ptr = *ptr;
+       *ptr = (*s) ? s+1 : s;  
+       *buff = 0;
+       last_ptr = *ptr;
 
-  return(True);
+       return(True);
 }
 
 /****************************************************************************
@@ -268,7 +273,7 @@ int StrnCaseCmp(const char *s, const char *t, size_t n)
 }
 
 /*******************************************************************
-  compare 2 strings 
+  compare 2 strings - DOS codepage.
 ********************************************************************/
 BOOL strequal(const char *s1, const char *s2)
 {
@@ -278,6 +283,20 @@ BOOL strequal(const char *s1, const char *s2)
   return(StrCaseCmp(s1,s2)==0);
 }
 
+/*******************************************************************
+  compare 2 strings - UNIX codepage.
+********************************************************************/
+BOOL strequal_unix(const char *s1, const char *s2)
+{
+  pstring dos_s1, dos_s2;
+  if (s1 == s2) return(True);
+  if (!s1 || !s2) return(False);
+  
+  pstrcpy(dos_s1, unix_to_dos_static(s1));
+  pstrcpy(dos_s2, unix_to_dos_static(s2));
+  return(StrCaseCmp(dos_s1,dos_s2)==0);
+}
+
 /*******************************************************************
   compare 2 strings up to and including the nth char.
   ******************************************************************/
@@ -437,6 +456,18 @@ void strupper(char *s)
   }
 }
 
+/* Convert a string to upper case, but don't modify it */
+
+char *strupper_static(const char *s)
+{
+       static pstring str;
+
+       pstrcpy(str, s);
+       strupper(str);
+
+       return str;
+}
+
 /*******************************************************************
   convert a string to "normal" form
 ********************************************************************/
index 560de2192eeeb960eb389c50760aad655c5de474..f6763016aaf90afa1bf7f39a1c1753507ce0a913 100644 (file)
@@ -401,8 +401,8 @@ NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx,
 /* Logon domain user */
 
 NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
-                                char *username, char *password,
-                                int logon_type)
+                               const char *unix_username, const char *unix_password,
+                               int logon_type)
 {
        prs_struct qbuf, rbuf;
        NET_Q_SAM_LOGON q;
@@ -413,10 +413,16 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
         NET_ID_INFO_CTR ctr;
         NET_USER_INFO_3 user;
         int validation_level = 3;
+       fstring dos_username, dos_password;
 
        ZERO_STRUCT(q);
        ZERO_STRUCT(r);
 
+       fstrcpy(dos_username, unix_username);
+       unix_to_dos(dos_username);
+       fstrcpy(dos_password, unix_password);
+       unix_to_dos(dos_password);
+
        /* Initialise parse structures */
 
        prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
@@ -437,12 +443,12 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
         case INTERACTIVE_LOGON_TYPE: {
                 unsigned char lm_owf_user_pwd[16], nt_owf_user_pwd[16];
 
-                nt_lm_owf_gen(password, nt_owf_user_pwd, lm_owf_user_pwd);
+                nt_lm_owf_gen(dos_password, nt_owf_user_pwd, lm_owf_user_pwd);
 
                 init_id_info1(&ctr.auth.id1, lp_workgroup(), 
                               0, /* param_ctrl */
                               0xdead, 0xbeef, /* LUID? */
-                              username, cli->clnt_name_slash,
+                              dos_username, cli->clnt_name_slash,
                               (char *)cli->sess_key, lm_owf_user_pwd,
                               nt_owf_user_pwd);
 
@@ -455,13 +461,13 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
 
                 generate_random_buffer(chal, 8, False);
 
-                SMBencrypt((const uchar *)password, chal, local_lm_response);
-                SMBNTencrypt((const uchar *)password, chal, local_nt_response);
+                SMBencrypt((const uchar *)dos_password, chal, local_lm_response);
+                SMBNTencrypt((const uchar *)dos_password, chal, local_nt_response);
 
                 init_id_info2(&ctr.auth.id2, lp_workgroup(), 
                               0, /* param_ctrl */
                               0xdead, 0xbeef, /* LUID? */
-                              username, cli->clnt_name_slash, chal,
+                              dos_username, cli->clnt_name_slash, chal,
                               local_lm_response, 24, local_nt_response, 24);
                 break;
         }
@@ -508,7 +514,7 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
  **/
 
 NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
-                                       const char *username, const char *domain, const char *workstation, 
+                                       const char *unix_username, const char *unix_domain, const char *workstation, 
                                        const uint8 chal[8],
                                        DATA_BLOB lm_response, DATA_BLOB nt_response,
                                        NET_USER_INFO_3 *info3)
@@ -523,10 +529,16 @@ NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_c
        extern pstring global_myname;
        int validation_level = 3;
        char *workstation_name_slash;
-       
+       fstring dos_username, dos_domain;
+
        ZERO_STRUCT(q);
        ZERO_STRUCT(r);
 
+       fstrcpy(dos_username, unix_username);
+       unix_to_dos(dos_username);
+       fstrcpy(dos_domain, unix_domain);
+       unix_to_dos(dos_domain);
+
        workstation_name_slash = talloc_asprintf(mem_ctx, "\\\\%s", workstation);
        
        if (!workstation_name_slash) {
@@ -550,10 +562,10 @@ NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_c
 
         ctr.switch_value = NET_LOGON_TYPE;
 
-       init_id_info2(&ctr.auth.id2, domain,
+       init_id_info2(&ctr.auth.id2, dos_domain,
                      0, /* param_ctrl */
                      0xdead, 0xbeef, /* LUID? */
-                     username, workstation_name_slash, (const uchar*)chal,
+                     dos_username, workstation_name_slash, (const uchar*)chal,
                      lm_response.data, lm_response.length, nt_response.data, nt_response.length);
  
         init_sam_info(&q.sam_id, cli->srv_name_slash, global_myname,
@@ -677,4 +689,3 @@ password ?).\n", cli->desthost ));
 }
 
 #endif /* JERRY */
-
index 643d8424f23351cc0d018de8a2f5e5c56f7a4e74..0da6b03dcd5f9a3676950ef7d76d125f1586a7a0 100644 (file)
 
 
 static const struct {
-    int prot;
-    const char *name;
-  }
-prots[] = 
-    {
-      {PROTOCOL_CORE,"PC NETWORK PROGRAM 1.0"},
-      {PROTOCOL_COREPLUS,"MICROSOFT NETWORKS 1.03"},
-      {PROTOCOL_LANMAN1,"MICROSOFT NETWORKS 3.0"},
-      {PROTOCOL_LANMAN1,"LANMAN1.0"},
-      {PROTOCOL_LANMAN2,"LM1.2X002"},
-      {PROTOCOL_LANMAN2,"Samba"},
-      {PROTOCOL_NT1,"NT LANMAN 1.0"},
-      {PROTOCOL_NT1,"NT LM 0.12"},
-      {-1,NULL}
-    };
-
+       int prot;
+       const char *name;
+} prots[] = {
+       {PROTOCOL_CORE,"PC NETWORK PROGRAM 1.0"},
+       {PROTOCOL_COREPLUS,"MICROSOFT NETWORKS 1.03"},
+       {PROTOCOL_LANMAN1,"MICROSOFT NETWORKS 3.0"},
+       {PROTOCOL_LANMAN1,"LANMAN1.0"},
+       {PROTOCOL_LANMAN2,"LM1.2X002"},
+       {PROTOCOL_LANMAN2,"Samba"},
+       {PROTOCOL_NT1,"NT LANMAN 1.0"},
+       {PROTOCOL_NT1,"NT LM 0.12"},
+       {-1,NULL}
+};
 
 /****************************************************************************
-do an old lanman2 style session setup
+ Do an old lanman2 style session setup.
 ****************************************************************************/
+
 static BOOL cli_session_setup_lanman2(struct cli_state *cli, char *user, 
                                      char *pass, int passlen)
 {
@@ -109,10 +107,10 @@ static BOOL cli_session_setup_lanman2(struct cli_state *cli, char *user,
        return True;
 }
 
-
 /****************************************************************************
-work out suitable capabilities to offer the server
+ Work out suitable capabilities to offer the server.
 ****************************************************************************/
+
 static uint32 cli_session_setup_capabilities(struct cli_state *cli)
 {
        uint32 capabilities = CAP_NT_SMBS;
@@ -132,10 +130,10 @@ static uint32 cli_session_setup_capabilities(struct cli_state *cli)
        return capabilities;
 }
 
-
 /****************************************************************************
-do a NT1 guest session setup
+ Do a NT1 guest session setup.
 ****************************************************************************/
+
 static BOOL cli_session_setup_guest(struct cli_state *cli)
 {
        char *p;
@@ -182,10 +180,10 @@ static BOOL cli_session_setup_guest(struct cli_state *cli)
        return True;
 }
 
-
 /****************************************************************************
-do a NT1 plaintext session setup
+ Do a NT1 plaintext session setup.
 ****************************************************************************/
+
 static BOOL cli_session_setup_plaintext(struct cli_state *cli, char *user, 
                                        char *pass, char *workgroup)
 {
@@ -239,8 +237,9 @@ static BOOL cli_session_setup_plaintext(struct cli_state *cli, char *user,
 
 
 /****************************************************************************
-do a NT1 NTLM/LM encrypted session setup
+ Do a NT1 NTLM/LM encrypted session setup.
 ****************************************************************************/
+
 static BOOL cli_session_setup_nt1(struct cli_state *cli, char *user, 
                                  char *pass, int passlen,
                                  char *ntpass, int ntpasslen,
@@ -319,6 +318,7 @@ static BOOL cli_session_setup_nt1(struct cli_state *cli, char *user,
  format and must be converted to DOS codepage format before sending. If the
  password is in plaintext, the same should be done.
 ****************************************************************************/
+
 BOOL cli_session_setup(struct cli_state *cli, 
                       char *user, 
                       char *pass, int passlen,
@@ -394,8 +394,9 @@ BOOL cli_ulogoff(struct cli_state *cli)
 }
 
 /****************************************************************************
-send a tconX
+ Send a tconX.
 ****************************************************************************/
+
 BOOL cli_send_tconX(struct cli_state *cli, 
                    const char *share, const char *dev, const char *pass, int passlen)
 {
@@ -484,8 +485,9 @@ BOOL cli_send_tconX(struct cli_state *cli,
 
 
 /****************************************************************************
-send a tree disconnect
+ Send a tree disconnect.
 ****************************************************************************/
+
 BOOL cli_tdis(struct cli_state *cli)
 {
        memset(cli->outbuf,'\0',smb_size);
@@ -503,8 +505,9 @@ BOOL cli_tdis(struct cli_state *cli)
 
 
 /****************************************************************************
-send a negprot command
+ Send a negprot command.
 ****************************************************************************/
+
 void cli_negprot_send(struct cli_state *cli)
 {
        char *p;
@@ -534,8 +537,9 @@ void cli_negprot_send(struct cli_state *cli)
 
 
 /****************************************************************************
-send a negprot command
+ Send a negprot command.
 ****************************************************************************/
+
 BOOL cli_negprot(struct cli_state *cli)
 {
        char *p;
@@ -629,8 +633,9 @@ BOOL cli_negprot(struct cli_state *cli)
 
 
 /****************************************************************************
-  send a session request.  see rfc1002.txt 4.3 and 4.3.2
+ Send a session request.  see rfc1002.txt 4.3 and 4.3.2.
 ****************************************************************************/
+
 BOOL cli_session_request(struct cli_state *cli,
                         struct nmb_name *calling, struct nmb_name *called)
 {
@@ -733,8 +738,9 @@ retry:
 }
 
 /****************************************************************************
-open the client sockets
+ Open the client sockets.
 ****************************************************************************/
+
 BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip)
 {
        extern pstring user_socket_options;
@@ -789,8 +795,9 @@ BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip)
 }
 
 /****************************************************************************
-establishes a connection right up to doing tconX, reading in a password.
+ Establishes a connection right up to doing tconX, reading in a password.
 ****************************************************************************/
+
 BOOL cli_establish_connection(struct cli_state *cli, 
                                char *dest_host, struct in_addr *dest_ip,
                                struct nmb_name *calling, struct nmb_name *called,
@@ -804,49 +811,39 @@ BOOL cli_establish_connection(struct cli_state *cli,
        /* establish connection */
 
        if ((!cli->initialised))
-       {
                return False;
-       }
 
-       if (cli->fd == -1)
-       {
-               if (!cli_connect(cli, dest_host, dest_ip))
-               {
+       if (cli->fd == -1) {
+               if (!cli_connect(cli, dest_host, dest_ip)) {
                        DEBUG(1,("cli_establish_connection: failed to connect to %s (%s)\n",
                                          nmb_namestr(called), inet_ntoa(*dest_ip)));
                        return False;
                }
        }
 
-       if (!cli_session_request(cli, calling, called))
-       {
+       if (!cli_session_request(cli, calling, called)) {
                DEBUG(1,("failed session request\n"));
                if (do_shutdown)
                        cli_shutdown(cli);
                return False;
        }
 
-       if (!cli_negprot(cli))
-       {
+       if (!cli_negprot(cli)) {
                DEBUG(1,("failed negprot\n"));
                if (do_shutdown)
                        cli_shutdown(cli);
                return False;
        }
 
-       if (cli->pwd.cleartext || cli->pwd.null_pwd)
-       {
+       if (cli->pwd.cleartext || cli->pwd.null_pwd) {
                fstring passwd;
                int pass_len;
 
-               if (cli->pwd.null_pwd)
-               {
+               if (cli->pwd.null_pwd) {
                        /* attempt null session */
                        passwd[0] = 0;
                        pass_len = 1;
-               }
-               else
-               {
+               } else {
                        /* attempt clear-text session */
                        pwd_get_cleartext(&(cli->pwd), passwd);
                        pass_len = strlen(passwd);
@@ -856,31 +853,22 @@ BOOL cli_establish_connection(struct cli_state *cli,
                if (!cli_session_setup(cli, cli->user_name,
                               passwd, pass_len,
                               NULL, 0,
-                              cli->domain))
-               {
+                              cli->domain)) {
                        DEBUG(1,("failed session setup\n"));
                        if (do_shutdown)
-                       {
                                cli_shutdown(cli);
-                       }
                        return False;
                }
-               if (do_tcon)
-               {
+               if (do_tcon) {
                        if (!cli_send_tconX(cli, service, service_type,
-                                           (char*)passwd, strlen(passwd)))
-                       {
+                                           (char*)passwd, strlen(passwd))) {
                                DEBUG(1,("failed tcon_X\n"));
                                if (do_shutdown)
-                               {
                                        cli_shutdown(cli);
-                               }
                                return False;
                        }
                }
-       }
-       else
-       {
+       } else {
                /* attempt encrypted session */
                unsigned char nt_sess_pwd[24];
                unsigned char lm_sess_pwd[24];
@@ -893,8 +881,7 @@ BOOL cli_establish_connection(struct cli_state *cli,
                if (!cli_session_setup(cli, cli->user_name,
                               (char*)lm_sess_pwd, sizeof(lm_sess_pwd),
                               (char*)nt_sess_pwd, sizeof(nt_sess_pwd),
-                              cli->domain))
-               {
+                              cli->domain)) {
                        DEBUG(1,("failed session setup\n"));
                        if (do_shutdown)
                              cli_shutdown(cli);
@@ -903,22 +890,19 @@ BOOL cli_establish_connection(struct cli_state *cli,
 
                DEBUG(1,("session setup ok\n"));
     
-               if (*cli->server_domain || *cli->server_os || *cli->server_type)
-               {
+               if (*cli->server_domain || *cli->server_os || *cli->server_type) {
                        DEBUG(1,("Domain=[%s] OS=[%s] Server=[%s]\n",
                                 cli->server_domain,
                                 cli->server_os,
                                 cli->server_type));
                }
                
-               if (do_tcon)
-               {
+               if (do_tcon) {
                        if (!cli_send_tconX(cli, service, service_type,
-                                           (char*)nt_sess_pwd, sizeof(nt_sess_pwd)))
-                       {
+                                           (char*)nt_sess_pwd, sizeof(nt_sess_pwd))) {
                                DEBUG(1,("failed tcon_X\n"));
                                if (do_shutdown)
-                  cli_shutdown(cli);
+                                       cli_shutdown(cli);
                                return False;
                        }
                }
@@ -930,7 +914,9 @@ BOOL cli_establish_connection(struct cli_state *cli,
        return True;
 }
 
-/* Initialise client credentials for authenticated pipe access */
+/****************************************************************************
+ Initialise client credentials for authenticated pipe access.
+****************************************************************************/
 
 static void init_creds(struct ntuser_creds *creds, char* username,
                       char* domain, char* password, int pass_len)
@@ -948,8 +934,9 @@ static void init_creds(struct ntuser_creds *creds, char* username,
 }
 
 /****************************************************************************
-establishes a connection right up to doing tconX, password specified.
+ Establishes a connection right up to doing tconX, password specified.
 ****************************************************************************/
+
 NTSTATUS cli_full_connection(struct cli_state **output_cli, 
                             const char *my_name, const char *dest_host, 
                             struct in_addr *dest_ip, int port,
@@ -1085,18 +1072,21 @@ BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char
 
                        DEBUG(0,("attempt_netbios_session_request: %s rejected the session for name *SMBSERVER with error %s.\n", 
                                desthost, cli_errstr(cli) ));
-                       cli_shutdown(cli);
                        return False;
                }
 
-               cli_shutdown(cli);
+               /*
+                * We need to close the connection here but can't call cli_shutdown as
+                * will free an allocated cli struct. cli_close_connection was invented
+                * for this purpose. JRA. Based on work by "Kim R. Pedersen" <krp@filanet.dk>.
+                */
+
+               cli_close_connection(cli);
 
                if (!cli_initialise(cli) || !cli_connect(cli, desthost, pdest_ip) ||
-                               !cli_session_request(cli, &calling, &smbservername)) 
-               {
+                               !cli_session_request(cli, &calling, &smbservername)) {
                        DEBUG(0,("attempt_netbios_session_request: %s rejected the session for name *SMBSERVER with error %s\n", 
                                desthost, cli_errstr(cli) ));
-                       cli_shutdown(cli);
                        return False;
                }
        }
index dae9f4de11a0d9eb939396b7021e6591d36e04e0..867b13fe8cb84a0e006d369a7329055a1ed17e03 100644 (file)
 
 #include "includes.h"
 
-/*
- * Change the port number used to call on 
- */
+/****************************************************************************
+ Change the port number used to call on.
+****************************************************************************/
+
 int cli_set_port(struct cli_state *cli, int port)
 {
        cli->port = port;
@@ -33,14 +34,17 @@ int cli_set_port(struct cli_state *cli, int port)
 }
 
 /****************************************************************************
-recv an smb
+ Recv an smb.
 ****************************************************************************/
+
 BOOL cli_receive_smb(struct cli_state *cli)
 {
+       extern int smb_read_error;
        BOOL ret;
 
        /* fd == -1 causes segfaults -- Tom (tom@ninja.nl) */
-       if (cli->fd == -1) return False; 
+       if (cli->fd == -1)
+               return False; 
 
  again:
        ret = client_receive_smb(cli->fd,cli->inbuf,abs(cli->timeout));
@@ -63,17 +67,17 @@ BOOL cli_receive_smb(struct cli_state *cli)
        }
 
         /* If the server is not responding, note that now */
-
-        if (!ret && cli->timeout > 0) {
-                close(cli->fd);
-                cli->fd = -1;
-        }
+       if (!ret) {
+               cli->smb_rw_error = smb_read_error;
+               close(cli->fd);
+               cli->fd = -1;
+       }
 
        return ret;
 }
 
 /****************************************************************************
 send an smb to a fd.
Send an smb to a fd.
 ****************************************************************************/
 
 BOOL cli_send_smb(struct cli_state *cli)
@@ -83,7 +87,8 @@ BOOL cli_send_smb(struct cli_state *cli)
        ssize_t ret;
 
        /* fd == -1 causes segfaults -- Tom (tom@ninja.nl) */
-       if (cli->fd == -1) return False;
+       if (cli->fd == -1)
+               return False;
 
        len = smb_len(cli->outbuf) + 4;
 
@@ -92,8 +97,9 @@ BOOL cli_send_smb(struct cli_state *cli)
                if (ret <= 0) {
                         close(cli->fd);
                         cli->fd = -1;
-                       DEBUG(0,("Error writing %d bytes to client. %d\n",
-                                (int)len,(int)ret));
+                       cli->smb_rw_error = WRITE_ERROR;
+                       DEBUG(0,("Error writing %d bytes to client. %d (%s)\n",
+                                (int)len,(int)ret, strerror(errno) ));
                        return False;
                }
                nwritten += ret;
@@ -103,8 +109,9 @@ BOOL cli_send_smb(struct cli_state *cli)
 }
 
 /****************************************************************************
-setup basics in a outgoing packet
+ Setup basics in a outgoing packet.
 ****************************************************************************/
+
 void cli_setup_packet(struct cli_state *cli)
 {
         cli->rap_error = 0;
@@ -126,18 +133,18 @@ void cli_setup_packet(struct cli_state *cli)
 }
 
 /****************************************************************************
-setup the bcc length of the packet from a pointer to the end of the data
+ Setup the bcc length of the packet from a pointer to the end of the data.
 ****************************************************************************/
+
 void cli_setup_bcc(struct cli_state *cli, void *p)
 {
        set_message_bcc(cli->outbuf, PTR_DIFF(p, smb_buf(cli->outbuf)));
 }
 
-
-
 /****************************************************************************
-initialise a client structure
+ Initialise a client structure.
 ****************************************************************************/
+
 void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr)
 {
         /* copy_nt_creds(&cli->usr, usr); */
@@ -152,10 +159,10 @@ void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr)
                cli->ntlmssp_flags,cli->ntlmssp_cli_flgs));
 }
 
-
 /****************************************************************************
-initialise a client structure
+ Initialise a client structure.
 ****************************************************************************/
+
 struct cli_state *cli_initialise(struct cli_state *cli)
 {
         BOOL alloced_cli = False;
@@ -174,9 +181,8 @@ struct cli_state *cli_initialise(struct cli_state *cli)
                 alloced_cli = True;
        }
 
-       if (cli->initialised) {
-               cli_shutdown(cli);
-       }
+       if (cli->initialised)
+               cli_close_connection(cli);
 
        ZERO_STRUCTP(cli);
 
@@ -196,9 +202,8 @@ struct cli_state *cli_initialise(struct cli_state *cli)
        /* Set the CLI_FORCE_DOSERR environment variable to test
           client routines using DOS errors instead of STATUS32
           ones.  This intended only as a temporary hack. */    
-       if (getenv("CLI_FORCE_DOSERR")) {
+       if (getenv("CLI_FORCE_DOSERR"))
                cli->force_dos_errors = True;
-       }
 
        if (!cli->outbuf || !cli->inbuf)
                 goto error;
@@ -230,16 +235,18 @@ struct cli_state *cli_initialise(struct cli_state *cli)
 }
 
 /****************************************************************************
-shutdown a client structure
+ Close a client connection and free the memory without destroying cli itself.
 ****************************************************************************/
-void cli_shutdown(struct cli_state *cli)
+
+void cli_close_connection(struct cli_state *cli)
 {
-       BOOL allocated;
        SAFE_FREE(cli->outbuf);
        SAFE_FREE(cli->inbuf);
 
-       if (cli->mem_ctx)
+       if (cli->mem_ctx) {
                talloc_destroy(cli->mem_ctx);
+               cli->mem_ctx = NULL;
+       }
 
 #ifdef WITH_SSL
        if (cli->fd != -1)
@@ -247,25 +254,36 @@ void cli_shutdown(struct cli_state *cli)
 #endif /* WITH_SSL */
        if (cli->fd != -1) 
                close(cli->fd);
-       allocated = cli->allocated;
+       cli->fd = -1;
+       cli->smb_rw_error = 0;
+}
+
+/****************************************************************************
+ Shutdown a client structure.
+****************************************************************************/
+
+void cli_shutdown(struct cli_state *cli)
+{
+       BOOL allocated = cli->allocated;
+       cli_close_connection(cli);
        ZERO_STRUCTP(cli);
-       if (allocated) {
+       if (allocated)
                SAFE_FREE(cli);
-       } 
 }
 
-
 /****************************************************************************
-set socket options on a open connection
+ Set socket options on a open connection.
 ****************************************************************************/
+
 void cli_sockopt(struct cli_state *cli, char *options)
 {
        set_socket_options(cli->fd, options);
 }
 
 /****************************************************************************
-set the PID to use for smb messages. Return the old pid.
+ Set the PID to use for smb messages. Return the old pid.
 ****************************************************************************/
+
 uint16 cli_setpid(struct cli_state *cli, uint16 pid)
 {
        uint16 ret = cli->pid;
@@ -274,8 +292,9 @@ uint16 cli_setpid(struct cli_state *cli, uint16 pid)
 }
 
 /****************************************************************************
-Send a keepalive packet to the server
+ Send a keepalive packet to the server.
 ****************************************************************************/
+
 BOOL cli_send_keepalive(struct cli_state *cli)
 {
         if (cli->fd == -1) {
@@ -285,7 +304,8 @@ BOOL cli_send_keepalive(struct cli_state *cli)
         if (!send_keepalive(cli->fd)) {
                 close(cli->fd);
                 cli->fd = -1;
-                DEBUG(0,("Error sending keepalive packet to client.\n"));
+                DEBUG(0,("Error sending keepalive packet to client. (%s)\n",
+                                       strerror(errno) ));
                 return False;
         }
         return True;
index 33c359fc2d3de8a13bc05bea37e735169cc3026d..30a4344555eb021f65cd5db6adc5baa621556035 100644 (file)
@@ -81,6 +81,33 @@ char *cli_errstr(struct cli_state *cli)
                return cli_error_message;
        }
                
+       /* Was it server socket error ? */
+       if (cli->fd == -1 && cli->smb_rw_error) {
+               switch(cli->smb_rw_error) {
+                       case READ_TIMEOUT:
+                               slprintf(cli_error_message, sizeof(cli_error_message) - 1,
+                                       "Call timed out: server did not respond after %d milliseconds", 
+                                       cli->timeout);
+                               break;
+                       case READ_EOF:
+                               slprintf(cli_error_message, sizeof(cli_error_message) - 1,
+                                       "Call returned zero bytes (EOF)\n" );
+                               break;
+                       case READ_ERROR:
+                               slprintf(cli_error_message, sizeof(cli_error_message) - 1,
+                                       "Read error: %s\n", strerror(errno) );
+                               break;
+                       case WRITE_ERROR:
+                               slprintf(cli_error_message, sizeof(cli_error_message) - 1,
+                                       "Write error: %s\n", strerror(errno) );
+                               break;
+                       default:
+                               slprintf(cli_error_message, sizeof(cli_error_message) - 1,
+                                       "Unknown error code %d\n", cli->smb_rw_error );
+                               break;
+               }
+               return cli_error_message;
+       }
 
         /* Case #1: RAP error */
        if (cli->rap_error) {
index 647bf54be61b4ec73efcd328ee83330a3af2bce8..77ffe7b41b021b2504c72d705ae7ae0be9c0ab5b 100644 (file)
@@ -59,7 +59,6 @@ static int interpret_long_filename(struct cli_state *cli,
                                    sizeof(finfo->name),
                                    len, 
                                    STR_TERMINATE);
-                       p += 1; /* Skip the trailing \0 too */
                        return PTR_DIFF(p, base);
 
                case 2: /* this is what OS/2 uses mostly */
index 09825ac6f1e0a023571d2786d5a3232a5133c8d9..e4bbd047ab7c131e9856348730e904a504f9af84 100644 (file)
@@ -862,7 +862,14 @@ static BOOL internal_resolve_name(const char *name, int name_type,
        }
     return True;
   }
-  
+  /* Check netbios name cache */
+
+  if (namecache_fetch(name, name_type, return_iplist, return_count)) {
+    /* This could be a negative response */
+    return (*return_count > 0);
+  }
+
   pstrcpy(name_resolve_list, lp_name_resolve_order());
   ptr = name_resolve_list;
   if (!ptr || !*ptr)
index 21f6bb7cf27e6b9c108d46a323b28a5c2962952c..2c9da0568897b63adb0621dcfc27800729ffc7df 100644 (file)
@@ -143,7 +143,7 @@ static NTSTATUS do_lock(files_struct *fsp,connection_struct *conn, uint16 lock_p
 }
 
 /****************************************************************************
- Utility function called by locking requests. This is *DISGISTING*. It also
+ Utility function called by locking requests. This is *DISGUSTING*. It also
  appears to be "What Windows Does" (tm). Andrew, ever wonder why Windows 2000
  is so slow on the locking tests...... ? This is the reason. Much though I hate
  it, we need this. JRA.
index 52340f1f3108c103edb87bbc0a2244b4107adc3e..cd8dbf868cb598c8dbcc6ecb818d0cd2eda1eab3 100644 (file)
@@ -110,6 +110,16 @@ in workgroup %s on subnet %s\n",
   /* Tell the namelist writer to write out a change. */
   subrec->work_changed = True;
 
+  /*
+   * Add the WORKGROUP<1C> name to the UNICAST subnet with the IP address
+   * for this subnet so we will respond to queries on this name.
+   */
+  {
+         struct nmb_name nmbname;
+         make_nmb_name(&nmbname,global_myworkgroup,0x1c);
+         insert_permanent_name_into_unicast(subrec, &nmbname, 0x1c);
+  }
+
   DEBUG(0,("become_logon_server_success: Samba is now a logon server \
 for workgroup %s on subnet %s\n", work->work_group, subrec->subnet_name));
 }
index c8dac82aa15142edd537ea200c8468d5582b2e3b..4fbd442c88014d7fabc3720a2990a9a62e60e82c 100644 (file)
@@ -71,7 +71,11 @@ static void sync_child(char *name, int nm_type,
        uint32 local_type = local ? SV_TYPE_LOCAL_LIST_ONLY : 0;
        struct nmb_name called, calling;
 
-       if (!cli_initialise(&cli) || !cli_connect(&cli, name, &ip)) {
+       /* W2K DMB's return empty browse lists on port 445. Use 139.
+        * Patch from Andy Levine andyl@epicrealm.com.
+        */
+
+       if (!cli_initialise(&cli) || !cli_set_port(&cli, 139) || !cli_connect(&cli, name, &ip)) {
                return;
        }
 
index efeb26fe45fa63a6fbf5652eb99a1e694918fb2f..4f13df3b7b24b9cdf80f8e1c95b51b94372ce14d 100644 (file)
@@ -23,7 +23,7 @@
 */
 
 #include "includes.h"
-#include "nsswitch/nss.h"
+#include "nsswitch/sys_nss.h"
 
 NSS_STATUS winbindd_request(int req_type,
                                  struct winbindd_request *request,
index 3b44c40ba2652f782335a7592b4a037fb1886f4a..2879db8f6913895e0463b5524ab460befcf3543a 100644 (file)
@@ -451,9 +451,10 @@ static BOOL wbinfo_auth(char *username)
         printf("plaintext password authentication %s\n", 
                (result == NSS_STATUS_SUCCESS) ? "succeeded" : "failed");
 
-       printf("error code was %s (0x%x)\n", 
-                response.data.auth.nt_status_string, 
-                response.data.auth.nt_status);
+       if (response.data.auth.nt_status)
+               printf("error code was %s (0x%x)\n", 
+                      response.data.auth.nt_status_string, 
+                      response.data.auth.nt_status);
 
         return result == NSS_STATUS_SUCCESS;
 }
@@ -507,9 +508,10 @@ static BOOL wbinfo_auth_crap(char *username)
         printf("challenge/response password authentication %s\n", 
                (result == NSS_STATUS_SUCCESS) ? "succeeded" : "failed");
 
-       printf("error code was %s (0x%x)\n", 
-              response.data.auth.nt_status_string, 
-              response.data.auth.nt_status);
+       if (response.data.auth.nt_status)
+               printf("error code was %s (0x%x)\n", 
+                      response.data.auth.nt_status_string, 
+                      response.data.auth.nt_status);
 
         return result == NSS_STATUS_SUCCESS;
 }
@@ -535,7 +537,7 @@ static BOOL print_domain_users(void)
        /* Look through extra data */
 
        if (!response.extra_data)
-               return False;
+               goto done;
 
        extra_data = (char *)response.extra_data;
 
@@ -544,6 +546,10 @@ static BOOL print_domain_users(void)
        
        SAFE_FREE(response.extra_data);
 
+done:
+       if (response.nt_status)
+               printf("0x%08x\n", response.nt_status);
+
        return True;
 }
 
@@ -564,7 +570,7 @@ static BOOL print_domain_groups(void)
        /* Look through extra data */
 
        if (!response.extra_data)
-               return False;
+               goto done;
 
        extra_data = (char *)response.extra_data;
 
@@ -572,6 +578,10 @@ static BOOL print_domain_groups(void)
                printf("%s\n", name);
 
        SAFE_FREE(response.extra_data);
+
+done:
+       if (response.nt_status)
+               printf("0x%08x\n", response.nt_status);
        
        return True;
 }
@@ -632,6 +642,7 @@ static void usage(void)
 {
        printf("Usage: wbinfo -ug | -n name | -sSY sid | -UG uid/gid | -tm "
                "| -[aA] user%%password\n");
+       printf("Version: %s\n", VERSION);
        printf("\t-u\t\t\tlists all domain users\n");
        printf("\t-g\t\t\tlists all domain groups\n");
        printf("\t-n name\t\t\tconverts name to sid\n");
@@ -647,8 +658,9 @@ static void usage(void)
        printf("\t-r user\t\t\tget user groups\n");
        printf("\t-a user%%password\tauthenticate user\n");
        printf("\t-A user%%password\tstore user and password used by winbindd (root only)\n");
-       printf("\t-p 'ping' winbindd to see if it is alive\n");
+       printf("\t-p\t\t\t'ping' winbindd to see if it is alive\n");
        printf("\t--sequence\t\tshow sequence numbers of all domains\n");
+       printf("\t--set-auth-user DOMAIN\\user%%password\tset password for restrict anonymous\n");
 }
 
 /* Main program */
index 00cd5c12e4798dc08131cb3de47d8d92cc318c71..eac80994fc3f83e17f79cf9991fbb2c44b3171c7 100644 (file)
@@ -66,7 +66,7 @@
 #include <sys/stat.h>
 #include <errno.h>
 #include <pwd.h>
-#include "nsswitch/nss.h"
+#include "nsswitch/sys_nss.h"
 
 /* Declarations for functions in winbind_nss.c
    needed in winbind_nss_solaris.c (solaris wrapper to nss) */
index 65361b571c45c010115d11c670bab179815754de..b4fe60487cf2d20181cfa92a5fca6c6ea364f756 100644 (file)
@@ -297,6 +297,9 @@ static void process_request(struct winbindd_cli_state *state)
                if (state->request.cmd == table->cmd) {
                        DEBUG(10,("process_request: request fn %s\n", table->winbindd_cmd_name ));
                        state->response.result = table->fn(state);
+                       if (state->response.nt_status)
+                               DEBUG(10, ("returning extended error 0x%08x\n",
+                                          state->response.nt_status));
                        break;
                }
        }
@@ -619,7 +622,7 @@ static void process_loop(int accept_sock)
 
                                        if (state->read_buf_len >= sizeof(uint32)
                                            && *(uint32 *) &state->request != sizeof(state->request)) {
-                                               DEBUG(0,("process_loop: Invalid request size (%d) send, should be (%d)\n",
+                                               DEBUG(0,("process_loop: Invalid request size (%d) sent, should be (%d)\n",
                                                                *(uint32 *) &state->request, sizeof(state->request)));
 
                                                remove_client(state);
@@ -657,6 +660,11 @@ static void process_loop(int accept_sock)
 
                        flush_caches();
                        reload_services_file(True);
+#if 0 /* Notised at present. */
+                       namecache_flush();
+#endif
+                       winbindd_cm_flush();
+
                        do_sighup = False;
                }
 
@@ -675,6 +683,7 @@ struct winbindd_state server_state;   /* Server state information */
 static void usage(void)
 {
        printf("Usage: winbindd [options]\n");
+       printf("Version: %s\n", VERSION);
        printf("\t-i                interactive mode\n");
        printf("\t-n                disable cacheing\n");
        printf("\t-d level          set debug level\n");
@@ -811,6 +820,10 @@ int main(int argc, char **argv)
 
        }
 
+#if 0 /* Notised at present. */
+       namecache_enable();     /* Enable netbios namecache */
+#endif
+
        /* Get list of domains we look up requests for.  This includes the
           domain which we are a member of as well as any trusted
           domains. */ 
index 4d35c27c21339ba6d74a5887053247443101b9ad..5329164f731793e78e14888d864f5a00b3263448 100644 (file)
@@ -100,6 +100,7 @@ struct winbindd_domain {
 
        time_t last_seq_check;
        uint32 sequence_number;
+       NTSTATUS last_status;
 
        /* Linked list info */
 
index 4978ced334da8ba4fb12521e2adfb757d3563547..920b0d388d722cce73fbac11edda7b2cf22ca5cb 100644 (file)
@@ -215,11 +215,29 @@ static void refresh_sequence_number(struct winbindd_domain *domain, BOOL force)
 
        status = wcache->backend->sequence_number(domain, &domain->sequence_number);
 
-       if (!NT_STATUS_IS_OK(status)) {
+       if (!NT_STATUS_IS_OK(status))
+               DEBUG(10, ("refresh_sequence_number: backend returned 0x%08x\n", 
+                          NT_STATUS_V(status)));
+       
+       /* Convert a NT_STATUS_UNSUCCESSFUL error to a
+          NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND.  The former is
+          returned when we can't make an initial connection to
+          the domain controller.  The latter is returned when we
+          can't fetch the sequence number on an already open
+          connection. */
+
+       if (NT_STATUS_EQUAL(status, NT_STATUS_UNSUCCESSFUL))
+               status = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
+
+       domain->last_status = status;
+
+       if (!NT_STATUS_IS_OK(status))
                domain->sequence_number = DOM_SEQUENCE_NONE;
-       }
 
        domain->last_seq_check = time(NULL);
+
+       DEBUG(10, ("refresh_sequence_number: seq number is now %d\n", 
+                  domain->sequence_number));
 }
 
 /*
@@ -486,7 +504,18 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
        }
 
 do_cached:     
-       status = centry->status;
+
+       /* If we are returning cached data and the domain controller
+          is down then we don't know whether the data is up to date
+          or not.  Return NT_STATUS_MORE_PROCESSING_REQUIRED to
+          indicate this. */
+
+       if (wcache_server_down(domain)) {
+               DEBUG(10, ("query_user_list: returning cached user list and server was down\n"));
+               status = NT_STATUS_MORE_PROCESSING_REQUIRED;
+       } else
+               status = centry->status;
+
        centry_free(centry);
        return status;
 
@@ -494,9 +523,10 @@ do_query:
        *num_entries = 0;
        *info = NULL;
 
-       if (wcache_server_down(domain)) {
-               return NT_STATUS_SERVER_DISABLED;
-       }
+       /* Return status value returned by seq number check */
+
+       if (!NT_STATUS_IS_OK(domain->last_status))
+               return domain->last_status;
 
        status = cache->backend->query_user_list(domain, mem_ctx, num_entries, info);
 
@@ -559,7 +589,18 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
        }
 
 do_cached:     
-       status = centry->status;
+
+       /* If we are returning cached data and the domain controller
+          is down then we don't know whether the data is up to date
+          or not.  Return NT_STATUS_MORE_PROCESSING_REQUIRED to
+          indicate this. */
+
+       if (wcache_server_down(domain)) {
+               DEBUG(10, ("query_user_list: returning cached user list and server was down\n"));
+               status = NT_STATUS_MORE_PROCESSING_REQUIRED;
+       } else
+               status = centry->status;
+
        centry_free(centry);
        return status;
 
@@ -567,9 +608,10 @@ do_query:
        *num_entries = 0;
        *info = NULL;
 
-       if (wcache_server_down(domain)) {
-               return NT_STATUS_SERVER_DISABLED;
-       }
+       /* Return status value returned by seq number check */
+
+       if (!NT_STATUS_IS_OK(domain->last_status))
+               return domain->last_status;
 
        status = cache->backend->enum_dom_groups(domain, mem_ctx, num_entries, info);
 
@@ -618,9 +660,11 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
 do_query:
        ZERO_STRUCTP(sid);
 
-       if (wcache_server_down(domain)) {
-               return NT_STATUS_SERVER_DISABLED;
-       }
+       /* Return status value returned by seq number check */
+
+       if (!NT_STATUS_IS_OK(domain->last_status))
+               return domain->last_status;
+
        status = cache->backend->name_to_sid(domain, name, sid, type);
 
        /* and save it */
@@ -662,9 +706,11 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
 do_query:
        *name = NULL;
 
-       if (wcache_server_down(domain)) {
-               return NT_STATUS_SERVER_DISABLED;
-       }
+       /* Return status value returned by seq number check */
+
+       if (!NT_STATUS_IS_OK(domain->last_status))
+               return domain->last_status;
+
        status = cache->backend->sid_to_name(domain, mem_ctx, sid, name, type);
 
        /* and save it */
@@ -702,10 +748,11 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
 do_query:
        ZERO_STRUCTP(info);
 
-       if (wcache_server_down(domain)) {
-               return NT_STATUS_SERVER_DISABLED;
-       }
-       
+       /* Return status value returned by seq number check */
+
+       if (!NT_STATUS_IS_OK(domain->last_status))
+               return domain->last_status;
+
        status = cache->backend->query_user(domain, mem_ctx, user_rid, info);
 
        /* and save it */
@@ -751,9 +798,11 @@ do_query:
        (*num_groups) = 0;
        (*user_gids) = NULL;
 
-       if (wcache_server_down(domain)) {
-               return NT_STATUS_SERVER_DISABLED;
-       }
+       /* Return status value returned by seq number check */
+
+       if (!NT_STATUS_IS_OK(domain->last_status))
+               return domain->last_status;
+
        status = cache->backend->lookup_usergroups(domain, mem_ctx, user_rid, num_groups, user_gids);
 
        /* and save it */
@@ -817,10 +866,11 @@ do_query:
        (*names) = NULL;
        (*name_types) = NULL;
        
+       /* Return status value returned by seq number check */
+
+       if (!NT_STATUS_IS_OK(domain->last_status))
+               return domain->last_status;
 
-       if (wcache_server_down(domain)) {
-               return NT_STATUS_SERVER_DISABLED;
-       }
        status = cache->backend->lookup_groupmem(domain, mem_ctx, group_rid, num_names, 
                                                 rid_mem, names, name_types);
 
index 7024592f5b74b00b977705d883b16280cb234472..fb406adcf7c47bc9a7ac92af40a20cb391a998ea 100644 (file)
@@ -74,85 +74,45 @@ struct winbindd_cm_conn {
 
 static struct winbindd_cm_conn *cm_conns = NULL;
 
-/* Get a domain controller name.  Cache positive and negative lookups so we
-   don't go to the network too often when something is badly broken. */
-
-#define GET_DC_NAME_CACHE_TIMEOUT 30 /* Seconds between dc lookups */
-
-struct get_dc_name_cache {
-       fstring domain_name;
-       fstring srv_name;
-       time_t lookup_time;
-       struct get_dc_name_cache *prev, *next;
-};
+/* Get a domain controller name */
 
 static BOOL cm_get_dc_name(const char *domain, fstring srv_name, struct in_addr *ip_out)
 {
-       static struct get_dc_name_cache *get_dc_name_cache;
-       struct get_dc_name_cache *dcc;
-       struct in_addr *ip_list, dc_ip;
+       struct in_addr *ip_list = NULL, dc_ip, exclude_ip;
        int count, i;
 
-       /* Check the cache for previous lookups */
-
-       for (dcc = get_dc_name_cache; dcc; dcc = dcc->next) {
-
-               if (!strequal(domain, dcc->domain_name))
-                       continue; /* Not our domain */
-
-               if ((time(NULL) - dcc->lookup_time) > 
-                   GET_DC_NAME_CACHE_TIMEOUT) {
-
-                       /* Cache entry has expired, delete it */
-
-                       DEBUG(10, ("get_dc_name_cache entry expired for %s\n", domain));
-
-                       DLIST_REMOVE(get_dc_name_cache, dcc);
-                       SAFE_FREE(dcc);
-
-                       break;
-               }
-
-               /* Return a positive or negative lookup for this domain */
-
-               if (dcc->srv_name[0]) {
-                       DEBUG(10, ("returning positive get_dc_name_cache entry for %s\n", domain));
-                       fstrcpy(srv_name, dcc->srv_name);
-                       return True;
-               } else {
-                       DEBUG(10, ("returning negative get_dc_name_cache entry for %s\n", domain));
-                       return False;
+       zero_ip(&exclude_ip);
+       /* Lookup domain controller name. Try the real PDC first to avoid
+          SAM sync delays */
+       if (get_dc_list(True, domain, &ip_list, &count)) {
+               if (name_status_find(domain, 0x1c, 0x20, ip_list[0], srv_name)) {
+                       dc_ip = ip_list[0];
+                       goto done;
                }
+               /* Didn't get name, remember not to talk to this DC. */
+               exclude_ip = ip_list[0];
+               SAFE_FREE(ip_list);
        }
 
-       /* Add cache entry for this lookup. */
-
-       DEBUG(10, ("Creating get_dc_name_cache entry for %s\n", domain));
-
-       if (!(dcc = (struct get_dc_name_cache *) 
-             malloc(sizeof(struct get_dc_name_cache))))
+       if (!get_dc_list(False, domain, &ip_list, &count)) {
+               DEBUG(3, ("Could not look up dc's for domain %s\n", domain));
                return False;
+       }
 
-       ZERO_STRUCTP(dcc);
-
-       fstrcpy(dcc->domain_name, domain);
-       dcc->lookup_time = time(NULL);
-
-       DLIST_ADD(get_dc_name_cache, dcc);
+       /* Remove the entry we've already failed with (should be the PDC). */
 
-       /* Lookup domain controller name. Try the real PDC first to avoid
-          SAM sync delays */
-       if (!get_dc_list(True, domain, &ip_list, &count)) {
-               if (!get_dc_list(False, domain, &ip_list, &count)) {
-                       DEBUG(3, ("Could not look up dc's for domain %s\n", domain));
-                       return False;
-               }
+       for (i = 0; i < count; i++) {
+               if (ip_equal( exclude_ip, ip_list[i]))
+                       zero_ip(&ip_list[i]);
        }
 
        /* Pick a nice close server */
        /* Look for DC on local net */
 
        for (i = 0; i < count; i++) {
+               if (is_zero_ip(ip_list[i]))
+                       continue;
+
                if (!is_local_net(ip_list[i]))
                        continue;
                
@@ -189,6 +149,8 @@ static BOOL cm_get_dc_name(const char *domain, fstring srv_name, struct in_addr
                }
        }
 
+       SAFE_FREE(ip_list);
+
        /* No-one to talk to )-: */
        return False;           /* Boo-hoo */
        
@@ -198,10 +160,6 @@ static BOOL cm_get_dc_name(const char *domain, fstring srv_name, struct in_addr
           the DC is alive and kicking.  If we can catch a dead DC before
           performing a cli_connect() we can avoid a 30-second timeout. */
 
-       /* We have a name so make the cache entry positive now */
-
-       fstrcpy(dcc->srv_name, srv_name);
-
        DEBUG(3, ("cm_get_dc_name: Returning DC %s (%s) for domain %s\n", srv_name,
                  inet_ntoa(dc_ip), domain));
 
@@ -258,11 +216,23 @@ static struct failed_connection_cache *failed_connection_cache;
 
 /* Add an entry to the failed conneciton cache */
 
-static void add_failed_connection_entry(struct winbindd_cm_conn *new_conn, NTSTATUS result) {
+static void add_failed_connection_entry(struct winbindd_cm_conn *new_conn, 
+                                       NTSTATUS result) 
+{
        struct failed_connection_cache *fcc;
 
        SMB_ASSERT(!NT_STATUS_IS_OK(result));
 
+       /* Check we already aren't in the cache */
+
+       for (fcc = failed_connection_cache; fcc; fcc = fcc->next) {
+               if (strequal(fcc->domain_name, new_conn->domain)) {
+                       DEBUG(10, ("domain %s already tried and failed\n",
+                                  fcc->domain_name));
+                       return;
+               }
+       }
+
        /* Create negative lookup cache entry for this domain and controller */
 
        if (!(fcc = (struct failed_connection_cache *)
@@ -284,7 +254,7 @@ static void add_failed_connection_entry(struct winbindd_cm_conn *new_conn, NTSTA
 /* Open a connction to the remote server, cache failures for 30 seconds */
 
 static NTSTATUS cm_open_connection(const char *domain,const char *pipe_name,
-                              struct winbindd_cm_conn *new_conn)
+                                  struct winbindd_cm_conn *new_conn)
 {
        struct failed_connection_cache *fcc;
        extern pstring global_myname;
@@ -446,7 +416,7 @@ static NTSTATUS get_connection_from_cache(const char *domain, const char *pipe_n
 
 /* Return a LSA policy handle on a domain */
 
-CLI_POLICY_HND *cm_get_lsa_handle(char *domain)
+NTSTATUS cm_get_lsa_handle(char *domain, CLI_POLICY_HND **return_hnd)
 {
        struct winbindd_cm_conn *conn;
        uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
@@ -455,15 +425,17 @@ CLI_POLICY_HND *cm_get_lsa_handle(char *domain)
 
        /* Look for existing connections */
 
-       if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_LSARPC, &conn))) {
-               return NULL;
-       }
+       if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_LSARPC, &conn)))
+               return result;
 
        /* This *shitty* code needs scrapping ! JRA */
+
        if (policy_handle_is_valid(&conn->pol)) {
                hnd.pol = conn->pol;
                hnd.cli = conn->cli;
-               return &hnd;
+               *return_hnd = &hnd;
+
+               return NT_STATUS_OK;
        }
        
        result = cli_lsa_open_policy(conn->cli, conn->cli->mem_ctx, False, 
@@ -472,9 +444,8 @@ CLI_POLICY_HND *cm_get_lsa_handle(char *domain)
        if (!NT_STATUS_IS_OK(result)) {
                /* Hit the cache code again.  This cleans out the old connection and gets a new one */
                if (conn->cli->fd == -1) { /* Try again, if the remote host disapeared */
-                       if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_LSARPC, &conn))) {
-                               return NULL;
-                       }
+                       if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_LSARPC, &conn)))
+                               return result;
 
                        result = cli_lsa_open_policy(conn->cli, conn->cli->mem_ctx, False, 
                                                     des_access, &conn->pol);
@@ -484,19 +455,22 @@ CLI_POLICY_HND *cm_get_lsa_handle(char *domain)
                        cli_shutdown(conn->cli);
                        DLIST_REMOVE(cm_conns, conn);
                        SAFE_FREE(conn);
-                       return NULL;
+
+                       return result;
                }
        }       
 
        hnd.pol = conn->pol;
        hnd.cli = conn->cli;
 
-       return &hnd;
+       *return_hnd = &hnd;
+
+       return NT_STATUS_OK;
 }
 
 /* Return a SAM policy handle on a domain */
 
-CLI_POLICY_HND *cm_get_sam_handle(char *domain)
+NTSTATUS cm_get_sam_handle(char *domain, CLI_POLICY_HND **return_hnd)
 { 
        struct winbindd_cm_conn *conn;
        uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
@@ -505,42 +479,50 @@ CLI_POLICY_HND *cm_get_sam_handle(char *domain)
 
        /* Look for existing connections */
 
-       if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_SAMR, &conn))) {
-               return NULL;
-       }
+       if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_SAMR, &conn)))
+               return result;
        
        /* This *shitty* code needs scrapping ! JRA */
+
        if (policy_handle_is_valid(&conn->pol)) {
                hnd.pol = conn->pol;
                hnd.cli = conn->cli;
-               return &hnd;
+
+               *return_hnd = &hnd;
+
+               return NT_STATUS_OK;
        }
+
        result = cli_samr_connect(conn->cli, conn->cli->mem_ctx,
                                  des_access, &conn->pol);
 
        if (!NT_STATUS_IS_OK(result)) {
                /* Hit the cache code again.  This cleans out the old connection and gets a new one */
                if (conn->cli->fd == -1) { /* Try again, if the remote host disapeared */
-                       if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_SAMR, &conn))) {
-                               return NULL;
-                       }
+
+                       if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_SAMR, &conn)))
+                               return result;
 
                        result = cli_samr_connect(conn->cli, conn->cli->mem_ctx,
                                                  des_access, &conn->pol);
                }
 
                if (!NT_STATUS_IS_OK(result)) {
+
                        cli_shutdown(conn->cli);
                        DLIST_REMOVE(cm_conns, conn);
                        SAFE_FREE(conn);
-                       return NULL;
+
+                       return result;
                }
        }       
 
        hnd.pol = conn->pol;
        hnd.cli = conn->cli;
 
-       return &hnd;
+       *return_hnd = &hnd;
+
+       return NT_STATUS_OK;
 }
 
 #if 0  /* This code now *well* out of date */
@@ -853,3 +835,28 @@ void winbindd_cm_status(void)
        else
                DEBUG(0, ("\tNo active connections\n"));
 }
+
+/* Close all cached connections */
+
+void winbindd_cm_flush(void)
+{
+       struct winbindd_cm_conn *conn, tmp;
+
+       for (conn = cm_conns; conn; conn = conn->next) {
+
+               if (!connection_ok(conn))
+                       continue;
+
+               DEBUG(10, ("Closing connection to %s on %s\n",
+                          conn->pipe_name, conn->controller));
+
+               if (conn->cli)
+                       cli_shutdown(conn->cli);
+
+               tmp.next = conn->next;
+
+               DLIST_REMOVE(cm_conns, conn);
+               SAFE_FREE(conn);
+               conn = &tmp;
+       }
+}
index 4ef57513bb0fc3e8e5c5be89d8b86b540d1034a9..126a99763bc3d6b079a9e345de19836584d43001 100644 (file)
@@ -393,19 +393,16 @@ enum winbindd_result winbindd_endgrent(struct winbindd_cli_state *state)
 
 #define MAX_FETCH_SAM_ENTRIES 100
 
-static BOOL get_sam_group_entries(struct getent_state *ent)
+static BOOL get_sam_group_entries(struct getent_state *ent, NTSTATUS *status)
 {
-       NTSTATUS status;
        uint32 num_entries;
        struct acct_info *name_list = NULL;
        TALLOC_CTX *mem_ctx;
        BOOL result = False;
        struct acct_info *sam_grp_entries = NULL;
        struct winbindd_domain *domain;
+       NTSTATUS nt_status;
         
-       if (ent->got_sam_entries)
-               return False;
-
        if (!(mem_ctx = talloc_init_named("get_sam_group_entries(%s)",
                                          ent->domain_name)))
                return False;
@@ -425,15 +422,11 @@ static BOOL get_sam_group_entries(struct getent_state *ent)
                goto done;
        }
 
-       status = domain->methods->enum_dom_groups(domain,
-                                                 mem_ctx, 
-                                                 &num_entries,
-                                                 &sam_grp_entries);
+       nt_status = domain->methods->enum_dom_groups(
+               domain, mem_ctx, &num_entries, &sam_grp_entries);
        
-       if (!NT_STATUS_IS_OK(status)) {
-               result = False;
-               goto done;
-       }
+       if (status && !NT_STATUS_IS_OK(nt_status))
+               *status = nt_status;
 
        /* Copy entries into return buffer */
 
@@ -450,7 +443,12 @@ static BOOL get_sam_group_entries(struct getent_state *ent)
        ent->sam_entries = name_list;
        ent->sam_entry_index = 0;
 
-       result = (ent->num_sam_entries > 0);
+       /* Return false if we got an error or no sam entries, true otherwise */
+       
+       if (!NT_STATUS_IS_OK(nt_status))
+               result = False;
+       else
+               result = (ent->num_sam_entries > 0);
 
  done:
        talloc_destroy(mem_ctx);
@@ -508,7 +506,7 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
 
                if (ent->num_sam_entries == ent->sam_entry_index) {
 
-                       while(ent && !get_sam_group_entries(ent)) {
+                       while(ent && !get_sam_group_entries(ent, NULL)) {
                                struct getent_state *next_ent;
 
                                DEBUG(10, ("freeing state info for domain %s\n", ent->domain_name)); 
@@ -685,21 +683,29 @@ enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state)
 
        for (domain = domain_list(); domain; domain = domain->next) {
                struct getent_state groups;
+               NTSTATUS status;
 
                ZERO_STRUCT(groups);
 
                /* Skip domains other than WINBINDD_DOMAIN environment
                   variable */ 
+
                if ((strcmp(state->request.domain, "") != 0) &&
                    !check_domain_env(state->request.domain, domain->name))
                        continue;
 
                /* Get list of sam groups */
+
                ZERO_STRUCT(groups);
                fstrcpy(groups.domain_name, domain->name);
 
-               get_sam_group_entries(&groups);
-                       
+               if (!get_sam_group_entries(&groups, &status)) {
+                       if (!NT_STATUS_IS_OK(status))
+                               state->response.nt_status = NT_STATUS_V(status);
+                       if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED))
+                               continue;
+               }
+
                if (groups.num_sam_entries == 0) {
                        /* this domain is empty or in an error state */
                        continue;
@@ -707,10 +713,12 @@ enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state)
 
                /* keep track the of the total number of groups seen so 
                   far over all domains */
+
                total_entries += groups.num_sam_entries;
                
                /* Allocate some memory for extra data.  Note that we limit
                   account names to sizeof(fstring) = 128 characters.  */               
+
                 ted = Realloc(extra_data, sizeof(fstring) * total_entries);
  
                if (!ted) {
index c71776f7096890c55af811bab6977b539c7a4525..a1ab57fa9c3e462cd1e4b3e11f8a1e56e439a2f7 100644 (file)
 
 extern pstring global_myname;
 
-/************************************************************************
- Routine to get the trust account password for a domain
-************************************************************************/
-static BOOL _get_trust_account_password(char *domain, unsigned char *ret_pwd, 
-                                       time_t *pass_last_set_time)
-{
-       if (!secrets_fetch_trust_account_password(domain, ret_pwd, pass_last_set_time)) {
-                return False;
-       }
-
-       return True;
-}
-
 /* Check the machine account password is valid */
 
 enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *state)
@@ -51,9 +38,10 @@ enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *stat
        /* Get trust account password */
 
  again:
-       if (!_get_trust_account_password(lp_workgroup(), trust_passwd, 
-                                         NULL)) {
+       if (!secrets_fetch_trust_account_password(
+                   lp_workgroup(), trust_passwd, NULL)) {
                result = NT_STATUS_INTERNAL_ERROR;
+               DEBUG(3, ("could not retrieve trust account pw for %s\n", lp_workgroup()));
                goto done;
        }
 
index 023d72306b7d12617b6ba2d969fc47dd7ed2c6b1..28a32ee191182b8aed74972840a702f0a5bb3c42 100644 (file)
@@ -118,6 +118,9 @@ struct winbindd_request {
                uid_t uid;           /* getpwuid, uid_to_sid */
                gid_t gid;           /* getgrgid, gid_to_sid */
                struct {
+                       /* We deliberatedly don't split into domain/user to
+                           avoid having the client know what the separator
+                           character is. */    
                        fstring user;
                        fstring pass;
                } auth;              /* pam_winbind auth module */
@@ -216,6 +219,8 @@ struct winbindd_response {
                } auth;
        } data;
 
+       uint32 nt_status;       /* Extended error information */
+
        /* Variable length return data */
 
        void *extra_data;               /* getgrnam, getgrgid, getgrent */
index 45aebe385d28ff5ac72ce3b7248c6de1fcf6c8b6..c02ce81bbd3f5bb2aff943d9c145c3e47278d732 100644 (file)
@@ -115,7 +115,7 @@ done:
        fstrcpy(state->response.data.auth.error_string, nt_errstr(result));
        state->response.data.auth.pam_error = nt_status_to_pam(result);
 
-       DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("Plain-text authenticaion for user %s returned %s (PAM: %d)\n", 
+       DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("Plain-text authentication for user %s returned %s (PAM: %d)\n", 
              state->request.data.auth.user, 
              state->response.data.auth.nt_status_string,
              state->response.data.auth.pam_error));          
@@ -146,7 +146,7 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state)
        DEBUG(3, ("[%5d]: pam auth crap domain: %s user: %s\n", state->pid,
                  state->request.data.auth_crap.domain, state->request.data.auth_crap.user));
 
-       if (!(mem_ctx = talloc_init_named("winbind pam auth crap for %s", state->request.data.auth.user))) {
+       if (!(mem_ctx = talloc_init_named("winbind pam auth crap for %s", state->request.data.auth_crap.user))) {
                DEBUG(0, ("winbindd_pam_auth_crap: could not talloc_init()!\n"));
                result = NT_STATUS_NO_MEMORY;
                goto done;
@@ -157,7 +157,7 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state)
        } else if (lp_winbind_use_default_domain()) {
                domain = talloc_strdup(mem_ctx, lp_workgroup());
        } else {
-               DEBUG(5,("no domain specified with username (%s) - failing auth\n", state->request.data.auth.user));
+               DEBUG(5,("no domain specified with username (%s) - failing auth\n", state->request.data.auth_crap.user));
                result = NT_STATUS_INVALID_PARAMETER;
                goto done;
        }
@@ -206,7 +206,7 @@ done:
        fstrcpy(state->response.data.auth.error_string, nt_errstr(result));
        state->response.data.auth.pam_error = nt_status_to_pam(result);
 
-       DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("NTLM CRAP authenticaion for user [%s]\\[%s] returned %s (PAM: %d)\n", 
+       DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("NTLM CRAP authentication for user [%s]\\[%s] returned %s (PAM: %d)\n", 
              state->request.data.auth_crap.domain, 
              state->request.data.auth_crap.user, 
              state->response.data.auth.nt_status_string,
@@ -250,9 +250,8 @@ enum winbindd_result winbindd_pam_chauthtok(struct winbindd_cli_state *state)
 
        /* Get sam handle */
 
-       if (!(hnd = cm_get_sam_handle(domain))) {
+       if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain, &hnd))) {
                DEBUG(1, ("could not get SAM handle on DC for %s\n", domain));
-               result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
                goto done;
        }
 
@@ -260,9 +259,8 @@ enum winbindd_result winbindd_pam_chauthtok(struct winbindd_cli_state *state)
                DEBUG(1, ("password change failed for user %s/%s\n", domain, 
                          user));
                result = NT_STATUS_WRONG_PASSWORD;
-       } else {
+       } else
                result = NT_STATUS_OK;
-       }
 
 done:    
        state->response.data.auth.nt_status = NT_STATUS_V(result);
index 9ad8a7717cb8ca1706779abee067f42112ab9877..96c29ce750d40918caaf3956789b472e5466cd11 100644 (file)
@@ -10,12 +10,13 @@ int main(int argc, char **argv);
 /* The following definitions come from nsswitch/winbindd_cache.c  */
 
 void wcache_flush_cache(void);
+void winbindd_check_cache_size(time_t t);
 struct cache_entry *centry_start(struct winbindd_domain *domain, NTSTATUS status);
 
 /* The following definitions come from nsswitch/winbindd_cm.c  */
 
-CLI_POLICY_HND *cm_get_lsa_handle(char *domain);
-CLI_POLICY_HND *cm_get_sam_handle(char *domain);
+NTSTATUS cm_get_lsa_handle(char *domain, CLI_POLICY_HND **return_hnd);
+NTSTATUS cm_get_sam_handle(char *domain, CLI_POLICY_HND **return_hnd);
 CLI_POLICY_HND *cm_get_sam_dom_handle(char *domain, DOM_SID *domain_sid);
 CLI_POLICY_HND *cm_get_sam_user_handle(char *domain, DOM_SID *domain_sid,
                                       uint32 user_rid);
@@ -24,6 +25,7 @@ CLI_POLICY_HND *cm_get_sam_group_handle(char *domain, DOM_SID *domain_sid,
 NTSTATUS cm_get_netlogon_cli(char *domain, unsigned char *trust_passwd,
                             struct cli_state **cli);
 void winbindd_cm_status(void);
+void winbindd_cm_flush(void);
 
 /* The following definitions come from nsswitch/winbindd_group.c  */
 
index edf445a0ec9191a7fdcfef923318d3e02d7b07f3..668244da3728b4e7c87ae535e30c5798f79533eb 100644 (file)
@@ -50,7 +50,7 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
                               WINBIND_USERINFO **info)
 {
        CLI_POLICY_HND *hnd;
-       NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+       NTSTATUS result;
        POLICY_HND dom_pol;
        BOOL got_dom_pol = False;
        uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
@@ -61,7 +61,7 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
 
        /* Get sam handle */
 
-       if (!(hnd = cm_get_sam_handle(domain->name)))
+       if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain->name, &hnd)))
                goto done;
 
        /* Get domain handle */
@@ -135,7 +135,8 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
        return result;
 }
 
-/* list all domain groups */
+/* List all domain groups */
+
 static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
                                TALLOC_CTX *mem_ctx,
                                uint32 *num_entries, 
@@ -144,20 +145,19 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
        uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
        CLI_POLICY_HND *hnd;
        POLICY_HND dom_pol;
-       NTSTATUS status;
+       NTSTATUS result;
 
        *num_entries = 0;
        *info = NULL;
 
-       if (!(hnd = cm_get_sam_handle(domain->name))) {
-               return NT_STATUS_UNSUCCESSFUL;
-       }
+       if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain->name, &hnd)))
+               return result;
 
-       status = cli_samr_open_domain(hnd->cli, mem_ctx,
+       result = cli_samr_open_domain(hnd->cli, mem_ctx,
                                      &hnd->pol, des_access, &domain->sid, &dom_pol);
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
+
+       if (!NT_STATUS_IS_OK(result))
+               return result;
 
        do {
                struct acct_info *info2 = NULL;
@@ -166,13 +166,12 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
 
                mem_ctx2 = talloc_init_named("enum_dom_groups[rpc]");
 
-               status = cli_samr_enum_dom_groups(hnd->cli, mem_ctx2, &dom_pol,
-                                                 &start,
-                                                 0xFFFF, /* buffer size? */
-                                                 &info2, &count);
+               result = cli_samr_enum_dom_groups(
+                       hnd->cli, mem_ctx2, &dom_pol, &start,
+                       0xFFFF, /* buffer size? */ &info2, &count);
 
-               if (!NT_STATUS_IS_OK(status) && 
-                   !NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)) {
+               if (!NT_STATUS_IS_OK(result) && 
+                   !NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)) {
                        talloc_destroy(mem_ctx2);
                        break;
                }
@@ -188,11 +187,11 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
                memcpy(&(*info)[*num_entries], info2, count*sizeof(*info2));
                (*num_entries) += count;
                talloc_destroy(mem_ctx2);
-       } while (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES));
+       } while (NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES));
 
        cli_samr_close(hnd->cli, mem_ctx, &dom_pol);
 
-       return status;
+       return result;
 }
 
 /* convert a single name to a sid in a domain */
@@ -203,7 +202,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
 {
        TALLOC_CTX *mem_ctx;
        CLI_POLICY_HND *hnd;
-       NTSTATUS status;
+       NTSTATUS result;
        DOM_SID *sids = NULL;
        uint32 *types = NULL;
        const char *full_name;
@@ -213,7 +212,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
                return NT_STATUS_NO_MEMORY;
        }
         
-       if (!(hnd = cm_get_lsa_handle(domain->name))) {
+       if (!NT_STATUS_IS_OK(result = cm_get_lsa_handle(domain->name, &hnd))) {
                talloc_destroy(mem_ctx);
                return NT_STATUS_UNSUCCESSFUL;
        }
@@ -226,18 +225,18 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
                return NT_STATUS_NO_MEMORY;
        }
 
-       status = cli_lsa_lookup_names(hnd->cli, mem_ctx, &hnd->pol, 1, 
+       result = cli_lsa_lookup_names(hnd->cli, mem_ctx, &hnd->pol, 1, 
                                      &full_name, &sids, &types);
         
        /* Return rid and type if lookup successful */
 
-       if (NT_STATUS_IS_OK(status)) {
+       if (NT_STATUS_IS_OK(result)) {
                sid_copy(sid, &sids[0]);
                *type = types[0];
        }
 
        talloc_destroy(mem_ctx);
-       return status;
+       return result;
 }
 
 /*
@@ -253,15 +252,15 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
        char **domains;
        char **names;
        uint32 *types;
-       NTSTATUS status;
+       NTSTATUS result;
 
-       if (!(hnd = cm_get_lsa_handle(domain->name)))
+       if (!NT_STATUS_IS_OK(result = cm_get_lsa_handle(domain->name, &hnd)))
                return NT_STATUS_UNSUCCESSFUL;
         
-       status = cli_lsa_lookup_sids(hnd->cli, mem_ctx, &hnd->pol,
+       result = cli_lsa_lookup_sids(hnd->cli, mem_ctx, &hnd->pol,
                                     1, sid, &domains, &names, &types);
 
-       if (NT_STATUS_IS_OK(status)) {
+       if (NT_STATUS_IS_OK(result)) {
                *type = types[0];
                *name = names[0];
                DEBUG(5,("Mapped sid to [%s]\\[%s]\n", domains[0], *name));
@@ -272,7 +271,8 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
                        return NT_STATUS_UNSUCCESSFUL;
                }
        }
-       return status;
+
+       return result;
 }
 
 /* Lookup user information from a rid or username. */
@@ -288,7 +288,8 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
        SAM_USERINFO_CTR *ctr;
 
        /* Get sam handle */
-       if (!(hnd = cm_get_sam_handle(domain->name)))
+
+       if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain->name, &hnd)))
                goto done;
 
        /* Get domain handle */
@@ -315,9 +316,13 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
        result = cli_samr_query_userinfo(hnd->cli, mem_ctx, &user_pol, 
                                         0x15, &ctr);
 
+       if (!NT_STATUS_IS_OK(result))
+               goto done;
+
        cli_samr_close(hnd->cli, mem_ctx, &user_pol);
        got_user_pol = False;
 
+       user_info->user_rid = user_rid;
        user_info->group_rid = ctr->info.id21->group_rid;
        user_info->acct_name = unistr2_tdup(mem_ctx, 
                                            &ctr->info.id21->uni_user_name);
@@ -342,7 +347,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
                                  uint32 *num_groups, uint32 **user_gids)
 {
        CLI_POLICY_HND *hnd;
-       NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+       NTSTATUS result;
        POLICY_HND dom_pol, user_pol;
        uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
        BOOL got_dom_pol = False, got_user_pol = False;
@@ -353,12 +358,14 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
        *user_gids = NULL;
 
        /* Get sam handle */
-       if (!(hnd = cm_get_sam_handle(domain->name)))
+
+       if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain->name, &hnd)))
                goto done;
 
        /* Get domain handle */
+
        result = cli_samr_open_domain(hnd->cli, mem_ctx, &hnd->pol,
-                                       des_access, &domain->sid, &dom_pol);
+                                     des_access, &domain->sid, &dom_pol);
 
        if (!NT_STATUS_IS_OK(result))
                goto done;
@@ -406,7 +413,7 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
                                uint32 **name_types)
 {
         CLI_POLICY_HND *hnd;
-        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+        NTSTATUS result;
         uint32 i, total_names = 0;
         POLICY_HND dom_pol, group_pol;
         uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
@@ -416,7 +423,7 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
 
         /* Get sam handle */
 
-        if (!(hnd = cm_get_sam_handle(domain->name)))
+        if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain->name, &hnd)))
                 goto done;
 
         /* Get domain handle */
@@ -502,6 +509,94 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
 }
 
 /* find the sequence number for a domain */
+
+#ifdef WITH_HORRIBLE_LDAP_NATIVE_MODE_HACK
+#include <ldap.h>
+
+static SIG_ATOMIC_T gotalarm;
+
+/***************************************************************
+ Signal function to tell us we timed out.
+****************************************************************/
+
+static void gotalarm_sig(void)
+{
+       gotalarm = 1;
+}
+
+static LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to)
+{
+       LDAP *ldp = NULL;
+
+       /* Setup timeout */
+       gotalarm = 0;
+       CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig);
+       alarm(to);
+       /* End setup timeout. */
+
+       ldp = ldap_open(server, port);
+
+       /* Teardown timeout. */
+       CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN);
+       alarm(0);
+
+       return ldp;
+}
+
+int get_ldap_seq(const char *server, uint32 *seq)
+{
+       int ret = -1;
+       struct timeval to;
+       char *attrs[] = {"highestCommittedUSN", NULL};
+       LDAPMessage *res = NULL;
+       char **values = NULL;
+       LDAP *ldp = NULL;
+
+       *seq = DOM_SEQUENCE_NONE;
+
+       /*
+        * 10 second timeout on open. This is needed as the search timeout
+        * doesn't seem to apply to doing an open as well. JRA.
+        */
+
+       if ((ldp = ldap_open_with_timeout(server, LDAP_PORT, 10)) == NULL)
+               return -1;
+
+#if 0
+       /* As per tridge comment this doesn't seem to be needed. JRA */
+       if ((err = ldap_simple_bind_s(ldp, NULL, NULL)) != 0)
+               goto done;
+#endif
+
+       /* Timeout if no response within 20 seconds. */
+       to.tv_sec = 10;
+       to.tv_usec = 0;
+
+       if (ldap_search_st(ldp, "", LDAP_SCOPE_BASE, "(objectclass=*)", &attrs[0], 0, &to, &res))
+               goto done;
+
+       if (ldap_count_entries(ldp, res) != 1)
+               goto done;
+
+       values = ldap_get_values(ldp, res, "highestCommittedUSN");
+       if (!values || !values[0])
+               goto done;
+
+       *seq = atoi(values[0]);
+       ret = 0;
+
+  done:
+
+       if (values)
+               ldap_value_free(values);
+       if (res)
+               ldap_msgfree(res);
+       if (ldp)
+               ldap_unbind(ldp);
+       return ret;
+}
+#endif /* WITH_HORRIBLE_LDAP_NATIVE_MODE_HACK */
+
 static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
 {
        TALLOC_CTX *mem_ctx;
@@ -521,9 +616,23 @@ static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
 
        /* Get sam handle */
 
-       if (!(hnd = cm_get_sam_handle(domain->name)))
+       if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain->name, &hnd)))
                goto done;
 
+#ifdef WITH_HORRIBLE_LDAP_NATIVE_MODE_HACK
+       if (get_ldap_seq( inet_ntoa(hnd->cli->dest_ip), seq) == 0) {
+               result = NT_STATUS_OK;
+               seqnum = *seq;
+               DEBUG(10,("domain_sequence_number: LDAP for domain %s is %u\n",
+                                       domain->name, (unsigned)seqnum ));
+               goto done;
+       }
+
+       DEBUG(10,("domain_sequence_number: failed to get LDAP sequence number (%u) for domain %s\n",
+               (unsigned)seqnum, domain->name ));
+
+#endif /* WITH_HORRIBLE_LDAP_NATIVE_MODE_HACK */
+
        /* Get domain handle */
 
        result = cli_samr_open_domain(hnd->cli, mem_ctx, &hnd->pol, 
@@ -541,6 +650,9 @@ static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
 
        if (NT_STATUS_IS_OK(result)) {
                seqnum = ctr.info.inf2.seq_num;
+               seqnum += ctr.info.inf2.num_domain_usrs;
+               seqnum += ctr.info.inf2.num_domain_grps;
+               seqnum += ctr.info.inf2.num_local_grps;
                DEBUG(10,("domain_sequence_number: for domain %s is %u\n", domain->name, (unsigned)seqnum ));
        } else {
                DEBUG(10,("domain_sequence_number: failed to get sequence number (%u) for domain %s\n",
@@ -567,12 +679,12 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain,
                                DOM_SID **dom_sids)
 {
        CLI_POLICY_HND *hnd;
-       NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+       NTSTATUS result;
        uint32 enum_ctx = 0;
 
        *num_domains = 0;
 
-       if (!(hnd = cm_get_lsa_handle(lp_workgroup())))
+       if (!NT_STATUS_IS_OK(result = cm_get_lsa_handle(lp_workgroup(), &hnd)))
                goto done;
 
        result = cli_lsa_enum_trust_dom(hnd->cli, mem_ctx,
@@ -585,7 +697,7 @@ done:
 /* find the domain sid for a domain */
 static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid)
 {
-       NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
+       NTSTATUS result;
        TALLOC_CTX *mem_ctx;
        CLI_POLICY_HND *hnd;
        fstring level5_dom;
@@ -594,15 +706,16 @@ static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid)
                return NT_STATUS_NO_MEMORY;
 
        /* Get sam handle */
-       if (!(hnd = cm_get_lsa_handle(domain->name)))
+
+       if (!NT_STATUS_IS_OK(result = cm_get_lsa_handle(domain->name, &hnd)))
                goto done;
 
-       status = cli_lsa_query_info_policy(hnd->cli, mem_ctx,
+       result = cli_lsa_query_info_policy(hnd->cli, mem_ctx,
                                           &hnd->pol, 0x05, level5_dom, sid);
 
 done:
        talloc_destroy(mem_ctx);
-       return status;
+       return result;
 }
 
 /* the rpc backend methods are exposed via this structure */
index d89717ad47c38ab8f46d6c29a0e91fe103e8ca5f..420a12b547361ffc6562299380254fad7c888c82 100644 (file)
@@ -3,7 +3,7 @@
 
    Winbind daemon - user related functions
 
-   Copyright (C) Tim Potter 2000
+   Copyright (C) Tim Potter 2000,2002
    Copyright (C) Jeremy Allison 2001.
    
    This program is free software; you can redistribute it and/or modify
@@ -555,13 +555,29 @@ enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state)
                methods = domain->methods;
 
                /* Query display info */
-               status = methods->query_user_list(domain, mem_ctx, 
-                                                 &num_entries, &info);
+
+               status = methods->query_user_list(
+                       domain, mem_ctx, &num_entries, &info);
+
+               /* If an error occured on this domain, set the extended error 
+                   info and continue to the next domain. If we receive
+                  NT_STATUS_MORE_PROCESSING_REQUIRED then cached data was 
+                   returned but we couldn't contact the DC for the sequence 
+                   number. */
+
+               if (!NT_STATUS_IS_OK(status)) {
+                       state->response.nt_status = NT_STATUS_V(status);
+                       if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED))
+                               continue;
+               }
+
+               /* No entries for this domain */
 
                if (num_entries == 0)
                        continue;
 
                /* Allocate some memory for extra data */
+
                total_entries += num_entries;
                        
                ted = Realloc(extra_data, sizeof(fstring) * total_entries);
index 90bc3479ea4a37647ed1d6707c0d6fdd99912f5c..5b772a35dcbf84346c225ed384895bc7caf5e8be 100644 (file)
@@ -164,9 +164,6 @@ BOOL init_domain_list(void)
                        DEBUG(1,("Added domain %s (%s)\n", 
                                 domain->name, 
                                 sid_string_static(&domain->sid)));
-
-                       /* this primes the connection */
-                       cache_methods.domain_sid(domain, &domain->sid);
                }
        }
 
index 52655a77fe34e135aa42afb61a494e2386558b61..ed205a84855973dfaff4500aa41b63c87692435f 100644 (file)
@@ -286,6 +286,7 @@ typedef struct
        BOOL bHideLocalUsers;
        BOOL bUseMmap;
        BOOL bUnixExtensions;
+       int name_cache_timeout;
 }
 global;
 
@@ -411,6 +412,10 @@ typedef struct
        BOOL bDefaultDevmode;
        BOOL bNTAclSupport;
        BOOL bForceUnknownAclUser;
+#ifdef WITH_SENDFILE
+       BOOL bUseSendfile;
+#endif
+       BOOL bProfileAcls;
 
        char dummy[3];          /* for alignment */
 }
@@ -532,6 +537,10 @@ static service sDefault = {
        False,                  /* bDefaultDevmode */
        True,                   /* bNTAclSupport */
        False,                  /* bForceUnknownAclUser */
+#ifdef WITH_SENDFILE
+       False,                  /* bUseSendfile */
+#endif
+       False,                  /* bProfileAcls */
 
        ""                      /* dummy */
 };
@@ -640,11 +649,11 @@ static struct enum_list enum_case[] = {
 };
 
 static struct enum_list enum_bool_auto[] = {
-       {False, "False"},
        {False, "No"},
+       {False, "False"},
        {False, "0"},
-       {True, "True"},
        {True, "Yes"},
+       {True, "True"},
        {True, "1"},
        {Auto, "Auto"},
        {-1, NULL}
@@ -854,6 +863,7 @@ static struct parm_struct parm_table[] = {
        {"nt pipe support", P_BOOL, P_GLOBAL, &Globals.bNTPipeSupport, NULL, NULL, 0},
        {"nt acl support", P_BOOL,  P_LOCAL, &sDefault.bNTAclSupport, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE },
        {"nt status support", P_BOOL,  P_GLOBAL, &Globals.bNTStatusSupport, NULL, NULL, 0 },
+       {"profile acls", P_BOOL,  P_LOCAL, &sDefault.bProfileAcls, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE },
        {"announce version", P_STRING, P_GLOBAL, &Globals.szAnnounceVersion, NULL, NULL, 0},
        {"announce as", P_ENUM, P_GLOBAL, &Globals.announce_as, NULL, enum_announce_as, 0},
        {"max mux", P_INTEGER, P_GLOBAL, &Globals.max_mux, NULL, NULL, 0},
@@ -882,6 +892,7 @@ static struct parm_struct parm_table[] = {
        {"max disk size", P_INTEGER, P_GLOBAL, &Globals.maxdisksize, NULL, NULL, 0},
        {"max open files", P_INTEGER, P_GLOBAL, &Globals.max_open_files, NULL, NULL, 0},
        {"min print space", P_INTEGER, P_LOCAL, &sDefault.iMinPrintSpace, NULL, NULL, FLAG_PRINT},
+       {"name cache timeout", P_INTEGER, P_GLOBAL, &Globals.name_cache_timeout, NULL, NULL, 0},
        {"read size", P_INTEGER, P_GLOBAL, &Globals.ReadSize, NULL, NULL, 0},
        
        {"socket options", P_GSTRING, P_GLOBAL, user_socket_options, NULL, NULL, 0},
@@ -890,6 +901,9 @@ static struct parm_struct parm_table[] = {
        {"strict sync", P_BOOL, P_LOCAL, &sDefault.bStrictSync, NULL, NULL, FLAG_SHARE},
        {"sync always", P_BOOL, P_LOCAL, &sDefault.bSyncAlways, NULL, NULL, FLAG_SHARE},
        {"use mmap", P_BOOL, P_GLOBAL, &Globals.bUseMmap, NULL, NULL, 0},
+#ifdef WITH_SENDFILE
+       {"use sendfile", P_BOOL, P_LOCAL, &sDefault.bUseSendfile, NULL, NULL, FLAG_SHARE},
+#endif
        {"write cache size", P_INTEGER, P_LOCAL, &sDefault.iWriteCacheSize, NULL, NULL, FLAG_SHARE},
 
        {"Printing Options", P_SEP, P_SEPARATOR},
@@ -1447,6 +1461,8 @@ static void init_globals(void)
 
        Globals.bHostMSDfs = False;
 
+        Globals.name_cache_timeout = 660; /* In seconds */
+
        /*
         * This must be done last as it checks the value in 
         * client_code_page.
@@ -1694,6 +1710,7 @@ FN_GLOBAL_INTEGER(lp_min_passwd_length, &Globals.min_passwd_length)
 FN_GLOBAL_INTEGER(lp_oplock_break_wait_time, &Globals.oplock_break_wait_time)
 FN_GLOBAL_INTEGER(lp_lock_spin_count, &Globals.iLockSpinCount)
 FN_GLOBAL_INTEGER(lp_lock_sleep_time, &Globals.iLockSpinTime)
+FN_GLOBAL_INTEGER(lp_name_cache_timeout, &Globals.name_cache_timeout)
 FN_LOCAL_STRING(lp_preexec, szPreExec)
 FN_LOCAL_STRING(lp_postexec, szPostExec)
 FN_LOCAL_STRING(lp_rootpreexec, szRootPreExec)
@@ -1784,6 +1801,10 @@ FN_LOCAL_BOOL(lp_use_client_driver, bUseClientDriver)
 FN_LOCAL_BOOL(lp_default_devmode, bDefaultDevmode)
 FN_LOCAL_BOOL(lp_nt_acl_support, bNTAclSupport)
 FN_LOCAL_BOOL(lp_force_unknown_acl_user, bForceUnknownAclUser)
+#ifdef WITH_SENDFILE
+FN_LOCAL_BOOL(lp_use_sendfile, bUseSendfile)
+#endif
+FN_LOCAL_BOOL(lp_profile_acls, bProfileAcls)
 FN_LOCAL_INTEGER(lp_create_mask, iCreate_mask)
 FN_LOCAL_INTEGER(lp_force_create_mode, iCreate_force_mode)
 FN_LOCAL_INTEGER(lp_security_mask, iSecurity_mask)
@@ -1795,7 +1816,6 @@ FN_LOCAL_INTEGER(lp_force_dir_security_mode, iDir_Security_force_mode)
 FN_LOCAL_INTEGER(lp_max_connections, iMaxConnections)
 FN_LOCAL_INTEGER(lp_defaultcase, iDefaultCase)
 FN_LOCAL_INTEGER(lp_minprintspace, iMinPrintSpace)
-FN_LOCAL_INTEGER(lp_maxprintjobs, iMaxPrintJobs)
 FN_LOCAL_INTEGER(lp_printing, iPrinting)
 FN_LOCAL_INTEGER(lp_oplock_contention_limit, iOplockContentionLimit)
 FN_LOCAL_INTEGER(lp_csc_policy, iCSCPolicy)
@@ -1941,12 +1961,6 @@ from service ifrom. homename must be in DOS codepage.
 BOOL lp_add_home(char *pszHomename, int iDefaultService, char *pszHomedir)
 {
        int i;
-       SMB_STRUCT_STAT buf;
-       
-       /* if the user's home directory doesn't exist, then don't 
-          add it to the list of available shares */
-       if (sys_stat(pszHomedir, &buf))
-               return False;
        
        i = add_a_service(ServicePtrs[iDefaultService], pszHomename);
 
@@ -2856,6 +2870,7 @@ BOOL lp_do_parameter(int snum, char *pszParmName, char *pszParmValue)
                        break;
        }
 
+
        return (True);
 }
 
@@ -3867,3 +3882,16 @@ const char *get_called_name(void)
 
        return local_machine;
 }
+
+/*******************************************************************
+ Return the max print jobs per queue.
+********************************************************************/
+
+int lp_maxprintjobs(int snum)
+{
+       int maxjobs = LP_SNUM_OK(snum) ? ServicePtrs[snum]->iMaxPrintJobs : sDefault.iMaxPrintJobs;
+       if (maxjobs <= 0 || maxjobs >= PRINT_MAX_JOBID)
+               maxjobs = PRINT_MAX_JOBID - 1;
+
+       return maxjobs;
+}
index 2700c2a0eb2cb5ee752860ec2996659f0330b809..cbeea5bbb7086d75597efbd9d8215885ca310f4e 100644 (file)
@@ -142,10 +142,28 @@ char *trust_keystr(char *domain)
        return keystr;
 }
 
+/************************************************************************
+ Lock the trust password entry.
+************************************************************************/
+
+BOOL secrets_lock_trust_account_password(char *domain, BOOL dolock)
+{
+       if (!tdb)
+               return False;
+
+       if (dolock)
+               return (tdb_lock_bystring(tdb, trust_keystr(domain),0) == 0);
+       else
+               tdb_unlock_bystring(tdb, trust_keystr(domain));
+       return True;
+}
+
 /************************************************************************
  Routine to get the trust account password for a domain.
- The user of this function must have locked the trust password file.
+ The user of this function must have locked the trust password file using
+ the above call.
 ************************************************************************/
+
 BOOL secrets_fetch_trust_account_password(char *domain, uint8 ret_pwd[16],
                                          time_t *pass_last_set_time)
 {
@@ -254,3 +272,30 @@ BOOL fetch_ldap_pw(char *dn, char* pw, int len)
        
        return True;
 }
+
+/*
+  lock the secrets tdb based on a string - this is used as a primitive form of mutex
+  between smbd instances. 
+*/
+BOOL secrets_named_mutex(const char *name, unsigned int timeout)
+{
+       int ret;
+
+       if (!message_init())
+               return False;
+
+       ret = tdb_lock_bystring(tdb, name, timeout);
+       if (ret == 0)
+               DEBUG(10,("secrets_named_mutex: got mutex for %s\n", name ));
+
+       return (ret == 0);
+}
+
+/*
+  unlock a named mutex
+*/
+void secrets_named_mutex_release(char *name)
+{
+       tdb_unlock_bystring(tdb, name);
+       DEBUG(10,("secrets_named_mutex: released mutex for %s\n", name ));
+}
index 768373e5ad352146830eebdef48d336101931ebd..6d60ecc20e0d8f897dc23442db695287a60d2e58 100644 (file)
@@ -286,7 +286,7 @@ BOOL nt_printing_init(void)
        local_pid = sys_getpid();
  
        /* handle a Samba upgrade */
-       tdb_lock_bystring(tdb_drivers, vstring);
+       tdb_lock_bystring(tdb_drivers, vstring,0);
        {
                int32 vers_id;
 
@@ -352,7 +352,7 @@ uint32 update_c_setprinter(BOOL initialize)
        int32 c_setprinter;
        int32 printer_count = 0;
  
-       tdb_lock_bystring(tdb_printers, GLOBAL_C_SETPRINTER);
+       tdb_lock_bystring(tdb_printers, GLOBAL_C_SETPRINTER,0);
  
        /* Traverse the tdb, counting the printers */
        tdb_traverse(tdb_printers, traverse_counting_printers, (void *)&printer_count);
@@ -1763,11 +1763,9 @@ static WERROR get_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr,
        kbuf.dsize = strlen(key)+1;
        
        dbuf = tdb_fetch(tdb_drivers, kbuf);
-#if 0
-       if (!dbuf.dptr) return get_a_printer_driver_3_default(info_ptr, in_prt, in_arch);
-#else
-       if (!dbuf.dptr) return WERR_ACCESS_DENIED;
-#endif
+       if (!dbuf.dptr) 
+               return WERR_UNKNOWN_PRINTER_DRIVER;
+
        len += tdb_unpack(dbuf.dptr, dbuf.dsize, "dffffffff",
                          &driver.cversion,
                          driver.name,
@@ -3373,17 +3371,31 @@ uint32 add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level)
 /****************************************************************************
 ****************************************************************************/
 WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
-                            fstring printername, fstring architecture, uint32 version)
+                            fstring drivername, fstring architecture, uint32 version)
 {
        WERROR result;
        
        switch (level)
        {
                case 3:
-               {
-                       result=get_a_printer_driver_3(&driver->info_3, printername, architecture, version);
+                       /* Sometime we just want any version of the driver */
+                       
+                       if ( version == DRIVER_ANY_VERSION ) {
+                               /* look for Win2k first and then for NT4 */
+                               result = get_a_printer_driver_3(&driver->info_3, drivername, 
+                                               architecture, 3);
+                                               
+                               if ( !W_ERROR_IS_OK(result) ) {
+                                       result = get_a_printer_driver_3( &driver->info_3, 
+                                                       drivername, architecture, 2 );
+                               }
+                       }
+                       else {
+                               result = get_a_printer_driver_3(&driver->info_3, drivername, 
+                                       architecture, version);                         
+                       }
                        break;
-               }
+                       
                default:
                        result=W_ERROR(1);
                        break;
@@ -3391,6 +3403,7 @@ WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
        
        if (W_ERROR_IS_OK(result))
                dump_a_printer_driver(*driver, level);
+               
        return result;
 }
 
@@ -3449,77 +3462,40 @@ uint32 free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level)
   Determine whether or not a particular driver is currently assigned
   to a printer
 ****************************************************************************/
-BOOL printer_driver_in_use (char *arch, char *driver)
+
+BOOL printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 )
 {
-       TDB_DATA kbuf, newkey, dbuf;
-       NT_PRINTER_INFO_LEVEL_2 info;
-       int ret;
+       int snum;
+       int n_services = lp_numservices();
+       NT_PRINTER_INFO_LEVEL *printer = NULL;
 
-       if (!tdb_printers)
-               if (!nt_printing_init())
-                       return False;
+       if ( !info_3 ) 
+               return False;
 
-       DEBUG(5,("printer_driver_in_use: Beginning search through printers.tdb...\n"));
+       DEBUG(5,("printer_driver_in_use: Beginning search through ntprinters.tdb...\n"));
        
        /* loop through the printers.tdb and check for the drivername */
-       for (kbuf = tdb_firstkey(tdb_printers); kbuf.dptr;
-            newkey = tdb_nextkey(tdb_printers, kbuf), safe_free(kbuf.dptr), kbuf=newkey
+       
+       for (snum=0; snum<n_services; snum++
        {
-
-               dbuf = tdb_fetch(tdb_printers, kbuf);
-               if (!dbuf.dptr) 
+               if ( !(lp_snum_ok(snum) && lp_print_ok(snum) ) )
                        continue;
-
-               if (strncmp(kbuf.dptr, PRINTERS_PREFIX, strlen(PRINTERS_PREFIX)) != 0) 
-                       continue;
-
-               ret = tdb_unpack(dbuf.dptr, dbuf.dsize, "dddddddddddfffffPfffff",
-                       &info.attributes,
-                       &info.priority,
-                       &info.default_priority,
-                       &info.starttime,
-                       &info.untiltime,
-                       &info.status,
-                       &info.cjobs,
-                       &info.averageppm,
-                       &info.changeid,
-                       &info.c_setprinter,
-                       &info.setuptime,
-                       info.servername,
-                       info.printername,
-                       info.sharename,
-                       info.portname,
-                       info.drivername,
-                       info.comment,
-                       info.location,
-                       info.sepfile,
-                       info.printprocessor,
-                       info.datatype,
-                       info.parameters);
-
-               SAFE_FREE(dbuf.dptr);
-
-               if (ret == -1) {
-                       DEBUG (0,("printer_driver_in_use: tdb_unpack failed for printer %s\n",
-                                       info.printername));
+               
+               if ( !W_ERROR_IS_OK(get_a_printer(&printer, 2, lp_servicename(snum))) )
                        continue;
-               }
                
-               DEBUG (10,("printer_driver_in_use: Printer - %s (%s)\n",
-                       info.printername, info.drivername));
-                       
-               if (strcmp(info.drivername, driver) == 0) 
-               {
-                       DEBUG(5,("printer_driver_in_use: Printer %s using %s\n",
-                               info.printername, driver));
+               if ( !StrCaseCmp(info_3->name, printer->info_2->drivername) ) {
+                       free_a_printer( &printer, 2 );
                        return True;
-               }       
+               }
+               
+               free_a_printer( &printer, 2 );
        }
-       DEBUG(5,("printer_driver_in_use: Completed search through printers.tdb...\n"));
        
+       DEBUG(5,("printer_driver_in_use: Completed search through ntprinters.tdb...\n"));
        
+       /* report that the driver is not in use by default */
        
-       /* report that the driver is in use by default */
        return False;
 }
 
@@ -3528,7 +3504,7 @@ BOOL printer_driver_in_use (char *arch, char *driver)
  previously looked up.
  ***************************************************************************/
 
-static WERROR delete_printer_driver_internal( NT_PRINTER_DRIVER_INFO_LEVEL_3 *i, struct current_user *user,
+WERROR delete_printer_driver( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct current_user *user,
                               uint32 version, BOOL delete_files )
 {
        pstring         key;
@@ -3538,24 +3514,24 @@ static WERROR delete_printer_driver_internal( NT_PRINTER_DRIVER_INFO_LEVEL_3 *i,
 
        /* delete the tdb data first */
 
-       get_short_archi(arch, i->environment);
+       get_short_archi(arch, info_3->environment);
        slprintf(key, sizeof(key)-1, "%s%s/%d/%s", DRIVERS_PREFIX,
-               arch, version, i->name);
+               arch, version, info_3->name);
 
        DEBUG(5,("delete_printer_driver: key = [%s] delete_files = %s\n",
                key, delete_files ? "TRUE" : "FALSE" ));
 
-       ctr.info_3 = i;
+       ctr.info_3 = info_3;
        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));
+               DEBUG(8,("delete_printer_driver: Driver unknown [%s]\n", key));
                return WERR_UNKNOWN_PRINTER_DRIVER;
        }
                
@@ -3564,7 +3540,7 @@ static WERROR delete_printer_driver_internal( NT_PRINTER_DRIVER_INFO_LEVEL_3 *i,
        /* ok... the driver exists so the delete should return success */
                
        if (tdb_delete(tdb_drivers, kbuf) == -1) {
-               DEBUG (0,("delete_printer_driver_internal: fail to delete %s!\n", key));
+               DEBUG (0,("delete_printer_driver: fail to delete %s!\n", key));
                return WERR_ACCESS_DENIED;
        }
 
@@ -3580,47 +3556,9 @@ static WERROR delete_printer_driver_internal( NT_PRINTER_DRIVER_INFO_LEVEL_3 *i,
 
 #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;
+       DEBUG(5,("delete_printer_driver: driver delete successful [%s]\n", key));
 
        return WERR_OK;
-       }
-       
-       /* just delete what they asked for */
-       
-       return delete_printer_driver_internal(i, user, version, delete_files );
 }
 
 /****************************************************************************
index 37de0a9ad843531c94916ff398e2771d6ecce94a..c8387bf79c87481f5b30f6fc1321cdb66b034900 100644 (file)
@@ -247,10 +247,11 @@ must be in DOS codepage.
 The xxx_printername_ok functions need fixing to understand they are being
 given a DOS codepage. FIXME !! JRA.
 ***************************************************************************/
-BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname)
+
+BOOL pcap_printername_ok(char *pszPrintername, const char *pszPrintcapname)
 {
   char *line=NULL;
-  char *psz;
+  const char *psz;
   char *p,*q;
   FILE *pfile;
 
index 77615dfe90f68f9cbd48ffd85a1d8722e4d2ebf2..1862699bade5db0ea04a457b6a54b2e942049bee 100644 (file)
@@ -664,6 +664,10 @@ cups_job_submit(int snum, struct printjob *pjob)
 
        httpClose(http);
 
+       if ( ret == 0 )
+               unlink(pjob->filename);
+       /* else print_job_end will do it for us */
+
        return (ret);
 }
 
index 4ac2cfcb1482f06e4e3d7dc4f51ebf41b3f1f87c..e499dc8d7ece2a8c5dcb62407dbf852bcd7cc159 100644 (file)
@@ -64,7 +64,7 @@ BOOL print_backend_init(void)
        local_pid = sys_getpid();
 
        /* handle a Samba upgrade */
-       tdb_lock_bystring(tdb, sversion);
+       tdb_lock_bystring(tdb, sversion, 0);
        if (tdb_fetch_int32(tdb, sversion) != PRINT_DATABASE_VERSION) {
                tdb_traverse(tdb, tdb_traverse_delete_fn, NULL);
                tdb_store_int32(tdb, sversion, PRINT_DATABASE_VERSION);
@@ -378,7 +378,11 @@ static void print_queue_update(int snum)
        /* Lock the queue for the database update */
 
        slprintf(keystr, sizeof(keystr) - 1, "LOCK/%s", printer_name);
-       tdb_lock_bystring(tdb, keystr);
+       /* Only wait 10 seconds for this. */
+       if (tdb_lock_bystring(tdb, keystr, 10) == -1) {
+               DEBUG(0,("print_queue_update: Failed to lock printing database\n" ));
+               return;
+       }
 
        /*
         * Ensure that no one else got in here.
@@ -1000,8 +1004,11 @@ int print_job_start(struct current_user *user, int snum, char *jobname)
 
        fstrcpy(pjob.queuename, lp_servicename(snum));
 
-       /* lock the database */
-       tdb_lock_bystring(tdb, "INFO/nextjob");
+       /* Lock the database - only wait 20 seconds. */
+       if (tdb_lock_bystring(tdb, "INFO/nextjob", 20) == -1) {
+               DEBUG(0,("print_job_start: failed to lock printing database.\n"));
+               return -1;
+       }
 
        next_jobid = tdb_fetch_int32(tdb, "INFO/nextjob");
        if (next_jobid == -1)
index e6ad610d89f84fc02b04d3510c80118a24dcf574..cde3bb35a56c873f1802cb00cdb38d4067462180 100644 (file)
 
 #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;
 
+#endif /* WITH_PROFILE */
+
 struct profile_header *profile_h;
 struct profile_stats *profile_p;
 
index be186e40a142adde564d0bf5010645c748bf412d..e5abca941be16fd8431246eb17ec2085e0408015 100644 (file)
@@ -32,50 +32,48 @@ Initialize domain session credentials.
 
 NTSTATUS cli_nt_setup_creds(struct cli_state *cli, unsigned char mach_pwd[16])
 {
-  NTSTATUS result;
-  DOM_CHAL clnt_chal;
-  DOM_CHAL srv_chal;
+       NTSTATUS result;
+       DOM_CHAL clnt_chal;
+       DOM_CHAL srv_chal;
 
-  UTIME zerotime;
+       UTIME zerotime;
 
-  /******************* Request Challenge ********************/
+       /******************* Request Challenge ********************/
 
-  generate_random_buffer( clnt_chal.data, 8, False);
+       generate_random_buffer( clnt_chal.data, 8, False);
        
-  /* send a client challenge; receive a server challenge */
-  if (!cli_net_req_chal(cli, &clnt_chal, &srv_chal))
-  {
-    DEBUG(0,("cli_nt_setup_creds: request challenge failed\n"));
-    return NT_STATUS_UNSUCCESSFUL;
-  }
+       /* Send a client challenge; receive a server challenge */
+       if (!cli_net_req_chal(cli, &clnt_chal, &srv_chal)) {
+               DEBUG(0,("cli_nt_setup_creds: request challenge failed\n"));
+               return NT_STATUS_UNSUCCESSFUL;
+       }
 
-  /**************** Long-term Session key **************/
+       /**************** Long-term Session key **************/
 
-  /* calculate the session key */
-  cred_session_key(&clnt_chal, &srv_chal, (uchar *)mach_pwd, cli->sess_key);
-  memset((char *)cli->sess_key+8, '\0', 8);
+       /* calculate the session key */
+       cred_session_key(&clnt_chal, &srv_chal, (uchar *)mach_pwd, cli->sess_key);
+       memset((char *)cli->sess_key+8, '\0', 8);
 
-  /******************* Authenticate 2 ********************/
+       /******************* Authenticate 2 ********************/
 
-  /* calculate auth-2 credentials */
-  zerotime.time = 0;
-  cred_create(cli->sess_key, &clnt_chal, zerotime, &(cli->clnt_cred.challenge));
+       /* Calculate auth-2 credentials */
+       zerotime.time = 0;
+       cred_create(cli->sess_key, &clnt_chal, zerotime, &(cli->clnt_cred.challenge));
 
-  /*  
-   * Send client auth-2 challenge.
-   * Receive an auth-2 challenge response and check it.
-   */
+       /*  
+        * Send client auth-2 challenge.
+        * Receive an auth-2 challenge response and check it.
+        */
 
-  result = cli_net_auth2(cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ?
-                         SEC_CHAN_WKSTA : SEC_CHAN_BDC, 0x000001ff, &srv_chal);
+       result = cli_net_auth2(cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ?
+                       SEC_CHAN_WKSTA : SEC_CHAN_BDC, 0x000001ff, &srv_chal);
   
-  if (!NT_STATUS_IS_OK(result))
-  {
-    DEBUG(0,("cli_nt_setup_creds: auth2 challenge failed\n"));
-    return result;
-  }
+       if (!NT_STATUS_IS_OK(result)) {
+               DEBUG(0,("cli_nt_setup_creds: auth2 challenge failed\n"));
+               return result;
+       }
 
-  return NT_STATUS_OK;
+       return NT_STATUS_OK;
 }
 
 /****************************************************************************
@@ -84,19 +82,19 @@ NTSTATUS cli_nt_setup_creds(struct cli_state *cli, unsigned char mach_pwd[16])
 
 BOOL cli_nt_srv_pwset(struct cli_state *cli, unsigned char *new_hashof_mach_pwd)
 {
-  unsigned char processed_new_pwd[16];
+       unsigned char processed_new_pwd[16];
 
-  DEBUG(5,("cli_nt_srv_pwset: %d\n", __LINE__));
+       DEBUG(5,("cli_nt_srv_pwset: %d\n", __LINE__));
 
 #ifdef DEBUG_PASSWORD
-  dump_data(6, (char *)new_hashof_mach_pwd, 16);
+       dump_data(6, (char *)new_hashof_mach_pwd, 16);
 #endif
 
-  /* Process the new password. */
-  cred_hash3( processed_new_pwd, new_hashof_mach_pwd, cli->sess_key, 1);
+       /* Process the new password. */
+       cred_hash3( processed_new_pwd, new_hashof_mach_pwd, cli->sess_key, 1);
 
-  /* send client srv_pwset challenge */
-  return cli_net_srv_pwset(cli, processed_new_pwd);
+       /* Send client srv_pwset challenge */
+       return cli_net_srv_pwset(cli, processed_new_pwd);
 }
 
 /****************************************************************************
@@ -105,51 +103,59 @@ NT login - interactive.
 password equivalents, protected by the session key) is inherently insecure
 given the current design of the NT Domain system. JRA.
  ****************************************************************************/
-NTSTATUS cli_nt_login_interactive(struct cli_state *cli, char *domain, char *username, 
-                              uint32 smb_userid_low, char *password,
-                              NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3)
+
+NTSTATUS cli_nt_login_interactive(struct cli_state *cli, char *unix_domain, char *unix_username, 
+                               uint32 smb_userid_low, char *unix_password,
+                               NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3)
 {
-  uchar lm_owf_user_pwd[16];
-  uchar nt_owf_user_pwd[16];
-  NTSTATUS ret;
+       fstring dos_password, dos_username, dos_domain;
+       uchar lm_owf_user_pwd[16];
+       uchar nt_owf_user_pwd[16];
+       NTSTATUS ret;
+
+       DEBUG(5,("cli_nt_login_interactive: %d\n", __LINE__));
 
-  DEBUG(5,("cli_nt_login_interactive: %d\n", __LINE__));
+       fstrcpy(dos_password, unix_password);
+       unix_to_dos(dos_password);
+       fstrcpy(dos_username, unix_username);
+       unix_to_dos(dos_username);
+       fstrcpy(dos_domain, unix_domain);
+       unix_to_dos(dos_domain);
 
-  nt_lm_owf_gen(password, nt_owf_user_pwd, lm_owf_user_pwd);
+       nt_lm_owf_gen(dos_password, nt_owf_user_pwd, lm_owf_user_pwd);
 
 #ifdef DEBUG_PASSWORD
 
-  DEBUG(100,("nt owf of user password: "));
-  dump_data(100, (char *)lm_owf_user_pwd, 16);
+       DEBUG(100,("nt owf of user password: "));
+       dump_data(100, (char *)lm_owf_user_pwd, 16);
 
-  DEBUG(100,("nt owf of user password: "));
-  dump_data(100, (char *)nt_owf_user_pwd, 16);
+       DEBUG(100,("nt owf of user password: "));
+       dump_data(100, (char *)nt_owf_user_pwd, 16);
 
 #endif
 
-  DEBUG(5,("cli_nt_login_interactive: %d\n", __LINE__));
+       DEBUG(5,("cli_nt_login_interactive: %d\n", __LINE__));
 
-  /* indicate an "interactive" login */
-  ctr->switch_value = INTERACTIVE_LOGON_TYPE;
+       /* indicate an "interactive" login */
+       ctr->switch_value = INTERACTIVE_LOGON_TYPE;
 
-  /* Create the structure needed for SAM logon. */
-  init_id_info1(&ctr->auth.id1, domain, 0, 
-                smb_userid_low, 0,
-                username, cli->clnt_name_slash,
-                (char *)cli->sess_key, lm_owf_user_pwd, nt_owf_user_pwd);
+       /* Create the structure needed for SAM logon. */
+       init_id_info1(&ctr->auth.id1, dos_domain, 0, 
+               smb_userid_low, 0,
+               dos_username, cli->clnt_name_slash,
+               (char *)cli->sess_key, lm_owf_user_pwd, nt_owf_user_pwd);
 
-  /* Ensure we overwrite all the plaintext password
-     equivalents. */
-  memset(lm_owf_user_pwd, '\0', sizeof(lm_owf_user_pwd));
-  memset(nt_owf_user_pwd, '\0', sizeof(nt_owf_user_pwd));
+       /* Ensure we overwrite all the plaintext password equivalents. */
+       memset(lm_owf_user_pwd, '\0', sizeof(lm_owf_user_pwd));
+       memset(nt_owf_user_pwd, '\0', sizeof(nt_owf_user_pwd));
 
-  /* Send client sam-logon request - update credentials on success. */
-  ret = cli_net_sam_logon(cli, ctr, user_info3);
+       /* Send client sam-logon request - update credentials on success. */
+       ret = cli_net_sam_logon(cli, ctr, user_info3);
 
-  memset(ctr->auth.id1.lm_owf.data, '\0', sizeof(lm_owf_user_pwd));
-  memset(ctr->auth.id1.nt_owf.data, '\0', sizeof(nt_owf_user_pwd));
+       memset(ctr->auth.id1.lm_owf.data, '\0', sizeof(lm_owf_user_pwd));
+       memset(ctr->auth.id1.nt_owf.data, '\0', sizeof(nt_owf_user_pwd));
 
-  return ret;
+       return ret;
 }
 
 /****************************************************************************
@@ -158,10 +164,10 @@ NT login - network.
 password equivalents over the network. JRA.
 ****************************************************************************/
 
-NTSTATUS cli_nt_login_network(struct cli_state *cli, char *domain, char *username, 
-                                                       uint32 smb_userid_low, const char lm_chal[8], 
-                                                       const char *lm_chal_resp, const char *nt_chal_resp,
-                                                       NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3)
+NTSTATUS cli_nt_login_network(struct cli_state *cli, char *unix_domain, char *unix_username, 
+                               uint32 smb_userid_low, const char lm_chal[8], 
+                               const char *lm_chal_resp, const char *nt_chal_resp,
+                               NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3)
 {
        fstring dos_wksta_name, dos_username, dos_domain;
        DEBUG(5,("cli_nt_login_network: %d\n", __LINE__));
@@ -171,10 +177,10 @@ NTSTATUS cli_nt_login_network(struct cli_state *cli, char *domain, char *usernam
        fstrcpy(dos_wksta_name, cli->clnt_name_slash);
        unix_to_dos(dos_wksta_name);
 
-       fstrcpy(dos_username, username);
+       fstrcpy(dos_username, unix_username);
        unix_to_dos(dos_username);
 
-       fstrcpy(dos_domain, domain);
+       fstrcpy(dos_domain, unix_domain);
        unix_to_dos(dos_domain);
 
        /* Create the structure needed for SAM logon. */
@@ -190,10 +196,11 @@ NTSTATUS cli_nt_login_network(struct cli_state *cli, char *domain, char *usernam
 /****************************************************************************
 NT Logoff.
 ****************************************************************************/
+
 BOOL cli_nt_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr)
 {
-  DEBUG(5,("cli_nt_logoff: %d\n", __LINE__));
+       DEBUG(5,("cli_nt_logoff: %d\n", __LINE__));
 
-  /* Send client sam-logoff request - update credentials on success. */
-  return cli_net_sam_logoff(cli, ctr);
+       /* Send client sam-logoff request - update credentials on success. */
+       return cli_net_sam_logoff(cli, ctr);
 }
index d6332c83bc4caf205ea1562ee9c8923cb8fc0e59..782119f064383b5faab138db592a69cde45015d0 100644 (file)
@@ -598,7 +598,7 @@ static BOOL create_rpc_bind_req(prs_struct *rpc_out, BOOL do_auth, uint32 rpc_ca
        }
 
        /* create the request RPC_HDR */
-       init_rpc_hdr(&hdr, RPC_BIND, 0x0, rpc_call_id, 
+       init_rpc_hdr(&hdr, RPC_BIND, RPC_FLG_FIRST | RPC_FLG_LAST, rpc_call_id, 
                RPC_HEADER_LEN + RPC_HDR_RB_LEN + prs_offset(&auth_info),
                auth_len);
 
index 118817256bbad209844ebd3cf08d54d8060b8a80..4a4d9d170930f6a9dc664bdd0a8059348a67dd4c 100644 (file)
@@ -96,6 +96,7 @@ BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine)
        if (!attempt_netbios_session_request(cli, global_myname, remote_machine, &cli->dest_ip)) {
                DEBUG(0,("connect_to_client: machine %s rejected the NetBIOS session request.\n", 
                        remote_machine));
+               cli_shutdown(cli);
                return False;
        }
 
index 21eb878deb3388662e78ee2d9928adf7a73bee9b..a5be01b66f7891c8da3300068906ecf7fb9b8ce6 100644 (file)
@@ -76,6 +76,7 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
   if (!attempt_netbios_session_request(&cli, global_myname, remote_machine, &cli.dest_ip)) {
     DEBUG(0,("modify_trust_password: machine %s rejected the NetBIOS session request.\n", 
       remote_machine ));
+    cli_shutdown(&cli);
     return False;
   }
 
index a666258d0cea52031fa0336cda89683654799075..988b7e32200f6397f7f43b4ff70846dc3ea63e2d 100644 (file)
@@ -1234,8 +1234,8 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr, SAM_ACCOUNT *sam
 
        /* Create NTTIME structs */
        unix_to_nt_time (&logon_time,           pdb_get_logon_time(sampw));
-       unix_to_nt_time (&logoff_time,          pdb_get_logoff_time(sampw));
-       unix_to_nt_time (&kickoff_time,         pdb_get_kickoff_time(sampw));
+       unix_to_nt_time (&logoff_time,          TIME_T_MAX);
+       unix_to_nt_time (&kickoff_time,         TIME_T_MAX);
        unix_to_nt_time (&pass_last_set_time,   pdb_get_pass_last_set_time(sampw));
        unix_to_nt_time (&pass_can_change_time, pdb_get_pass_can_change_time(sampw));
        unix_to_nt_time (&pass_must_change_time,pdb_get_pass_must_change_time(sampw));
index 6d6904dab7a69944f0e4b909a5d9d764f8ad9a16..c983903f767f65d12a2aba7e37590773157c21fb 100644 (file)
@@ -426,6 +426,10 @@ BOOL prs_align(prs_struct *ps)
        return True;
 }
 
+/******************************************************************
+ Align on a 2 byte boundary
+ *****************************************************************/
+
 BOOL prs_align_uint16(prs_struct *ps)
 {
        BOOL ret;
@@ -437,6 +441,21 @@ BOOL prs_align_uint16(prs_struct *ps)
        return ret;
 }
 
+/******************************************************************
+ Align on a 8 byte boundary
+ *****************************************************************/
+
+BOOL prs_align_uint64(prs_struct *ps)
+{
+       BOOL ret;
+       uint8 old_align = ps->align;
+
+       ps->align = 8;
+       ret = prs_align(ps);
+       ps->align = old_align;
+       return ret;
+}
+
 /*******************************************************************
  Align only if required (for the unistr2 string mainly)
  ********************************************************************/
index 2b865c7f3cb6636603259a0d16a4545e8c6176f3..d1b95e1732c6715226f5494b832d9636f606f20d 100644 (file)
@@ -1205,6 +1205,12 @@ BOOL spoolss_io_r_getprinterdata(char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_st
        if (!prs_uint32("size", ps, depth, &r_u->size))
                return False;
        
+       if (UNMARSHALLING(ps) && r_u->size) {
+               r_u->data = prs_alloc_mem(ps, r_u->size);
+               if(!r_u->data)
+                       return False;
+       }
+
        if (!prs_uint8s(False,"data", ps, depth, r_u->data, r_u->size))
                return False;
                
@@ -2282,7 +2288,7 @@ BOOL smb_io_printer_info_2(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *info,
 {
        prs_struct *ps=&buffer->prs;
        uint32 dm_offset, sd_offset, current_offset;
-       uint32 dummy_value = 0;
+       uint32 dummy_value = 0, has_secdesc = 0;
        
        prs_debug(ps, depth, desc, "smb_io_printer_info_2");
        depth++;        
@@ -2320,9 +2326,8 @@ BOOL smb_io_printer_info_2(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *info,
 
        /* save current offset for the sec_desc */
        sd_offset = prs_offset(ps);
-       if (!prs_uint32("sec_desc", ps, depth, &dummy_value))
+       if (!prs_uint32("sec_desc", ps, depth, &has_secdesc))
                return False;
-
        
        /* save current location so we can pick back up here */
        current_offset = prs_offset(ps);
@@ -2334,10 +2339,12 @@ BOOL smb_io_printer_info_2(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *info,
                return False;
        
        /* parse the sec_desc */
-       if (!prs_set_offset(ps, sd_offset))
-               return False;
-       if (!smb_io_relsecdesc("secdesc", buffer, depth, &info->secdesc))
-               return False;
+       if (has_secdesc) {
+               if (!prs_set_offset(ps, sd_offset))
+                       return False;
+               if (!smb_io_relsecdesc("secdesc", buffer, depth, &info->secdesc))
+                       return False;
+       }
                
        /* pick up where we left off */
        if (!prs_set_offset(ps, current_offset))
@@ -2360,13 +2367,6 @@ BOOL smb_io_printer_info_2(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *info,
        if (!prs_uint32("averageppm", ps, depth, &info->averageppm))
                return False;
 
-#if 0 /* JFMTEST */
-       if (!prs_uint32_post("secdesc_ptr", ps, depth, NULL, sec_offset, info->secdesc ? prs_offset(ps)-buffer->struct_start : 0 ))
-               return False;
-
-       if (!sec_io_desc("secdesc", &info->secdesc, ps, depth)) 
-               return False;
-#endif
        return True;
 }
 
@@ -3152,7 +3152,8 @@ uint32 spoolss_size_printer_info_2(PRINTER_INFO_2 *info)
         * it is easier to maintain the calculation here and
         * not place the burden on the caller to remember.   --jerry
         */
-       size += size % 4;
+       if ((size % 4) != 0) 
+               size += 4 - (size % 4);
        
        return size;
 }
@@ -4861,60 +4862,56 @@ BOOL spool_io_printer_driver_info_level_6(char *desc, SPOOL_PRINTER_DRIVER_INFO_
        if(!prs_align(ps))
                return False;
 
+       /* 
+        * I know this seems weird, but I have no other explanation.
+        * This is observed behavior on both NT4 and 2K servers.
+        * --jerry
+        */
+        
+       if (!prs_align_uint64(ps))
+               return False;
 
        /* parse the main elements the packet */
 
-       if(!prs_uint32("version", ps, depth, &il->version))
+       if(!prs_uint32("cversion       ", ps, depth, &il->version))
                return False;
-
-       if(!prs_uint32("name_ptr", ps, depth, &il->name_ptr))
+       if(!prs_uint32("name           ", ps, depth, &il->name_ptr))
                return False;   
-       /*
-        * If name_ptr is NULL then the next 4 bytes are the name_ptr. A driver 
-        * with a NULL name just isn't a driver For example: "HP LaserJet 4si"
-        * from W2K CDROM (which uses unidriver). JohnR 010205
-        */
-       if (!il->name_ptr) {
-               DEBUG(5,("spool_io_printer_driver_info_level_6: name_ptr is NULL! Get next value\n"));
-               if(!prs_uint32("name_ptr", ps, depth, &il->name_ptr))
+       if(!prs_uint32("environment    ", ps, depth, &il->environment_ptr))
                        return False;   
-       }
-       
-       if(!prs_uint32("environment_ptr", ps, depth, &il->environment_ptr))
+       if(!prs_uint32("driverpath     ", ps, depth, &il->driverpath_ptr))
                return False;
-       if(!prs_uint32("driverpath_ptr", ps, depth, &il->driverpath_ptr))
+       if(!prs_uint32("datafile       ", ps, depth, &il->datafile_ptr))
                return False;
-       if(!prs_uint32("datafile_ptr", ps, depth, &il->datafile_ptr))
+       if(!prs_uint32("configfile     ", ps, depth, &il->configfile_ptr))
                return False;
-       if(!prs_uint32("configfile_ptr", ps, depth, &il->configfile_ptr))
+       if(!prs_uint32("helpfile       ", ps, depth, &il->helpfile_ptr))
                return False;
-       if(!prs_uint32("helpfile_ptr", ps, depth, &il->helpfile_ptr))
+       if(!prs_uint32("monitorname    ", ps, depth, &il->monitorname_ptr))
                return False;
-       if(!prs_uint32("monitorname_ptr", ps, depth, &il->monitorname_ptr))
-               return False;
-       if(!prs_uint32("defaultdatatype_ptr", ps, depth, &il->defaultdatatype_ptr))
+       if(!prs_uint32("defaultdatatype", ps, depth, &il->defaultdatatype_ptr))
                return False;
-       if(!prs_uint32("dependentfiles_len", ps, depth, &il->dependentfiles_len))
+       if(!prs_uint32("dependentfiles ", ps, depth, &il->dependentfiles_len))
                return False;
-       if(!prs_uint32("dependentfiles_ptr", ps, depth, &il->dependentfiles_ptr))
+       if(!prs_uint32("dependentfiles ", ps, depth, &il->dependentfiles_ptr))
                return False;
-       if(!prs_uint32("previousnames_len", ps, depth, &il->previousnames_len))
+       if(!prs_uint32("previousnames  ", ps, depth, &il->previousnames_len))
                return False;
-       if(!prs_uint32("previousnames_ptr", ps, depth, &il->previousnames_ptr))
+       if(!prs_uint32("previousnames  ", ps, depth, &il->previousnames_ptr))
                return False;
-       if(!smb_io_time("driverdate", &il->driverdate, ps, depth))
+       if(!smb_io_time("driverdate    ", &il->driverdate, ps, depth))
                return False;
-       if(!prs_uint32("dummy4", ps, depth, &il->dummy4))
+       if(!prs_uint32("dummy4         ", ps, depth, &il->dummy4))
                return False;
-       if(!prs_uint64("driverversion", ps, depth, &il->driverversion))
+       if(!prs_uint64("driverversion  ", ps, depth, &il->driverversion))
                return False;
-       if(!prs_uint32("mfgname_ptr", ps, depth, &il->mfgname_ptr))
+       if(!prs_uint32("mfgname        ", ps, depth, &il->mfgname_ptr))
                return False;
-       if(!prs_uint32("oemurl_ptr", ps, depth, &il->oemurl_ptr))
+       if(!prs_uint32("oemurl         ", ps, depth, &il->oemurl_ptr))
                return False;
-       if(!prs_uint32("hardwareid_ptr", ps, depth, &il->hardwareid_ptr))
+       if(!prs_uint32("hardwareid     ", ps, depth, &il->hardwareid_ptr))
                return False;
-       if(!prs_uint32("provider_ptr", ps, depth, &il->provider_ptr))
+       if(!prs_uint32("provider       ", ps, depth, &il->provider_ptr))
                return False;
 
        /* parse the structures in the packet */
@@ -5746,6 +5743,14 @@ BOOL spoolss_io_r_enumprinterdata(char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_
        if(!prs_uint32("valuesize", ps, depth, &r_u->valuesize))
                return False;
 
+       if (UNMARSHALLING(ps) && r_u->valuesize) {
+               r_u->value = (uint16 *)prs_alloc_mem(ps, r_u->valuesize * 2);
+               if (!r_u->value) {
+                       DEBUG(0, ("spoolss_io_r_enumprinterdata: out of memory for printerdata value\n"));
+                       return False;
+               }
+       }
+
        if(!prs_uint16uni(False, "value", ps, depth, r_u->value, r_u->valuesize ))
                return False;
 
@@ -5760,6 +5765,15 @@ BOOL spoolss_io_r_enumprinterdata(char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_
 
        if(!prs_uint32("datasize", ps, depth, &r_u->datasize))
                return False;
+
+       if (UNMARSHALLING(ps) && r_u->datasize) {
+               r_u->data = (uint8 *)prs_alloc_mem(ps, r_u->datasize);
+               if (!r_u->data) {
+                       DEBUG(0, ("spoolss_io_r_enumprinterdata: out of memory for printerdata data\n"));
+                       return False;
+               }
+       }
+
        if(!prs_uint8s(False, "data", ps, depth, r_u->data, r_u->datasize))
                return False;
        if(!prs_align(ps))
@@ -6648,6 +6662,12 @@ BOOL spoolss_io_r_getprinterdataex(char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, pr
        if (!prs_uint32("size", ps, depth, &r_u->size))
                return False;
        
+       if (UNMARSHALLING(ps) && r_u->size) {
+               r_u->data = prs_alloc_mem(ps, r_u->size);
+               if(!r_u->data)
+                       return False;
+       }
+
        if (!prs_uint8s(False,"data", ps, depth, r_u->data, r_u->size))
                return False;
                
@@ -6818,6 +6838,7 @@ BOOL spoolss_io_q_enumprinterdataex(char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u,
 
 /*******************************************************************
 ********************************************************************/  
+
 static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps, 
                                PRINTER_ENUM_VALUES_CTR *ctr, int depth)
 {
@@ -6830,9 +6851,6 @@ static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps,
        prs_debug(ps, depth, desc, "spoolss_io_printer_enum_values_ctr");
        depth++;        
        
-       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 
@@ -6842,8 +6860,14 @@ static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps,
        
        /* first loop to write basic enum_value information */
        
-       for (i=0; i<ctr->size_of_array; i++) 
-       {
+       if (UNMARSHALLING(ps)) {
+               ctr->values = (PRINTER_ENUM_VALUES *)prs_alloc_mem(
+                       ps, ctr->size_of_array * sizeof(PRINTER_ENUM_VALUES));
+               if (!ctr->values)
+                       return False;
+       }
+
+       for (i=0; i<ctr->size_of_array; i++) {
                valuename_offset = current_offset;
                if (!prs_uint32("valuename_offset", ps, depth, &valuename_offset))
                        return False;
@@ -6872,12 +6896,18 @@ static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps,
         * attention to 2-byte alignment here....
         */
        
-       for (i=0; i<ctr->size_of_array; i++) 
-       {
+       for (i=0; i<ctr->size_of_array; i++) {
        
                if (!prs_unistr("valuename", ps, depth, &ctr->values[i].valuename))
                        return False;
                
+               if (UNMARSHALLING(ps)) {
+                       ctr->values[i].data = (uint8 *)prs_alloc_mem(
+                               ps, ctr->values[i].data_len);
+                       if (!ctr->values[i].data)
+                               return False;
+               }
+
                if (!prs_uint8s(False, "data", ps, depth, ctr->values[i].data, ctr->values[i].data_len))
                        return False;
                        
@@ -6888,37 +6918,54 @@ static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps,
        return True;    
 }
 
-
 /*******************************************************************
  * write a structure.
  ********************************************************************/  
 
 BOOL spoolss_io_r_enumprinterdataex(char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth)
 {
+       uint32 data_offset, end_offset;
        prs_debug(ps, depth, desc, "spoolss_io_r_enumprinterdataex");
        depth++;
 
        if(!prs_align(ps))
                return False;
-               
-       if (!spoolss_io_printer_enum_values_ctr("", ps, &r_u->ctr, depth ))
+
+       if (!prs_uint32("size", ps, depth, &r_u->ctr.size))
                return False;
-       
+
+       data_offset = prs_offset(ps);
+
+       if (!prs_set_offset(ps, data_offset + r_u->ctr.size))
+               return False;
+
        if(!prs_align(ps))
                return False;
 
        if(!prs_uint32("needed",     ps, depth, &r_u->needed))
                return False;
-               
+
        if(!prs_uint32("returned",   ps, depth, &r_u->returned))
                return False;
 
        if(!prs_werror("status",     ps, depth, &r_u->status))
                return False;
 
-       return True;
-}
+       r_u->ctr.size_of_array = r_u->returned;
+
+       end_offset = prs_offset(ps);
+
+       if (!prs_set_offset(ps, data_offset))
+               return False;
 
+       if (r_u->ctr.size)
+               if (!spoolss_io_printer_enum_values_ctr("", ps, &r_u->ctr, depth ))
+                       return False;
+
+       if (!prs_set_offset(ps, end_offset))
+               return False;
+                                                                                                                                                       return True;
+}
 
 /*******************************************************************
  * write a structure.
index 396883ca5bbd58d031fcc47f8209df9ac981519b..146ab88ffea16bd2262c548e7844b7702eb3b59d 100644 (file)
@@ -298,11 +298,19 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd)
                return WERR_BADFID;
        }
 
-       if (del_a_printer(Printer->dev.handlename) != 0) {
-               DEBUG(3,("Error deleting printer %s\n", Printer->dev.handlename));
-               return WERR_BADFID;
+       /* 
+        * It turns out that Windows allows delete printer on a handle
+        * opened by an admin user, then used on a pipe handle created
+        * by an anonymous user..... but they're working on security.... riiight !
+        * JRA.
+        */
+
+       if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
+               DEBUG(3, ("delete_printer_handle: denied by handle\n"));
+               return WERR_ACCESS_DENIED;
        }
 
+#if 0
        /* Check calling user has permission to delete printer.  Note that
           since we set the snum parameter to -1 only administrators can
           delete the printer.  This stops people with the Full Control
@@ -312,6 +320,12 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd)
                DEBUG(3, ("printer delete denied by security descriptor\n"));
                return WERR_ACCESS_DENIED;
        }
+#endif
+
+       if (del_a_printer(Printer->dev.handlename) != 0) {
+               DEBUG(3,("Error deleting printer %s\n", Printer->dev.handlename));
+               return WERR_BADFID;
+       }
 
        if (*lp_deleteprinter_cmd()) {
 
@@ -335,10 +349,10 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd)
                /* Send SIGHUP to process group... is there a better way? */
                kill(0, SIGHUP);
 
-               if ( ( i = lp_servicenumber( Printer->dev.handlename ) ) >= 0 ) {
-                       lp_killservice( i );
-                       return WERR_OK;
-               } else
+               /* go ahead and re-read the services immediately */
+               reload_services( False );
+
+               if ( ( i = lp_servicenumber( Printer->dev.handlename ) ) < 0 )
                        return WERR_ACCESS_DENIED;
        }
 
@@ -1422,34 +1436,71 @@ WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER
        fstring                         driver;
        fstring                         arch;
        NT_PRINTER_DRIVER_INFO_LEVEL    info;
+       NT_PRINTER_DRIVER_INFO_LEVEL    info_win2k;
        int                             version;
+       struct current_user             user;
+       WERROR                          status;
+       WERROR                          status_win2k = WERR_ACCESS_DENIED;
         
        unistr2_to_dos(driver, &q_u->driver, sizeof(driver)-1 );
+       unistr2_to_dos(arch,   &q_u->arch,   sizeof(arch)-1   );
+       get_current_user(&user, p);
+        
        unistr2_to_dos(arch,   &q_u->arch,   sizeof(arch)-1   );
        
        /* check that we have a valid driver name first */
-       if ((version=get_version_id(arch)) == -1) {
-               /* this is what NT returns */
+       
+       if ((version=get_version_id(arch)) == -1) 
                return WERR_INVALID_ENVIRONMENT;
-       }
+                               
+       ZERO_STRUCT(info);
+       ZERO_STRUCT(info_win2k);
+       
+       if (!W_ERROR_IS_OK(get_a_printer_driver(&info, 3, driver, arch, version))) 
+       {
+               /* try for Win2k driver if "Windows NT x86" */
                
-       /* if they said "Windows NT x86", then try for version 2 & 3 */
+               if ( version == 2 ) {
+                       version = 3;
+                       if (!W_ERROR_IS_OK(get_a_printer_driver(&info, 3, driver, arch, version))) {
+                               status = WERR_UNKNOWN_PRINTER_DRIVER;
+                               goto done;
+                       }
+               }
+       }
        
+       if (printer_driver_in_use(info.info_3)) {
+               status = WERR_PRINTER_DRIVER_IN_USE;
+               goto done;
+       }
+               
        if ( version == 2 )
-               version = DRIVER_ANY_VERSION;
+       {               
+               if (W_ERROR_IS_OK(get_a_printer_driver(&info_win2k, 3, driver, arch, 3)))
+               {
+                       /* if we get to here, we now have 2 driver info structures to remove */
+                       /* remove the Win2k driver first*/
                
-       ZERO_STRUCT(info);
-       if (!W_ERROR_IS_OK(get_a_printer_driver(&info, 3, driver, arch, version))) {
-               return WERR_UNKNOWN_PRINTER_DRIVER;
+                       status_win2k = delete_printer_driver(info_win2k.info_3, &user, 3, False );
+                       free_a_printer_driver( info_win2k, 3 );
+                       
+                       /* this should not have failed---if it did, report to client */
+                       if ( !W_ERROR_IS_OK(status_win2k) )
+                               goto done;
+               }
        }
        
-
-       if (printer_driver_in_use(arch, driver))
-       {
-               return WERR_PRINTER_DRIVER_IN_USE;
-       }
-
-       return delete_printer_driver(info.info_3, NULL, version, False);
+       status = delete_printer_driver(info.info_3, &user, version, False);
+       
+       /* if at least one of the deletes succeeded return OK */
+       
+       if ( W_ERROR_IS_OK(status) || W_ERROR_IS_OK(status_win2k) )
+               status = WERR_OK;
+       
+done:
+       free_a_printer_driver( info, 3 );
+       
+       return status;
 }
 
 /********************************************************************
@@ -4872,7 +4923,9 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer)
 
                /* Send SIGHUP to process group... is there a better way? */
                kill(0, SIGHUP);
-               add_all_printers();
+               
+               /* reload our services immediately */
+               reload_services( False );
        }
 
        file_lines_free(qlines);
@@ -5194,6 +5247,13 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level,
                        result =  WERR_NOMEM;
                        goto done;
                }
+
+               /* 
+                * make sure we actually reload the services after 
+                * this as smb.conf could have a new section in it 
+                * .... shouldn't .... but could
+                */
+               reload_services(False); 
        }
 
        /* Do sanity check on the requested changes for Samba */
@@ -5529,11 +5589,9 @@ static WERROR enumjobs_level2(print_queue_struct *queue, int snum,
                goto done;
        }
                
-       if (!(devmode = construct_dev_mode(snum))) {
-               *returned = 0;
-               result = WERR_NOMEM;
-               goto done;
-       }
+       /* this should not be a failure condition if the devmode is NULL */
+       
+       devmode = construct_dev_mode(snum);
 
        for (i=0; i<*returned; i++)
                fill_job_info_2(&(info[i]), &queue[i], i, snum, ntprinter,
@@ -6453,15 +6511,17 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_
                return WERR_PRINTER_ALREADY_EXISTS;
        }
 
-       if (*lp_addprinter_cmd() )
+       if (*lp_addprinter_cmd() ) {
                if ( !add_printer_hook(printer) ) {
                        free_a_printer(&printer,2);
                        return WERR_ACCESS_DENIED;
        }
+       }
 
        slprintf(name, sizeof(name)-1, "\\\\%s\\%s", get_called_name(),
              printer->info_2->sharename);
 
+       
        if ((snum = print_queue_snum(printer->info_2->sharename)) == -1) {
                free_a_printer(&printer,2);
                return WERR_ACCESS_DENIED;
@@ -7603,10 +7663,10 @@ static WERROR getjob_level_2(print_queue_struct *queue, int count, int snum, uin
        ret = get_a_printer(&ntprinter, 2, lp_servicename(snum));
        if (!W_ERROR_IS_OK(ret))
                goto done;
-       if (construct_dev_mode(snum) == NULL) {
-               ret = WERR_NOMEM;
-               goto done;
-       }
+               
+       /* not a failure condition if devmode == NULL */
+       
+       construct_dev_mode(snum);
 
        fill_job_info_2(info_2, &(queue[i-1]), i, snum, ntprinter, devmode);
        
@@ -8060,6 +8120,7 @@ WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROC
        case 1:
                result = getprintprocessordirectory_level_1
                  (&q_u->name, &q_u->environment, buffer, offered, needed);
+               break;
        default:
                result = WERR_UNKNOWN_LEVEL;
        }
index 1ba85e7fdba1186dea4d1cbae6f6c5f0594b5ecb..2218fdb455c04c5dd09af7ddb3a241f3f31dceaa 100644 (file)
@@ -137,7 +137,7 @@ BOOL share_info_db_init(void)
        local_pid = sys_getpid();
  
        /* handle a Samba upgrade */
-       tdb_lock_bystring(share_tdb, vstring);
+       tdb_lock_bystring(share_tdb, vstring,0);
 
        /* Cope with byte-reversed older versions of the db. */
        vers_id = tdb_fetch_int32(share_tdb, vstring);
index 3067d8f437d54f8aad3ad0acdc59c057938263dc..d926f4946e9006fa3d3a355da5187313951713c2 100644 (file)
@@ -585,6 +585,7 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd)
 static void usage(void)
 {
        printf("Usage: rpcclient [options] server\n");
+       printf("Version: %s\n", VERSION);
 
        printf("\t-A authfile           file containing user credentials\n");
        printf("\t-c \"command string\"   execute semicolon separated cmds\n");
index c1be521c553a94a2163dce009634151293f57bf7..152b5091abc91df159cd096125807fffc9842a43 100644 (file)
@@ -130,6 +130,7 @@ static NTSTATUS sam_repl(struct cli_state *cli, unsigned char trust_passwde[16],
 static void usage(void)
 {
        printf("Usage: samsync [options]\n");
+       printf("Version: %s\n", VERSION);
 
        printf("\t-d debuglevel         set the debuglevel\n");
        printf("\t-h                    Print this help message.\n");
index cce6287071553f684f5a63746a5d5888b73fc5ee..3d77fd64ce416f84ee4b791baf7ce55a37aa37c3 100644 (file)
@@ -554,9 +554,24 @@ void *dptr_fetch_lanman2(int dptr_num)
 
 BOOL dir_check_ftype(connection_struct *conn,int mode,SMB_STRUCT_STAT *st,int dirtype)
 {
-  if (((mode & ~dirtype) & (aHIDDEN | aSYSTEM | aDIR)) != 0)
-    return False;
-  return True;
+       int mask;
+
+       /* Check the "may have" search bits. */
+       if (((mode & ~dirtype) & (aHIDDEN | aSYSTEM | aDIR)) != 0)
+               return False;
+
+       /* Check the "must have" bits, which are the may have bits shifted eight */
+       /* If must have bit is set, the file/dir can not be returned in search unless the matching
+               file attribute is set */
+       mask = ((dirtype >> 8) & (aDIR|aARCH|aRONLY|aHIDDEN|aSYSTEM)); /* & 0x37 */
+       if(mask) {
+               if((mask & (mode & (aDIR|aARCH|aRONLY|aHIDDEN|aSYSTEM))) == mask)   /* check if matching attribute present */
+                       return True;
+               else
+                       return False;
+       }
+
+       return True;
 }
 
 static BOOL mangle_mask_match(connection_struct *conn, char *filename, char *mask)
index fd660f40d08ee224e025f454d5f302b3909881c4..06bce01e78f5b65d810897e66ed1a5a527a5021e 100644 (file)
@@ -256,6 +256,18 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n",
 
                if ((pos >= wcp->offset) && (pos <= wcp->offset + wcp->data_size)) {
       
+                       /* ASCII art.... JRA.
+
+      +--------------+-----
+      | Cached data  | Rest of allocated cache buffer....
+      +--------------+-----
+
+            +-------------------+
+            | Data to write     |
+            +-------------------+
+
+                       */
+
                        /*
                         * Start of write overlaps or abutts the existing data.
                         */
@@ -305,6 +317,18 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n",
                } else if ((pos < wcp->offset) && (pos + n > wcp->offset) && 
                                        (pos + n <= wcp->offset + wcp->alloc_size)) {
 
+                       /* ASCII art.... JRA.
+
+                        +---------------+
+                        | Cache buffer  |
+                        +---------------+
+
+            +-------------------+
+            | Data to write     |
+            +-------------------+
+
+                       */
+
                        /*
                         * End of write overlaps the existing data.
                         */
@@ -350,6 +374,20 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n",
                                        (pos > wcp->offset + wcp->data_size) && 
                                        (pos < wcp->offset + wcp->alloc_size) ) {
 
+                       /* ASCII art.... JRA.
+
+                       End of file ---->|
+
+                        +---------------+---------------+
+                        | Cached data   | Cache buffer  |
+                        +---------------+---------------+
+
+                                              +-------------------+
+                                              | Data to write     |
+                                              +-------------------+
+
+                       */
+
                        /*
                         * Non-contiguous write part of which fits within
                         * the cache buffer and is extending the file
@@ -413,7 +451,41 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n",
 
                } else {
 
-                       /*
+                       /* ASCII art..... JRA.
+
+   Case 1).
+
+                        +---------------+---------------+
+                        | Cached data   | Cache buffer  |
+                        +---------------+---------------+
+
+                                                              +-------------------+
+                                                              | Data to write     |
+                                                              +-------------------+
+
+   Case 2).
+
+                           +---------------+---------------+
+                           | Cached data   | Cache buffer  |
+                           +---------------+---------------+
+
+   +-------------------+
+   | Data to write     |
+   +-------------------+
+
+    Case 3).
+
+                           +---------------+---------------+
+                           | Cached data   | Cache buffer  |
+                           +---------------+---------------+
+
+                  +-----------------------------------------------------+
+                  | Data to write                                       |
+                  +-----------------------------------------------------+
+
+                 */
+
+                       /*
                         * Write is bigger than buffer, or there is no overlap on the
                         * low or high ends.
                         */
@@ -440,6 +512,19 @@ len = %u\n",fsp->fd, (double)pos, (unsigned int)n, (double)wcp->offset, (unsigne
                        } else {
                                ssize_t ret = real_write_file(fsp, data, pos, n);
 
+                               /*
+                                * If the write overlaps the entire cache, then
+                                * discard the current contents of the cache.
+                                * Fix from Rasmus Borup Hansen rbh@math.ku.dk.
+                                */
+
+                               if ((pos <= wcp->offset) &&
+                                               (pos + n >= wcp->offset + wcp->data_size) ) {
+                                       DEBUG(9,("write_file: discarding overwritten write \
+cache: fd = %d, off=%.0f, size=%u\n", fsp->fd, (double)wcp->offset, (unsigned int)wcp->data_size ));
+                                       wcp->data_size = 0;
+                               }
+
                                DO_PROFILE_INC(writecache_direct_writes);
                                if (ret == -1)
                                        return ret;
index 7fef891f63346617813f94bf56348ce61d051722..291e96274cd00855bda5cbaaf636c8a4c5015c87 100644 (file)
@@ -172,7 +172,7 @@ static void init_chartest( void )
  *
  * ************************************************************************** **
  */
-static BOOL is_reserved_msdos( char *fname )
+static BOOL is_reserved_msdos( const char *fname )
   {
   char upperFname[13];
   char *p;
@@ -353,10 +353,10 @@ static BOOL is_8_3( const char *cfname, BOOL check_case, BOOL allow_wildcards )
        int   len;
        int   l;
        int   skip;
-       char *p;
-       char *dot_pos;
+       const char *p;
+       const char *dot_pos;
        char *slash_pos;
-       char *fname = (char *)cfname;
+       const char *fname = cfname;
 
        slash_pos = strrchr( fname, '/' );
 
@@ -405,7 +405,7 @@ static BOOL is_8_3( const char *cfname, BOOL check_case, BOOL allow_wildcards )
                        p += skip;
                else {
                        if( *p == '.' && !dot_pos )
-                               dot_pos = (char *)p;
+                               dot_pos = p;
                        else {
                                if( !isdoschar( *p )) {
                                        if (!allow_wildcards)
index 372ddc0bd497070e053a1673a2b3d6de948979d6..d41a5606c5f5c7db011460ff24459c2aa9f74b7a 100644 (file)
@@ -127,8 +127,8 @@ static char *map_filename( char *s,         /* This is null terminated */
  */
 static void mangled_map(char *s, const char *MangledMap)
 {
-       char *start=(char*)MangledMap; /* Use this to search for mappings. */
-       char *end;                    /* Used to find the end of strings. */
+       const char *start=MangledMap; /* Use this to search for mappings. */
+       const char *end;                    /* Used to find the end of strings. */
        char *match_string;
        pstring new_string;           /* Make up the result here. */
        char *np;                     /* Points into new_string. */
index 79330175bbd822d12ac4ef2566901f924cbab2e3..5c54b450df398006fe46b784bd1fd6e6c09954e1 100644 (file)
@@ -141,21 +141,33 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn,
         * as we always opened files read-write in that release. JRA.
         */
 
-       if ((accmode == O_RDONLY) && ((flags & O_TRUNC) == O_TRUNC))
+       if ((accmode == O_RDONLY) && ((flags & O_TRUNC) == O_TRUNC)) {
+               DEBUG(10,("open_file: truncate requested on read-only open for file %s\n",fname ));
                local_flags = (flags & ~O_ACCMODE)|O_RDWR;
-
-       /*
-        * We can't actually truncate here as the file may be locked.
-        * open_file_shared will take care of the truncate later. JRA.
-        */
-
-       local_flags &= ~O_TRUNC;
+       }
 
        /* actually do the open */
 
        if ((desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) ||
-                       (local_flags & O_CREAT)) {
+                       (local_flags & O_CREAT) || ((local_flags & O_TRUNC) == O_TRUNC) ) {
+
+               /*
+                * We can't actually truncate here as the file may be locked.
+                * open_file_shared will take care of the truncate later. JRA.
+                */
 
+               local_flags &= ~O_TRUNC;
+
+#if defined(O_NONBLOCK) && defined(S_ISFIFO)
+               /*
+                * We would block on opening a FIFO with no one else on the
+                * other end. Do what we used to do and add O_NONBLOCK to the
+                * open flags. JRA.
+                */
+
+               if (VALID_STAT(*psbuf) && S_ISFIFO(psbuf->st_mode))
+                       local_flags |= O_NONBLOCK;
+#endif
                fsp->fd = fd_open(conn, fname, local_flags, mode);
 
                if (fsp->fd == -1)  {
@@ -672,6 +684,31 @@ dev = %x, inode = %.0f. Deleting it to continue...\n", (int)broken_entry.pid, fn
        return num_share_modes;
 }
 
+static BOOL open_match_attributes(connection_struct *conn, char *path, mode_t existing_mode, mode_t new_mode)
+{
+       uint32 old_dos_mode, new_dos_mode;
+       SMB_STRUCT_STAT sbuf;
+
+       ZERO_STRUCT(sbuf);
+
+       sbuf.st_mode = existing_mode;
+       old_dos_mode = dos_mode(conn, path, &sbuf);
+
+       sbuf.st_mode = new_mode;
+       new_dos_mode = dos_mode(conn, path, &sbuf);
+
+       /* If we're mapping SYSTEM and HIDDEN ensure they match. */
+       if (lp_map_system(SNUM(conn))) {
+               if ((old_dos_mode & FILE_ATTRIBUTE_SYSTEM) != (new_dos_mode & FILE_ATTRIBUTE_SYSTEM))
+                       return False;
+       }
+       if (lp_map_hidden(SNUM(conn))) {
+               if ((old_dos_mode & FILE_ATTRIBUTE_HIDDEN) != (new_dos_mode & FILE_ATTRIBUTE_HIDDEN))
+                       return False;
+       }
+       return True;
+}
+
 /****************************************************************************
 set a kernel flock on a file for NFS interoperability
 this requires a patch to Linux
@@ -782,6 +819,17 @@ files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_
        if (CAN_WRITE(conn) && (GET_FILE_OPEN_DISPOSITION(ofun) == FILE_EXISTS_TRUNCATE))
                flags2 |= O_TRUNC;
 
+       /* We only care about matching attributes on file exists and truncate. */
+       if (file_existed && (GET_FILE_OPEN_DISPOSITION(ofun) == FILE_EXISTS_TRUNCATE)) {
+               if (!open_match_attributes(conn, fname, psbuf->st_mode, mode)) {
+                       DEBUG(5,("open_file_shared: attributes missmatch for file %s (0%o, 0%o)\n",
+                                               fname, psbuf->st_mode, mode ));
+                       file_free(fsp);
+                       errno = EACCES;
+                       return NULL;
+               }
+       }
+
        if (GET_FILE_OPEN_DISPOSITION(ofun) == FILE_EXISTS_FAIL)
                flags2 |= O_EXCL;
 
index 9b9dfbcdf678a3a61c3720d0239b158760e9623b..d5d7a29f29d4d9943b1cf549022f107deb088d53 100644 (file)
@@ -1056,8 +1056,10 @@ struct cli_state *server_cryptkey(void)
                return NULL;
        }
 
-       if (!attempt_netbios_session_request(cli, global_myname, desthost, &dest_ip))
+       if (!attempt_netbios_session_request(cli, global_myname, desthost, &dest_ip)) {
+               cli_shutdown(cli);
                return NULL;
+       }
 
        DEBUG(3,("got session\n"));
 
@@ -1195,7 +1197,7 @@ static BOOL grab_server_mutex(const char *name)
                DEBUG(0,("grab_server_mutex: malloc failed for %s\n", name));
                return False;
        }
-       if (!message_named_mutex(name, 20)) {
+       if (!secrets_named_mutex(name, 10)) {
                DEBUG(10,("grab_server_mutex: failed for %s\n", name));
                SAFE_FREE(mutex_server_name);
                return False;
@@ -1207,7 +1209,7 @@ static BOOL grab_server_mutex(const char *name)
 static void release_server_mutex(void)
 {
        if (mutex_server_name) {
-               message_named_mutex_release(mutex_server_name);
+               secrets_named_mutex_release(mutex_server_name);
                SAFE_FREE(mutex_server_name);
        }
 }
@@ -1237,11 +1239,13 @@ static BOOL connect_to_domain_password_server(struct cli_state **ppcli,
                /* we shouldn't have 255.255.255.255 forthe IP address of a password server anyways */
                if ((to_ip.s_addr=inet_addr(server)) == 0xFFFFFFFF) {
                        DEBUG (0,("connect_to_domain_password_server: inet_addr(%s) returned 0xFFFFFFFF!\n", server));
+                       cli_shutdown(pcli);
                        return False;
                }
 
                if (!name_status_find("*", 0, 0x20, to_ip, remote_machine)) {
                        DEBUG(1, ("connect_to_domain_password_server: Can't " "resolve name for IP %s\n", server));
+                       cli_shutdown(pcli);
                        return False;
                }
        } else {
@@ -1268,8 +1272,10 @@ static BOOL connect_to_domain_password_server(struct cli_state **ppcli,
                two connections where one hasn't completed a negprot yet it will send a
                TCP reset to the first connection (tridge) */
 
-       if (!grab_server_mutex(server))
+       if (!grab_server_mutex(server)) {
+               cli_shutdown(pcli);
                return False;
+       }
 
        if (!cli_connect(pcli, remote_machine, &dest_ip)) {
                DEBUG(0,("connect_to_domain_password_server: unable to connect to SMB server on \
@@ -1282,6 +1288,7 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli) ));
        if (!attempt_netbios_session_request(pcli, global_myname, remote_machine, &dest_ip)) {
                DEBUG(0,("connect_to_password_server: machine %s rejected the NetBIOS \
 session request. Error was : %s.\n", remote_machine, cli_errstr(pcli) ));
+               cli_shutdown(pcli);
                release_server_mutex();
                return False;
        }
@@ -1551,8 +1558,13 @@ BOOL domain_client_validate( char *user, char *domain,
        }
 
        /* Test if machine password is expired and need to be changed */
-       if (time(NULL) > last_change_time + lp_machine_password_timeout())
+       if (time(NULL) > last_change_time + lp_machine_password_timeout()) {
+               DEBUG(10,("domain_client_validate: machine account password needs changing. \
+Last change time = (%u) %s. Machine password timeout = %u seconds\n",
+                       (unsigned int)last_change_time, http_timestring(last_change_time),
+                       (unsigned int)lp_machine_password_timeout() ));
                global_machine_password_needs_changing = True;
+       }
 
        /*
         * At this point, smb_apasswd points to the lanman response to
@@ -1635,7 +1647,7 @@ BOOL domain_client_validate( char *user, char *domain,
                        return False;
                }
  
-               ptok->num_sids = (size_t)info3.num_groups2;
+               ptok->num_sids = (size_t)info3.num_groups2 + info3.num_other_sids;
                if ((ptok->user_sids = (DOM_SID *)malloc( sizeof(DOM_SID) * ptok->num_sids )) == NULL) {
                        DEBUG(0, ("domain_client_validate: Out of memory allocating group SIDS\n"));
                        SAFE_FREE(ptok);
@@ -1643,10 +1655,22 @@ BOOL domain_client_validate( char *user, char *domain,
                        return False;
                }
  
-               for (i = 0; i < ptok->num_sids; i++) {
+               /* Group membership (including nested groups) is
+                  stored here. */
+
+               for (i = 0; i < info3.num_groups2; i++) {
                        sid_copy(&ptok->user_sids[i], &info3.dom_sid.sid);
                        sid_append_rid(&ptok->user_sids[i], info3.gids[i].g_rid);
                }
+
+               /* Universal group memberships for other domains are
+                  stored in the info3.other_sids field.  We also need to
+                  do sid filtering here. */
+
+               for (i = 0; i < info3.num_other_sids; i++)
+                       sid_copy(&ptok->user_sids[info3.num_groups2 + i], 
+                                &info3.other_sids[i].sid);
+
                *pptoken = ptok;
        }
 
index cbb28359f944e8e277bb3c534e3bdbef6919e7ff..b8f4b752fda6a0298b6508a3eed1a24ee60857d9 100644 (file)
@@ -1873,6 +1873,45 @@ static int nt_ace_comp( SEC_ACE *a1, SEC_ACE *a2)
        return 1;
 }
 
+/****************************************************************************
+  Incoming NT ACLs on a directory can be split into a default POSIX acl (CI|OI|IO) and
+  a normal POSIX acl. Win2k needs these split acls re-merging into one ACL
+  with CI|OI set so it is inherited and also applies to the directory.
+  Based on code from "Jim McDonough" <jmcd@us.ibm.com>.
+****************************************************************************/
+
+static size_t merge_default_aces( SEC_ACE *nt_ace_list, size_t num_aces)
+{
+       size_t i, j;
+
+       for (i = 0; i < num_aces; i++) {
+               for (j = i+1; j < num_aces; j++) {
+                       /* We know the lower number ACE's are file entries. */
+                       if ((nt_ace_list[i].type == nt_ace_list[j].type) &&
+                               (nt_ace_list[i].size == nt_ace_list[j].size) &&
+                               (nt_ace_list[i].info.mask == nt_ace_list[j].info.mask) &&
+                               sid_equal(&nt_ace_list[i].trustee, &nt_ace_list[j].trustee) &&
+                               (nt_ace_list[i].flags == 0) &&
+                               (nt_ace_list[j].flags == (SEC_ACE_FLAG_OBJECT_INHERIT|
+                                                         SEC_ACE_FLAG_CONTAINER_INHERIT|
+                                                         SEC_ACE_FLAG_INHERIT_ONLY))) {
+                               /*
+                                * These are identical except for the flags.
+                                * Merge the inherited ACE onto the non-inherited ACE.
+                                */
+
+                               nt_ace_list[i].flags = SEC_ACE_FLAG_OBJECT_INHERIT|SEC_ACE_FLAG_CONTAINER_INHERIT;
+                               if (num_aces - j - 1 > 0)
+                                       memmove(&nt_ace_list[j], &nt_ace_list[j+1], (num_aces-j-1) *
+                                                       sizeof(SEC_ACE));
+                               num_aces--;
+                               break;
+                       }
+               }
+       }
+
+       return num_aces;
+}
 /****************************************************************************
  Reply to query a security descriptor from an fsp. If it succeeds it allocates
  the space for the return elements and returns the size needed to return the
@@ -1882,6 +1921,8 @@ static int nt_ace_comp( SEC_ACE *a1, SEC_ACE *a2)
 
 size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc)
 {
+       extern DOM_SID global_sid_Builtin_Administrators;
+       extern DOM_SID global_sid_Builtin_Users;
        connection_struct *conn = fsp->conn;
        SMB_STRUCT_STAT sbuf;
        SEC_ACE *nt_ace_list = NULL;
@@ -1896,6 +1937,7 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc)
        SMB_ACL_T dir_acl = NULL;
        canon_ace *file_ace = NULL;
        canon_ace *dir_ace = NULL;
+       size_t num_profile_acls = 0;
  
        *ppdesc = NULL;
 
@@ -1940,7 +1982,14 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc)
         * Get the owner, group and world SIDs.
         */
 
-       create_file_sids(&sbuf, &owner_sid, &group_sid);
+       if (lp_profile_acls(SNUM(fsp->conn))) {
+               /* For WXP SP1 the owner must be administrators. */
+               sid_copy(&owner_sid, &global_sid_Builtin_Administrators);
+               sid_copy(&group_sid, &global_sid_Builtin_Users);
+               num_profile_acls = 2;
+       } else {
+               create_file_sids(&sbuf, &owner_sid, &group_sid);
+       }
 
        /* Create the canon_ace lists. */
        file_ace = canonicalise_acl( fsp, posix_acl, &sbuf,  &owner_sid, &group_sid);
@@ -1964,12 +2013,12 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc)
        }
 
        /* Allocate the ace list. */
-       if ((nt_ace_list = (SEC_ACE *)malloc((num_acls + num_dir_acls)* sizeof(SEC_ACE))) == NULL) {
+       if ((nt_ace_list = (SEC_ACE *)malloc((num_acls + num_profile_acls + num_dir_acls)* sizeof(SEC_ACE))) == NULL) {
                DEBUG(0,("get_nt_acl: Unable to malloc space for nt_ace_list.\n"));
                goto done;
        }
 
-       memset(nt_ace_list, '\0', (num_acls + num_dir_acls) * sizeof(SEC_ACE) );
+       memset(nt_ace_list, '\0', (num_acls + num_profile_acls + num_dir_acls) * sizeof(SEC_ACE) );
 
        /*
         * Create the NT ACE list from the canonical ace lists.
@@ -1983,27 +2032,55 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc)
                ace = file_ace;
 
                for (i = 0; i < num_acls; i++, ace = ace->next) {
-                       SEC_ACCESS acc = map_canon_ace_perms(&nt_acl_type, &owner_sid, ace );
+                       SEC_ACCESS acc;
+
+                       acc = map_canon_ace_perms(&nt_acl_type, &owner_sid, ace );
                        init_sec_ace(&nt_ace_list[num_aces++], &ace->trustee, nt_acl_type, acc, 0);
                }
 
+               /* The User must have access to a profile share - even if we can't map the SID. */
+               if (lp_profile_acls(SNUM(fsp->conn))) {
+                       SEC_ACCESS acc;
+                       init_sec_access(&acc,FILE_GENERIC_ALL);
+                       init_sec_ace(&nt_ace_list[num_aces++], &global_sid_Builtin_Users, SEC_ACE_TYPE_ACCESS_ALLOWED, acc, 0);
+               }
+
                ace = dir_ace;
 
                for (i = 0; i < num_dir_acls; i++, ace = ace->next) {
-                       SEC_ACCESS acc = map_canon_ace_perms(&nt_acl_type, &owner_sid, ace );
+                       SEC_ACCESS acc;
+
+                       acc = map_canon_ace_perms(&nt_acl_type, &owner_sid, ace );
                        init_sec_ace(&nt_ace_list[num_aces++], &ace->trustee, nt_acl_type, acc, 
                                        SEC_ACE_FLAG_OBJECT_INHERIT|SEC_ACE_FLAG_CONTAINER_INHERIT|SEC_ACE_FLAG_INHERIT_ONLY);
                }
 
+               /* The User must have access to a profile share - even if we can't map the SID. */
+               if (lp_profile_acls(SNUM(fsp->conn))) {
+                       SEC_ACCESS acc;
+                       init_sec_access(&acc,FILE_GENERIC_ALL);
+                       init_sec_ace(&nt_ace_list[num_aces++], &global_sid_Builtin_Users, SEC_ACE_TYPE_ACCESS_ALLOWED, acc,
+                                       SEC_ACE_FLAG_OBJECT_INHERIT|SEC_ACE_FLAG_CONTAINER_INHERIT|
+                                       SEC_ACE_FLAG_INHERIT_ONLY);
+               }
+
+               /*
+                * Merge POSIX default ACLs and normal ACLs into one NT ACE.
+                * Win2K needs this to get the inheritance correct when replacing ACLs
+                * on a directory tree. Based on work by Jim @ IBM.
+                */
+
+               num_aces = merge_default_aces(nt_ace_list, num_aces);
+
                /*
                 * Sort to force deny entries to the front.
                 */
 
-               if (num_acls + num_dir_acls)
-                       qsort( nt_ace_list, num_acls + num_dir_acls, sizeof(nt_ace_list[0]), QSORT_CAST nt_ace_comp);
+               if (num_aces)
+                       qsort( nt_ace_list, num_aces, sizeof(nt_ace_list[0]), QSORT_CAST nt_ace_comp);
        }
 
-       if (num_acls) {
+       if (num_aces) {
                if((psa = make_sec_acl( main_loop_talloc_get(), ACL_REVISION, num_aces, nt_ace_list)) == NULL) {
                        DEBUG(0,("get_nt_acl: Unable to malloc space for acl.\n"));
                        goto done;
@@ -2030,14 +2107,14 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc)
        return sd_size;
 }
 
-/*
-  try to chown a file. We will be able to chown it under the following conditions
+/****************************************************************************
+ Try to chown a file. We will be able to chown it under the following conditions.
 
-  1) if we have root privileges, then it will just work
-  2) if we have write permission to the file and dos_filemodes is set
+  1) If we have root privileges, then it will just work.
+  2) If we have write permission to the file and dos_filemodes is set
      then allow chown to the currently authenticated user.
+****************************************************************************/
 
- */
 static int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_t gid)
 {
        int ret;
@@ -2099,6 +2176,11 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd)
 
        DEBUG(10,("set_nt_acl: called for file %s\n", fsp->fsp_name ));
 
+       if (!CAN_WRITE(conn)) {
+               DEBUG(10,("set acl rejected on read-only share\n"));
+               return False;
+       }
+
        /*
         * Get the current state of the file.
         */
@@ -2379,6 +2461,10 @@ int fchmod_acl(files_struct *fsp, int fd, mode_t mode)
        return ret;
 }
 
+/****************************************************************************
+ Check for an existing default POSIX ACL on a directory.
+****************************************************************************/
+
 BOOL directory_has_default_acl(connection_struct *conn, const char *fname)
 {
         SMB_ACL_T dir_acl = conn->vfs_ops.sys_acl_get_file( conn, fname, SMB_ACL_TYPE_DEFAULT);
index c34a146eab1d9144cd77bc1bfe266a4d472a4a5e..ea3eb4ba76f942a59d9222f4035247fcf5504b46 100644 (file)
@@ -1166,13 +1166,22 @@ static BOOL timeout_processing(int deadtime, int *select_timeout, time_t *last_t
      * password needs changing.
      */
 
+    DEBUG(10,("timeout_processing: checking to see if machine account password need changing.\n"));
+
     /*
      * First, open the machine password file with an exclusive lock.
      */
 
+    if (secrets_lock_trust_account_password(global_myworkgroup, True) == False) {
+      DEBUG(0,("process: unable to lock the machine account password for \
+machine %s in domain %s.\n", global_myname, global_myworkgroup ));
+      return True;
+    }
+
     if(!secrets_fetch_trust_account_password(global_myworkgroup, trust_passwd_hash, &lct)) {
       DEBUG(0,("process: unable to read the machine account password for \
 machine %s in domain %s.\n", global_myname, global_myworkgroup ));
+      secrets_lock_trust_account_password(global_myworkgroup, False);
       return True;
     }
 
@@ -1182,13 +1191,18 @@ machine %s in domain %s.\n", global_myname, global_myworkgroup ));
 
     if(t < lct + lp_machine_password_timeout()) {
       global_machine_password_needs_changing = False;
+      secrets_lock_trust_account_password(global_myworkgroup, False);
       return True;
     }
 
+    DEBUG(10,("timeout_processing: machine account password last change time = (%u) %s.\n",
+                           (unsigned int)lct, http_timestring(lct)));
+
     pstrcpy(remote_machine_list, lp_passwordserver());
 
     change_trust_account_password( global_myworkgroup, remote_machine_list);
     global_machine_password_needs_changing = False;
+    secrets_lock_trust_account_password(global_myworkgroup, False);
   }
 
   /*
index 50b31d7d6810e272924b3af2d956482a4e2cdb8e..775eb5dfe14daba75ab94e4d05f2a4cae90d8d71 100644 (file)
@@ -42,7 +42,7 @@ uint32 global_client_caps = 0;
 unsigned int smb_echo_count = 0;
 
 /****************************************************************************
-report a possible attack via the password buffer overflow bug
+ Report a possible attack via the password buffer overflow bug.
 ****************************************************************************/
 
 static void overflow_attack(int len)
@@ -57,7 +57,7 @@ static void overflow_attack(int len)
 
 
 /****************************************************************************
-  reply to an special message 
+ Reply to an special message.
 ****************************************************************************/
 
 int reply_special(char *inbuf,char *outbuf)
@@ -154,9 +154,8 @@ int reply_special(char *inbuf,char *outbuf)
        return(outsize);
 }
 
-
 /*******************************************************************
-work out what error to give to a failed connection
+ Work out what error to give to a failed connection.
 ********************************************************************/
 
 static int connection_error(char *outbuf, int ecode)
@@ -168,7 +167,7 @@ static int connection_error(char *outbuf, int ecode)
 }
 
 /****************************************************************************
-  parse a share descriptor string
+ Parse a share descriptor string.
 ****************************************************************************/
 
 static void parse_connect(char *p,char *service,char *user,
@@ -232,11 +231,11 @@ int reply_tcon(connection_struct *conn,
                pstrcpy(user,validated_username(vuid));
        }
 
-    /*
-     * Ensure the user and password names are in UNIX codepage format.
-     */
+       /*
+        * Ensure the user and password names are in UNIX codepage format.
+        */
 
-    pstrcpy(user,dos_to_unix_static(user));
+       pstrcpy(user,dos_to_unix_static(user));
        if (!doencrypt)
        pstrcpy(password,dos_to_unix_static(password));
 
@@ -403,10 +402,10 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt
        return chain_reply(inbuf,outbuf,length,bufsize);
 }
 
-
 /****************************************************************************
-  reply to an unknown type
+ Reply to an unknown type.
 ****************************************************************************/
+
 int reply_unknown(char *inbuf,char *outbuf)
 {
        int type;
@@ -419,8 +418,9 @@ int reply_unknown(char *inbuf,char *outbuf)
 }
 
 /****************************************************************************
-  reply to an ioctl
+ Reply to an ioctl.
 ****************************************************************************/
+
 int reply_ioctl(connection_struct *conn,
                char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
@@ -860,7 +860,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
 
   /* don't allow strange characters in usernames or domains */
   alpha_strcpy(user, user, ". _-$", sizeof(user));
-  alpha_strcpy(domain, domain, ". _-", sizeof(domain));
+  alpha_strcpy(domain, domain, ". _-@", sizeof(domain));
   if (strstr(user, "..") || strstr(domain,"..")) {
          return ERROR_BOTH(NT_STATUS_LOGON_FAILURE,ERRSRV,ERRbadpw);
   }
@@ -1113,10 +1113,10 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
   return chain_reply(inbuf,outbuf,length,bufsize);
 }
 
-
 /****************************************************************************
-  reply to a chkpth
+ Reply to a chkpth.
 ****************************************************************************/
+
 int reply_chkpth(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
   int outsize = 0;
@@ -1161,10 +1161,10 @@ int reply_chkpth(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
   return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a getatr
+ Reply to a getatr.
 ****************************************************************************/
+
 int reply_getatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
   pstring fname;
@@ -1235,10 +1235,10 @@ int reply_getatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
   return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a setatr
+ Reply to a setatr.
 ****************************************************************************/
+
 int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
   pstring fname;
@@ -1281,10 +1281,10 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
   return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a dskattr
+ Reply to a dskattr.
 ****************************************************************************/
+
 int reply_dskattr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
        int outsize = 0;
@@ -1329,11 +1329,11 @@ int reply_dskattr(connection_struct *conn, char *inbuf,char *outbuf, int dum_siz
        return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a search
 Can be called from SMBsearch, SMBffirst or SMBfunique.
+ Reply to a search.
+ Can be called from SMBsearch, SMBffirst or SMBfunique.
 ****************************************************************************/
+
 int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
   pstring mask;
@@ -1409,12 +1409,15 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
     if (strlen(directory) == 0)
       pstrcpy(directory,"./");
     memset((char *)status,'\0',21);
-    SCVAL(status,0,dirtype);
+    SCVAL(status,0,(dirtype & 0x1F));
   }
   else
   {
+    int status_dirtype;
     memcpy(status,smb_buf(inbuf) + 1 + strlen(path) + 4,21);
-    dirtype = CVAL(status,0) & 0x1F;
+    status_dirtype = CVAL(status,0) & 0x1F;
+    if (status_dirtype != (dirtype & 0x1F))
+       dirtype = status_dirtype;
     conn->dirptr = dptr_fetch(status+12,&dptr_num);      
     if (!conn->dirptr)
       goto SearchEmpty;
@@ -1532,10 +1535,10 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
   return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a fclose (stop directory search)
+ Reply to a fclose (stop directory search).
 ****************************************************************************/
+
 int reply_fclose(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
   int outsize = 0;
@@ -1570,9 +1573,8 @@ int reply_fclose(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
   return(outsize);
 }
 
-
 /****************************************************************************
-  reply to an open
+ Reply to an open.
 ****************************************************************************/
 
 int reply_open(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
@@ -1642,10 +1644,10 @@ int reply_open(connection_struct *conn, char *inbuf,char *outbuf, int dum_size,
   return(outsize);
 }
 
-
 /****************************************************************************
-  reply to an open and X
+ Reply to an open and X.
 ****************************************************************************/
+
 int reply_open_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize)
 {
   pstring fname;
@@ -1752,10 +1754,10 @@ int reply_open_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt
   return chain_reply(inbuf,outbuf,length,bufsize);
 }
 
-
 /****************************************************************************
-  reply to a SMBulogoffX
+ Reply to a SMBulogoffX.
 ****************************************************************************/
+
 int reply_ulogoffX(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize)
 {
   uint16 vuid = SVAL(inbuf,smb_uid);
@@ -1782,10 +1784,10 @@ int reply_ulogoffX(connection_struct *conn, char *inbuf,char *outbuf,int length,
   return chain_reply(inbuf,outbuf,length,bufsize);
 }
 
-
 /****************************************************************************
-  reply to a mknew or a create
+ Reply to a mknew or a create.
 ****************************************************************************/
+
 int reply_mknew(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
   pstring fname;
@@ -1855,10 +1857,10 @@ int reply_mknew(connection_struct *conn, char *inbuf,char *outbuf, int dum_size,
   return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a create temporary file
+ Reply to a create temporary file.
 ****************************************************************************/
+
 int reply_ctemp(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
        pstring fname;
@@ -2167,6 +2169,59 @@ void fail_readraw(void)
        exit_server(errstr);
 }
 
+/****************************************************************************
+ Use sendfile in readbraw.
+****************************************************************************/
+
+void send_file_readbraw(connection_struct *conn, files_struct *fsp, SMB_OFF_T startpos, size_t nread,
+               ssize_t mincount, char *outbuf)
+{
+       ssize_t ret=0;
+
+#if defined(WITH_SENDFILE)
+       /*
+        * We can only use sendfile on a non-chained packet and on a file
+        * that is exclusively oplocked. reply_readbraw has already checked the length.
+        */
+
+       if ((nread > 0) && (lp_write_cache_size(SNUM(conn)) == 0) &&
+                       EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type) && lp_use_sendfile(SNUM(conn)) ) {
+               DATA_BLOB header;
+
+               _smb_setlen(outbuf,nread);
+               header.data = outbuf;
+               header.length = 4;
+               header.free = NULL;
+
+               if ( conn->vfs_ops.sendfile( smbd_server_fd(), fsp, fsp->fd, &header, startpos, nread) == -1) {
+                       /*
+                        * Special hack for broken Linux with no 64 bit clean sendfile. If we
+                        * return ENOSYS then pretend we just got a normal read.
+                        */
+                       if (errno == ENOSYS)
+                               goto normal_read;
+
+                       DEBUG(0,("send_file_readbraw: sendfile failed for file %s (%s). Terminating\n",
+                               fsp->fsp_name, strerror(errno) ));
+                       exit_server("send_file_readbraw sendfile failed");
+               }
+
+       }
+
+  normal_read:
+#endif
+
+       if (nread > 0) {
+               ret = read_file(fsp,outbuf+4,startpos,nread);
+               if (ret < mincount)
+                       ret = 0;
+       }
+
+       _smb_setlen(outbuf,ret);
+       if (write_data(smbd_server_fd(),outbuf,4+ret) != 4+ret)
+               fail_readraw();
+}
+
 /****************************************************************************
  Reply to a readbraw (core+ protocol).
 ****************************************************************************/
@@ -2177,7 +2232,6 @@ int reply_readbraw(connection_struct *conn, char *inbuf, char *outbuf, int dum_s
        size_t nread = 0;
        SMB_OFF_T startpos;
        char *header = outbuf;
-       ssize_t ret=0;
        files_struct *fsp;
        START_PROFILE(SMBreadbraw);
 
@@ -2279,217 +2333,288 @@ int reply_readbraw(connection_struct *conn, char *inbuf, char *outbuf, int dum_s
        DEBUG( 3, ( "readbraw fnum=%d start=%.0f max=%d min=%d nread=%d\n", fsp->fnum, (double)startpos,
                                (int)maxcount, (int)mincount, (int)nread ) );
   
-       if (nread > 0) {
-               ret = read_file(fsp,header+4,startpos,nread);
-               if (ret < mincount)
-                       ret = 0;
-       }
-
-       _smb_setlen(header,ret);
-       if (write_data(smbd_server_fd(),header,4+ret) != 4+ret)
-               fail_readraw();
+       send_file_readbraw(conn, fsp, startpos, nread, mincount, outbuf);
 
        DEBUG(5,("readbraw finished\n"));
        END_PROFILE(SMBreadbraw);
        return -1;
 }
 
-
 /****************************************************************************
-  reply to a lockread (core+ protocol)
+ Reply to a lockread (core+ protocol).
 ****************************************************************************/
+
 int reply_lockread(connection_struct *conn, char *inbuf,char *outbuf, int length, int dum_buffsiz)
 {
-  ssize_t nread = -1;
-  char *data;
-  int outsize = 0;
-  SMB_OFF_T startpos;
-  size_t numtoread;
+       ssize_t nread = -1;
+       char *data;
+       int outsize = 0;
+       SMB_OFF_T startpos;
+       size_t numtoread;
        NTSTATUS status;
-  files_struct *fsp = file_fsp(inbuf,smb_vwv0);
-  START_PROFILE(SMBlockread);
+       files_struct *fsp = file_fsp(inbuf,smb_vwv0);
+       START_PROFILE(SMBlockread);
 
-  CHECK_FSP(fsp,conn);
-  CHECK_READ(fsp);
+       CHECK_FSP(fsp,conn);
+       CHECK_READ(fsp);
 
-  release_level_2_oplocks_on_change(fsp);
+       release_level_2_oplocks_on_change(fsp);
 
-  numtoread = SVAL(inbuf,smb_vwv1);
-  startpos = IVAL(inbuf,smb_vwv2);
+       numtoread = SVAL(inbuf,smb_vwv1);
+       startpos = IVAL(inbuf,smb_vwv2);
   
-  outsize = set_message(outbuf,5,3,True);
-  numtoread = MIN(BUFFER_SIZE-outsize,numtoread);
-  data = smb_buf(outbuf) + 3;
+       outsize = set_message(outbuf,5,3,True);
+       numtoread = MIN(BUFFER_SIZE-outsize,numtoread);
+       data = smb_buf(outbuf) + 3;
  
-  /*
-   * NB. Discovered by Menny Hamburger at Mainsoft. This is a core+
-   * protocol request that predates the read/write lock concept. 
-   * Thus instead of asking for a read lock here we need to ask
-   * for a write lock. JRA.
-   */
+       /*
+        * NB. Discovered by Menny Hamburger at Mainsoft. This is a core+
+        * protocol request that predates the read/write lock concept. 
+        * Thus instead of asking for a read lock here we need to ask
+        * for a write lock. JRA.
+        */
 
        status = do_lock_spin(fsp, conn, SVAL(inbuf,smb_pid), 
                         (SMB_BIG_UINT)numtoread, (SMB_BIG_UINT)startpos, WRITE_LOCK);
 
        if (NT_STATUS_V(status)) {
-               if (lp_blocking_locks(SNUM(conn))) {
-      /*
-       * A blocking lock was requested. Package up
-       * this smb into a queued request and push it
-       * onto the blocking lock queue.
-       */
-      if(push_blocking_lock_request(inbuf, length, -1, 0))
+               if (lp_blocking_locks(SNUM(conn)) && ERROR_WAS_LOCK_DENIED(status)) {
+                       /*
+                        * A blocking lock was requested. Package up
+                        * this smb into a queued request and push it
+                        * onto the blocking lock queue.
+                        */
+                       if(push_blocking_lock_request(inbuf, length, -1, 0)) {
+                               END_PROFILE(SMBlockread);
+                               return -1;
+                       }
+               }
                END_PROFILE(SMBlockread);
-        return -1;
-    }
-    END_PROFILE(SMBlockread);
                return ERROR_NT(status);
-  }
+       }
 
-  nread = read_file(fsp,data,startpos,numtoread);
+       nread = read_file(fsp,data,startpos,numtoread);
 
-  if (nread < 0) {
-    END_PROFILE(SMBlockread);
-    return(UNIXERROR(ERRDOS,ERRnoaccess));
-  }
+       if (nread < 0) {
+               END_PROFILE(SMBlockread);
+               return(UNIXERROR(ERRDOS,ERRnoaccess));
+       }
 
-  outsize += nread;
-  SSVAL(outbuf,smb_vwv0,nread);
-  SSVAL(outbuf,smb_vwv5,nread+3);
-  SSVAL(smb_buf(outbuf),1,nread);
+       outsize += nread;
+       SSVAL(outbuf,smb_vwv0,nread);
+       SSVAL(outbuf,smb_vwv5,nread+3);
+       SSVAL(smb_buf(outbuf),1,nread);
 
-  DEBUG( 3, ( "lockread fnum=%d num=%d nread=%d\n",
-            fsp->fnum, (int)numtoread, (int)nread ) );
+       DEBUG( 3, ( "lockread fnum=%d num=%d nread=%d\n",
+               fsp->fnum, (int)numtoread, (int)nread ) );
 
-  END_PROFILE(SMBlockread);
-  return(outsize);
+       END_PROFILE(SMBlockread);
+       return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a read
+ Reply to a read.
 ****************************************************************************/
 
 int reply_read(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize)
 {
-  size_t numtoread;
-  ssize_t nread = 0;
-  char *data;
-  SMB_OFF_T startpos;
-  int outsize = 0;
-  files_struct *fsp = file_fsp(inbuf,smb_vwv0);
-  START_PROFILE(SMBread);
+       size_t numtoread;
+       ssize_t nread = 0;
+       char *data;
+       SMB_OFF_T startpos;
+       int outsize = 0;
+       files_struct *fsp = file_fsp(inbuf,smb_vwv0);
+       START_PROFILE(SMBread);
 
-  CHECK_FSP(fsp,conn);
-  CHECK_READ(fsp);
+       CHECK_FSP(fsp,conn);
+       CHECK_READ(fsp);
 
-  numtoread = SVAL(inbuf,smb_vwv1);
-  startpos = IVAL(inbuf,smb_vwv2);
+       numtoread = SVAL(inbuf,smb_vwv1);
+       startpos = IVAL(inbuf,smb_vwv2);
   
-  outsize = set_message(outbuf,5,3,True);
-  numtoread = MIN(BUFFER_SIZE-outsize,numtoread);
-  data = smb_buf(outbuf) + 3;
+       outsize = set_message(outbuf,5,3,True);
+       numtoread = MIN(BUFFER_SIZE-outsize,numtoread);
+       data = smb_buf(outbuf) + 3;
   
-  if (is_locked(fsp,conn,(SMB_BIG_UINT)numtoread,(SMB_BIG_UINT)startpos, READ_LOCK,False)) {
-    END_PROFILE(SMBread);
-    return ERROR_DOS(ERRDOS,ERRlock);
-  }
+       if (is_locked(fsp,conn,(SMB_BIG_UINT)numtoread,(SMB_BIG_UINT)startpos, READ_LOCK,False)) {
+               END_PROFILE(SMBread);
+               return ERROR_DOS(ERRDOS,ERRlock);
+       }
 
-  if (numtoread > 0)
-    nread = read_file(fsp,data,startpos,numtoread);
+       if (numtoread > 0)
+               nread = read_file(fsp,data,startpos,numtoread);
   
-  if (nread < 0) {
-    END_PROFILE(SMBread);
-    return(UNIXERROR(ERRDOS,ERRnoaccess));
-  }
+       if (nread < 0) {
+               END_PROFILE(SMBread);
+               return(UNIXERROR(ERRDOS,ERRnoaccess));
+       }
   
-  outsize += nread;
-  SSVAL(outbuf,smb_vwv0,nread);
-  SSVAL(outbuf,smb_vwv5,nread+3);
-  SCVAL(smb_buf(outbuf),0,1);
-  SSVAL(smb_buf(outbuf),1,nread);
+       outsize += nread;
+       SSVAL(outbuf,smb_vwv0,nread);
+       SSVAL(outbuf,smb_vwv5,nread+3);
+       SCVAL(smb_buf(outbuf),0,1);
+       SSVAL(smb_buf(outbuf),1,nread);
   
-  DEBUG( 3, ( "read fnum=%d num=%d nread=%d\n",
-            fsp->fnum, (int)numtoread, (int)nread ) );
+       DEBUG( 3, ( "read fnum=%d num=%d nread=%d\n",
+               fsp->fnum, (int)numtoread, (int)nread ) );
 
-  END_PROFILE(SMBread);
-  return(outsize);
+       END_PROFILE(SMBread);
+       return(outsize);
 }
 
+/****************************************************************************
+ Reply to a read and X - possibly using sendfile.
+****************************************************************************/
+
+int send_file_readX(connection_struct *conn, char *inbuf,char *outbuf,int length, 
+               files_struct *fsp, SMB_OFF_T startpos, size_t smb_maxcnt)
+{
+       ssize_t nread = -1;
+       char *data = smb_buf(outbuf);
+
+#if defined(WITH_SENDFILE)
+       /*
+        * We can only use sendfile on a non-chained packet and on a file
+        * that is exclusively oplocked.
+        */
+
+       if ((CVAL(inbuf,smb_vwv0) == 0xFF) && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type) &&
+                       lp_use_sendfile(SNUM(conn)) && (lp_write_cache_size(SNUM(conn)) == 0) ) {
+               SMB_STRUCT_STAT sbuf;
+               DATA_BLOB header;
+
+               if(vfs_fstat(fsp,fsp->fd, &sbuf) == -1)
+                       return(UNIXERROR(ERRDOS,ERRnoaccess));
+
+               if (startpos > sbuf.st_size)
+                       goto normal_read;
+
+               if (smb_maxcnt > (sbuf.st_size - startpos))
+                       smb_maxcnt = (sbuf.st_size - startpos);
+
+               if (smb_maxcnt == 0)
+                       goto normal_read;
+
+               /* 
+                * Set up the packet header before send. We
+                * assume here the sendfile will work (get the
+                * correct amount of data).
+                */
+
+               SSVAL(outbuf,smb_vwv5,smb_maxcnt);
+               SSVAL(outbuf,smb_vwv6,smb_offset(data,outbuf));
+               SSVAL(smb_buf(outbuf),-2,smb_maxcnt);
+               SCVAL(outbuf,smb_vwv0,0xFF);
+               set_message(outbuf,12,smb_maxcnt,False);
+               header.data = outbuf;
+               header.length = data - outbuf;
+               header.free = NULL;
+
+               if ( conn->vfs_ops.sendfile( smbd_server_fd(), fsp, fsp->fd, &header, startpos, smb_maxcnt) == -1) {
+                       /*
+                        * Special hack for broken Linux with no 64 bit clean sendfile. If we
+                        * return ENOSYS then pretend we just got a normal read.
+                        */
+                       if (errno == ENOSYS)
+                               goto normal_read;
+
+                       DEBUG(0,("send_file_readX: sendfile failed for file %s (%s). Terminating\n",
+                               fsp->fsp_name, strerror(errno) ));
+                       exit_server("send_file_readX sendfile failed");
+               }
+
+               DEBUG( 3, ( "send_file_readX: sendfile fnum=%d max=%d nread=%d\n",
+                       fsp->fnum, (int)smb_maxcnt, (int)nread ) );
+               return -1;
+       }
+
+  normal_read:
+
+#endif
+
+       nread = read_file(fsp,data,startpos,smb_maxcnt);
+  
+       if (nread < 0) {
+               END_PROFILE(SMBreadX);
+               return(UNIXERROR(ERRDOS,ERRnoaccess));
+       }
+
+       SSVAL(outbuf,smb_vwv5,nread);
+       SSVAL(outbuf,smb_vwv6,smb_offset(data,outbuf));
+       SSVAL(smb_buf(outbuf),-2,nread);
+  
+       DEBUG( 3, ( "send_file_readX fnum=%d max=%d nread=%d\n",
+               fsp->fnum, (int)smb_maxcnt, (int)nread ) );
+
+       return nread;
+}
 
 /****************************************************************************
-  reply to a read and X
+ Reply to a read and X.
 ****************************************************************************/
+
 int reply_read_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize)
 {
-  files_struct *fsp = file_fsp(inbuf,smb_vwv2);
-  SMB_OFF_T startpos = IVAL(inbuf,smb_vwv3);
-  size_t smb_maxcnt = SVAL(inbuf,smb_vwv5);
-  size_t smb_mincnt = SVAL(inbuf,smb_vwv6);
-  ssize_t nread = -1;
-  char *data;
-  START_PROFILE(SMBreadX);
+       files_struct *fsp = file_fsp(inbuf,smb_vwv2);
+       SMB_OFF_T startpos = IVAL(inbuf,smb_vwv3);
+       size_t smb_maxcnt = SVAL(inbuf,smb_vwv5);
+#if 0
+       size_t smb_mincnt = SVAL(inbuf,smb_vwv6);
+#endif
+       ssize_t nread = -1;
+       char *data;
+       START_PROFILE(SMBreadX);
 
-  /* If it's an IPC, pass off the pipe handler. */
-  if (IS_IPC(conn)) {
-    END_PROFILE(SMBreadX);
-    return reply_pipe_read_and_X(inbuf,outbuf,length,bufsize);
-  }
+       /* If it's an IPC, pass off the pipe handler. */
+       if (IS_IPC(conn)) {
+               END_PROFILE(SMBreadX);
+               return reply_pipe_read_and_X(inbuf,outbuf,length,bufsize);
+       }
 
-  CHECK_FSP(fsp,conn);
-  CHECK_READ(fsp);
+       CHECK_FSP(fsp,conn);
+       CHECK_READ(fsp);
 
-  set_message(outbuf,12,0,True);
-  data = smb_buf(outbuf);
+       set_message(outbuf,12,0,True);
+       data = smb_buf(outbuf);
 
-  if(CVAL(inbuf,smb_wct) == 12) {
+       if(CVAL(inbuf,smb_wct) == 12) {
 #ifdef LARGE_SMB_OFF_T
-    /*
-     * This is a large offset (64 bit) read.
-     */
-    startpos |= (((SMB_OFF_T)IVAL(inbuf,smb_vwv10)) << 32);
+               /*
+                * This is a large offset (64 bit) read.
+                */
+               startpos |= (((SMB_OFF_T)IVAL(inbuf,smb_vwv10)) << 32);
 
 #else /* !LARGE_SMB_OFF_T */
 
-    /*
-     * Ensure we haven't been sent a >32 bit offset.
-     */
+               /*
+                * Ensure we haven't been sent a >32 bit offset.
+                */
 
-    if(IVAL(inbuf,smb_vwv10) != 0) {
-      DEBUG(0,("reply_read_and_X - large offset (%x << 32) used and we don't support \
+               if(IVAL(inbuf,smb_vwv10) != 0) {
+                       DEBUG(0,("reply_read_and_X - large offset (%x << 32) used and we don't support \
 64 bit offsets.\n", (unsigned int)IVAL(inbuf,smb_vwv10) ));
-      END_PROFILE(SMBreadX);
-      return ERROR_DOS(ERRDOS,ERRbadaccess);
-    }
+                       END_PROFILE(SMBreadX);
+                       return ERROR_DOS(ERRDOS,ERRbadaccess);
+               }
 
 #endif /* LARGE_SMB_OFF_T */
 
-  }
+       }
 
-  if (is_locked(fsp,conn,(SMB_BIG_UINT)smb_maxcnt,(SMB_BIG_UINT)startpos, READ_LOCK,False)) {
-    END_PROFILE(SMBreadX);
-    return ERROR_DOS(ERRDOS,ERRlock);
-  }
-  nread = read_file(fsp,data,startpos,smb_maxcnt);
-  
-  if (nread < 0) {
-    END_PROFILE(SMBreadX);
-    return(UNIXERROR(ERRDOS,ERRnoaccess));
-  }
-  
-  SSVAL(outbuf,smb_vwv5,nread);
-  SSVAL(outbuf,smb_vwv6,smb_offset(data,outbuf));
-  SSVAL(smb_buf(outbuf),-2,nread);
-  
-  DEBUG( 3, ( "readX fnum=%d min=%d max=%d nread=%d\n",
-             fsp->fnum, (int)smb_mincnt, (int)smb_maxcnt, (int)nread ) );
+       if (is_locked(fsp,conn,(SMB_BIG_UINT)smb_maxcnt,(SMB_BIG_UINT)startpos, READ_LOCK,False)) {
+               END_PROFILE(SMBreadX);
+               return ERROR_DOS(ERRDOS,ERRlock);
+       }
+       nread = send_file_readX(conn, inbuf, outbuf, length, fsp, startpos, smb_maxcnt);
+       if (nread != -1)
+               nread = chain_reply(inbuf,outbuf,length,bufsize);
 
-  END_PROFILE(SMBreadX);
-  return chain_reply(inbuf,outbuf,length,bufsize);
+       END_PROFILE(SMBreadX);
+       return nread;
 }
 
 /****************************************************************************
-  reply to a writebraw (core+ or LANMAN1.0 protocol)
+ Reply to a writebraw (core+ or LANMAN1.0 protocol).
 ****************************************************************************/
 
 int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize)
@@ -2617,7 +2742,7 @@ int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size,
 }
 
 /****************************************************************************
-  reply to a writeunlock (core+)
+ Reply to a writeunlock (core+).
 ****************************************************************************/
 
 int reply_writeunlock(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize)
@@ -2678,7 +2803,6 @@ int reply_writeunlock(connection_struct *conn, char *inbuf,char *outbuf, int siz
   return(outsize);
 }
 
-
 /****************************************************************************
  Reply to a write.
 ****************************************************************************/
@@ -2757,10 +2881,10 @@ int reply_write(connection_struct *conn, char *inbuf,char *outbuf,int size,int d
        return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a write and X
+ Reply to a write and X.
 ****************************************************************************/
+
 int reply_write_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize)
 {
   files_struct *fsp = file_fsp(inbuf,smb_vwv2);
@@ -2859,7 +2983,7 @@ int reply_write_and_X(connection_struct *conn, char *inbuf,char *outbuf,int leng
 
 
 /****************************************************************************
-  reply to a lseek
+ Reply to a lseek.
 ****************************************************************************/
 
 int reply_lseek(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize)
@@ -2963,8 +3087,9 @@ int reply_flush(connection_struct *conn, char *inbuf,char *outbuf, int size, int
 }
 
 /****************************************************************************
-  reply to a exit
+ Reply to a exit.
 ****************************************************************************/
+
 int reply_exit(connection_struct *conn, 
               char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
@@ -2982,6 +3107,7 @@ int reply_exit(connection_struct *conn,
 /****************************************************************************
  Reply to a close - has to deal with closing a directory opened by NT SMB's.
 ****************************************************************************/
+
 int reply_close(connection_struct *conn, char *inbuf,char *outbuf, int size,
                 int dum_buffsize)
 {
@@ -3056,9 +3182,8 @@ int reply_close(connection_struct *conn, char *inbuf,char *outbuf, int size,
        return(outsize);
 }
 
-
 /****************************************************************************
 reply to a writeclose (Core+ protocol)
Reply to a writeclose (Core+ protocol)
 ****************************************************************************/
 
 int reply_writeclose(connection_struct *conn,
@@ -3115,10 +3240,10 @@ int reply_writeclose(connection_struct *conn,
        return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a lock
+ Reply to a lock.
 ****************************************************************************/
+
 int reply_lock(connection_struct *conn,
               char *inbuf,char *outbuf, int length, int dum_buffsize)
 {
@@ -3140,18 +3265,18 @@ int reply_lock(connection_struct *conn,
 
        status = do_lock_spin(fsp, conn, SVAL(inbuf,smb_pid), count, offset, WRITE_LOCK);
        if (NT_STATUS_V(status)) {
-               if (lp_blocking_locks(SNUM(conn))) {
-           /*
-             * A blocking lock was requested. Package up
-             * this smb into a queued request and push it
-             * onto the blocking lock queue.
-             */
-            if(push_blocking_lock_request(inbuf, length, -1, 0)) {
-             END_PROFILE(SMBlock);
-              return -1;
-           }
-          }
-         END_PROFILE(SMBlock);
+               if (lp_blocking_locks(SNUM(conn)) && ERROR_WAS_LOCK_DENIED(status)) {
+                       /*
+                        * A blocking lock was requested. Package up
+                        * this smb into a queued request and push it
+                        * onto the blocking lock queue.
+                        */
+                       if(push_blocking_lock_request(inbuf, length, -1, 0)) {
+                               END_PROFILE(SMBlock);
+                               return -1;
+                       }
+               }
+               END_PROFILE(SMBlock);
                return ERROR_NT(status);
        }
 
@@ -3159,10 +3284,10 @@ int reply_lock(connection_struct *conn,
        return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a unlock
+ Reply to a unlock.
 ****************************************************************************/
+
 int reply_unlock(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize)
 {
   int outsize = set_message(outbuf,0,0,True);
@@ -3189,10 +3314,10 @@ int reply_unlock(connection_struct *conn, char *inbuf,char *outbuf, int size, in
   return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a tdis
+ Reply to a tdis.
 ****************************************************************************/
+
 int reply_tdis(connection_struct *conn, 
               char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
@@ -3216,11 +3341,10 @@ int reply_tdis(connection_struct *conn,
        return outsize;
 }
 
-
-
 /****************************************************************************
-  reply to a echo
+ Reply to a echo.
 ****************************************************************************/
+
 int reply_echo(connection_struct *conn,
               char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
@@ -3258,10 +3382,10 @@ int reply_echo(connection_struct *conn,
        return -1;
 }
 
-
 /****************************************************************************
-  reply to a printopen
+ Reply to a printopen.
 ****************************************************************************/
+
 int reply_printopen(connection_struct *conn, 
                    char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
@@ -3292,10 +3416,10 @@ int reply_printopen(connection_struct *conn,
        return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a printclose
+ Reply to a printclose.
 ****************************************************************************/
+
 int reply_printclose(connection_struct *conn,
                     char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
@@ -3326,10 +3450,10 @@ int reply_printclose(connection_struct *conn,
        return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a printqueue
+ Reply to a printqueue.
 ****************************************************************************/
+
 int reply_printqueue(connection_struct *conn,
                     char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
@@ -3397,10 +3521,10 @@ int reply_printqueue(connection_struct *conn,
        return(outsize);
 }
 
-
 /****************************************************************************
-  reply to a printwrite
+ Reply to a printwrite.
 ****************************************************************************/
+
 int reply_printwrite(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
   int numtowrite;
@@ -3431,11 +3555,11 @@ int reply_printwrite(connection_struct *conn, char *inbuf,char *outbuf, int dum_
   return(outsize);
 }
 
-
 /****************************************************************************
  The guts of the mkdir command, split out so it may be called by the NT SMB
  code. 
 ****************************************************************************/
+
 NTSTATUS mkdir_internal(connection_struct *conn, pstring directory)
 {
        BOOL bad_path = False;
@@ -3657,10 +3781,10 @@ int reply_rmdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size,
   return(outsize);
 }
 
-
 /*******************************************************************
-resolve wildcards in a filename rename
+ Resolve wildcards in a filename rename.
 ********************************************************************/
+
 static BOOL resolve_wildcards(char *name1,char *name2)
 {
   fstring root1,root2;
@@ -4099,11 +4223,10 @@ static BOOL copy_file(char *src,char *dest1,connection_struct *conn, int ofun,
        return(ret == (SMB_OFF_T)src_sbuf.st_size);
 }
 
-
-
 /****************************************************************************
-  reply to a file copy.
-  ****************************************************************************/
+ Reply to a file copy.
+****************************************************************************/
+
 int reply_copy(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
   int outsize = 0;
@@ -4265,8 +4388,9 @@ int reply_copy(connection_struct *conn, char *inbuf,char *outbuf, int dum_size,
 }
 
 /****************************************************************************
-  reply to a setdir
+ Reply to a setdir.
 ****************************************************************************/
+
 int reply_setdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
 {
   int snum;
@@ -4441,7 +4565,7 @@ SMB_BIG_UINT get_lock_offset( char *data, int data_offset, BOOL large_file_forma
 }
 
 /****************************************************************************
-  reply to a lockingX request
+ Reply to a lockingX request.
 ****************************************************************************/
 
 int reply_lockingX(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize)
@@ -4581,7 +4705,7 @@ no oplock granted on this file (%s).\n", fsp->fnum, fsp->fsp_name));
                                ((locktype & 1) ? READ_LOCK : WRITE_LOCK));
 
                if (NT_STATUS_V(status)) {
-                       if ((lock_timeout != 0) && lp_blocking_locks(SNUM(conn))) {
+                       if ((lock_timeout != 0) && lp_blocking_locks(SNUM(conn)) && ERROR_WAS_LOCK_DENIED(status)) {
                                /*
                                 * A blocking lock was requested. Package up
                                 * this smb into a queued request and push it
index 4a02967866b8980e3a571006593f6996bd494727..05d29d544ab69acdc58d338ce843838b49082d1b 100644 (file)
@@ -353,38 +353,34 @@ connection_struct *make_connection(char *service,char *user,char *password, int
        }
 
        conn->read_only = lp_readonly(snum);
+       DEBUG(10,("make_connection: share is set %s.\n", conn->read_only ? "read only" : "writable" ));
 
        {
                pstring list;
                StrnCpy(list,lp_readlist(snum),sizeof(pstring)-1);
                pstring_sub(list,"%S",service);
 
-               if (user_in_list(user,list))
+               if (user_in_list(user,list)) {
+                       DEBUG(10,("make_connection: user in read list makes share read only\n"));
                        conn->read_only = True;
-               
+               }
+
                StrnCpy(list,lp_writelist(snum),sizeof(pstring)-1);
                pstring_sub(list,"%S",service);
                
-               if (user_in_list(user,list))
+               if (user_in_list(user,list)) {
+                       DEBUG(10,("make_connection: user in read list makes share writable.\n"));
                        conn->read_only = False;    
+               }
        }
 
-       /* admin user check */
+       /* Admin user check */
        
-       /* JRA - original code denied admin user if the share was
-          marked read_only. Changed as I don't think this is needed,
-          but old code left in case there is a problem here.
-       */
-       if (user_in_list(user,lp_admin_users(snum)) 
-#if 0
-           && !conn->read_only
-#endif
-           ) {
+       if (user_in_list(user,lp_admin_users(snum)) ) {
                conn->admin_user = True;
-               DEBUG(0,("%s logged in as admin user (root privileges)\n",user));
-       } else {
+               DEBUG(0,("make_connection: %s logged in as admin user (root privileges)\n",user));
+       } else
                conn->admin_user = False;
-       }
     
        conn->force_user = force;
        conn->vuid = vuid;
index 5d1e21cb2e125861e713606b1e9b121d27b6993e..3750fb68b7049e435ec521a59d2b609bf8bdf8f0 100644 (file)
@@ -940,7 +940,11 @@ close_if_end = %d requires_resume_key = %d level = %d, max_data_bytes = %d\n",
 
        p = strrchr(directory,'/');
        if(p == NULL) {
-               pstrcpy(mask,directory);
+               /* Windows and OS/2 systems treat search on the root '\' as if it were '\*' */
+               if((directory[0] == '.') && (directory[1] == '\0'))
+                       pstrcpy(mask,"*");
+               else
+                       pstrcpy(mask,directory);
                pstrcpy(directory,"./");
        } else {
                pstrcpy(mask,p+1);
@@ -2437,7 +2441,6 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char
 
        switch (info_level) {
                case SMB_INFO_STANDARD:
-               case SMB_INFO_QUERY_EA_SIZE:
                {
                        if (total_data < l1_cbFile+4)
                                return(ERROR_DOS(ERRDOS,ERRinvalidparam));
@@ -2453,6 +2456,9 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char
                        break;
                }
 
+               case SMB_INFO_SET_EA:
+                       return(ERROR_DOS(ERRDOS,ERReasnotsupported));
+
                /* XXXX um, i don't think this is right.
                it's also not in the cifs6.txt spec.
                */
index 2d7cf05bf9b10a281534c0f718b033c923e922a9..b7ec5c10247f4c10612f18e4e4c0f6b519834c20 100644 (file)
@@ -168,6 +168,17 @@ ssize_t vfswrap_write(files_struct *fsp, int fd, const void *data, size_t n)
     return result;
 }
 
+ssize_t vfswrap_sendfile(int tofd, struct files_struct *fsp, int fromfd, const DATA_BLOB *hdr,
+                       SMB_OFF_T offset, size_t n)
+{
+       ssize_t result;
+
+       START_PROFILE_BYTES(syscall_sendfile, n);
+       result = sys_sendfile(tofd, fromfd, hdr, offset, n);
+       END_PROFILE(syscall_sendfile);
+       return result;
+}
+
 SMB_OFF_T vfswrap_lseek(files_struct *fsp, int filedes, SMB_OFF_T offset, int whence)
 {
        SMB_OFF_T result = 0;
index fd25d9956348aae411c3f318a81733855d938064..f94f917415e0488390b7331de586aabb04ef809a 100644 (file)
@@ -55,6 +55,7 @@ struct vfs_ops default_vfs_ops = {
        vfswrap_read,
        vfswrap_write,
        vfswrap_lseek,
+        vfswrap_sendfile,
        vfswrap_rename,
        vfswrap_fsync,
        vfswrap_stat,
index 74472854cf21c90a781c32e604ea8053f69c4ba0..2370ce3bdd93286d8c86e3f7c410a3e0ad1e37a4 100644 (file)
@@ -30,6 +30,7 @@
 #include <errno.h>
 #include <sys/stat.h>
 #include <time.h>
+#include <signal.h>
 #include "tdb.h"
 #include "spinlock.h"
 
index ed75a55e3e9739370c46f091d13481b2443c2989..c57d23cb6f519bf54f9507a887694ecdb9a56bd3 100644 (file)
@@ -34,6 +34,7 @@
 #include <errno.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
+#include <signal.h>
 #include "tdb.h"
 #include "spinlock.h"
 #else
@@ -160,6 +161,18 @@ struct list_struct {
        */
 };
 
+/***************************************************************
+ Allow a caller to set a "alarm" flag that tdb can check to abort
+ a blocking lock on SIGALRM.
+***************************************************************/
+
+static sig_atomic_t *palarm_fired;
+
+void tdb_set_lock_alarm(sig_atomic_t *palarm)
+{
+       palarm_fired = palarm;
+}
+
 /* a byte range locking function - return 0 on success
    this functions locks/unlocks 1 byte at the specified offset.
 
@@ -186,6 +199,8 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset,
 
        do {
                ret = fcntl(tdb->fd,lck_type,&fl);
+               if (ret == -1 && errno == EINTR && palarm_fired && *palarm_fired)
+                       break;
        } while (ret == -1 && errno == EINTR);
 
        if (ret == -1) {
@@ -193,6 +208,10 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset,
                        TDB_LOG((tdb, 5,"tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d\n", 
                                 tdb->fd, offset, rw_type, lck_type));
                }
+               /* Was it an alarm timeout ? */
+               if (errno == EINTR && palarm_fired && *palarm_fired)
+                       return TDB_ERRCODE(TDB_ERR_LOCK_TIMEOUT, -1);
+               /* Otherwise - generic lock error. */
                /* errno set by fcntl */
                return TDB_ERRCODE(TDB_ERR_LOCK, -1);
        }
@@ -517,17 +536,20 @@ int tdb_printfreelist(TDB_CONTEXT *tdb)
 
        /* read in the freelist top */
        if (ofs_read(tdb, offset, &rec_ptr) == -1) {
+               tdb_unlock(tdb, -1, F_WRLCK);
                return 0;
        }
 
        printf("freelist top=[0x%08x]\n", rec_ptr );
        while (rec_ptr) {
                if (tdb_read(tdb, rec_ptr, (char *)&rec, sizeof(rec), DOCONV()) == -1) {
+                       tdb_unlock(tdb, -1, F_WRLCK);
                        return -1;
                }
 
                if (rec.magic != TDB_FREE_MAGIC) {
                        printf("bad magic 0x%08x in free list\n", rec.magic);
+                       tdb_unlock(tdb, -1, F_WRLCK);
                        return -1;
                }
 
@@ -1030,6 +1052,12 @@ static int tdb_update(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf)
 }
 
 /* find an entry in the database given a key */
+/* If an entry doesn't exist tdb_err will be set to
+ * TDB_ERR_NOEXIST. If a key has no data attached
+ * tdb_err will not be set. Both will return a
+ * zero pptr and zero dsize.
+ */
+
 TDB_DATA tdb_fetch(TDB_CONTEXT *tdb, TDB_DATA key)
 {
        tdb_off rec_ptr;
@@ -1040,8 +1068,11 @@ TDB_DATA tdb_fetch(TDB_CONTEXT *tdb, TDB_DATA key)
        if (!(rec_ptr = tdb_find_lock(tdb,key,F_RDLCK,&rec)))
                return tdb_null;
 
-       ret.dptr = tdb_alloc_read(tdb, rec_ptr + sizeof(rec) + rec.key_len,
-                                 rec.data_len);
+       if (rec.data_len)
+               ret.dptr = tdb_alloc_read(tdb, rec_ptr + sizeof(rec) + rec.key_len,
+                                         rec.data_len);
+       else
+               ret.dptr = NULL;
        ret.dsize = rec.data_len;
        tdb_unlock(tdb, BUCKET(rec.full_hash), F_RDLCK);
        return ret;
index 8cc908703f8209f4da251f8f8086c4c920b388d5..dda89d035595de97fbe767f528f9335db26c696b 100644 (file)
@@ -44,7 +44,7 @@ extern "C" {
 
 /* error codes */
 enum TDB_ERROR {TDB_SUCCESS=0, TDB_ERR_CORRUPT, TDB_ERR_IO, TDB_ERR_LOCK, 
-               TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOEXIST, TDB_ERR_NOLOCK };
+               TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOEXIST, TDB_ERR_NOLOCK, TDB_ERR_LOCK_TIMEOUT };
 
 #ifndef u32
 #define u32 unsigned
@@ -126,6 +126,7 @@ int tdb_lockall(TDB_CONTEXT *tdb);
 void tdb_unlockall(TDB_CONTEXT *tdb);
 
 /* Low level locking functions: use with care */
+void tdb_set_lock_alarm(sig_atomic_t *palarm);
 int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key);
 int tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key);
 
index 48c4272d3312e199d6ca8a8a4da64624be5e0093..659aeb01e37bce20ccf20cd07f1a12790efe7fcc 100644 (file)
@@ -53,7 +53,9 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <ctype.h>
+#include <signal.h>
 #include "tdb.h"
+#include "version.h"
 
 static int failed;
 
@@ -227,6 +229,7 @@ static int verify_tdb(const char *fname, const char *bak_name)
 static void usage(void)
 {
        printf("Usage: tdbbackup [options] <fname...>\n\n");
+       printf("Version: %s\n", VERSION);
        printf("   -h            this help message\n");
        printf("   -s suffix     set the backup suffix\n");
        printf("   -v            veryify mode (restore if corrupt)\n");
index 66642132093c85a10782578f65a20df8377cbc2d..9c1dc2761b67d9bb6af9879d798e4d6df89eb662 100644 (file)
@@ -30,6 +30,7 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <ctype.h>
+#include <signal.h>
 #include "tdb.h"
 
 static void print_data(TDB_DATA d)
index 0741073ce116ffbb49c620e5edb8f6b794e764c6..89295a3291f6a15d3c34be61f067fbc801dcb153 100644 (file)
@@ -8,6 +8,7 @@
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <sys/time.h>
+#include <signal.h>
 #include "tdb.h"
 #include <gdbm.h>
 
index 3ae955901c2cff88d732ae1c6bf2c4ca9269176d..d27160e0e840f8736e7d1c92714d53d56d6c8935 100644 (file)
@@ -33,6 +33,7 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <ctype.h>
+#include <signal.h>
 #include "tdb.h"
 
 /* a tdb tool for manipulating a tdb database */
index 5250d675c913c8016c7c11c3a0c2efb0ac333a12..91dfacaf5d81684136c40f2d4d0a4126ca764ba8 100644 (file)
 /* these are little tdb utility functions that are meant to make
    dealing with a tdb database a little less cumbersome in Samba */
 
+static SIG_ATOMIC_T gotalarm;
+
+/***************************************************************
+ Signal function to tell us we timed out.
+****************************************************************/
+
+static void gotalarm_sig(void)
+{
+       gotalarm = 1;
+}
+
+/****************************************************************************
+ Lock a chain with timeout (in seconds).
+****************************************************************************/
+
+int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key, unsigned int timeout)
+{
+       /* Allow tdb_chainlock to be interrupted by an alarm. */
+       int ret;
+       gotalarm = 0;
+       tdb_set_lock_alarm(&gotalarm);
+
+       if (timeout) {
+               CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig);
+               alarm(timeout);
+       }
+
+       ret = tdb_chainlock(tdb, key);
+
+       if (timeout) {
+               alarm(0);
+               CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN);
+               if (gotalarm)
+                       return -1;
+       }
+
+       return ret;
+}
+
 /****************************************************************************
- Lock a chain by string.
+ Lock a chain by string. Return -1 if timeout or lock failed.
 ****************************************************************************/
 
-int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval)
+int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval, unsigned int timeout)
 {
        TDB_DATA key;
 
        key.dptr = keyval;
        key.dsize = strlen(keyval)+1;
        
-       return tdb_chainlock(tdb, key);
+       return tdb_chainlock_with_timeout(tdb, key, timeout);
 }
 
 /****************************************************************************
@@ -215,7 +254,7 @@ int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, char *keystr, int32 *oldval, int
        int32 val;
        int32 ret = -1;
 
-       if (tdb_lock_bystring(tdb, keystr) == -1)
+       if (tdb_lock_bystring(tdb, keystr,0) == -1)
                return -1;
 
        if ((val = tdb_fetch_int32(tdb, keystr)) == -1) {
@@ -256,7 +295,7 @@ BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, char *keystr, uint32 *oldval, ui
        uint32 val;
        BOOL ret = False;
  
-       if (tdb_lock_bystring(tdb, keystr) == -1)
+       if (tdb_lock_bystring(tdb, keystr,0) == -1)
                return False;
  
        if (!tdb_fetch_uint32(tdb, keystr, &val)) {
index 68e26dff6072ac3ca3736ea2b01c4b2bd478824c..7ef2d76d7bfbb77f4d63b2fe4ac1469100ecc1cc 100644 (file)
@@ -787,9 +787,10 @@ struct cli_state *connect_one(char *share)
 
 static void usage(void)
 {
+       printf("Usage: smbcacls //server1/share1 filename [options]\n");
+       printf("Version: %s\n", VERSION);
        printf(
-"Usage: smbcacls //server1/share1 filename [options]\n\
-\n\
+"\n\
 \t-D <acls>               delete an acl\n\
 \t-M <acls>               modify an acl\n\
 \t-A <acls>               add an acl\n\
index df2d2d7ef6ddb7659be5be14ab3e6f0f1d6e1bab..79d49a9e058ea88e2c0fb070eb343581b9f69518 100644 (file)
@@ -34,7 +34,7 @@ extern int optind;
 
 /* forced running in root-mode */
 static BOOL local_mode;
-static BOOL joining_domain = False, got_pass = False, got_username = False, changing_trust_pw = FALSE
+static BOOL joining_domain = False, got_pass = False, got_username = False, changing_trust_pw = False
 static int local_flags = 0;
 static BOOL stdin_passwd_get = False;
 static fstring user_name, user_password;
@@ -75,6 +75,7 @@ static void usage(void)
        printf("otherwise:\n");
        printf("    smbpasswd [options] [password]\n\n");
 
+       printf("Version: %s\n", VERSION);
        printf("options:\n");
        printf("  -L                   local mode (must be first option)\n");
        printf("  -h                   print this usage message\n");
@@ -702,23 +703,23 @@ static int set_domain_sid_from_dc( char *domain, char *remote )
 *************************************************************/
 static char *stdin_new_passwd(void)
 {
-       static fstring new_passwd;
+       static fstring new_pwd;
        size_t len;
 
-       ZERO_ARRAY(new_passwd);
+       ZERO_ARRAY(new_pwd);
 
        /*
         * if no error is reported from fgets() and string at least contains
         * the newline that ends the password, then replace the newline with
         * a null terminator.
         */
-       if ( fgets(new_passwd, sizeof(new_passwd), stdin) != NULL) {
-               if ((len = strlen(new_passwd)) > 0) {
-                       if(new_passwd[len-1] == '\n')
-                               new_passwd[len - 1] = 0; 
+       if ( fgets(new_pwd, sizeof(new_pwd), stdin) != NULL) {
+               if ((len = strlen(new_pwd)) > 0) {
+                       if(new_pwd[len-1] == '\n')
+                               new_pwd[len - 1] = 0; 
                }
        }
-       return(new_passwd);
+       return(new_pwd);
 }
 
 
@@ -744,20 +745,20 @@ static char *get_pass( char *prompt, BOOL stdin_get)
 static char *prompt_for_new_password(BOOL stdin_get)
 {
        char *p;
-       fstring new_passwd;
+       fstring new_pwd;
 
-       ZERO_ARRAY(new_passwd);
+       ZERO_ARRAY(new_pwd);
  
        p = get_pass("New SMB password:", stdin_get);
 
-       fstrcpy(new_passwd, p);
+       fstrcpy(new_pwd, p);
        safe_free(p);
 
        p = get_pass("Retype new SMB password:", stdin_get);
 
-       if (strcmp(p, new_passwd)) {
+       if (strcmp(p, new_pwd)) {
                fprintf(stderr, "Mismatch - password unchanged.\n");
-               ZERO_ARRAY(new_passwd);
+               ZERO_ARRAY(new_pwd);
                safe_free(p);
                return NULL;
        }
@@ -770,27 +771,27 @@ static char *prompt_for_new_password(BOOL stdin_get)
  Change a password either locally or remotely.
 *************************************************************/
 
-static BOOL password_change(const char *remote_machine, char *user_name, 
-                           char *old_passwd, char *new_passwd, int local_flags)
+static BOOL password_change(const char *rem_machine, char *usr_name, 
+                           char *old_pwd, char *new_pwd, int loc_flags)
 {
        BOOL ret;
        pstring err_str;
        pstring msg_str;
 
-       if (remote_machine != NULL) {
-               if (local_flags & (LOCAL_ADD_USER|LOCAL_DELETE_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|
+       if (rem_machine != NULL) {
+               if (loc_flags & (LOCAL_ADD_USER|LOCAL_DELETE_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|
                                                        LOCAL_TRUST_ACCOUNT|LOCAL_SET_NO_PASSWORD)) {
                        /* these things can't be done remotely yet */
                        return False;
                }
-               ret = remote_password_change(remote_machine, user_name, 
-                                        old_passwd, new_passwd, err_str, sizeof(err_str));
+               ret = remote_password_change(rem_machine, usr_name, 
+                                        old_pwd, new_pwd, err_str, sizeof(err_str));
                if(*err_str)
                        fprintf(stderr, err_str);
                return ret;
        }
        
-       ret = local_password_change(user_name, local_flags, new_passwd, 
+       ret = local_password_change(usr_name, loc_flags, new_pwd, 
                                     err_str, sizeof(err_str), msg_str, sizeof(msg_str));
 
        if(*msg_str)
@@ -860,6 +861,13 @@ static int process_root(void)
 
        if (joining_domain) {
 
+               /* smb.conf must specify both security = domain and encrypt passwords = yes */
+
+               if (!lp_encrypted_passwords() || lp_security() != SEC_DOMAIN) {
+                       DEBUG(0,("ERROR: Must have both SECURITY = DOMAIN and ENCRYPT PASSWORDS = YES!\n"));
+                       return 1;
+               } 
+
                /* Are we joining by specifing an admin username and
                   password? */
 
index 9195426231e63353fbdf750dcaf6975bbb2dd18a..af29d9bf640effdc8447f65e94f6b7cb629e37af 100644 (file)
@@ -194,6 +194,11 @@ static int profile_dump(void)
        printf("write_count:                    %u\n", profile_p->syscall_write_count);
        printf("write_time:                     %u\n", profile_p->syscall_write_time);
        printf("write_bytes:                    %u\n", profile_p->syscall_write_bytes);
+#ifdef HAVE_SENDFILE
+       printf("sendfile_count:                    %u\n", profile_p->syscall_sendfile_count);
+       printf("sendfile_time:                     %u\n", profile_p->syscall_sendfile_time);
+       printf("sendfile_bytes:                    %u\n", profile_p->syscall_sendfile_bytes);
+#endif
        printf("lseek_count:                    %u\n", profile_p->syscall_lseek_count);
        printf("lseek_time:                     %u\n", profile_p->syscall_lseek_time);
        printf("rename_count:                   %u\n", profile_p->syscall_rename_count);
index c5c211672edc16fe8fec84f93f5318320855e8e5..7fec741066d1ea77a21f9fcf9c9c778dd1ec80cf 100644 (file)
@@ -746,7 +746,7 @@ static void wizard_page(void)
        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());
+       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>");