- 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
-----------------------
%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
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
<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>
<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
<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
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 = <falseg>
+ <para>Default: <command>winbind use default domain = <no>
</command></para>
- <para>Example: <command>winbind use default domain = true</command></para>
+ <para>Example: <command>winbind use default domain = yes</command></para>
</listitem>
</varlistentry>
<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>
<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>
<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>
<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>
CLASS="COMPUTEROUTPUT"
> [foo]
path = /home/bar
- writeable = true
+ read only = no
</TT
>
</PRE
CLASS="COMPUTEROUTPUT"
> [aprinter]
path = /usr/spool/public
- writeable = false
- printable = true
- guest ok = true
+ read only = yes
+ printable = yes
+ guest ok = yes
</TT
>
</PRE
> <TT
CLASS="COMPUTEROUTPUT"
> [homes]
- writeable = yes
+ read only = no
</TT
>
</PRE
><LI
><P
><A
+HREF="#PROFILEACLS"
+><TT
+CLASS="PARAMETER"
+><I
+>profile acls</I
+></TT
+></A
+></P
+></LI
+><LI
+><P
+><A
HREF="#PUBLIC"
><TT
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"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN1492"
+NAME="AEN1500"
></A
><H2
>EXPLANATION OF EACH PARAMETER</H2
><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
> call. Normally
set to <TT
CLASS="CONSTANT"
->true</TT
+>yes</TT
>. You should never need to change
this.</P
><P
>
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
><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"
> 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"
</A
>parameter is set to <TT
CLASS="CONSTANT"
->false</TT
+>no</TT
>.</P
><P
>Default: <B
></A
> is <TT
CLASS="CONSTANT"
->true</TT
+>yes</TT
>, and <A
HREF="smbd.8.html"
TARGET="_top"
</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
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"
>.
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
> 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
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
><P
>Setting this value to <TT
CLASS="CONSTANT"
->false</TT
+>no</TT
> will cause <B
CLASS="COMMAND"
>nmbd</B
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
></TT
> parameter is set to <TT
CLASS="CONSTANT"
->true
+>yes
</TT
> then this program is called <EM
>AS ROOT</EM
></TT
> is set to <TT
CLASS="CONSTANT"
->false</TT
+>no</TT
>.</P
><P
>See also <A
><P
>If this is set to <TT
CLASS="CONSTANT"
->true</TT
+>yes</TT
>, on startup, <B
CLASS="COMMAND"
>nmbd</B
>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
></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
>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
>
>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
><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
><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
</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
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()
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
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
><P
>If this global parameter is <TT
CLASS="CONSTANT"
->true</TT
+>yes</TT
>, it specifies
that the UNIX user's <TT
CLASS="FILENAME"
></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
></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
> --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
>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
>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
><P
>Default: <B
CLASS="COMMAND"
->winbind use default domain = <falseg>
+>winbind use default domain = <no>
</B
></P
><P
>Example: <B
CLASS="COMMAND"
->winbind use default domain = true</B
+>winbind use default domain = yes</B
></P
></DD
><DT
> 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"
>NEVER</EM
> set this to <TT
CLASS="CONSTANT"
->true</TT
+>yes</TT
>
on more than one machine in your network.</P
><P
>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
>
>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
>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
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN6208"
+NAME="AEN6235"
></A
><H2
>WARNINGS</H2
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN6214"
+NAME="AEN6241"
></A
><H2
>VERSION</H2
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN6217"
+NAME="AEN6244"
></A
><H2
>SEE ALSO</H2
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN6237"
+NAME="AEN6264"
></A
><H2
>AUTHOR</H2
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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"
.nf
[foo]
path = /home/bar
- writeable = true
+ read only = no
.sp
.nf
[aprinter]
path = /usr/spool/public
- writeable = false
- printable = true
- guest ok = true
+ read only = yes
+ printable = yes
+ guest ok = yes
.sp
.sp
.nf
[homes]
- writeable = yes
+ read only = no
.sp
\fIprinting\fR
.TP 0.2i
\(bu
+\fIprofile acls\fR
+.TP 0.2i
+\(bu
\fIpublic\fR
.TP 0.2i
\(bu
\fIuse client driver\fR
.TP 0.2i
\(bu
+\fIuse sendfile\fR
+.TP 0.2i
+\(bu
\fIuser\fR
.TP 0.2i
\(bu
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.
\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
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
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
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
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
.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
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
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
.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
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.
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
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.
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.
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.
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
\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.
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
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.
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
.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.
\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
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
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.
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.
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
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.
\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
\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
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
\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
\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.
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
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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
.\" <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
##
## 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 ) )
NULL, /* read */
NULL, /* write */
NULL, /* lseek */
+ NULL, /* sendfile */
audit_rename,
NULL, /* fsync */
NULL, /* stat */
NULL, /* read */
NULL, /* write */
NULL, /* lseek */
+ NULL, /* sendfile */
NULL, /* rename */
NULL, /* fsync */
NULL, /* stat */
NULL, /* read */
NULL, /* write */
NULL, /* lseek */
+ NULL, /* sendfile */
NULL, /* rename */
NULL, /* fsync */
NULL, /* stat */
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)
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;
}
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);
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;
skel_read,
skel_write,
skel_lseek,
+ skel_sendfile,
skel_rename,
skel_fsync,
skel_stat,
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
%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
%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
%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
%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
%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
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 \
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 \
#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
}
/****************************************************************************
-handle a message operation
+ Handle a message operation.
****************************************************************************/
+
static int do_message_op(void)
{
struct in_addr ip;
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));
usage(void)
{
printf("usage: smbumount mountpoint\n");
+ printf("Version: %s\n", VERSION);
}
static int
--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"
# 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
# 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
# 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
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.
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
{ 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
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
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
# 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
# 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
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
# 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
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]/_/'`"
# 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.
:
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
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
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
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
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" &&
# 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
*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>
#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
#
*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>
}
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
*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>
#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
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
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=
# 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
:
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
:
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
:
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>
#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*
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
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
:
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')
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
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>
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
# 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
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
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
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
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
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
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>
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
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>
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
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*
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*
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*
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*
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*
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*
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*
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*
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*
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
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*
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*
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*
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*
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*
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*
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*
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*
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
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()
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
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
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()
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
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
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()
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
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() {
; 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
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
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>
#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>
#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
{ 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. */
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
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
{ 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
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
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>
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
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
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
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
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
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
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>
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
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>
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
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
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
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
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
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
# 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
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. */
; 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
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
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
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
############################################
# 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>
; 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
############################################
# 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>
; 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
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>
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
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>
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
# 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
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
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
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
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
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
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
# 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
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
# 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
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
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
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 4404 "configure"
+#line 4408 "configure"
#include "confdefs.h"
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
# 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"
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*
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*
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*
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
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
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
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
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
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
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*
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*
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*
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
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
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
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
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
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
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. */
; 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
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
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
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
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
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
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
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
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
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
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
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
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
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. */
; 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
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
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
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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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)
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
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)
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
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)
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
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
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
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
*-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. */
; 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
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
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
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
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. */
; 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
*-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. */
; 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
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
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
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
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. */
; 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
*-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. */
; 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
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
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
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
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. */
; 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
*-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. */
; 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
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
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
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
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. */
; 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
*-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. */
; 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
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
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
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
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. */
; 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
*-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. */
; 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
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
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
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
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. */
; 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
*-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. */
; 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
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
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
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
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. */
; 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
*-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. */
; 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
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
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
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
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. */
; 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
*-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. */
; 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
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
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
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
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. */
; 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
*-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. */
; 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
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
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
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
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. */
; 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
*-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. */
; 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
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
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
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
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. */
; 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
# 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
LDSHFLAGS="-shared"
DYNEXP="-Wl,--export-dynamic"
SONAMEFLAG="-Wl,-soname,"
- PICFLAG="-fPIC"
+ PICFLAG="-fPIC -DPIC"
cat >> confdefs.h <<\EOF
#define STAT_ST_BLOCKSIZE 512
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
*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
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
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
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
################
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
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
# 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
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
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
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
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)
#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
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
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
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
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)
#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
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
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)
#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
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)
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
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
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)
#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
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
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)
#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
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
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)
#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
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
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
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>
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
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>
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
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
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
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
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
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;
__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
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
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>
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
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
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>
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
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>
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
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. */
; 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
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>
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
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>
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
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>
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
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>
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
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>
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
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>
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
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>
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
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>
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
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>
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
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>
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>
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
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>
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
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
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>
}
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
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
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>
}
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
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
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>
}
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>
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
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
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>
}
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)
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
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)
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
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)
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
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)
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
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
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
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
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
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
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
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
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
; 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
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
samba_cv_REPLACE_INET_NTOA=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10840 "configure"
+#line 10842 "configure"
#include "confdefs.h"
#include <stdio.h>
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
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
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>
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
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
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
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
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
# 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
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
#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
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
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
#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
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
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
#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
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
samba_cv_USE_SETRESUID=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11142 "configure"
+#line 11144 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
#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
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
samba_cv_USE_SETREUID=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11185 "configure"
+#line 11187 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
#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
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
samba_cv_USE_SETEUID=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11227 "configure"
+#line 11229 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
#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
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
samba_cv_USE_SETUIDX=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11269 "configure"
+#line 11271 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
#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
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
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
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
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
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
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
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
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
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
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)
#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
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>
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
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>
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
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)
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
#################################################
# 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"
#################################################
# 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"
#################################################
# 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"
#################################################
# 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"
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
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
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
#################################################
# 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"
#################################################
# 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"
#################################################
# 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"
# 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"
# 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
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
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
#################################################
# 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"
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. */
; 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
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
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
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
##
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
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
#################################################
# 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"
#################################################
# 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"
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
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
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
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. */
; 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
#################################################
# 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"
# 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
#################################################
# 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"
#################################################
# 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"
#################################################
# 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"
#################################################
# 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"
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"
# 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"
# 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"
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
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)
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>
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
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
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>
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
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
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
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
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
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>
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
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
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
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
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
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
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
# 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)))
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
# 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"
;;
*)
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
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
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
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>
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
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>
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
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
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
# 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
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>
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
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
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
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
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
LDSHFLAGS="-shared"
DYNEXP="-Wl,--export-dynamic"
SONAMEFLAG="-Wl,-soname,"
- PICFLAG="-fPIC"
+ PICFLAG="-fPIC -DPIC"
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
;;
*openbsd*) BLDSHARED="true"
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)
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)
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
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)
struct cli_state {
int port;
int fd;
+ int smb_rw_error; /* Copy of last read or write error. */
uint16 cnum;
uint16 pid;
uint16 mid;
#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
#define UNI_XDIGIT 0x8
#define UNI_SPACE 0x10
-#include "nsswitch/nss.h"
+#include "nsswitch/sys_nss.h"
/***** automatically generated prototypes *****/
#include "proto.h"
/* Allocation roundup. */
#define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000
+/* Max number of jobs per print queue. */
+#define PRINT_MAX_JOBID 10000
+
#endif
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)
#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 */
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;
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 */
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);
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);
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);
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,
/* 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);
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 );
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 );
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 );
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 */
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]);
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 */
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);
/* 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 */
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 */
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);
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);
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);
/* 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);
/* 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);
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 */
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;
#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
#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)
} 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
/* 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 */
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);
*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 ));
-}
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;
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;
}
}
/****************************************************************************
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)
*/
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;
}
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);
}
}
/****************************************************************************
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)
/****************************************************************************
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)
/*
* 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
* 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 */
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 {
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");
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);
}
/****************************************************************************
}
/*******************************************************************
- compare 2 strings
+ compare 2 strings - DOS codepage.
********************************************************************/
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.
******************************************************************/
}
}
+/* 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
********************************************************************/
/* 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;
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);
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);
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;
}
**/
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)
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) {
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,
}
#endif /* JERRY */
-
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)
{
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;
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;
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)
{
/****************************************************************************
-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,
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,
}
/****************************************************************************
-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)
{
/****************************************************************************
-send a tree disconnect
+ Send a tree disconnect.
****************************************************************************/
+
BOOL cli_tdis(struct cli_state *cli)
{
memset(cli->outbuf,'\0',smb_size);
/****************************************************************************
-send a negprot command
+ Send a negprot command.
****************************************************************************/
+
void cli_negprot_send(struct cli_state *cli)
{
char *p;
/****************************************************************************
-send a negprot command
+ Send a negprot command.
****************************************************************************/
+
BOOL cli_negprot(struct cli_state *cli)
{
char *p;
/****************************************************************************
- 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)
{
}
/****************************************************************************
-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;
}
/****************************************************************************
-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,
/* 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);
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];
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);
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;
}
}
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)
}
/****************************************************************************
-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,
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;
}
}
#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;
}
/****************************************************************************
-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));
}
/* 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)
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;
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;
}
/****************************************************************************
-setup basics in a outgoing packet
+ Setup basics in a outgoing packet.
****************************************************************************/
+
void cli_setup_packet(struct cli_state *cli)
{
cli->rap_error = 0;
}
/****************************************************************************
-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); */
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;
alloced_cli = True;
}
- if (cli->initialised) {
- cli_shutdown(cli);
- }
+ if (cli->initialised)
+ cli_close_connection(cli);
ZERO_STRUCTP(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;
}
/****************************************************************************
-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)
#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;
}
/****************************************************************************
-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) {
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;
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) {
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 */
}
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)
}
/****************************************************************************
- 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.
/* 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));
}
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;
}
*/
#include "includes.h"
-#include "nsswitch/nss.h"
+#include "nsswitch/sys_nss.h"
NSS_STATUS winbindd_request(int req_type,
struct winbindd_request *request,
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;
}
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;
}
/* Look through extra data */
if (!response.extra_data)
- return False;
+ goto done;
extra_data = (char *)response.extra_data;
SAFE_FREE(response.extra_data);
+done:
+ if (response.nt_status)
+ printf("0x%08x\n", response.nt_status);
+
return True;
}
/* Look through extra data */
if (!response.extra_data)
- return False;
+ goto done;
extra_data = (char *)response.extra_data;
printf("%s\n", name);
SAFE_FREE(response.extra_data);
+
+done:
+ if (response.nt_status)
+ printf("0x%08x\n", response.nt_status);
return True;
}
{
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");
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 */
#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) */
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;
}
}
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);
flush_caches();
reload_services_file(True);
+#if 0 /* Notised at present. */
+ namecache_flush();
+#endif
+ winbindd_cm_flush();
+
do_sighup = False;
}
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");
}
+#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. */
time_t last_seq_check;
uint32 sequence_number;
+ NTSTATUS last_status;
/* Linked list info */
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));
}
/*
}
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;
*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);
}
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;
*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);
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 */
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 */
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 */
(*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 */
(*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);
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;
}
}
+ SAFE_FREE(ip_list);
+
/* No-one to talk to )-: */
return False; /* Boo-hoo */
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));
/* 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 *)
/* 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;
/* 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;
/* 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,
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);
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;
/* 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 */
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;
+ }
+}
#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;
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 */
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);
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));
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;
/* 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) {
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)
/* 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;
}
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 */
} auth;
} data;
+ uint32 nt_status; /* Extended error information */
+
/* Variable length return data */
void *extra_data; /* getgrnam, getgrgid, getgrent */
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));
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;
} 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;
}
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,
/* 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;
}
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);
/* 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);
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 */
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;
/* 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 */
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,
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;
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;
}
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 */
{
TALLOC_CTX *mem_ctx;
CLI_POLICY_HND *hnd;
- NTSTATUS status;
+ NTSTATUS result;
DOM_SID *sids = NULL;
uint32 *types = NULL;
const char *full_name;
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;
}
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;
}
/*
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));
return NT_STATUS_UNSUCCESSFUL;
}
}
- return status;
+
+ return result;
}
/* Lookup user information from a rid or username. */
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 */
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);
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;
*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;
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;
/* 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 */
}
/* 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;
/* 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,
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",
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,
/* 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;
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 */
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
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);
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);
}
}
BOOL bHideLocalUsers;
BOOL bUseMmap;
BOOL bUnixExtensions;
+ int name_cache_timeout;
}
global;
BOOL bDefaultDevmode;
BOOL bNTAclSupport;
BOOL bForceUnknownAclUser;
+#ifdef WITH_SENDFILE
+ BOOL bUseSendfile;
+#endif
+ BOOL bProfileAcls;
char dummy[3]; /* for alignment */
}
False, /* bDefaultDevmode */
True, /* bNTAclSupport */
False, /* bForceUnknownAclUser */
+#ifdef WITH_SENDFILE
+ False, /* bUseSendfile */
+#endif
+ False, /* bProfileAcls */
"" /* dummy */
};
};
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}
{"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},
{"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},
{"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},
Globals.bHostMSDfs = False;
+ Globals.name_cache_timeout = 660; /* In seconds */
+
/*
* This must be done last as it checks the value in
* client_code_page.
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)
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)
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)
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);
break;
}
+
return (True);
}
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;
+}
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)
{
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 ));
+}
local_pid = sys_getpid();
/* handle a Samba upgrade */
- tdb_lock_bystring(tdb_drivers, vstring);
+ tdb_lock_bystring(tdb_drivers, vstring,0);
{
int32 vers_id;
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);
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,
/****************************************************************************
****************************************************************************/
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;
if (W_ERROR_IS_OK(result))
dump_a_printer_driver(*driver, level);
+
return result;
}
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;
}
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;
/* 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;
}
/* 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;
}
#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 );
}
/****************************************************************************
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;
httpClose(http);
+ if ( ret == 0 )
+ unlink(pjob->filename);
+ /* else print_job_end will do it for us */
+
return (ret);
}
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);
/* 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.
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)
#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;
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;
}
/****************************************************************************
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);
}
/****************************************************************************
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;
}
/****************************************************************************
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__));
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. */
/****************************************************************************
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);
}
}
/* 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);
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;
}
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;
}
/* 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));
return True;
}
+/******************************************************************
+ Align on a 2 byte boundary
+ *****************************************************************/
+
BOOL prs_align_uint16(prs_struct *ps)
{
BOOL ret;
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)
********************************************************************/
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;
{
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++;
/* 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);
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))
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;
}
* 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;
}
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 */
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;
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))
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;
/*******************************************************************
********************************************************************/
+
static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps,
PRINTER_ENUM_VALUES_CTR *ctr, int depth)
{
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
/* 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;
* 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;
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.
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
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()) {
/* 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;
}
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;
}
/********************************************************************
/* 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);
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 */
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,
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;
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);
case 1:
result = getprintprocessordirectory_level_1
(&q_u->name, &q_u->environment, buffer, offered, needed);
+ break;
default:
result = WERR_UNKNOWN_LEVEL;
}
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);
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");
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");
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)
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.
*/
} 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.
*/
(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
} 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.
*/
} 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;
*
* ************************************************************************** **
*/
-static BOOL is_reserved_msdos( char *fname )
+static BOOL is_reserved_msdos( const char *fname )
{
char upperFname[13];
char *p;
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, '/' );
p += skip;
else {
if( *p == '.' && !dot_pos )
- dot_pos = (char *)p;
+ dot_pos = p;
else {
if( !isdoschar( *p )) {
if (!allow_wildcards)
*/
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. */
* 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) {
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
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;
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"));
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;
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);
}
}
/* 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 {
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 \
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;
}
}
/* 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
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);
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;
}
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
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;
SMB_ACL_T dir_acl = NULL;
canon_ace *file_ace = NULL;
canon_ace *dir_ace = NULL;
+ size_t num_profile_acls = 0;
*ppdesc = NULL;
* 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);
}
/* 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.
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;
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;
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.
*/
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);
* 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;
}
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);
}
/*
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)
/****************************************************************************
- reply to an special message
+ Reply to an special message.
****************************************************************************/
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)
}
/****************************************************************************
- parse a share descriptor string
+ Parse a share descriptor string.
****************************************************************************/
static void parse_connect(char *p,char *service,char *user,
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));
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;
}
/****************************************************************************
- reply to an ioctl
+ Reply to an ioctl.
****************************************************************************/
+
int reply_ioctl(connection_struct *conn,
char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
/* 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);
}
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;
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;
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;
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;
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;
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;
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;
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)
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;
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);
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;
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;
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).
****************************************************************************/
size_t nread = 0;
SMB_OFF_T startpos;
char *header = outbuf;
- ssize_t ret=0;
files_struct *fsp;
START_PROFILE(SMBreadbraw);
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)
}
/****************************************************************************
- 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)
return(outsize);
}
-
/****************************************************************************
Reply to a write.
****************************************************************************/
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);
/****************************************************************************
- reply to a lseek
+ Reply to a lseek.
****************************************************************************/
int reply_lseek(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize)
}
/****************************************************************************
- reply to a exit
+ Reply to a exit.
****************************************************************************/
+
int reply_exit(connection_struct *conn,
char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
/****************************************************************************
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)
{
return(outsize);
}
-
/****************************************************************************
- reply to a writeclose (Core+ protocol)
+ Reply to a writeclose (Core+ protocol)
****************************************************************************/
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)
{
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);
}
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);
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)
{
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)
{
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)
{
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)
{
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)
{
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;
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;
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;
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;
}
/****************************************************************************
- 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;
}
/****************************************************************************
- reply to a lockingX request
+ Reply to a lockingX request.
****************************************************************************/
int reply_lockingX(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize)
((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
}
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;
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);
switch (info_level) {
case SMB_INFO_STANDARD:
- case SMB_INFO_QUERY_EA_SIZE:
{
if (total_data < l1_cbFile+4)
return(ERROR_DOS(ERRDOS,ERRinvalidparam));
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.
*/
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;
vfswrap_read,
vfswrap_write,
vfswrap_lseek,
+ vfswrap_sendfile,
vfswrap_rename,
vfswrap_fsync,
vfswrap_stat,
#include <errno.h>
#include <sys/stat.h>
#include <time.h>
+#include <signal.h>
#include "tdb.h"
#include "spinlock.h"
#include <errno.h>
#include <sys/mman.h>
#include <sys/stat.h>
+#include <signal.h>
#include "tdb.h"
#include "spinlock.h"
#else
*/
};
+/***************************************************************
+ 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.
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) {
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);
}
/* 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;
}
}
/* 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;
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;
/* 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
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);
#include <sys/stat.h>
#include <sys/time.h>
#include <ctype.h>
+#include <signal.h>
#include "tdb.h"
+#include "version.h"
static int failed;
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");
#include <sys/stat.h>
#include <sys/time.h>
#include <ctype.h>
+#include <signal.h>
#include "tdb.h"
static void print_data(TDB_DATA d)
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <signal.h>
#include "tdb.h"
#include <gdbm.h>
#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 */
/* 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);
}
/****************************************************************************
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) {
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)) {
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\
/* 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;
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");
*************************************************************/
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);
}
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;
}
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)
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? */
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);
printf("<td><input type=radio name=\"WINSType\" value=0 %s> Not Used </td>", (winstype == 0) ? "checked" : "");
printf("<td><input type=radio name=\"WINSType\" value=1 %s> Server for client use </td>", (winstype == 1) ? "checked" : "");
printf("<td><input type=radio name=\"WINSType\" value=2 %s> Client of another WINS server </td>", (winstype == 2) ? "checked" : "");
- printf("<tr><td></td><td></td><td></td><td>Remote WINS Server <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 <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>");