mirror of
https://github.com/samba-team/samba.git
synced 2025-03-24 10:50:22 +03:00
updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
This commit is contained in:
parent
ec167dc9cc
commit
e90b652848
@ -177,13 +177,14 @@
|
||||
<listitem><para>The -l parameter specifies a directory
|
||||
into which the "log.nmbd" log file will be created
|
||||
for operational data from the running
|
||||
<command>nmbd</command> server.</para>
|
||||
|
||||
<para>The default log directory is compiled into Samba
|
||||
<command>nmbd</command> server. The default log directory is compiled into Samba
|
||||
as part of the build process. Common defaults are <filename>
|
||||
/usr/local/samba/var/log.nmb</filename>, <filename>
|
||||
/usr/samba/var/log.nmb</filename> or
|
||||
<filename>/var/log/log.nmb</filename>.</para></listitem>
|
||||
<filename>/var/log/log.nmb</filename>. <emphasis>Beware:</emphasis>
|
||||
If the directory specified does not exist, <command>nmbd</command>
|
||||
will log to the default debug log location defined at compile time.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
@ -198,25 +199,25 @@
|
||||
<filename>smb.conf</filename>.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>-p <UDP port number></term>
|
||||
<listitem><para>UDP port number is a positive integer value.
|
||||
This option changes the default UDP port number (normally 137)
|
||||
that <command>nmbd</command> responds to name queries on. Don't
|
||||
use this option unless you are an expert, in which case you
|
||||
This option changes the default UDP port number (normally 137)
|
||||
that <command>nmbd</command> responds to name queries on. Don't
|
||||
use this option unless you are an expert, in which case you
|
||||
won't need help!</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>-s <configuration file></term>
|
||||
<listitem><para>The default configuration file name
|
||||
<listitem><para>The default configuration file name
|
||||
is set at build time, typically as <filename>
|
||||
/usr/local/samba/lib/smb.conf</filename>, but
|
||||
this may be changed when Samba is autoconfigured.</para>
|
||||
|
||||
<para>The file specified contains the configuration details
|
||||
required by the server. See <ulink url="smb.conf.5.html">
|
||||
<para>The file specified contains the configuration details
|
||||
required by the server. See <ulink url="smb.conf.5.html">
|
||||
<filename>smb.conf(5)</filename></ulink> for more information.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
@ -229,55 +230,55 @@
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><filename>/etc/inetd.conf</filename></term>
|
||||
<listitem><para>If the server is to be run by the
|
||||
<command>inetd</command> meta-daemon, this file
|
||||
must contain suitable startup information for the
|
||||
<listitem><para>If the server is to be run by the
|
||||
<command>inetd</command> meta-daemon, this file
|
||||
must contain suitable startup information for the
|
||||
meta-daemon. See the <ulink
|
||||
url="UNIX_INSTALL.html">UNIX_INSTALL.html</ulink> document
|
||||
for details.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term><filename>/etc/rc</filename></term>
|
||||
<listitem><para>or whatever initialization script your
|
||||
<listitem><para>or whatever initialization script your
|
||||
system uses).</para>
|
||||
|
||||
<para>If running the server as a daemon at startup,
|
||||
this file will need to contain an appropriate startup
|
||||
<para>If running the server as a daemon at startup,
|
||||
this file will need to contain an appropriate startup
|
||||
sequence for the server. See the <ulink
|
||||
url="UNIX_INSTALL.html">UNIX_INSTALL.html</ulink> document
|
||||
for details.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term><filename>/etc/services</filename></term>
|
||||
<listitem><para>If running the server via the
|
||||
meta-daemon <command>inetd</command>, this file
|
||||
must contain a mapping of service name (e.g., netbios-ssn)
|
||||
to service port (e.g., 139) and protocol type (e.g., tcp).
|
||||
<listitem><para>If running the server via the
|
||||
meta-daemon <command>inetd</command>, this file
|
||||
must contain a mapping of service name (e.g., netbios-ssn)
|
||||
to service port (e.g., 139) and protocol type (e.g., tcp).
|
||||
See the <ulink url="UNIX_INSTALL.html">UNIX_INSTALL.html</ulink>
|
||||
document for details.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term><filename>/usr/local/samba/lib/smb.conf</filename></term>
|
||||
<listitem><para>This is the default location of the
|
||||
<listitem><para>This is the default location of the
|
||||
<ulink url="smb.conf.5.html"><filename>smb.conf</filename></ulink>
|
||||
server configuration file. Other common places that systems
|
||||
install this file are <filename>/usr/samba/lib/smb.conf</filename>
|
||||
server configuration file. Other common places that systems
|
||||
install this file are <filename>/usr/samba/lib/smb.conf</filename>
|
||||
and <filename>/etc/smb.conf</filename>.</para>
|
||||
|
||||
<para>When run as a WINS server (see the
|
||||
|
||||
<para>When run as a WINS server (see the
|
||||
<ulink url="smb.conf.5.html#WINSSUPPORT">wins support</ulink>
|
||||
parameter in the <filename>smb.conf(5)</filename> man page),
|
||||
<command>nmbd</command>
|
||||
will store the WINS database in the file <filename>wins.dat</filename>
|
||||
in the <filename>var/locks</filename> directory configured under
|
||||
will store the WINS database in the file <filename>wins.dat</filename>
|
||||
in the <filename>var/locks</filename> directory configured under
|
||||
wherever Samba was configured to install itself.</para>
|
||||
|
||||
<para>If <command>nmbd</command> is acting as a <emphasis>
|
||||
browse master</emphasis> (see the <ulink
|
||||
browse master</emphasis> (see the <ulink
|
||||
url="smb.conf.5.html#LOCALMASTER">local master</ulink>
|
||||
parameter in the <filename>smb.conf(5)</filename> man page,
|
||||
<command>nmbd</command>
|
||||
@ -292,20 +293,20 @@
|
||||
<refsect1>
|
||||
<title>SIGNALS</title>
|
||||
|
||||
<para>To shut down an <command>nmbd</command> process it is recommended
|
||||
that SIGKILL (-9) <emphasis>NOT</emphasis> be used, except as a last
|
||||
resort, as this may leave the name database in an inconsistent state.
|
||||
The correct way to terminate <command>nmbd</command> is to send it
|
||||
<para>To shut down an <command>nmbd</command> process it is recommended
|
||||
that SIGKILL (-9) <emphasis>NOT</emphasis> be used, except as a last
|
||||
resort, as this may leave the name database in an inconsistent state.
|
||||
The correct way to terminate <command>nmbd</command> is to send it
|
||||
a SIGTERM (-15) signal and wait for it to die on its own.</para>
|
||||
|
||||
<para><command>nmbd</command> will accept SIGHUP, which will cause
|
||||
<para><command>nmbd</command> will accept SIGHUP, which will cause
|
||||
it to dump out its namelists into the file <filename>namelist.debug
|
||||
</filename> in the <filename>/usr/local/samba/var/locks</filename>
|
||||
directory (or the <filename>var/locks</filename> directory configured
|
||||
under wherever Samba was configured to install itself). This will also
|
||||
</filename> in the <filename>/usr/local/samba/var/locks</filename>
|
||||
directory (or the <filename>var/locks</filename> directory configured
|
||||
under wherever Samba was configured to install itself). This will also
|
||||
cause <command>nmbd</command> to dump out its server database in
|
||||
the <filename>log.nmb</filename> file.</para>
|
||||
|
||||
|
||||
<para>The debug log level of nmbd may be raised or lowered using
|
||||
<ulink url="smbcontrol.1.html"><command>smbcontrol(1)</command>
|
||||
</ulink> (SIGUSR[1|2] signals are no longer used in Samba 2.2). This is
|
||||
|
@ -27,7 +27,9 @@
|
||||
<arg choice="opt">-a</arg>
|
||||
<arg choice="opt">-m</arg>
|
||||
<arg choice="opt">-x</arg>
|
||||
<arg choice="opt">-i file</arg>
|
||||
<arg choice="opt">-i passdb-backend</arg>
|
||||
<arg choice="opt">-e passdb-backend</arg>
|
||||
<arg choice="opt">-D debuglevel</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
@ -233,16 +235,24 @@
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>-i file</term>
|
||||
<listitem><para>This command is used to import a smbpasswd
|
||||
file into the database.</para>
|
||||
<term>-i passdb-backend</term>
|
||||
<listitem><para>Use a different passdb backend to retrieve users than the one specified in smb.conf.</para>
|
||||
|
||||
<para>This option will ease migration from the plain smbpasswd
|
||||
file database to more powerful backend databases like tdb and
|
||||
ldap.</para>
|
||||
|
||||
<para>Example: <command>pdbedit -i /etc/smbpasswd.old</command>
|
||||
<para>This option will ease migration from one passdb backend to another.
|
||||
</para>
|
||||
|
||||
<para>Example: <command>pdbedit -i smbpasswd:/etc/smbpasswd.old -e tdbsam:/etc/samba/passwd.tdb</command>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-e passdb-backend</term>
|
||||
<listitem><para>Export all currently available users to the specified password database backend.</para>
|
||||
|
||||
<para>This option will ease migration from one passdb backend to another and will ease backupping</para>
|
||||
|
||||
<para>Example: <command>pdbedit -e smbpasswd:/root/samba-users.backup</command></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -26,6 +26,7 @@
|
||||
<arg choice="opt">-U username[%password]</arg>
|
||||
<arg choice="opt">-W workgroup</arg>
|
||||
<arg choice="opt">-N</arg>
|
||||
<arg choice="opt">-I destinationIP</arg>
|
||||
<arg choice="req">server</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
@ -104,6 +105,23 @@
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>-I IP-address</term>
|
||||
<listitem><para><replaceable>IP address</replaceable> is the address of the server to connect to.
|
||||
It should be specified in standard "a.b.c.d" notation. </para>
|
||||
|
||||
<para>Normally the client would attempt to locate a named
|
||||
SMB/CIFS server by looking it up via the NetBIOS name resolution
|
||||
mechanism described above in the <parameter>name resolve order</parameter>
|
||||
parameter above. Using this parameter will force the client
|
||||
to assume that the server is on the machine with the specified IP
|
||||
address and the NetBIOS name component of the resource being
|
||||
connected to will be ignored. </para>
|
||||
|
||||
<para>There is no default for this parameter. If not supplied,
|
||||
it will be determined automatically by the client as described
|
||||
above. </para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -434,9 +434,9 @@ domain = <value>
|
||||
|
||||
<varlistentry>
|
||||
<term>-W WORKGROUP</term>
|
||||
<listitem><para>Override the default workgroup specified in the
|
||||
workgroup parameter of the <filename>smb.conf</filename> file
|
||||
for this connection. This may be needed to connect to some
|
||||
<listitem><para>Override the default workgroup (domain) specified
|
||||
in the workgroup parameter of the <filename>smb.conf</filename>
|
||||
file for this connection. This may be needed to connect to some
|
||||
servers. </para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
@ -634,6 +634,44 @@ domain = <value>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>altname file</term>
|
||||
<listitem><para>The client will request that the server return
|
||||
the "alternate" name (the 8.3 name) for a file or directory.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>cancel jobid0 [jobid1] ... [jobidN]</term>
|
||||
<listitem><para>The client will request that the server cancel
|
||||
the printjobs identified by the given numeric print job ids.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>chmod file mode in octal</term>
|
||||
<listitem><para>This command depends on the server supporting the CIFS
|
||||
UNIX extensions and will fail if the server does not. The client requests that the server
|
||||
change the UNIX permissions to the given octal mode, in standard UNIX format.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>chown file uid gid</term>
|
||||
<listitem><para>This command depends on the server supporting the CIFS
|
||||
UNIX extensions and will fail if the server does not. The client requests that the server
|
||||
change the UNIX user and group ownership to the given decimal values. Note there is
|
||||
currently no way to remotely look up the UNIX uid and gid values for a given name.
|
||||
This may be addressed in future versions of the CIFS UNIX extensions.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>cd [directory name]</term>
|
||||
@ -700,6 +738,17 @@ domain = <value>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>link source destination</term>
|
||||
<listitem><para>This command depends on the server supporting the CIFS
|
||||
UNIX extensions and will fail if the server does not. The client requests that the server
|
||||
create a hard link between the source and destination files. The source file
|
||||
must not exist.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>lowercase</term>
|
||||
<listitem><para>Toggle lowercasing of filenames for the get and
|
||||
@ -877,6 +926,30 @@ domain = <value>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>setmode <filename> <perm=[+|\-]rsha></term>
|
||||
<listitem><para>A version of the DOS attrib command to set
|
||||
file permissions. For example: </para>
|
||||
|
||||
<para><command>setmode myfile +r </command></para>
|
||||
|
||||
<para>would make myfile read only. </para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>symlink source destination</term>
|
||||
<listitem><para>This command depends on the server supporting the CIFS
|
||||
UNIX extensions and will fail if the server does not. The client requests that the server
|
||||
create a symbolic hard link between the source and destination files. The source file
|
||||
must not exist. Note that the server will not create a link to any path that lies
|
||||
outside the currently connected share. This is enforced by the Samba server.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>tar <c|x>[IXbgNa]</term>
|
||||
<listitem><para>Performs a tar operation - see the <parameter>-T
|
||||
@ -907,16 +980,6 @@ domain = <value>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>setmode <filename> <perm=[+|\-]rsha></term>
|
||||
<listitem><para>A version of the DOS attrib command to set
|
||||
file permissions. For example: </para>
|
||||
|
||||
<para><command>setmode myfile +r </command></para>
|
||||
|
||||
<para>would make myfile read only. </para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<refnamediv>
|
||||
<refname>smbcontrol</refname>
|
||||
<refpurpose>send messages to smbd or nmbd processes</refpurpose>
|
||||
<refpurpose>send messages to smbd, nmbd or winbindd processes</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
@ -33,9 +33,10 @@
|
||||
Samba</ulink> suite.</para>
|
||||
|
||||
<para><command>smbcontrol</command> is a very small program, which
|
||||
sends messages to an <ulink url="smbd.8.html">smbd(8)</ulink> or
|
||||
an <ulink url="nmbd.8.html">nmbd(8)</ulink> daemon running on the
|
||||
system.</para>
|
||||
sends messages to an <ulink url="smbd.8.html">smbd(8)</ulink>,
|
||||
an <ulink url="nmbd.8.html">nmbd(8)</ulink>
|
||||
or a <ulink url="winbindd.8.html">winbindd(8)</ulink>
|
||||
daemon running on the system.</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@ -81,8 +82,9 @@
|
||||
message to smbd which will then close the client connections to
|
||||
the named share. Note that this doesn't affect client connections
|
||||
to any other shares. This message-type takes an argument of the
|
||||
share name for which client connections will be close, or the
|
||||
share name for which client connections will be closed, or the
|
||||
"*" character which will close all currently open shares.
|
||||
This may be useful if you made changes to the access controls on the share.
|
||||
This message can only be sent to <constant>smbd</constant>.</para>
|
||||
|
||||
<para>The <constant>debug</constant> message-type allows
|
||||
@ -105,7 +107,7 @@
|
||||
collection, "off" to turn off profile stats collection, "count"
|
||||
to enable only collection of count stats (time stats are
|
||||
disabled), and "flush" to zero the current profile stats. This can
|
||||
be sent to any of the destinations.</para>
|
||||
be sent to any smbd or nmbd destinations.</para>
|
||||
|
||||
<para>The <constant>debuglevel</constant> message-type sends
|
||||
a "request debug level" message. The current debug level setting
|
||||
@ -115,18 +117,13 @@
|
||||
<para>The <constant>profilelevel</constant> message-type sends
|
||||
a "request profile level" message. The current profile level
|
||||
setting is returned by a "profilelevel" message. This can be sent
|
||||
to any of the destinations.</para>
|
||||
to any smbd or nmbd destinations.</para>
|
||||
|
||||
<para>The <constant>printer-notify</constant> message-type sends a
|
||||
message to smbd which in turn sends a printer notify message to
|
||||
any Windows NT clients connected to a printer. This message-type
|
||||
takes an argument of the printer name to send notify messages to.
|
||||
This message can only be sent to <constant>smbd</constant>.</para>
|
||||
|
||||
<para>The <constant>close-share</constant> message-type sends a
|
||||
message to smbd which forces smbd to close the share that was
|
||||
specified as an argument. This may be useful if you made changes
|
||||
to the access controls on the share. </para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
@ -176,7 +176,9 @@
|
||||
its size may be controlled by the <ulink
|
||||
url="smb.conf.5.html#maxlogsize">max log size</ulink>
|
||||
option in the <ulink url="smb.conf.5.html"><filename>
|
||||
smb.conf(5)</filename></ulink> file.
|
||||
smb.conf(5)</filename></ulink> file. <emphasis>Beware:</emphasis>
|
||||
If the directory specified does not exist, <command>smbd</command>
|
||||
will log to the default debug log location defined at compile time.
|
||||
</para>
|
||||
|
||||
<para>The default log directory is specified at
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>smbumount</command>
|
||||
<command>smbmount</command>
|
||||
<arg choice="req">service</arg>
|
||||
<arg choice="req">mount-point</arg>
|
||||
<arg choice="opt">-o options</arg>
|
||||
|
@ -16,6 +16,13 @@
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>smbsh</command>
|
||||
<arg choice="opt">-W workgroup</arg>
|
||||
<arg choice="opt">-U username</arg>
|
||||
<arg choice="opt">-P prefix</arg>
|
||||
<arg choice="opt">-R <name resolve order></arg>
|
||||
<arg choice="opt">-d <debug level></arg>
|
||||
<arg choice="opt">-l logfile</arg>
|
||||
<arg choice="opt">-L libdir</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
@ -30,6 +37,129 @@
|
||||
egrep</command>, and <command>rcp</command>. You must use a
|
||||
shell that is dynamically linked in order for <command>smbsh</command>
|
||||
to work correctly.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-W WORKGROUP</term>
|
||||
<listitem><para>Override the default workgroup specified in the
|
||||
workgroup parameter of the <filename>smb.conf</filename> file
|
||||
for this session. This may be needed to connect to some
|
||||
servers. </para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-U username[%pass]</term>
|
||||
<listitem><para>Sets the SMB username or username and password.
|
||||
If this option is not specified, the user will be prompted for
|
||||
both the username and the password. If %pass is not specified,
|
||||
the user will be prompted for the password.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-P prefix</term><listitem><para>This option allows
|
||||
the user to set the directory prefix for SMB access. The
|
||||
default value if this option is not specified is
|
||||
<emphasis>smb</emphasis>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-R <name resolve order></term>
|
||||
<listitem><para>This option is used to determine what naming
|
||||
services and in what order to resolve
|
||||
host names to IP addresses. The option takes a space-separated
|
||||
string of different name resolution options.</para>
|
||||
|
||||
<para>The options are :"lmhosts", "host", "wins" and "bcast".
|
||||
They cause names to be resolved as follows :</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para><constant>lmhosts</constant> :
|
||||
Lookup an IP address in the Samba lmhosts file. If the
|
||||
line in lmhosts has no name type attached to the
|
||||
NetBIOS name
|
||||
(see the <ulink url="lmhosts.5.html">lmhosts(5)</ulink>
|
||||
for details) then any name type matches for lookup.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para><constant>host</constant> :
|
||||
Do a standard host name to IP address resolution, using
|
||||
the system <filename>/etc/hosts</filename>, NIS, or DNS
|
||||
lookups. This method of name resolution is operating
|
||||
system dependent, for instance on IRIX or Solaris this
|
||||
may be controlled by the <filename>/etc/nsswitch.conf
|
||||
</filename> file). Note that this method is only used
|
||||
if the NetBIOS name type being queried is the 0x20
|
||||
(server) name type, otherwise it is ignored.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para><constant>wins</constant> :
|
||||
Query a name with the IP address listed in the
|
||||
<parameter>wins server</parameter> parameter. If no
|
||||
WINS server has been specified this method will be
|
||||
ignored.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para><constant>bcast</constant> :
|
||||
Do a broadcast on each of the known local interfaces
|
||||
listed in the <parameter>interfaces</parameter>
|
||||
parameter. This is the least reliable of the name
|
||||
resolution methods as it depends on the target host
|
||||
being on a locally connected subnet.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>If this parameter is not set then the name resolve order
|
||||
defined in the <filename>smb.conf</filename> file parameter
|
||||
(name resolve order) will be used. </para>
|
||||
|
||||
<para>The default order is lmhosts, host, wins, bcast. Without
|
||||
this parameter or any entry in the <parameter>name resolve order
|
||||
</parameter> parameter of the <filename>smb.conf</filename>
|
||||
file, the name resolution methods will be attempted in this
|
||||
order. </para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-d <debug level></term>
|
||||
<listitem><para>debug level is an integer from 0 to 10.</para>
|
||||
|
||||
<para>The default value if this parameter is not specified
|
||||
is zero.</para>
|
||||
|
||||
<para>The higher this value, the more detail will be logged
|
||||
about the activities of <command>nmblookup</command>. At level
|
||||
0, only critical errors and serious warnings will be logged.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-l logfilename</term>
|
||||
<listitem><para>If specified causes all debug messages to be
|
||||
written to the file specified by <replaceable>logfilename
|
||||
</replaceable>. If not specified then all messages will be
|
||||
written to<replaceable>stderr</replaceable>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-L libdir</term>
|
||||
<listitem><para>This parameter specifies the location of the
|
||||
shared libraries used by <command>smbsh</command>. The default
|
||||
value is specified at compile time.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>EXAMPLES</title>
|
||||
|
||||
<para>To use the <command>smbsh</command> command, execute <command>
|
||||
smbsh</command> from the prompt and enter the username and password
|
||||
|
@ -17,6 +17,8 @@
|
||||
<command>wbinfo</command>
|
||||
<arg choice="opt">-u</arg>
|
||||
<arg choice="opt">-g</arg>
|
||||
<arg choice="opt">-h name</arg>
|
||||
<arg choice="opt">-i ip</arg>
|
||||
<arg choice="opt">-n name</arg>
|
||||
<arg choice="opt">-s sid</arg>
|
||||
<arg choice="opt">-U uid</arg>
|
||||
@ -25,8 +27,9 @@
|
||||
<arg choice="opt">-Y sid</arg>
|
||||
<arg choice="opt">-t</arg>
|
||||
<arg choice="opt">-m</arg>
|
||||
<arg choice="opt">-r user</arg>
|
||||
<arg choice="opt">-a user%password</arg>
|
||||
<arg choice="opt">-p</arg>
|
||||
<arg choice="opt">-A user%password</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
@ -70,6 +73,26 @@
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>-h name</term>
|
||||
<listitem><para>The <parameter>-h</parameter> option
|
||||
queries <command>winbindd(8)</command> to query the WINS
|
||||
server for the IP address associated with the NetBIOS name
|
||||
specified by the <parameter>name</parameter> parameter.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>-i ip</term>
|
||||
<listitem><para>The <parameter>-i</parameter> option
|
||||
queries <command>winbindd(8)</command> to send a node status
|
||||
request to get the NetBIOS name associated with the IP address
|
||||
specified by the <parameter>ip</parameter> parameter.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>-n name</term>
|
||||
<listitem><para>The <parameter>-n</parameter> option
|
||||
@ -143,6 +166,16 @@
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>-r username</term>
|
||||
<listitem><para>Try to obtain the list of UNIX group ids
|
||||
to which the user belongs. This only works for users
|
||||
defined on a Domain Controller.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>-a username%password</term>
|
||||
<listitem><para>Attempt to authenticate a user via winbindd.
|
||||
@ -150,10 +183,14 @@
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term>-p</term>
|
||||
<listitem><para>Attempt a simple 'ping' check that the winbindd
|
||||
is indeed alive.
|
||||
<term>-A username%password</term>
|
||||
<listitem><para>Store username and password used by winbindd
|
||||
during session setup to a domain controller. This enables
|
||||
winbindd to operate in a Windows 2000 domain with Restrict
|
||||
Anonymous turned on (a.k.a. Permissions compatiable with
|
||||
Windows 2000 servers only).
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -56,6 +56,15 @@
|
||||
the winbindd service: </para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>hosts</term>
|
||||
<listitem><para>User information traditionally stored in
|
||||
the <filename>hosts(5)</filename> file and used by
|
||||
<command>gethostbyname(3)</command> functions. Names are
|
||||
resolved through the WINS server or by broadcast.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>passwd</term>
|
||||
<listitem><para>User information traditionally stored in
|
||||
@ -81,6 +90,12 @@
|
||||
passwd: files winbind
|
||||
group: files winbind
|
||||
</programlisting></para>
|
||||
|
||||
<para>The following simple configuration in the
|
||||
<filename>/etc/nsswitch.conf</filename> file can be used to initially
|
||||
resolve hostnames from <filename>/etc/hosts</filename> and then from the
|
||||
WINS server.</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
|
||||
|
@ -132,7 +132,7 @@ by the TCP/IP configuration control files. The file
|
||||
|
||||
<para>
|
||||
When the IP address of the destination interface has been
|
||||
determined a protocol called ARP/RARP isused to identify
|
||||
determined a protocol called ARP/RARP is used to identify
|
||||
the MAC address of the target interface. ARP stands for Address
|
||||
Resolution Protocol, and is a broadcast oriented method that
|
||||
uses UDP (User Datagram Protocol) to send a request to all
|
||||
@ -335,7 +335,7 @@ architecture of the MS Windows network. The term "workgroup" indicates
|
||||
that the primary nature of the network environment is that of a
|
||||
peer-to-peer design. In a WORKGROUP all machines are responsible for
|
||||
their own security, and generally such security is limited to use of
|
||||
just a password (known as SHARE MORE security). In most situations
|
||||
just a password (known as SHARE MODE security). In most situations
|
||||
with peer-to-peer networking the users who control their own machines
|
||||
will simply opt to have no security at all. It is possible to have
|
||||
USER MODE security in a WORKGROUP environment, thus requiring use
|
||||
@ -366,8 +366,8 @@ limited to this area.
|
||||
|
||||
<para>
|
||||
All MS Windows machines employ an in memory buffer in which is
|
||||
stored the NetBIOS names and their IP addresses for all external
|
||||
machines that that the local machine has communicated with over the
|
||||
stored the NetBIOS names and IP addresses for all external
|
||||
machines that that machine has communicated with over the
|
||||
past 10-15 minutes. It is more efficient to obtain an IP address
|
||||
for a machine from the local cache than it is to go through all the
|
||||
configured name resolution mechanisms.
|
||||
@ -377,7 +377,7 @@ configured name resolution mechanisms.
|
||||
If a machine whose name is in the local name cache has been shut
|
||||
down before the name had been expired and flushed from the cache, then
|
||||
an attempt to exchange a message with that machine will be subject
|
||||
to time-out delays. ie: It's name is in the cache, so a name resolution
|
||||
to time-out delays. i.e.: Its name is in the cache, so a name resolution
|
||||
lookup will succeed, but the machine can not respond. This can be
|
||||
frustrating for users - but it is a characteristic of the protocol.
|
||||
</para>
|
||||
@ -563,7 +563,7 @@ dependable browsing using Samba</title>
|
||||
|
||||
<para>
|
||||
As stated above, MS Windows machines register their NetBIOS names
|
||||
(ie: the machine name for each service type in operation) on start
|
||||
(i.e.: the machine name for each service type in operation) on start
|
||||
up. Also, as stated above, the exact method by which this name registration
|
||||
takes place is determined by whether or not the MS Windows client/server
|
||||
has been given a WINS server address, whether or not LMHOSTS lookup
|
||||
@ -594,7 +594,7 @@ Instead, the domain master browser serves the role of contacting each local
|
||||
master browser (found by asking WINS or from LMHOSTS) and exchanging browse
|
||||
list contents. This way every master browser will eventually obtain a complete
|
||||
list of all machines that are on the network. Every 11-15 minutes an election
|
||||
is held to determine which machine will be the master browser. By nature of
|
||||
is held to determine which machine will be the master browser. By the nature of
|
||||
the election criteria used, the machine with the highest uptime, or the
|
||||
most senior protocol version, or other criteria, will win the election
|
||||
as domain master browser.
|
||||
@ -679,8 +679,8 @@ these versions no longer support plain text passwords by default.
|
||||
<para>
|
||||
MS Windows clients have a habit of dropping network mappings that
|
||||
have been idle for 10 minutes or longer. When the user attempts to
|
||||
use the mapped drive connection that has been dropped the SMB protocol
|
||||
has a mechanism by which the connection can be re-established using
|
||||
use the mapped drive connection that has been dropped, the client
|
||||
re-establishes the connection using
|
||||
a cached copy of the password.
|
||||
</para>
|
||||
|
||||
@ -835,7 +835,7 @@ this HOWTO collection.
|
||||
|
||||
<para>
|
||||
This mode of authentication demands that there be on the
|
||||
Unix/Linux system both a Unix style account as well as and
|
||||
Unix/Linux system both a Unix style account as well as an
|
||||
smbpasswd entry for the user. The Unix system account can be
|
||||
locked if required as only the encrypted password will be
|
||||
used for SMB client authentication.
|
||||
|
@ -13,8 +13,8 @@
|
||||
<address><email>olem@IDEALX.org</email></address>
|
||||
</affiliation>
|
||||
</author>
|
||||
|
||||
|
||||
|
||||
|
||||
<pubdate> (13 Jan 2002) </pubdate>
|
||||
</chapterinfo>
|
||||
|
||||
@ -98,7 +98,7 @@ Identified (RID).
|
||||
As a result of these defeciencies, a more robust means of storing user attributes
|
||||
used by smbd was developed. The API which defines access to user accounts
|
||||
is commonly referred to as the samdb interface (previously this was called the passdb
|
||||
API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support
|
||||
API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support
|
||||
for a samdb backend (e.g. <parameter>--with-ldapsam</parameter> or
|
||||
<parameter>--with-tdbsam</parameter>) requires compile time support.
|
||||
</para>
|
||||
@ -515,7 +515,6 @@ something other than the default (e.g. \\MOBY\becky).
|
||||
|
||||
|
||||
|
||||
|
||||
<sect1>
|
||||
<title>Example LDIF Entries for a sambaAccount</title>
|
||||
|
||||
|
@ -231,7 +231,7 @@
|
||||
<para><prompt>$ </prompt><userinput>smbclient -L
|
||||
<replaceable>yourhostname</replaceable></userinput></para>
|
||||
|
||||
<para>Your should get back a list of shares available on
|
||||
<para>You should get back a list of shares available on
|
||||
your server. If you don't then something is incorrectly setup.
|
||||
Note that this method can also be used to see what shares
|
||||
are available on other LanManager clients (such as WfWg).</para>
|
||||
@ -316,8 +316,8 @@
|
||||
<para>By default Samba uses a blank scope ID. This means
|
||||
all your windows boxes must also have a blank scope ID.
|
||||
If you really want to use a non-blank scope ID then you will
|
||||
need to use the -i <scope> option to nmbd, smbd, and
|
||||
smbclient. All your PCs will need to have the same setting for
|
||||
need to use the 'netbios scope' smb.conf option.
|
||||
All your PCs will need to have the same setting for
|
||||
this to work. I do not recommend scope IDs.</para>
|
||||
</sect2>
|
||||
|
||||
@ -421,12 +421,6 @@
|
||||
its open. A client may ask for DENY_NONE, DENY_READ, DENY_WRITE
|
||||
or DENY_ALL. There are also special compatibility modes called
|
||||
DENY_FCB and DENY_DOS.</para>
|
||||
|
||||
<para>You can disable share modes using "share modes = no".
|
||||
This may be useful on a heavily loaded server as the share
|
||||
modes code is very slow. See also the FAST_SHARE_MODES
|
||||
option in the Makefile for a way to do full share modes
|
||||
very fast using shared memory (if your OS supports it).</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
@ -437,15 +431,5 @@
|
||||
See the smb.conf man page for details.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Other Character Sets</title>
|
||||
|
||||
<para>If you have problems using filenames with accented
|
||||
characters in them (like the German, French or Scandinavian
|
||||
character sets) then I recommend you look at the "valid chars"
|
||||
option in smb.conf and also take a look at the validchars
|
||||
package in the examples directory.</para>
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
@ -324,6 +324,14 @@ to control access and authenticate users on your Linux box using
|
||||
the winbind services which come with SAMBA 2.2.2.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There is also some Solaris specific information in
|
||||
<filename>docs/textdocs/Solaris-Winbind-HOWTO.txt</filename>.
|
||||
Future revisions of this document will incorporate that
|
||||
information.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<sect2>
|
||||
<title>Introduction</title>
|
||||
|
@ -296,7 +296,7 @@ to somewhere on your network to see if TCP/IP is functioning OK. If it
|
||||
is, the problem is most likely name resolution.
|
||||
|
||||
If your client has a facility to do so, hardcode a mapping between the
|
||||
hosts IP and the name you want to use. For example, with Man Manager
|
||||
hosts IP and the name you want to use. For example, with Lan Manager
|
||||
or Windows for Workgroups you would put a suitable entry in the file
|
||||
LMHOSTS. If this works, the problem is in the communication between
|
||||
your client and the netbios name server. If it does not work, then
|
||||
@ -319,7 +319,7 @@ the name you gave.
|
||||
|
||||
The first step is to check the exact name of the service you are
|
||||
trying to connect to (consult your system administrator). Assuming it
|
||||
exists and you specified it correctly (read your client's doco on how
|
||||
exists and you specified it correctly (read your client's docs on how
|
||||
to specify a service name correctly), read on:
|
||||
|
||||
<itemize>
|
||||
|
@ -371,7 +371,7 @@ to somewhere on your network to see if TCP/IP is functioning OK. If it
|
||||
is, the problem is most likely name resolution.
|
||||
|
||||
If your client has a facility to do so, hardcode a mapping between the
|
||||
hosts IP and the name you want to use. For example, with Man Manager
|
||||
hosts IP and the name you want to use. For example, with Lan Manager
|
||||
or Windows for Workgroups you would put a suitable entry in the file
|
||||
LMHOSTS. If this works, the problem is in the communication between
|
||||
your client and the netbios name server. If it does not work, then
|
||||
@ -394,7 +394,7 @@ the name you gave.
|
||||
|
||||
The first step is to check the exact name of the service you are
|
||||
trying to connect to (consult your system administrator). Assuming it
|
||||
exists and you specified it correctly (read your client's doco on how
|
||||
exists and you specified it correctly (read your client's docs on how
|
||||
to specify a service name correctly), read on:
|
||||
|
||||
<itemize>
|
||||
|
@ -878,29 +878,29 @@ HREF="#AEN2015"
|
||||
><DL
|
||||
><DT
|
||||
>11.5.1. <A
|
||||
HREF="#AEN2020"
|
||||
HREF="#AEN2022"
|
||||
>Introduction</A
|
||||
></DT
|
||||
><DT
|
||||
>11.5.2. <A
|
||||
HREF="#AEN2033"
|
||||
HREF="#AEN2035"
|
||||
>Requirements</A
|
||||
></DT
|
||||
><DT
|
||||
>11.5.3. <A
|
||||
HREF="#AEN2047"
|
||||
HREF="#AEN2049"
|
||||
>Testing Things Out</A
|
||||
></DT
|
||||
><DD
|
||||
><DL
|
||||
><DT
|
||||
>11.5.3.1. <A
|
||||
HREF="#AEN2058"
|
||||
HREF="#AEN2060"
|
||||
>Configure and compile SAMBA</A
|
||||
></DT
|
||||
><DT
|
||||
>11.5.3.2. <A
|
||||
HREF="#AEN2077"
|
||||
HREF="#AEN2079"
|
||||
>Configure <TT
|
||||
CLASS="FILENAME"
|
||||
>nsswitch.conf</TT
|
||||
@ -909,22 +909,22 @@ winbind libraries</A
|
||||
></DT
|
||||
><DT
|
||||
>11.5.3.3. <A
|
||||
HREF="#AEN2102"
|
||||
HREF="#AEN2104"
|
||||
>Configure smb.conf</A
|
||||
></DT
|
||||
><DT
|
||||
>11.5.3.4. <A
|
||||
HREF="#AEN2118"
|
||||
HREF="#AEN2120"
|
||||
>Join the SAMBA server to the PDC domain</A
|
||||
></DT
|
||||
><DT
|
||||
>11.5.3.5. <A
|
||||
HREF="#AEN2129"
|
||||
HREF="#AEN2131"
|
||||
>Start up the winbindd daemon and test it!</A
|
||||
></DT
|
||||
><DT
|
||||
>11.5.3.6. <A
|
||||
HREF="#AEN2165"
|
||||
HREF="#AEN2167"
|
||||
>Fix the <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/rc.d/init.d/smb</TT
|
||||
@ -932,7 +932,7 @@ CLASS="FILENAME"
|
||||
></DT
|
||||
><DT
|
||||
>11.5.3.7. <A
|
||||
HREF="#AEN2187"
|
||||
HREF="#AEN2189"
|
||||
>Configure Winbind and PAM</A
|
||||
></DT
|
||||
></DL
|
||||
@ -941,12 +941,12 @@ HREF="#AEN2187"
|
||||
></DD
|
||||
><DT
|
||||
>11.6. <A
|
||||
HREF="#AEN2234"
|
||||
HREF="#AEN2236"
|
||||
>Limitations</A
|
||||
></DT
|
||||
><DT
|
||||
>11.7. <A
|
||||
HREF="#AEN2244"
|
||||
HREF="#AEN2246"
|
||||
>Conclusion</A
|
||||
></DT
|
||||
></DL
|
||||
@ -960,32 +960,32 @@ HREF="#OS2"
|
||||
><DL
|
||||
><DT
|
||||
>12.1. <A
|
||||
HREF="#AEN2258"
|
||||
HREF="#AEN2260"
|
||||
>FAQs</A
|
||||
></DT
|
||||
><DD
|
||||
><DL
|
||||
><DT
|
||||
>12.1.1. <A
|
||||
HREF="#AEN2260"
|
||||
HREF="#AEN2262"
|
||||
>How can I configure OS/2 Warp Connect or
|
||||
OS/2 Warp 4 as a client for Samba?</A
|
||||
></DT
|
||||
><DT
|
||||
>12.1.2. <A
|
||||
HREF="#AEN2275"
|
||||
HREF="#AEN2277"
|
||||
>How can I configure OS/2 Warp 3 (not Connect),
|
||||
OS/2 1.2, 1.3 or 2.x for Samba?</A
|
||||
></DT
|
||||
><DT
|
||||
>12.1.3. <A
|
||||
HREF="#AEN2284"
|
||||
HREF="#AEN2286"
|
||||
>Are there any other issues when OS/2 (any version)
|
||||
is used as a client?</A
|
||||
></DT
|
||||
><DT
|
||||
>12.1.4. <A
|
||||
HREF="#AEN2288"
|
||||
HREF="#AEN2290"
|
||||
>How do I get printer driver download working
|
||||
for OS/2 clients?</A
|
||||
></DT
|
||||
@ -1002,24 +1002,24 @@ HREF="#CVS-ACCESS"
|
||||
><DL
|
||||
><DT
|
||||
>13.1. <A
|
||||
HREF="#AEN2304"
|
||||
HREF="#AEN2306"
|
||||
>Introduction</A
|
||||
></DT
|
||||
><DT
|
||||
>13.2. <A
|
||||
HREF="#AEN2309"
|
||||
HREF="#AEN2311"
|
||||
>CVS Access to samba.org</A
|
||||
></DT
|
||||
><DD
|
||||
><DL
|
||||
><DT
|
||||
>13.2.1. <A
|
||||
HREF="#AEN2312"
|
||||
HREF="#AEN2314"
|
||||
>Access via CVSweb</A
|
||||
></DT
|
||||
><DT
|
||||
>13.2.2. <A
|
||||
HREF="#AEN2317"
|
||||
HREF="#AEN2319"
|
||||
>Access via cvs</A
|
||||
></DT
|
||||
></DL
|
||||
@ -1028,7 +1028,7 @@ HREF="#AEN2317"
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
HREF="#AEN2345"
|
||||
HREF="#AEN2347"
|
||||
>Index</A
|
||||
></DT
|
||||
></DL
|
||||
@ -8347,7 +8347,7 @@ Identified (RID).</P
|
||||
>As a result of these defeciencies, a more robust means of storing user attributes
|
||||
used by smbd was developed. The API which defines access to user accounts
|
||||
is commonly referred to as the samdb interface (previously this was called the passdb
|
||||
API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support
|
||||
API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support
|
||||
for a samdb backend (e.g. <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
@ -9535,12 +9535,20 @@ for providing the HOWTO for this section.</P
|
||||
>This HOWTO describes how to get winbind services up and running
|
||||
to control access and authenticate users on your Linux box using
|
||||
the winbind services which come with SAMBA 2.2.2.</P
|
||||
><P
|
||||
>There is also some Solaris specific information in
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>docs/textdocs/Solaris-Winbind-HOWTO.txt</TT
|
||||
>.
|
||||
Future revisions of this document will incorporate that
|
||||
information.</P
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><HR><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2020"
|
||||
NAME="AEN2022"
|
||||
>11.5.1. Introduction</A
|
||||
></H2
|
||||
><P
|
||||
@ -9591,7 +9599,7 @@ CLASS="SECT2"
|
||||
><HR><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2033"
|
||||
NAME="AEN2035"
|
||||
>11.5.2. Requirements</A
|
||||
></H2
|
||||
><P
|
||||
@ -9649,7 +9657,7 @@ CLASS="SECT2"
|
||||
><HR><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2047"
|
||||
NAME="AEN2049"
|
||||
>11.5.3. Testing Things Out</A
|
||||
></H2
|
||||
><P
|
||||
@ -9694,7 +9702,7 @@ CLASS="SECT3"
|
||||
><HR><H3
|
||||
CLASS="SECT3"
|
||||
><A
|
||||
NAME="AEN2058"
|
||||
NAME="AEN2060"
|
||||
>11.5.3.1. Configure and compile SAMBA</A
|
||||
></H3
|
||||
><P
|
||||
@ -9769,7 +9777,7 @@ CLASS="SECT3"
|
||||
><HR><H3
|
||||
CLASS="SECT3"
|
||||
><A
|
||||
NAME="AEN2077"
|
||||
NAME="AEN2079"
|
||||
>11.5.3.2. Configure <TT
|
||||
CLASS="FILENAME"
|
||||
>nsswitch.conf</TT
|
||||
@ -9859,7 +9867,7 @@ CLASS="SECT3"
|
||||
><HR><H3
|
||||
CLASS="SECT3"
|
||||
><A
|
||||
NAME="AEN2102"
|
||||
NAME="AEN2104"
|
||||
>11.5.3.3. Configure smb.conf</A
|
||||
></H3
|
||||
><P
|
||||
@ -9943,7 +9951,7 @@ CLASS="SECT3"
|
||||
><HR><H3
|
||||
CLASS="SECT3"
|
||||
><A
|
||||
NAME="AEN2118"
|
||||
NAME="AEN2120"
|
||||
>11.5.3.4. Join the SAMBA server to the PDC domain</A
|
||||
></H3
|
||||
><P
|
||||
@ -9989,7 +9997,7 @@ CLASS="SECT3"
|
||||
><HR><H3
|
||||
CLASS="SECT3"
|
||||
><A
|
||||
NAME="AEN2129"
|
||||
NAME="AEN2131"
|
||||
>11.5.3.5. Start up the winbindd daemon and test it!</A
|
||||
></H3
|
||||
><P
|
||||
@ -10130,7 +10138,7 @@ CLASS="SECT3"
|
||||
><HR><H3
|
||||
CLASS="SECT3"
|
||||
><A
|
||||
NAME="AEN2165"
|
||||
NAME="AEN2167"
|
||||
>11.5.3.6. Fix the <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/rc.d/init.d/smb</TT
|
||||
@ -10260,7 +10268,7 @@ CLASS="SECT3"
|
||||
><HR><H3
|
||||
CLASS="SECT3"
|
||||
><A
|
||||
NAME="AEN2187"
|
||||
NAME="AEN2189"
|
||||
>11.5.3.7. Configure Winbind and PAM</A
|
||||
></H3
|
||||
><P
|
||||
@ -10482,7 +10490,7 @@ CLASS="SECT1"
|
||||
><HR><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2234"
|
||||
NAME="AEN2236"
|
||||
>11.6. Limitations</A
|
||||
></H1
|
||||
><P
|
||||
@ -10523,7 +10531,7 @@ CLASS="SECT1"
|
||||
><HR><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2244"
|
||||
NAME="AEN2246"
|
||||
>11.7. Conclusion</A
|
||||
></H1
|
||||
><P
|
||||
@ -10547,7 +10555,7 @@ CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2258"
|
||||
NAME="AEN2260"
|
||||
>12.1. FAQs</A
|
||||
></H1
|
||||
><DIV
|
||||
@ -10555,7 +10563,7 @@ CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2260"
|
||||
NAME="AEN2262"
|
||||
>12.1.1. How can I configure OS/2 Warp Connect or
|
||||
OS/2 Warp 4 as a client for Samba?</A
|
||||
></H2
|
||||
@ -10614,7 +10622,7 @@ CLASS="SECT2"
|
||||
><HR><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2275"
|
||||
NAME="AEN2277"
|
||||
>12.1.2. How can I configure OS/2 Warp 3 (not Connect),
|
||||
OS/2 1.2, 1.3 or 2.x for Samba?</A
|
||||
></H2
|
||||
@ -10667,7 +10675,7 @@ CLASS="SECT2"
|
||||
><HR><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2284"
|
||||
NAME="AEN2286"
|
||||
>12.1.3. Are there any other issues when OS/2 (any version)
|
||||
is used as a client?</A
|
||||
></H2
|
||||
@ -10689,7 +10697,7 @@ CLASS="SECT2"
|
||||
><HR><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2288"
|
||||
NAME="AEN2290"
|
||||
>12.1.4. How do I get printer driver download working
|
||||
for OS/2 clients?</A
|
||||
></H2
|
||||
@ -10745,7 +10753,7 @@ CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2304"
|
||||
NAME="AEN2306"
|
||||
>13.1. Introduction</A
|
||||
></H1
|
||||
><P
|
||||
@ -10767,7 +10775,7 @@ CLASS="SECT1"
|
||||
><HR><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2309"
|
||||
NAME="AEN2311"
|
||||
>13.2. CVS Access to samba.org</A
|
||||
></H1
|
||||
><P
|
||||
@ -10780,7 +10788,7 @@ CLASS="SECT2"
|
||||
><HR><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2312"
|
||||
NAME="AEN2314"
|
||||
>13.2.1. Access via CVSweb</A
|
||||
></H2
|
||||
><P
|
||||
@ -10801,7 +10809,7 @@ CLASS="SECT2"
|
||||
><HR><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2317"
|
||||
NAME="AEN2319"
|
||||
>13.2.2. Access via cvs</A
|
||||
></H2
|
||||
><P
|
||||
@ -10907,7 +10915,7 @@ CLASS="COMMAND"
|
||||
></DIV
|
||||
><HR><H1
|
||||
><A
|
||||
NAME="AEN2345"
|
||||
NAME="AEN2347"
|
||||
>Index</A
|
||||
></H1
|
||||
><DL
|
||||
|
@ -295,9 +295,7 @@ CLASS="FILENAME"
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>nmbd</B
|
||||
> server.</P
|
||||
><P
|
||||
>The default log directory is compiled into Samba
|
||||
> server. The default log directory is compiled into Samba
|
||||
as part of the build process. Common defaults are <TT
|
||||
CLASS="FILENAME"
|
||||
> /usr/local/samba/var/log.nmb</TT
|
||||
@ -308,7 +306,15 @@ CLASS="FILENAME"
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>/var/log/log.nmb</TT
|
||||
>.</P
|
||||
>. <EM
|
||||
>Beware:</EM
|
||||
>
|
||||
If the directory specified does not exist, <B
|
||||
CLASS="COMMAND"
|
||||
>nmbd</B
|
||||
>
|
||||
will log to the default debug log location defined at compile time.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-n <primary NetBIOS name></DT
|
||||
@ -340,31 +346,30 @@ CLASS="FILENAME"
|
||||
><DD
|
||||
><P
|
||||
>UDP port number is a positive integer value.
|
||||
This option changes the default UDP port number (normally 137)
|
||||
This option changes the default UDP port number (normally 137)
|
||||
that <B
|
||||
CLASS="COMMAND"
|
||||
>nmbd</B
|
||||
> responds to name queries on. Don't
|
||||
use this option unless you are an expert, in which case you
|
||||
> responds to name queries on. Don't
|
||||
use this option unless you are an expert, in which case you
|
||||
won't need help!</P
|
||||
></DD
|
||||
><DT
|
||||
>-s <configuration file></DT
|
||||
><DD
|
||||
><P
|
||||
>The default configuration file name
|
||||
>The default configuration file name
|
||||
is set at build time, typically as <TT
|
||||
CLASS="FILENAME"
|
||||
> /usr/local/samba/lib/smb.conf</TT
|
||||
>, but
|
||||
this may be changed when Samba is autoconfigured.</P
|
||||
><P
|
||||
>The file specified contains the configuration details
|
||||
>The file specified contains the configuration details
|
||||
required by the server. See <A
|
||||
HREF="smb.conf.5.html"
|
||||
TARGET="_top"
|
||||
>
|
||||
<TT
|
||||
> <TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf(5)</TT
|
||||
></A
|
||||
@ -377,7 +382,7 @@ CLASS="FILENAME"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN130"
|
||||
NAME="AEN131"
|
||||
></A
|
||||
><H2
|
||||
>FILES</H2
|
||||
@ -393,12 +398,12 @@ CLASS="FILENAME"
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>If the server is to be run by the
|
||||
>If the server is to be run by the
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>inetd</B
|
||||
> meta-daemon, this file
|
||||
must contain suitable startup information for the
|
||||
> meta-daemon, this file
|
||||
must contain suitable startup information for the
|
||||
meta-daemon. See the <A
|
||||
HREF="UNIX_INSTALL.html"
|
||||
TARGET="_top"
|
||||
@ -414,11 +419,11 @@ CLASS="FILENAME"
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>or whatever initialization script your
|
||||
>or whatever initialization script your
|
||||
system uses).</P
|
||||
><P
|
||||
>If running the server as a daemon at startup,
|
||||
this file will need to contain an appropriate startup
|
||||
>If running the server as a daemon at startup,
|
||||
this file will need to contain an appropriate startup
|
||||
sequence for the server. See the <A
|
||||
HREF="UNIX_INSTALL.html"
|
||||
TARGET="_top"
|
||||
@ -433,13 +438,13 @@ CLASS="FILENAME"
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>If running the server via the
|
||||
>If running the server via the
|
||||
meta-daemon <B
|
||||
CLASS="COMMAND"
|
||||
>inetd</B
|
||||
>, this file
|
||||
must contain a mapping of service name (e.g., netbios-ssn)
|
||||
to service port (e.g., 139) and protocol type (e.g., tcp).
|
||||
>, this file
|
||||
must contain a mapping of service name (e.g., netbios-ssn)
|
||||
to service port (e.g., 139) and protocol type (e.g., tcp).
|
||||
See the <A
|
||||
HREF="UNIX_INSTALL.html"
|
||||
TARGET="_top"
|
||||
@ -454,7 +459,7 @@ CLASS="FILENAME"
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>This is the default location of the
|
||||
>This is the default location of the
|
||||
<A
|
||||
HREF="smb.conf.5.html"
|
||||
TARGET="_top"
|
||||
@ -463,17 +468,17 @@ CLASS="FILENAME"
|
||||
>smb.conf</TT
|
||||
></A
|
||||
>
|
||||
server configuration file. Other common places that systems
|
||||
server configuration file. Other common places that systems
|
||||
install this file are <TT
|
||||
CLASS="FILENAME"
|
||||
>/usr/samba/lib/smb.conf</TT
|
||||
>
|
||||
>
|
||||
and <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/smb.conf</TT
|
||||
>.</P
|
||||
><P
|
||||
>When run as a WINS server (see the
|
||||
>When run as a WINS server (see the
|
||||
<A
|
||||
HREF="smb.conf.5.html#WINSSUPPORT"
|
||||
TARGET="_top"
|
||||
@ -490,11 +495,11 @@ CLASS="COMMAND"
|
||||
will store the WINS database in the file <TT
|
||||
CLASS="FILENAME"
|
||||
>wins.dat</TT
|
||||
>
|
||||
>
|
||||
in the <TT
|
||||
CLASS="FILENAME"
|
||||
>var/locks</TT
|
||||
> directory configured under
|
||||
> directory configured under
|
||||
wherever Samba was configured to install itself.</P
|
||||
><P
|
||||
>If <B
|
||||
@ -532,7 +537,7 @@ CLASS="FILENAME"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN177"
|
||||
NAME="AEN178"
|
||||
></A
|
||||
><H2
|
||||
>SIGNALS</H2
|
||||
@ -540,21 +545,21 @@ NAME="AEN177"
|
||||
>To shut down an <B
|
||||
CLASS="COMMAND"
|
||||
>nmbd</B
|
||||
> process it is recommended
|
||||
> process it is recommended
|
||||
that SIGKILL (-9) <EM
|
||||
>NOT</EM
|
||||
> be used, except as a last
|
||||
resort, as this may leave the name database in an inconsistent state.
|
||||
> be used, except as a last
|
||||
resort, as this may leave the name database in an inconsistent state.
|
||||
The correct way to terminate <B
|
||||
CLASS="COMMAND"
|
||||
>nmbd</B
|
||||
> is to send it
|
||||
> is to send it
|
||||
a SIGTERM (-15) signal and wait for it to die on its own.</P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>nmbd</B
|
||||
> will accept SIGHUP, which will cause
|
||||
> will accept SIGHUP, which will cause
|
||||
it to dump out its namelists into the file <TT
|
||||
CLASS="FILENAME"
|
||||
>namelist.debug
|
||||
@ -562,12 +567,12 @@ CLASS="FILENAME"
|
||||
> in the <TT
|
||||
CLASS="FILENAME"
|
||||
>/usr/local/samba/var/locks</TT
|
||||
>
|
||||
>
|
||||
directory (or the <TT
|
||||
CLASS="FILENAME"
|
||||
>var/locks</TT
|
||||
> directory configured
|
||||
under wherever Samba was configured to install itself). This will also
|
||||
> directory configured
|
||||
under wherever Samba was configured to install itself). This will also
|
||||
cause <B
|
||||
CLASS="COMMAND"
|
||||
>nmbd</B
|
||||
@ -593,7 +598,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN193"
|
||||
NAME="AEN194"
|
||||
></A
|
||||
><H2
|
||||
>VERSION</H2
|
||||
@ -604,7 +609,7 @@ NAME="AEN193"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN196"
|
||||
NAME="AEN197"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
@ -669,7 +674,7 @@ TARGET="_top"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN213"
|
||||
NAME="AEN214"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
|
@ -36,12 +36,12 @@ NAME="AEN8"
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>pdbedit</B
|
||||
> [-l] [-v] [-w] [-u username] [-f fullname] [-h homedir] [-d drive] [-s script] [-p profile] [-a] [-m] [-x] [-i file]</P
|
||||
> [-l] [-v] [-w] [-u username] [-f fullname] [-h homedir] [-d drive] [-s script] [-p profile] [-a] [-m] [-x] [-i passdb-backend] [-e passdb-backend] [-D debuglevel]</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN24"
|
||||
NAME="AEN26"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
@ -67,7 +67,7 @@ TARGET="_top"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN31"
|
||||
NAME="AEN33"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
@ -337,29 +337,40 @@ CLASS="COMMAND"
|
||||
></P
|
||||
></DD
|
||||
><DT
|
||||
>-i file</DT
|
||||
>-i passdb-backend</DT
|
||||
><DD
|
||||
><P
|
||||
>This command is used to import a smbpasswd
|
||||
file into the database.</P
|
||||
>Use a different passdb backend to retrieve users than the one specified in smb.conf.</P
|
||||
><P
|
||||
>This option will ease migration from the plain smbpasswd
|
||||
file database to more powerful backend databases like tdb and
|
||||
ldap.</P
|
||||
>This option will ease migration from one passdb backend to another.
|
||||
</P
|
||||
><P
|
||||
>Example: <B
|
||||
CLASS="COMMAND"
|
||||
>pdbedit -i /etc/smbpasswd.old</B
|
||||
>pdbedit -i smbpasswd:/etc/smbpasswd.old -e tdbsam:/etc/samba/passwd.tdb</B
|
||||
>
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-e passdb-backend</DT
|
||||
><DD
|
||||
><P
|
||||
>Export all currently available users to the specified password database backend.</P
|
||||
><P
|
||||
>This option will ease migration from one passdb backend to another and will ease backupping</P
|
||||
><P
|
||||
>Example: <B
|
||||
CLASS="COMMAND"
|
||||
>pdbedit -e smbpasswd:/root/samba-users.backup</B
|
||||
></P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN124"
|
||||
NAME="AEN133"
|
||||
></A
|
||||
><H2
|
||||
>NOTES</H2
|
||||
@ -369,7 +380,7 @@ NAME="AEN124"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN127"
|
||||
NAME="AEN136"
|
||||
></A
|
||||
><H2
|
||||
>VERSION</H2
|
||||
@ -380,7 +391,7 @@ NAME="AEN127"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN130"
|
||||
NAME="AEN139"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
@ -400,7 +411,7 @@ TARGET="_top"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN135"
|
||||
NAME="AEN144"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
|
@ -89,7 +89,7 @@ CLASS="REPLACEABLE"
|
||||
>Section and parameter names are not case sensitive.</P
|
||||
><P
|
||||
>Only the first equals sign in a parameter is significant.
|
||||
Whitespace before or after the first equals sign is discarded.
|
||||
Whitespace before or after the first equals sign is discarded.
|
||||
Leading, trailing and internal whitespace in section and parameter
|
||||
names is irrelevant. Leading and trailing whitespace in a parameter
|
||||
value is discarded. Internal whitespace within a parameter value
|
||||
@ -140,7 +140,7 @@ NAME="AEN28"
|
||||
><P
|
||||
>Sections may be designated <EM
|
||||
>guest</EM
|
||||
> services,
|
||||
> services,
|
||||
in which case no password is required to access them. A specified
|
||||
UNIX <EM
|
||||
>guest account</EM
|
||||
@ -632,7 +632,7 @@ CLASS="VARIABLELIST"
|
||||
>%d</DT
|
||||
><DD
|
||||
><P
|
||||
>The process id of the current server
|
||||
>The process id of the current server
|
||||
process.</P
|
||||
></DD
|
||||
><DT
|
||||
@ -756,7 +756,7 @@ CLASS="VARIABLELIST"
|
||||
>short preserve case = yes/no</DT
|
||||
><DD
|
||||
><P
|
||||
>controls if new files which conform to 8.3 syntax,
|
||||
>controls if new files which conform to 8.3 syntax,
|
||||
that is all in upper case and of suitable length, are created
|
||||
upper case, or if they are forced to be the "default"
|
||||
case. This option can be use with "preserve case = yes"
|
||||
@ -785,8 +785,9 @@ NAME="AEN236"
|
||||
steps fail, then the connection request is rejected. However, if one of the
|
||||
steps succeeds, then the following steps are not checked.</P
|
||||
><P
|
||||
>If the service is marked "guest only = yes" then
|
||||
steps 1 to 5 are skipped.</P
|
||||
>If the service is marked "guest only = yes" and the
|
||||
server is running with share-level security ("security = share")
|
||||
then steps 1 to 5 are skipped.</P
|
||||
><P
|
||||
></P
|
||||
><OL
|
||||
@ -924,6 +925,18 @@ CLASS="PARAMETER"
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#ALGORITHMICRIDBASE"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>algorithmic rid base</I
|
||||
></TT
|
||||
></A
|
||||
></P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#ALLOWTRUSTEDDOMAINS"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
@ -1572,6 +1585,42 @@ CLASS="PARAMETER"
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#LOCKSPINCOUNT"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>lock spin count</I
|
||||
></TT
|
||||
></A
|
||||
></P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#LOCKSPINTIME"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>lock spin time</I
|
||||
></TT
|
||||
></A
|
||||
></P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#PIDDIRECTORY"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>pid directory</I
|
||||
></TT
|
||||
></A
|
||||
></P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#LOGFILE"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
@ -1944,6 +1993,18 @@ CLASS="PARAMETER"
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#NTSTATUSSUPPORT"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>nt status support</I
|
||||
></TT
|
||||
></A
|
||||
></P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#NULLPASSWORDS"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
@ -3002,7 +3063,7 @@ CLASS="PARAMETER"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN971"
|
||||
NAME="AEN991"
|
||||
></A
|
||||
><H2
|
||||
>COMPLETE LIST OF SERVICE PARAMETERS</H2
|
||||
@ -3159,6 +3220,18 @@ CLASS="PARAMETER"
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#CSCPOLICY"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>csc policy</I
|
||||
></TT
|
||||
></A
|
||||
></P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#DEFAULTCASE"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
@ -3555,6 +3628,18 @@ CLASS="PARAMETER"
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#INHERITACLS"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>inherit acls</I
|
||||
></TT
|
||||
></A
|
||||
></P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#INHERITPERMISSIONS"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
@ -4179,6 +4264,18 @@ CLASS="PARAMETER"
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#SHAREMODES"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>share modes</I
|
||||
></TT
|
||||
></A
|
||||
></P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
><A
|
||||
HREF="#SHORTPRESERVECASE"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
@ -4445,7 +4542,7 @@ CLASS="PARAMETER"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN1451"
|
||||
NAME="AEN1483"
|
||||
></A
|
||||
><H2
|
||||
>EXPLANATION OF EACH PARAMETER</H2
|
||||
@ -5019,6 +5116,38 @@ CLASS="PARAMETER"
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="ALGORITHMICRIDBASE"
|
||||
></A
|
||||
>algorithmic rid base (G)</DT
|
||||
><DD
|
||||
><P
|
||||
>This determines how Samba will use its
|
||||
algorithmic mapping from uids/gid to the RIDs needed to construct
|
||||
NT Security Identifiers.</P
|
||||
><P
|
||||
>Setting this option to a larger value could be useful to sites
|
||||
transitioning from WinNT and Win2k, as existing user and
|
||||
group rids would otherwise clash with sytem users etc.
|
||||
</P
|
||||
><P
|
||||
>All UIDs and GIDs must be able to be resolved into SIDs for
|
||||
the correct operation of ACLs on the server. As such the algorithmic
|
||||
mapping can't be 'turned off', but pushing it 'out of the way' should
|
||||
resolve the issues. Users and groups can then be assigned 'low' RIDs
|
||||
in arbitary-rid supporting backends. </P
|
||||
><P
|
||||
>Default: <B
|
||||
CLASS="COMMAND"
|
||||
>algorithmic rid base = 1000</B
|
||||
></P
|
||||
><P
|
||||
>Example: <B
|
||||
CLASS="COMMAND"
|
||||
>algorithmic rid base = 100000</B
|
||||
></P
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="ALLOWTRUSTEDDOMAINS"
|
||||
></A
|
||||
>allow trusted domains (G)</DT
|
||||
@ -5927,6 +6056,40 @@ CLASS="PARAMETER"
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="CSCPOLICY"
|
||||
></A
|
||||
>csc policy (S)</DT
|
||||
><DD
|
||||
><P
|
||||
>This stands for <EM
|
||||
>client-side caching
|
||||
policy</EM
|
||||
>, and specifies how clients capable of offline
|
||||
caching will cache the files in the share. The valid values
|
||||
are: manual, documents, programs, disable.</P
|
||||
><P
|
||||
>These values correspond to those used on Windows
|
||||
servers.</P
|
||||
><P
|
||||
>For example, shares containing roaming profiles can have
|
||||
offline caching disabled using <B
|
||||
CLASS="COMMAND"
|
||||
>csc policy = disable
|
||||
</B
|
||||
>.</P
|
||||
><P
|
||||
>Default: <B
|
||||
CLASS="COMMAND"
|
||||
>csc policy = manual</B
|
||||
></P
|
||||
><P
|
||||
>Example: <B
|
||||
CLASS="COMMAND"
|
||||
>csc policy = programs</B
|
||||
></P
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="DEADTIME"
|
||||
></A
|
||||
>deadtime (G)</DT
|
||||
@ -8813,6 +8976,28 @@ CLASS="COMMAND"
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="INHERITACLS"
|
||||
></A
|
||||
>inherit acls (S)</DT
|
||||
><DD
|
||||
><P
|
||||
>This parameter can be used to ensure
|
||||
that if default acls exist on parent directories,
|
||||
they are always honored when creating a subdirectory.
|
||||
The default behavior is to use the mode specified
|
||||
when creating the directory. Enabling this option
|
||||
sets the mode to 0777, thus guaranteeing that
|
||||
default directory acls are propagated.
|
||||
</P
|
||||
><P
|
||||
>Default: <B
|
||||
CLASS="COMMAND"
|
||||
>inherit acls = no</B
|
||||
>
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="INHERITPERMISSIONS"
|
||||
></A
|
||||
>inherit permissions (S)</DT
|
||||
@ -9831,6 +10016,56 @@ CLASS="COMMAND"
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="LOCKSPINCOUNT"
|
||||
></A
|
||||
>lock spin count (G)</DT
|
||||
><DD
|
||||
><P
|
||||
>This parameter controls the number of times
|
||||
that smbd should attempt to gain a byte range lock on the
|
||||
behalf of a client request. Experiments have shown that
|
||||
Windows 2k servers do not reply with a failure if the lock
|
||||
could not be immediately granted, but try a few more times
|
||||
in case the lock could later be aquired. This behavior
|
||||
is used to support PC database formats such as MS Access
|
||||
and FoxPro.
|
||||
</P
|
||||
><P
|
||||
>Default: <B
|
||||
CLASS="COMMAND"
|
||||
>lock spin count = 2</B
|
||||
>
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="LOCKSPINTIME"
|
||||
></A
|
||||
>lock spin time (G)</DT
|
||||
><DD
|
||||
><P
|
||||
>The time in microseconds that smbd should
|
||||
pause before attempting to gain a failed lock. See
|
||||
<A
|
||||
HREF="#LOCKSPINCOUNT"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>lock spin
|
||||
count</I
|
||||
></TT
|
||||
></A
|
||||
> for more details.
|
||||
</P
|
||||
><P
|
||||
>Default: <B
|
||||
CLASS="COMMAND"
|
||||
>lock spin time = 10</B
|
||||
>
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="LOCKING"
|
||||
></A
|
||||
>locking (S)</DT
|
||||
@ -10360,8 +10595,8 @@ CLASS="COMMAND"
|
||||
takes a printer name as its only parameter and outputs printer
|
||||
status information.</P
|
||||
><P
|
||||
>Currently eight styles of printer status information
|
||||
are supported; BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX and SOFTQ.
|
||||
>Currently nine styles of printer status information
|
||||
are supported; BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX, CUPS, and SOFTQ.
|
||||
This covers most UNIX systems. You control which type is expected
|
||||
using the <TT
|
||||
CLASS="PARAMETER"
|
||||
@ -10395,7 +10630,15 @@ CLASS="PARAMETER"
|
||||
CLASS="ENVAR"
|
||||
>$PATH
|
||||
</TT
|
||||
> may not be available to the server.</P
|
||||
> may not be available to the server. When compiled with
|
||||
the CUPS libraries, no <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>lpq command</I
|
||||
></TT
|
||||
> is
|
||||
needed because smbd will make a library call to obtain the
|
||||
print queue listing.</P
|
||||
><P
|
||||
>See also the <A
|
||||
HREF="#PRINTING"
|
||||
@ -12230,6 +12473,34 @@ CLASS="COMMAND"
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="NTSTATUSSUPPORT"
|
||||
></A
|
||||
>nt status support (G)</DT
|
||||
><DD
|
||||
><P
|
||||
>This boolean parameter controls whether <A
|
||||
HREF="smbd.8.html"
|
||||
TARGET="_top"
|
||||
>smbd(8)</A
|
||||
> will negotiate NT specific status
|
||||
support with Windows NT/2k/XP clients. This is a developer
|
||||
debugging option and should be left alone.
|
||||
If this option is set to <TT
|
||||
CLASS="CONSTANT"
|
||||
>no</TT
|
||||
> then Samba offers
|
||||
exactly the same DOS error codes that versions prior to Samba 2.2.3
|
||||
reported.</P
|
||||
><P
|
||||
>You should not need to ever disable this parameter.</P
|
||||
><P
|
||||
>Default: <B
|
||||
CLASS="COMMAND"
|
||||
>nt status support = yes</B
|
||||
></P
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="NULLPASSWORDS"
|
||||
></A
|
||||
>null passwords (G)</DT
|
||||
@ -12655,10 +12926,10 @@ NAME="PASSDBBACKEND"
|
||||
>passdb backend (G)</DT
|
||||
><DD
|
||||
><P
|
||||
>This option allows the administrator to chose what
|
||||
backend in which to store passwords. This allows (for example) both
|
||||
smbpasswd and tdbsam to be used without a recompile. Only one can
|
||||
be used at a time however, and experimental backends must still be selected
|
||||
>This option allows the administrator to chose which backends to retrieve and store passwords with. This allows (for example) both
|
||||
smbpasswd and tdbsam to be used without a recompile.
|
||||
Multiple backends can be specified, seperated by spaces. The backends will be searched in the order they are specified. New users are always added to the first backend specified.
|
||||
Experimental backends must still be selected
|
||||
(eg --with-tdbsam) at configure time.
|
||||
</P
|
||||
><P
|
||||
@ -12798,7 +13069,7 @@ CLASS="COMMAND"
|
||||
><P
|
||||
>Example: <B
|
||||
CLASS="COMMAND"
|
||||
>passdb backend = tdbsam:/etc/samba/private/passdb.tdb</B
|
||||
>passdb backend = tdbsam:/etc/samba/private/passdb.tdb smbpasswd:/etc/samba/smbpasswd</B
|
||||
></P
|
||||
><P
|
||||
>Example: <B
|
||||
@ -12808,7 +13079,7 @@ CLASS="COMMAND"
|
||||
><P
|
||||
>Example: <B
|
||||
CLASS="COMMAND"
|
||||
>passdb backend = plugin:/usr/local/samba/lib/my_passdb.so:my_plugin_args</B
|
||||
>passdb backend = plugin:/usr/local/samba/lib/my_passdb.so:my_plugin_args tdbsam:/etc/samba/private/passdb.tdb</B
|
||||
></P
|
||||
></DD
|
||||
><DT
|
||||
@ -13461,6 +13732,27 @@ CLASS="COMMAND"
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="PIDDIRECTORY"
|
||||
></A
|
||||
>pid directory (G)</DT
|
||||
><DD
|
||||
><P
|
||||
>This option specifies the directory where pid
|
||||
files will be placed. </P
|
||||
><P
|
||||
>Default: <B
|
||||
CLASS="COMMAND"
|
||||
>pid directory = ${prefix}/var/locks</B
|
||||
></P
|
||||
><P
|
||||
>Example: <B
|
||||
CLASS="COMMAND"
|
||||
>pid directory = /var/run/</B
|
||||
>
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="POSIXLOCKING"
|
||||
></A
|
||||
>posix locking (S)</DT
|
||||
@ -13789,34 +14081,23 @@ CLASS="COMMAND"
|
||||
manually remove old spool files.</P
|
||||
><P
|
||||
>The print command is simply a text string. It will be used
|
||||
verbatim, with two exceptions: All occurrences of <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>%s
|
||||
</I
|
||||
></TT
|
||||
> and <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>%f</I
|
||||
></TT
|
||||
> will be replaced by the
|
||||
appropriate spool file name, and all occurrences of <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>%p
|
||||
</I
|
||||
></TT
|
||||
> will be replaced by the appropriate printer name. The
|
||||
spool file name is generated automatically by the server. The
|
||||
<TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>%J</I
|
||||
></TT
|
||||
> macro can be used to access the job
|
||||
verbatim after macro substitutions have been made:</P
|
||||
><P
|
||||
>s, %p - the path to the spool
|
||||
file name</P
|
||||
><P
|
||||
>%p - the appropriate printer
|
||||
name</P
|
||||
><P
|
||||
>%J - the job
|
||||
name as transmitted by the client.</P
|
||||
><P
|
||||
>%c - The number of printed pages
|
||||
of the spooled job (if known).</P
|
||||
><P
|
||||
>%z - the size of the spooled
|
||||
print job (in bytes)</P
|
||||
><P
|
||||
>The print command <EM
|
||||
>MUST</EM
|
||||
> contain at least
|
||||
@ -13923,6 +14204,25 @@ CLASS="COMMAND"
|
||||
>print command = lp -d%p -s %s; rm %s</B
|
||||
></P
|
||||
><P
|
||||
>For printing = CUPS : If SAMBA is compiled against
|
||||
libcups, then <A
|
||||
HREF="#PRINTING"
|
||||
>printcap = cups</A
|
||||
>
|
||||
uses the CUPS API to
|
||||
submit jobs, etc. Otherwise it maps to the System V
|
||||
commands with the -oraw option for printing, i.e. it
|
||||
uses <B
|
||||
CLASS="COMMAND"
|
||||
>lp -c -d%p -oraw; rm %s</B
|
||||
>.
|
||||
With <B
|
||||
CLASS="COMMAND"
|
||||
>printing = cups</B
|
||||
>,
|
||||
and if SAMBA is compiled against libcups, any manually
|
||||
set print command will be ignored.</P
|
||||
><P
|
||||
>Example: <B
|
||||
CLASS="COMMAND"
|
||||
>print command = /usr/local/samba/bin/myprintscript
|
||||
@ -14013,6 +14313,23 @@ HREF="#AEN79"
|
||||
> section above for reasons
|
||||
why you might want to do this.</P
|
||||
><P
|
||||
>To use the CUPS printing interface set <B
|
||||
CLASS="COMMAND"
|
||||
>printcap name = cups
|
||||
</B
|
||||
>. This should be supplemented by an addtional setting
|
||||
<A
|
||||
HREF="#PRINTING"
|
||||
>printing = cups</A
|
||||
> in the [global]
|
||||
section. <B
|
||||
CLASS="COMMAND"
|
||||
>printcap name = cups</B
|
||||
> will use the
|
||||
"dummy" printcap created by CUPS, as specified in your CUPS
|
||||
configuration file.
|
||||
</P
|
||||
><P
|
||||
>On System V systems that use <B
|
||||
CLASS="COMMAND"
|
||||
>lpstat</B
|
||||
@ -15854,6 +16171,64 @@ CLASS="COMMAND"
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="SHAREMODES"
|
||||
></A
|
||||
>share modes (S)</DT
|
||||
><DD
|
||||
><P
|
||||
>This enables or disables the honoring of
|
||||
the <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>share modes</I
|
||||
></TT
|
||||
> during a file open. These
|
||||
modes are used by clients to gain exclusive read or write access
|
||||
to a file.</P
|
||||
><P
|
||||
>These open modes are not directly supported by UNIX, so
|
||||
they are simulated using shared memory, or lock files if your
|
||||
UNIX doesn't support shared memory (almost all do).</P
|
||||
><P
|
||||
>The share modes that are enabled by this option are
|
||||
<TT
|
||||
CLASS="CONSTANT"
|
||||
>DENY_DOS</TT
|
||||
>, <TT
|
||||
CLASS="CONSTANT"
|
||||
>DENY_ALL</TT
|
||||
>,
|
||||
<TT
|
||||
CLASS="CONSTANT"
|
||||
>DENY_READ</TT
|
||||
>, <TT
|
||||
CLASS="CONSTANT"
|
||||
>DENY_WRITE</TT
|
||||
>,
|
||||
<TT
|
||||
CLASS="CONSTANT"
|
||||
>DENY_NONE</TT
|
||||
> and <TT
|
||||
CLASS="CONSTANT"
|
||||
>DENY_FCB</TT
|
||||
>.
|
||||
</P
|
||||
><P
|
||||
>This option gives full share compatibility and enabled
|
||||
by default.</P
|
||||
><P
|
||||
>You should <EM
|
||||
>NEVER</EM
|
||||
> turn this parameter
|
||||
off as many Windows applications will break if you do so.</P
|
||||
><P
|
||||
>Default: <B
|
||||
CLASS="COMMAND"
|
||||
>share modes = yes</B
|
||||
></P
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="SHORTPRESERVECASE"
|
||||
></A
|
||||
>short preserve case (S)</DT
|
||||
@ -18258,7 +18633,7 @@ CLASS="COMMAND"
|
||||
><A
|
||||
NAME="WINBINDCACHETIME"
|
||||
></A
|
||||
>winbind cache time</DT
|
||||
>winbind cache time (G)</DT
|
||||
><DD
|
||||
><P
|
||||
>This parameter specifies the number of seconds the
|
||||
@ -18279,8 +18654,7 @@ CLASS="COMMAND"
|
||||
><A
|
||||
NAME="WINBINDENUMUSERS"
|
||||
></A
|
||||
>winbind enum
|
||||
users</DT
|
||||
>winbind enum users (G)</DT
|
||||
><DD
|
||||
><P
|
||||
>On large installations using
|
||||
@ -18331,8 +18705,7 @@ CLASS="COMMAND"
|
||||
><A
|
||||
NAME="WINBINDENUMGROUPS"
|
||||
></A
|
||||
>winbind enum
|
||||
groups</DT
|
||||
>winbind enum groups (G)</DT
|
||||
><DD
|
||||
><P
|
||||
>On large installations using
|
||||
@ -18382,7 +18755,7 @@ CLASS="COMMAND"
|
||||
><A
|
||||
NAME="WINBINDGID"
|
||||
></A
|
||||
>winbind gid</DT
|
||||
>winbind gid (G)</DT
|
||||
><DD
|
||||
><P
|
||||
>The winbind gid parameter specifies the range of group
|
||||
@ -18409,7 +18782,7 @@ CLASS="COMMAND"
|
||||
><A
|
||||
NAME="WINBINDSEPARATOR"
|
||||
></A
|
||||
>winbind separator</DT
|
||||
>winbind separator (G)</DT
|
||||
><DD
|
||||
><P
|
||||
>This parameter allows an admin to define the character
|
||||
@ -18439,21 +18812,21 @@ CLASS="FILENAME"
|
||||
with group membership at least on glibc systems, as the character +
|
||||
is used as a special character for NIS in /etc/group.</P
|
||||
><P
|
||||
>Example: <B
|
||||
>Default: <B
|
||||
CLASS="COMMAND"
|
||||
>winbind separator = \\</B
|
||||
>winbind separator = '\'</B
|
||||
></P
|
||||
><P
|
||||
>Example: <B
|
||||
CLASS="COMMAND"
|
||||
>winbind separator = /</B
|
||||
>winbind separator = +</B
|
||||
></P
|
||||
></DD
|
||||
><DT
|
||||
><A
|
||||
NAME="WINBINDUID"
|
||||
></A
|
||||
>winbind uid</DT
|
||||
>winbind uid (G)</DT
|
||||
><DD
|
||||
><P
|
||||
>The winbind gid parameter specifies the range of group
|
||||
@ -18873,7 +19246,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN5974"
|
||||
NAME="AEN6101"
|
||||
></A
|
||||
><H2
|
||||
>WARNINGS</H2
|
||||
@ -18903,7 +19276,7 @@ TARGET="_top"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN5980"
|
||||
NAME="AEN6107"
|
||||
></A
|
||||
><H2
|
||||
>VERSION</H2
|
||||
@ -18914,7 +19287,7 @@ NAME="AEN5980"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN5983"
|
||||
NAME="AEN6110"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
@ -18993,7 +19366,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN6003"
|
||||
NAME="AEN6130"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
|
@ -673,12 +673,12 @@ CLASS="COMMAND"
|
||||
>-W WORKGROUP</DT
|
||||
><DD
|
||||
><P
|
||||
>Override the default workgroup specified in the
|
||||
workgroup parameter of the <TT
|
||||
>Override the default workgroup (domain) specified
|
||||
in the workgroup parameter of the <TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf</TT
|
||||
> file
|
||||
for this connection. This may be needed to connect to some
|
||||
>
|
||||
file for this connection. This may be needed to connect to some
|
||||
servers. </P
|
||||
></DD
|
||||
><DT
|
||||
@ -1051,6 +1051,42 @@ CLASS="REPLACEABLE"
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>altname file</DT
|
||||
><DD
|
||||
><P
|
||||
>The client will request that the server return
|
||||
the "alternate" name (the 8.3 name) for a file or directory.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>cancel jobid0 [jobid1] ... [jobidN]</DT
|
||||
><DD
|
||||
><P
|
||||
>The client will request that the server cancel
|
||||
the printjobs identified by the given numeric print job ids.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>chmod file mode in octal</DT
|
||||
><DD
|
||||
><P
|
||||
>This command depends on the server supporting the CIFS
|
||||
UNIX extensions and will fail if the server does not. The client requests that the server
|
||||
change the UNIX permissions to the given octal mode, in standard UNIX format.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>chown file uid gid</DT
|
||||
><DD
|
||||
><P
|
||||
>This command depends on the server supporting the CIFS
|
||||
UNIX extensions and will fail if the server does not. The client requests that the server
|
||||
change the UNIX user and group ownership to the given decimal values. Note there is
|
||||
currently no way to remotely look up the UNIX uid and gid values for a given name.
|
||||
This may be addressed in future versions of the CIFS UNIX extensions.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>cd [directory name]</DT
|
||||
><DD
|
||||
><P
|
||||
@ -1139,6 +1175,16 @@ CLASS="REPLACEABLE"
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>link source destination</DT
|
||||
><DD
|
||||
><P
|
||||
>This command depends on the server supporting the CIFS
|
||||
UNIX extensions and will fail if the server does not. The client requests that the server
|
||||
create a hard link between the source and destination files. The source file
|
||||
must not exist.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>lowercase</DT
|
||||
><DD
|
||||
><P
|
||||
@ -1352,6 +1398,31 @@ CLASS="REPLACEABLE"
|
||||
privileges permitting) from the server. </P
|
||||
></DD
|
||||
><DT
|
||||
>setmode <filename> <perm=[+|\-]rsha></DT
|
||||
><DD
|
||||
><P
|
||||
>A version of the DOS attrib command to set
|
||||
file permissions. For example: </P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>setmode myfile +r </B
|
||||
></P
|
||||
><P
|
||||
>would make myfile read only. </P
|
||||
></DD
|
||||
><DT
|
||||
>symlink source destination</DT
|
||||
><DD
|
||||
><P
|
||||
>This command depends on the server supporting the CIFS
|
||||
UNIX extensions and will fail if the server does not. The client requests that the server
|
||||
create a symbolic hard link between the source and destination files. The source file
|
||||
must not exist. Note that the server will not create a link to any path that lies
|
||||
outside the currently connected share. This is enforced by the Samba server.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>tar <c|x>[IXbgNa]</DT
|
||||
><DD
|
||||
><P
|
||||
@ -1391,27 +1462,13 @@ CLASS="REPLACEABLE"
|
||||
tar will reset the archive bit on all files it backs up (implies
|
||||
read/write share). </P
|
||||
></DD
|
||||
><DT
|
||||
>setmode <filename> <perm=[+|\-]rsha></DT
|
||||
><DD
|
||||
><P
|
||||
>A version of the DOS attrib command to set
|
||||
file permissions. For example: </P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>setmode myfile +r </B
|
||||
></P
|
||||
><P
|
||||
>would make myfile read only. </P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN477"
|
||||
NAME="AEN501"
|
||||
></A
|
||||
><H2
|
||||
>NOTES</H2
|
||||
@ -1432,7 +1489,7 @@ NAME="AEN477"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN482"
|
||||
NAME="AEN506"
|
||||
></A
|
||||
><H2
|
||||
>ENVIRONMENT VARIABLES</H2
|
||||
@ -1465,7 +1522,7 @@ CLASS="ENVAR"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN490"
|
||||
NAME="AEN514"
|
||||
></A
|
||||
><H2
|
||||
>INSTALLATION</H2
|
||||
@ -1503,7 +1560,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN500"
|
||||
NAME="AEN524"
|
||||
></A
|
||||
><H2
|
||||
>DIAGNOSTICS</H2
|
||||
@ -1519,7 +1576,7 @@ NAME="AEN500"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN504"
|
||||
NAME="AEN528"
|
||||
></A
|
||||
><H2
|
||||
>VERSION</H2
|
||||
@ -1530,7 +1587,7 @@ NAME="AEN504"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN507"
|
||||
NAME="AEN531"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
|
@ -24,7 +24,7 @@ NAME="AEN5"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
>smbcontrol -- send messages to smbd or nmbd processes</DIV
|
||||
>smbcontrol -- send messages to smbd, nmbd or winbindd processes</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
@ -65,18 +65,23 @@ CLASS="COMMAND"
|
||||
HREF="smbd.8.html"
|
||||
TARGET="_top"
|
||||
>smbd(8)</A
|
||||
> or
|
||||
>,
|
||||
an <A
|
||||
HREF="nmbd.8.html"
|
||||
TARGET="_top"
|
||||
>nmbd(8)</A
|
||||
> daemon running on the
|
||||
system.</P
|
||||
>
|
||||
or a <A
|
||||
HREF="winbindd.8.html"
|
||||
TARGET="_top"
|
||||
>winbindd(8)</A
|
||||
>
|
||||
daemon running on the system.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN25"
|
||||
NAME="AEN26"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
@ -175,8 +180,9 @@ CLASS="CONSTANT"
|
||||
message to smbd which will then close the client connections to
|
||||
the named share. Note that this doesn't affect client connections
|
||||
to any other shares. This message-type takes an argument of the
|
||||
share name for which client connections will be close, or the
|
||||
share name for which client connections will be closed, or the
|
||||
"*" character which will close all currently open shares.
|
||||
This may be useful if you made changes to the access controls on the share.
|
||||
This message can only be sent to <TT
|
||||
CLASS="CONSTANT"
|
||||
>smbd</TT
|
||||
@ -220,7 +226,7 @@ CLASS="CONSTANT"
|
||||
collection, "off" to turn off profile stats collection, "count"
|
||||
to enable only collection of count stats (time stats are
|
||||
disabled), and "flush" to zero the current profile stats. This can
|
||||
be sent to any of the destinations.</P
|
||||
be sent to any smbd or nmbd destinations.</P
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="CONSTANT"
|
||||
@ -236,7 +242,7 @@ CLASS="CONSTANT"
|
||||
> message-type sends
|
||||
a "request profile level" message. The current profile level
|
||||
setting is returned by a "profilelevel" message. This can be sent
|
||||
to any of the destinations.</P
|
||||
to any smbd or nmbd destinations.</P
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="CONSTANT"
|
||||
@ -249,14 +255,6 @@ CLASS="CONSTANT"
|
||||
CLASS="CONSTANT"
|
||||
>smbd</TT
|
||||
>.</P
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="CONSTANT"
|
||||
>close-share</TT
|
||||
> message-type sends a
|
||||
message to smbd which forces smbd to close the share that was
|
||||
specified as an argument. This may be useful if you made changes
|
||||
to the access controls on the share. </P
|
||||
></DD
|
||||
><DT
|
||||
>parameters</DT
|
||||
@ -270,7 +268,7 @@ CLASS="CONSTANT"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN82"
|
||||
NAME="AEN81"
|
||||
></A
|
||||
><H2
|
||||
>VERSION</H2
|
||||
@ -281,7 +279,7 @@ NAME="AEN82"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN85"
|
||||
NAME="AEN84"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
@ -307,7 +305,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN92"
|
||||
NAME="AEN91"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
|
@ -272,7 +272,14 @@ TARGET="_top"
|
||||
CLASS="FILENAME"
|
||||
> smb.conf(5)</TT
|
||||
></A
|
||||
> file.
|
||||
> file. <EM
|
||||
>Beware:</EM
|
||||
>
|
||||
If the directory specified does not exist, <B
|
||||
CLASS="COMMAND"
|
||||
>smbd</B
|
||||
>
|
||||
will log to the default debug log location defined at compile time.
|
||||
</P
|
||||
><P
|
||||
>The default log directory is specified at
|
||||
@ -354,7 +361,7 @@ CLASS="FILENAME"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN120"
|
||||
NAME="AEN122"
|
||||
></A
|
||||
><H2
|
||||
>FILES</H2
|
||||
@ -466,7 +473,7 @@ CLASS="FILENAME"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN156"
|
||||
NAME="AEN158"
|
||||
></A
|
||||
><H2
|
||||
>LIMITATIONS</H2
|
||||
@ -485,7 +492,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN160"
|
||||
NAME="AEN162"
|
||||
></A
|
||||
><H2
|
||||
>ENVIRONMENT VARIABLES</H2
|
||||
@ -516,7 +523,7 @@ CLASS="CONSTANT"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN169"
|
||||
NAME="AEN171"
|
||||
></A
|
||||
><H2
|
||||
>PAM INTERACTION</H2
|
||||
@ -561,7 +568,7 @@ TARGET="_top"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN180"
|
||||
NAME="AEN182"
|
||||
></A
|
||||
><H2
|
||||
>VERSION</H2
|
||||
@ -572,7 +579,7 @@ NAME="AEN180"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN183"
|
||||
NAME="AEN185"
|
||||
></A
|
||||
><H2
|
||||
>DIAGNOSTICS</H2
|
||||
@ -595,7 +602,7 @@ NAME="AEN183"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN188"
|
||||
NAME="AEN190"
|
||||
></A
|
||||
><H2
|
||||
>SIGNALS</H2
|
||||
@ -660,7 +667,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN205"
|
||||
NAME="AEN207"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
@ -726,7 +733,7 @@ TARGET="_top"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN222"
|
||||
NAME="AEN224"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
|
@ -35,7 +35,7 @@ NAME="AEN8"
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>smbumount</B
|
||||
>smbmount</B
|
||||
> {service} {mount-point} [-o options]</P
|
||||
></DIV
|
||||
><DIV
|
||||
|
@ -37,12 +37,12 @@ NAME="AEN8"
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>smbsh</B
|
||||
> </P
|
||||
> [-W workgroup] [-U username] [-P prefix] [-R <name resolve order>] [-d <debug level>] [-l logfile] [-L libdir]</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN11"
|
||||
NAME="AEN18"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
@ -72,6 +72,223 @@ CLASS="COMMAND"
|
||||
>smbsh</B
|
||||
>
|
||||
to work correctly.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN28"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>-W WORKGROUP</DT
|
||||
><DD
|
||||
><P
|
||||
>Override the default workgroup specified in the
|
||||
workgroup parameter of the <TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf</TT
|
||||
> file
|
||||
for this session. This may be needed to connect to some
|
||||
servers. </P
|
||||
></DD
|
||||
><DT
|
||||
>-U username[%pass]</DT
|
||||
><DD
|
||||
><P
|
||||
>Sets the SMB username or username and password.
|
||||
If this option is not specified, the user will be prompted for
|
||||
both the username and the password. If %pass is not specified,
|
||||
the user will be prompted for the password.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-P prefix</DT
|
||||
><DD
|
||||
><P
|
||||
>This option allows
|
||||
the user to set the directory prefix for SMB access. The
|
||||
default value if this option is not specified is
|
||||
<EM
|
||||
>smb</EM
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-R <name resolve order></DT
|
||||
><DD
|
||||
><P
|
||||
>This option is used to determine what naming
|
||||
services and in what order to resolve
|
||||
host names to IP addresses. The option takes a space-separated
|
||||
string of different name resolution options.</P
|
||||
><P
|
||||
>The options are :"lmhosts", "host", "wins" and "bcast".
|
||||
They cause names to be resolved as follows :</P
|
||||
><P
|
||||
></P
|
||||
><UL
|
||||
><LI
|
||||
><P
|
||||
><TT
|
||||
CLASS="CONSTANT"
|
||||
>lmhosts</TT
|
||||
> :
|
||||
Lookup an IP address in the Samba lmhosts file. If the
|
||||
line in lmhosts has no name type attached to the
|
||||
NetBIOS name
|
||||
(see the <A
|
||||
HREF="lmhosts.5.html"
|
||||
TARGET="_top"
|
||||
>lmhosts(5)</A
|
||||
>
|
||||
for details) then any name type matches for lookup.
|
||||
</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
><TT
|
||||
CLASS="CONSTANT"
|
||||
>host</TT
|
||||
> :
|
||||
Do a standard host name to IP address resolution, using
|
||||
the system <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/hosts</TT
|
||||
>, NIS, or DNS
|
||||
lookups. This method of name resolution is operating
|
||||
system dependent, for instance on IRIX or Solaris this
|
||||
may be controlled by the <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/nsswitch.conf
|
||||
</TT
|
||||
> file). Note that this method is only used
|
||||
if the NetBIOS name type being queried is the 0x20
|
||||
(server) name type, otherwise it is ignored.
|
||||
</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
><TT
|
||||
CLASS="CONSTANT"
|
||||
>wins</TT
|
||||
> :
|
||||
Query a name with the IP address listed in the
|
||||
<TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>wins server</I
|
||||
></TT
|
||||
> parameter. If no
|
||||
WINS server has been specified this method will be
|
||||
ignored.
|
||||
</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
><TT
|
||||
CLASS="CONSTANT"
|
||||
>bcast</TT
|
||||
> :
|
||||
Do a broadcast on each of the known local interfaces
|
||||
listed in the <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>interfaces</I
|
||||
></TT
|
||||
>
|
||||
parameter. This is the least reliable of the name
|
||||
resolution methods as it depends on the target host
|
||||
being on a locally connected subnet.
|
||||
</P
|
||||
></LI
|
||||
></UL
|
||||
><P
|
||||
>If this parameter is not set then the name resolve order
|
||||
defined in the <TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf</TT
|
||||
> file parameter
|
||||
(name resolve order) will be used. </P
|
||||
><P
|
||||
>The default order is lmhosts, host, wins, bcast. Without
|
||||
this parameter or any entry in the <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>name resolve order
|
||||
</I
|
||||
></TT
|
||||
> parameter of the <TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf</TT
|
||||
>
|
||||
file, the name resolution methods will be attempted in this
|
||||
order. </P
|
||||
></DD
|
||||
><DT
|
||||
>-d <debug level></DT
|
||||
><DD
|
||||
><P
|
||||
>debug level is an integer from 0 to 10.</P
|
||||
><P
|
||||
>The default value if this parameter is not specified
|
||||
is zero.</P
|
||||
><P
|
||||
>The higher this value, the more detail will be logged
|
||||
about the activities of <B
|
||||
CLASS="COMMAND"
|
||||
>nmblookup</B
|
||||
>. At level
|
||||
0, only critical errors and serious warnings will be logged.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-l logfilename</DT
|
||||
><DD
|
||||
><P
|
||||
>If specified causes all debug messages to be
|
||||
written to the file specified by <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>logfilename
|
||||
</I
|
||||
></TT
|
||||
>. If not specified then all messages will be
|
||||
written to<TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>stderr</I
|
||||
></TT
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-L libdir</DT
|
||||
><DD
|
||||
><P
|
||||
>This parameter specifies the location of the
|
||||
shared libraries used by <B
|
||||
CLASS="COMMAND"
|
||||
>smbsh</B
|
||||
>. The default
|
||||
value is specified at compile time.
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN91"
|
||||
></A
|
||||
><H2
|
||||
>EXAMPLES</H2
|
||||
><P
|
||||
>To use the <B
|
||||
CLASS="COMMAND"
|
||||
@ -158,7 +375,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN40"
|
||||
NAME="AEN112"
|
||||
></A
|
||||
><H2
|
||||
>VERSION</H2
|
||||
@ -169,7 +386,7 @@ NAME="AEN40"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN43"
|
||||
NAME="AEN115"
|
||||
></A
|
||||
><H2
|
||||
>BUGS</H2
|
||||
@ -202,7 +419,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN52"
|
||||
NAME="AEN124"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
@ -225,7 +442,7 @@ TARGET="_top"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN58"
|
||||
NAME="AEN130"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
|
@ -36,12 +36,12 @@ NAME="AEN8"
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>wbinfo</B
|
||||
> [-u] [-g] [-n name] [-s sid] [-U uid] [-G gid] [-S sid] [-Y sid] [-t] [-m] [-a user%password] [-p]</P
|
||||
> [-u] [-g] [-h name] [-i ip] [-n name] [-s sid] [-U uid] [-G gid] [-S sid] [-Y sid] [-t] [-m] [-r user] [-a user%password] [-A user%password]</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN23"
|
||||
NAME="AEN26"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
@ -78,7 +78,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN34"
|
||||
NAME="AEN37"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
@ -122,6 +122,52 @@ CLASS="COMMAND"
|
||||
>. </P
|
||||
></DD
|
||||
><DT
|
||||
>-h name</DT
|
||||
><DD
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>-h</I
|
||||
></TT
|
||||
> option
|
||||
queries <B
|
||||
CLASS="COMMAND"
|
||||
>winbindd(8)</B
|
||||
> to query the WINS
|
||||
server for the IP address associated with the NetBIOS name
|
||||
specified by the <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>name</I
|
||||
></TT
|
||||
> parameter.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-i ip</DT
|
||||
><DD
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>-i</I
|
||||
></TT
|
||||
> option
|
||||
queries <B
|
||||
CLASS="COMMAND"
|
||||
>winbindd(8)</B
|
||||
> to send a node status
|
||||
request to get the NetBIOS name associated with the IP address
|
||||
specified by the <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>ip</I
|
||||
></TT
|
||||
> parameter.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-n name</DT
|
||||
><DD
|
||||
><P
|
||||
@ -228,6 +274,15 @@ CLASS="COMMAND"
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-r username</DT
|
||||
><DD
|
||||
><P
|
||||
>Try to obtain the list of UNIX group ids
|
||||
to which the user belongs. This only works for users
|
||||
defined on a Domain Controller.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-a username%password</DT
|
||||
><DD
|
||||
><P
|
||||
@ -236,11 +291,14 @@ CLASS="COMMAND"
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-p</DT
|
||||
>-A username%password</DT
|
||||
><DD
|
||||
><P
|
||||
>Attempt a simple 'ping' check that the winbindd
|
||||
is indeed alive.
|
||||
>Store username and password used by winbindd
|
||||
during session setup to a domain controller. This enables
|
||||
winbindd to operate in a Windows 2000 domain with Restrict
|
||||
Anonymous turned on (a.k.a. Permissions compatiable with
|
||||
Windows 2000 servers only).
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
@ -249,7 +307,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN98"
|
||||
NAME="AEN119"
|
||||
></A
|
||||
><H2
|
||||
>EXIT STATUS</H2
|
||||
@ -268,7 +326,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN103"
|
||||
NAME="AEN124"
|
||||
></A
|
||||
><H2
|
||||
>VERSION</H2
|
||||
@ -279,7 +337,7 @@ NAME="AEN103"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN106"
|
||||
NAME="AEN127"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
@ -297,7 +355,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN111"
|
||||
NAME="AEN132"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
|
@ -109,6 +109,22 @@ CLASS="FILENAME"
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>hosts</DT
|
||||
><DD
|
||||
><P
|
||||
>User information traditionally stored in
|
||||
the <TT
|
||||
CLASS="FILENAME"
|
||||
>hosts(5)</TT
|
||||
> file and used by
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>gethostbyname(3)</B
|
||||
> functions. Names are
|
||||
resolved through the WINS server or by broadcast.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>passwd</DT
|
||||
><DD
|
||||
><P
|
||||
@ -169,11 +185,22 @@ group: files winbind
|
||||
></TR
|
||||
></TABLE
|
||||
></P
|
||||
><P
|
||||
>The following simple configuration in the
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/nsswitch.conf</TT
|
||||
> file can be used to initially
|
||||
resolve hostnames from <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/hosts</TT
|
||||
> and then from the
|
||||
WINS server.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN48"
|
||||
NAME="AEN57"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
@ -212,7 +239,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN61"
|
||||
NAME="AEN70"
|
||||
></A
|
||||
><H2
|
||||
>NAME AND ID RESOLUTION</H2
|
||||
@ -243,7 +270,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN67"
|
||||
NAME="AEN76"
|
||||
></A
|
||||
><H2
|
||||
>CONFIGURATION</H2
|
||||
@ -532,7 +559,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN158"
|
||||
NAME="AEN167"
|
||||
></A
|
||||
><H2
|
||||
>EXAMPLE SETUP</H2
|
||||
@ -710,7 +737,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN197"
|
||||
NAME="AEN206"
|
||||
></A
|
||||
><H2
|
||||
>NOTES</H2
|
||||
@ -768,7 +795,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN213"
|
||||
NAME="AEN222"
|
||||
></A
|
||||
><H2
|
||||
>SIGNALS</H2
|
||||
@ -819,7 +846,7 @@ CLASS="COMMAND"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN230"
|
||||
NAME="AEN239"
|
||||
></A
|
||||
><H2
|
||||
>FILES</H2
|
||||
@ -895,7 +922,7 @@ CLASS="FILENAME"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN259"
|
||||
NAME="AEN268"
|
||||
></A
|
||||
><H2
|
||||
>VERSION</H2
|
||||
@ -906,7 +933,7 @@ NAME="AEN259"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN262"
|
||||
NAME="AEN271"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
@ -934,7 +961,7 @@ TARGET="_top"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN269"
|
||||
NAME="AEN278"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
|
@ -3,7 +3,7 @@
|
||||
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
|
||||
.\" Please send any bug reports, improvements, comments, patches,
|
||||
.\" etc. to Steve Cheng <steve@ggi-project.org>.
|
||||
.TH "NMBD" "8" "28 January 2002" "" ""
|
||||
.TH "NMBD" "8" "08 May 2002" "" ""
|
||||
.SH NAME
|
||||
nmbd \- NetBIOS name server to provide NetBIOS over IP naming services to clients
|
||||
.SH SYNOPSIS
|
||||
@ -126,11 +126,11 @@ parameter in the \fI smb.conf\fRfile.
|
||||
The -l parameter specifies a directory
|
||||
into which the "log.nmbd" log file will be created
|
||||
for operational data from the running
|
||||
\fBnmbd\fR server.
|
||||
|
||||
The default log directory is compiled into Samba
|
||||
\fBnmbd\fR server. The default log directory is compiled into Samba
|
||||
as part of the build process. Common defaults are \fI /usr/local/samba/var/log.nmb\fR, \fI /usr/samba/var/log.nmb\fR or
|
||||
\fI/var/log/log.nmb\fR.
|
||||
\fI/var/log/log.nmb\fR. \fBBeware:\fR
|
||||
If the directory specified does not exist, \fBnmbd\fR
|
||||
will log to the default debug log location defined at compile time.
|
||||
.TP
|
||||
\fB-n <primary NetBIOS name>\fR
|
||||
This option allows you to override
|
||||
@ -142,58 +142,57 @@ line setting will take precedence over settings in
|
||||
.TP
|
||||
\fB-p <UDP port number>\fR
|
||||
UDP port number is a positive integer value.
|
||||
This option changes the default UDP port number (normally 137)
|
||||
that \fBnmbd\fR responds to name queries on. Don't
|
||||
use this option unless you are an expert, in which case you
|
||||
This option changes the default UDP port number (normally 137)
|
||||
that \fBnmbd\fR responds to name queries on. Don't
|
||||
use this option unless you are an expert, in which case you
|
||||
won't need help!
|
||||
.TP
|
||||
\fB-s <configuration file>\fR
|
||||
The default configuration file name
|
||||
The default configuration file name
|
||||
is set at build time, typically as \fI /usr/local/samba/lib/smb.conf\fR, but
|
||||
this may be changed when Samba is autoconfigured.
|
||||
|
||||
The file specified contains the configuration details
|
||||
required by the server. See
|
||||
\fIsmb.conf(5)\fRfor more information.
|
||||
The file specified contains the configuration details
|
||||
required by the server. See \fIsmb.conf(5)\fRfor more information.
|
||||
.SH "FILES"
|
||||
.TP
|
||||
\fB\fI/etc/inetd.conf\fB\fR
|
||||
If the server is to be run by the
|
||||
\fBinetd\fR meta-daemon, this file
|
||||
must contain suitable startup information for the
|
||||
If the server is to be run by the
|
||||
\fBinetd\fR meta-daemon, this file
|
||||
must contain suitable startup information for the
|
||||
meta-daemon. See the UNIX_INSTALL.htmldocument
|
||||
for details.
|
||||
.TP
|
||||
\fB\fI/etc/rc\fB\fR
|
||||
or whatever initialization script your
|
||||
or whatever initialization script your
|
||||
system uses).
|
||||
|
||||
If running the server as a daemon at startup,
|
||||
this file will need to contain an appropriate startup
|
||||
If running the server as a daemon at startup,
|
||||
this file will need to contain an appropriate startup
|
||||
sequence for the server. See the UNIX_INSTALL.htmldocument
|
||||
for details.
|
||||
.TP
|
||||
\fB\fI/etc/services\fB\fR
|
||||
If running the server via the
|
||||
meta-daemon \fBinetd\fR, this file
|
||||
must contain a mapping of service name (e.g., netbios-ssn)
|
||||
to service port (e.g., 139) and protocol type (e.g., tcp).
|
||||
If running the server via the
|
||||
meta-daemon \fBinetd\fR, this file
|
||||
must contain a mapping of service name (e.g., netbios-ssn)
|
||||
to service port (e.g., 139) and protocol type (e.g., tcp).
|
||||
See the UNIX_INSTALL.html
|
||||
document for details.
|
||||
.TP
|
||||
\fB\fI/usr/local/samba/lib/smb.conf\fB\fR
|
||||
This is the default location of the
|
||||
This is the default location of the
|
||||
\fIsmb.conf\fR
|
||||
server configuration file. Other common places that systems
|
||||
install this file are \fI/usr/samba/lib/smb.conf\fR
|
||||
server configuration file. Other common places that systems
|
||||
install this file are \fI/usr/samba/lib/smb.conf\fR
|
||||
and \fI/etc/smb.conf\fR.
|
||||
|
||||
When run as a WINS server (see the
|
||||
When run as a WINS server (see the
|
||||
wins support
|
||||
parameter in the \fIsmb.conf(5)\fR man page),
|
||||
\fBnmbd\fR
|
||||
will store the WINS database in the file \fIwins.dat\fR
|
||||
in the \fIvar/locks\fR directory configured under
|
||||
will store the WINS database in the file \fIwins.dat\fR
|
||||
in the \fIvar/locks\fR directory configured under
|
||||
wherever Samba was configured to install itself.
|
||||
|
||||
If \fBnmbd\fR is acting as a \fB browse master\fR (see the local master
|
||||
@ -204,17 +203,17 @@ will store the browsing database in the file \fIbrowse.dat
|
||||
configured under wherever Samba was configured to install itself.
|
||||
.SH "SIGNALS"
|
||||
.PP
|
||||
To shut down an \fBnmbd\fR process it is recommended
|
||||
that SIGKILL (-9) \fBNOT\fR be used, except as a last
|
||||
resort, as this may leave the name database in an inconsistent state.
|
||||
The correct way to terminate \fBnmbd\fR is to send it
|
||||
To shut down an \fBnmbd\fR process it is recommended
|
||||
that SIGKILL (-9) \fBNOT\fR be used, except as a last
|
||||
resort, as this may leave the name database in an inconsistent state.
|
||||
The correct way to terminate \fBnmbd\fR is to send it
|
||||
a SIGTERM (-15) signal and wait for it to die on its own.
|
||||
.PP
|
||||
\fBnmbd\fR will accept SIGHUP, which will cause
|
||||
\fBnmbd\fR will accept SIGHUP, which will cause
|
||||
it to dump out its namelists into the file \fInamelist.debug
|
||||
\fRin the \fI/usr/local/samba/var/locks\fR
|
||||
directory (or the \fIvar/locks\fR directory configured
|
||||
under wherever Samba was configured to install itself). This will also
|
||||
\fRin the \fI/usr/local/samba/var/locks\fR
|
||||
directory (or the \fIvar/locks\fR directory configured
|
||||
under wherever Samba was configured to install itself). This will also
|
||||
cause \fBnmbd\fR to dump out its server database in
|
||||
the \fIlog.nmb\fR file.
|
||||
.PP
|
||||
|
@ -3,12 +3,12 @@
|
||||
.\" <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 January 2002" "" ""
|
||||
.TH "PDBEDIT" "8" "24 April 2002" "" ""
|
||||
.SH NAME
|
||||
pdbedit \- manage the SAM database
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBpdbedit\fR [ \fB-l\fR ] [ \fB-v\fR ] [ \fB-w\fR ] [ \fB-u username\fR ] [ \fB-f fullname\fR ] [ \fB-h homedir\fR ] [ \fB-d drive\fR ] [ \fB-s script\fR ] [ \fB-p profile\fR ] [ \fB-a\fR ] [ \fB-m\fR ] [ \fB-x\fR ] [ \fB-i file\fR ]
|
||||
\fBpdbedit\fR [ \fB-l\fR ] [ \fB-v\fR ] [ \fB-w\fR ] [ \fB-u username\fR ] [ \fB-f fullname\fR ] [ \fB-h homedir\fR ] [ \fB-d drive\fR ] [ \fB-s script\fR ] [ \fB-p profile\fR ] [ \fB-a\fR ] [ \fB-m\fR ] [ \fB-x\fR ] [ \fB-i passdb-backend\fR ] [ \fB-e passdb-backend\fR ] [ \fB-D debuglevel\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
This tool is part of the Sambasuite.
|
||||
@ -160,15 +160,19 @@ from the database. It need the username be specified with the
|
||||
|
||||
Example: \fBpdbedit -x -u bob\fR
|
||||
.TP
|
||||
\fB-i file\fR
|
||||
This command is used to import a smbpasswd
|
||||
file into the database.
|
||||
\fB-i passdb-backend\fR
|
||||
Use a different passdb backend to retrieve users than the one specified in smb.conf.
|
||||
|
||||
This option will ease migration from the plain smbpasswd
|
||||
file database to more powerful backend databases like tdb and
|
||||
ldap.
|
||||
This option will ease migration from one passdb backend to another.
|
||||
|
||||
Example: \fBpdbedit -i /etc/smbpasswd.old\fR
|
||||
Example: \fBpdbedit -i smbpasswd:/etc/smbpasswd.old -e tdbsam:/etc/samba/passwd.tdb\fR
|
||||
.TP
|
||||
\fB-e passdb-backend\fR
|
||||
Export all currently available users to the specified password database backend.
|
||||
|
||||
This option will ease migration from one passdb backend to another and will ease backupping
|
||||
|
||||
Example: \fBpdbedit -e smbpasswd:/root/samba-users.backup\fR
|
||||
.SH "NOTES"
|
||||
.PP
|
||||
This command may be used only by root.
|
||||
|
@ -3,7 +3,7 @@
|
||||
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
|
||||
.\" Please send any bug reports, improvements, comments, patches,
|
||||
.\" etc. to Steve Cheng <steve@ggi-project.org>.
|
||||
.TH "SMB.CONF" "5" "16 April 2002" "" ""
|
||||
.TH "SMB.CONF" "5" "08 May 2002" "" ""
|
||||
.SH NAME
|
||||
smb.conf \- The configuration file for the Samba suite
|
||||
.SH "SYNOPSIS"
|
||||
@ -30,7 +30,7 @@ line represents either a comment, a section name or a parameter.
|
||||
Section and parameter names are not case sensitive.
|
||||
.PP
|
||||
Only the first equals sign in a parameter is significant.
|
||||
Whitespace before or after the first equals sign is discarded.
|
||||
Whitespace before or after the first equals sign is discarded.
|
||||
Leading, trailing and internal whitespace in section and parameter
|
||||
names is irrelevant. Leading and trailing whitespace in a parameter
|
||||
value is discarded. Internal whitespace within a parameter value
|
||||
@ -70,7 +70,7 @@ client as an extension of their native file systems) or
|
||||
printable services (used by the client to access print services
|
||||
on the host running the server).
|
||||
.PP
|
||||
Sections may be designated \fBguest\fR services,
|
||||
Sections may be designated \fBguest\fR services,
|
||||
in which case no password is required to access them. A specified
|
||||
UNIX \fBguest account\fR is used to define access
|
||||
privileges in this case.
|
||||
@ -384,7 +384,7 @@ protocol negotiation. It can be one of CORE, COREPLUS,
|
||||
LANMAN1, LANMAN2 or NT1.
|
||||
.TP
|
||||
\fB%d\fR
|
||||
The process id of the current server
|
||||
The process id of the current server
|
||||
process.
|
||||
.TP
|
||||
\fB%a\fR
|
||||
@ -445,7 +445,7 @@ case that the client passes, or if they are forced to be the
|
||||
"default" case. Default \fByes\fR.
|
||||
.TP
|
||||
\fBshort preserve case = yes/no\fR
|
||||
controls if new files which conform to 8.3 syntax,
|
||||
controls if new files which conform to 8.3 syntax,
|
||||
that is all in upper case and of suitable length, are created
|
||||
upper case, or if they are forced to be the "default"
|
||||
case. This option can be use with "preserve case = yes"
|
||||
@ -463,8 +463,9 @@ if it will allow a connection to a specified service. If all the
|
||||
steps fail, then the connection request is rejected. However, if one of the
|
||||
steps succeeds, then the following steps are not checked.
|
||||
.PP
|
||||
If the service is marked "guest only = yes" then
|
||||
steps 1 to 5 are skipped.
|
||||
If the service is marked "guest only = yes" and the
|
||||
server is running with share-level security ("security = share")
|
||||
then steps 1 to 5 are skipped.
|
||||
.IP 1.
|
||||
If the client has passed a username/password
|
||||
pair and that username/password pair is validated by the UNIX
|
||||
@ -521,6 +522,9 @@ each parameter for details. Note that some are synonyms.
|
||||
\fIadd machine script\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIalgorithmic rid base\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIallow trusted domains\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
@ -683,6 +687,15 @@ each parameter for details. Note that some are synonyms.
|
||||
\fIlock directory\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIlock spin count\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIlock spin time\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIpid directory\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIlog file\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
@ -776,6 +789,9 @@ each parameter for details. Note that some are synonyms.
|
||||
\fInt pipe support\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fInt status support\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fInull passwords\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
@ -1080,6 +1096,9 @@ each parameter for details. Note that some are synonyms.
|
||||
\fIcreate mode\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIcsc policy\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIdefault case\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
@ -1179,6 +1198,9 @@ each parameter for details. Note that some are synonyms.
|
||||
\fIinclude\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIinherit acls\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIinherit permissions\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
@ -1335,6 +1357,9 @@ each parameter for details. Note that some are synonyms.
|
||||
\fIset directory\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIshare modes\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIshort preserve case\fR
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
@ -1597,6 +1622,25 @@ Example: \fBadmin users = jason\fR
|
||||
\fBallow hosts (S)\fR
|
||||
Synonym for \fIhosts allow\fR.
|
||||
.TP
|
||||
\fBalgorithmic rid base (G)\fR
|
||||
This determines how Samba will use its
|
||||
algorithmic mapping from uids/gid to the RIDs needed to construct
|
||||
NT Security Identifiers.
|
||||
|
||||
Setting this option to a larger value could be useful to sites
|
||||
transitioning from WinNT and Win2k, as existing user and
|
||||
group rids would otherwise clash with sytem users etc.
|
||||
|
||||
All UIDs and GIDs must be able to be resolved into SIDs for
|
||||
the correct operation of ACLs on the server. As such the algorithmic
|
||||
mapping can't be 'turned off', but pushing it 'out of the way' should
|
||||
resolve the issues. Users and groups can then be assigned 'low' RIDs
|
||||
in arbitary-rid supporting backends.
|
||||
|
||||
Default: \fBalgorithmic rid base = 1000\fR
|
||||
|
||||
Example: \fBalgorithmic rid base = 100000\fR
|
||||
.TP
|
||||
\fBallow trusted domains (G)\fR
|
||||
This option only takes effect when the \fIsecurity\fR option is set to
|
||||
server or domain.
|
||||
@ -1913,6 +1957,23 @@ Example: \fBcreate mask = 0775\fR
|
||||
\fBcreate mode (S)\fR
|
||||
This is a synonym for \fI create mask\fR.
|
||||
.TP
|
||||
\fBcsc policy (S)\fR
|
||||
This stands for \fBclient-side caching
|
||||
policy\fR, and specifies how clients capable of offline
|
||||
caching will cache the files in the share. The valid values
|
||||
are: manual, documents, programs, disable.
|
||||
|
||||
These values correspond to those used on Windows
|
||||
servers.
|
||||
|
||||
For example, shares containing roaming profiles can have
|
||||
offline caching disabled using \fBcsc policy = disable
|
||||
\fR\&.
|
||||
|
||||
Default: \fBcsc policy = manual\fR
|
||||
|
||||
Example: \fBcsc policy = programs\fR
|
||||
.TP
|
||||
\fBdeadtime (G)\fR
|
||||
The value of the parameter (a decimal integer)
|
||||
represents the number of minutes of inactivity before a connection
|
||||
@ -3054,6 +3115,17 @@ Default: \fBno file included\fR
|
||||
|
||||
Example: \fBinclude = /usr/local/samba/lib/admin_smb.conf
|
||||
\fR.TP
|
||||
\fBinherit acls (S)\fR
|
||||
This parameter can be used to ensure
|
||||
that if default acls exist on parent directories,
|
||||
they are always honored when creating a subdirectory.
|
||||
The default behavior is to use the mode specified
|
||||
when creating the directory. Enabling this option
|
||||
sets the mode to 0777, thus guaranteeing that
|
||||
default directory acls are propagated.
|
||||
|
||||
Default: \fBinherit acls = no\fR
|
||||
.TP
|
||||
\fBinherit permissions (S)\fR
|
||||
The permissions on new files and directories
|
||||
are normally governed by \fI create mask\fR, \fIdirectory mask\fR, \fIforce create mode\fR
|
||||
@ -3421,6 +3493,26 @@ Default: \fBlock directory = ${prefix}/var/locks\fR
|
||||
|
||||
Example: \fBlock directory = /var/run/samba/locks\fR
|
||||
.TP
|
||||
\fBlock spin count (G)\fR
|
||||
This parameter controls the number of times
|
||||
that smbd should attempt to gain a byte range lock on the
|
||||
behalf of a client request. Experiments have shown that
|
||||
Windows 2k servers do not reply with a failure if the lock
|
||||
could not be immediately granted, but try a few more times
|
||||
in case the lock could later be aquired. This behavior
|
||||
is used to support PC database formats such as MS Access
|
||||
and FoxPro.
|
||||
|
||||
Default: \fBlock spin count = 2\fR
|
||||
.TP
|
||||
\fBlock spin time (G)\fR
|
||||
The time in microseconds that smbd should
|
||||
pause before attempting to gain a failed lock. See
|
||||
\fIlock spin
|
||||
count\fR for more details.
|
||||
|
||||
Default: \fBlock spin time = 10\fR
|
||||
.TP
|
||||
\fBlocking (S)\fR
|
||||
This controls whether or not locking will be
|
||||
performed by the server in response to lock requests from the
|
||||
@ -3664,8 +3756,8 @@ This command should be a program or script which
|
||||
takes a printer name as its only parameter and outputs printer
|
||||
status information.
|
||||
|
||||
Currently eight styles of printer status information
|
||||
are supported; BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX and SOFTQ.
|
||||
Currently nine styles of printer status information
|
||||
are supported; BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX, CUPS, and SOFTQ.
|
||||
This covers most UNIX systems. You control which type is expected
|
||||
using the \fIprinting =\fR option.
|
||||
|
||||
@ -3681,7 +3773,10 @@ command.
|
||||
|
||||
Note that it is good practice to include the absolute path
|
||||
in the \fIlpq command\fR as the \fB$PATH
|
||||
\fRmay not be available to the server.
|
||||
\fRmay not be available to the server. When compiled with
|
||||
the CUPS libraries, no \fIlpq command\fR is
|
||||
needed because smbd will make a library call to obtain the
|
||||
print queue listing.
|
||||
|
||||
See also the \fIprinting
|
||||
\fRparameter.
|
||||
@ -4469,6 +4564,18 @@ alone.
|
||||
|
||||
Default: \fBnt pipe support = yes\fR
|
||||
.TP
|
||||
\fBnt status support (G)\fR
|
||||
This boolean parameter controls whether smbd(8)will negotiate NT specific status
|
||||
support with Windows NT/2k/XP clients. This is a developer
|
||||
debugging option and should be left alone.
|
||||
If this option is set to no then Samba offers
|
||||
exactly the same DOS error codes that versions prior to Samba 2.2.3
|
||||
reported.
|
||||
|
||||
You should not need to ever disable this parameter.
|
||||
|
||||
Default: \fBnt status support = yes\fR
|
||||
.TP
|
||||
\fBnull passwords (G)\fR
|
||||
Allow or disallow client access to accounts
|
||||
that have null passwords.
|
||||
@ -4629,10 +4736,10 @@ Default: \fBpanic action = <empty string>\fR
|
||||
Example: \fBpanic action = "/bin/sleep 90000"\fR
|
||||
.TP
|
||||
\fBpassdb backend (G)\fR
|
||||
This option allows the administrator to chose what
|
||||
backend in which to store passwords. This allows (for example) both
|
||||
smbpasswd and tdbsam to be used without a recompile. Only one can
|
||||
be used at a time however, and experimental backends must still be selected
|
||||
This option allows the administrator to chose which backends to retrieve and store passwords with. This allows (for example) both
|
||||
smbpasswd and tdbsam to be used without a recompile.
|
||||
Multiple backends can be specified, seperated by spaces. The backends will be searched in the order they are specified. New users are always added to the first backend specified.
|
||||
Experimental backends must still be selected
|
||||
(eg --with-tdbsam) at configure time.
|
||||
|
||||
This paramater is in two parts, the backend's name, and a 'location'
|
||||
@ -4688,11 +4795,11 @@ for its own processing
|
||||
|
||||
Default: \fBpassdb backend = smbpasswd\fR
|
||||
|
||||
Example: \fBpassdb backend = tdbsam:/etc/samba/private/passdb.tdb\fR
|
||||
Example: \fBpassdb backend = tdbsam:/etc/samba/private/passdb.tdb smbpasswd:/etc/samba/smbpasswd\fR
|
||||
|
||||
Example: \fBpassdb backend = ldapsam_nua:ldaps://ldap.example.com\fR
|
||||
|
||||
Example: \fBpassdb backend = plugin:/usr/local/samba/lib/my_passdb.so:my_plugin_args\fR
|
||||
Example: \fBpassdb backend = plugin:/usr/local/samba/lib/my_passdb.so:my_plugin_args tdbsam:/etc/samba/private/passdb.tdb\fR
|
||||
.TP
|
||||
\fBpasswd chat (G)\fR
|
||||
This string controls the \fB"chat"\fR
|
||||
@ -4948,6 +5055,14 @@ Default: \fBnone\fR
|
||||
|
||||
Example: \fBpath = /home/fred\fR
|
||||
.TP
|
||||
\fBpid directory (G)\fR
|
||||
This option specifies the directory where pid
|
||||
files will be placed.
|
||||
|
||||
Default: \fBpid directory = ${prefix}/var/locks\fR
|
||||
|
||||
Example: \fBpid directory = /var/run/\fR
|
||||
.TP
|
||||
\fBposix locking (S)\fR
|
||||
The \fBsmbd(8)\fR
|
||||
daemon maintains an database of file locks obtained by SMB clients.
|
||||
@ -5077,14 +5192,23 @@ spool file when it has been processed, otherwise you will need to
|
||||
manually remove old spool files.
|
||||
|
||||
The print command is simply a text string. It will be used
|
||||
verbatim, with two exceptions: All occurrences of \fI%s
|
||||
\fRand \fI%f\fR will be replaced by the
|
||||
appropriate spool file name, and all occurrences of \fI%p
|
||||
\fRwill be replaced by the appropriate printer name. The
|
||||
spool file name is generated automatically by the server. The
|
||||
\fI%J\fR macro can be used to access the job
|
||||
verbatim after macro substitutions have been made:
|
||||
|
||||
s, %p - the path to the spool
|
||||
file name
|
||||
|
||||
%p - the appropriate printer
|
||||
name
|
||||
|
||||
%J - the job
|
||||
name as transmitted by the client.
|
||||
|
||||
%c - The number of printed pages
|
||||
of the spooled job (if known).
|
||||
|
||||
%z - the size of the spooled
|
||||
print job (in bytes)
|
||||
|
||||
The print command \fBMUST\fR contain at least
|
||||
one occurrence of \fI%s\fR or \fI%f
|
||||
\fR- the \fI%p\fR is optional. At the time
|
||||
@ -5129,6 +5253,16 @@ For \fBprinting = SOFTQ :\fR
|
||||
|
||||
\fBprint command = lp -d%p -s %s; rm %s\fR
|
||||
|
||||
For printing = CUPS : If SAMBA is compiled against
|
||||
libcups, then printcap = cups
|
||||
uses the CUPS API to
|
||||
submit jobs, etc. Otherwise it maps to the System V
|
||||
commands with the -oraw option for printing, i.e. it
|
||||
uses \fBlp -c -d%p -oraw; rm %s\fR.
|
||||
With \fBprinting = cups\fR,
|
||||
and if SAMBA is compiled against libcups, any manually
|
||||
set print command will be ignored.
|
||||
|
||||
Example: \fBprint command = /usr/local/samba/bin/myprintscript
|
||||
%p %s\fR
|
||||
.TP
|
||||
@ -5156,6 +5290,13 @@ This parameter may be used to override the
|
||||
compiled-in default printcap name used by the server (usually \fI /etc/printcap\fR). See the discussion of the [printers] section above for reasons
|
||||
why you might want to do this.
|
||||
|
||||
To use the CUPS printing interface set \fBprintcap name = cups
|
||||
\fR\&. This should be supplemented by an addtional setting
|
||||
printing = cups in the [global]
|
||||
section. \fBprintcap name = cups\fR will use the
|
||||
"dummy" printcap created by CUPS, as specified in your CUPS
|
||||
configuration file.
|
||||
|
||||
On System V systems that use \fBlpstat\fR to
|
||||
list available printers you can use \fBprintcap name = lpstat
|
||||
\fRto automatically obtain lists of available printers. This
|
||||
@ -5886,6 +6027,29 @@ for details.
|
||||
|
||||
Default: \fBset directory = no\fR
|
||||
.TP
|
||||
\fBshare modes (S)\fR
|
||||
This enables or disables the honoring of
|
||||
the \fIshare modes\fR during a file open. These
|
||||
modes are used by clients to gain exclusive read or write access
|
||||
to a file.
|
||||
|
||||
These open modes are not directly supported by UNIX, so
|
||||
they are simulated using shared memory, or lock files if your
|
||||
UNIX doesn't support shared memory (almost all do).
|
||||
|
||||
The share modes that are enabled by this option are
|
||||
DENY_DOS, DENY_ALL,
|
||||
DENY_READ, DENY_WRITE,
|
||||
DENY_NONE and DENY_FCB.
|
||||
|
||||
This option gives full share compatibility and enabled
|
||||
by default.
|
||||
|
||||
You should \fBNEVER\fR turn this parameter
|
||||
off as many Windows applications will break if you do so.
|
||||
|
||||
Default: \fBshare modes = yes\fR
|
||||
.TP
|
||||
\fBshort preserve case (S)\fR
|
||||
This boolean parameter controls if new files
|
||||
which conform to 8.3 syntax, that is all in upper case and of
|
||||
@ -6956,7 +7120,7 @@ that Samba has to do in order to perform the link checks.
|
||||
|
||||
Default: \fBwide links = yes\fR
|
||||
.TP
|
||||
\fBwinbind cache time\fR
|
||||
\fBwinbind cache time (G)\fR
|
||||
This parameter specifies the number of seconds the
|
||||
winbindd(8)daemon will cache
|
||||
user and group information before querying a Windows NT server
|
||||
@ -6964,7 +7128,7 @@ again.
|
||||
|
||||
Default: \fBwinbind cache type = 15\fR
|
||||
.TP
|
||||
\fBwinbind enum users\fR
|
||||
\fBwinbind enum users (G)\fR
|
||||
On large installations using
|
||||
winbindd(8)it may be
|
||||
necessary to suppress the enumeration of users through the
|
||||
@ -6983,7 +7147,7 @@ usernames.
|
||||
|
||||
Default: \fBwinbind enum users = yes \fR
|
||||
.TP
|
||||
\fBwinbind enum groups\fR
|
||||
\fBwinbind enum groups (G)\fR
|
||||
On large installations using
|
||||
winbindd(8)it may be
|
||||
necessary to suppress the enumeration of groups through the
|
||||
@ -6999,7 +7163,7 @@ enumeration may cause some programs to behave oddly.
|
||||
|
||||
Default: \fBwinbind enum groups = yes \fR
|
||||
.TP
|
||||
\fBwinbind gid\fR
|
||||
\fBwinbind gid (G)\fR
|
||||
The winbind gid parameter specifies the range of group
|
||||
ids that are allocated by the winbindd(8)daemon. This range of group ids should have no
|
||||
existing local or NIS groups within it as strange conflicts can
|
||||
@ -7009,7 +7173,7 @@ Default: \fBwinbind gid = <empty string>
|
||||
\fR
|
||||
Example: \fBwinbind gid = 10000-20000\fR
|
||||
.TP
|
||||
\fBwinbind separator\fR
|
||||
\fBwinbind separator (G)\fR
|
||||
This parameter allows an admin to define the character
|
||||
used when listing a username of the form of \fIDOMAIN
|
||||
\fR\\\fIuser\fR. This parameter
|
||||
@ -7020,11 +7184,11 @@ Please note that setting this parameter to + causes problems
|
||||
with group membership at least on glibc systems, as the character +
|
||||
is used as a special character for NIS in /etc/group.
|
||||
|
||||
Example: \fBwinbind separator = \\\\\fR
|
||||
Default: \fBwinbind separator = '\\'\fR
|
||||
|
||||
Example: \fBwinbind separator = /\fR
|
||||
Example: \fBwinbind separator = +\fR
|
||||
.TP
|
||||
\fBwinbind uid\fR
|
||||
\fBwinbind uid (G)\fR
|
||||
The winbind gid parameter specifies the range of group
|
||||
ids that are allocated by the winbindd(8)daemon. This range of ids should have no
|
||||
existing local or NIS users within it as strange conflicts can
|
||||
|
@ -3,7 +3,7 @@
|
||||
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
|
||||
.\" Please send any bug reports, improvements, comments, patches,
|
||||
.\" etc. to Steve Cheng <steve@ggi-project.org>.
|
||||
.TH "SMBCLIENT" "1" "28 January 2002" "" ""
|
||||
.TH "SMBCLIENT" "1" "08 May 2002" "" ""
|
||||
.SH NAME
|
||||
smbclient \- ftp-like client to access SMB/CIFS resources on servers
|
||||
.SH SYNOPSIS
|
||||
@ -327,9 +327,9 @@ is 65520 bytes. Setting this value smaller (to 1200 bytes) has been
|
||||
observed to speed up file transfers to and from a Win9x server.
|
||||
.TP
|
||||
\fB-W WORKGROUP\fR
|
||||
Override the default workgroup specified in the
|
||||
workgroup parameter of the \fIsmb.conf\fR file
|
||||
for this connection. This may be needed to connect to some
|
||||
Override the default workgroup (domain) specified
|
||||
in the workgroup parameter of the \fIsmb.conf\fR
|
||||
file for this connection. This may be needed to connect to some
|
||||
servers.
|
||||
.TP
|
||||
\fB-T tar options\fR
|
||||
@ -513,6 +513,26 @@ If \fIshell command\fR is specified, the !
|
||||
command will execute a shell locally and run the specified shell
|
||||
command. If no command is specified, a local shell will be run.
|
||||
.TP
|
||||
\fBaltname file\fR
|
||||
The client will request that the server return
|
||||
the "alternate" name (the 8.3 name) for a file or directory.
|
||||
.TP
|
||||
\fBcancel jobid0 [jobid1] ... [jobidN]\fR
|
||||
The client will request that the server cancel
|
||||
the printjobs identified by the given numeric print job ids.
|
||||
.TP
|
||||
\fBchmod file mode in octal\fR
|
||||
This command depends on the server supporting the CIFS
|
||||
UNIX extensions and will fail if the server does not. The client requests that the server
|
||||
change the UNIX permissions to the given octal mode, in standard UNIX format.
|
||||
.TP
|
||||
\fBchown file uid gid\fR
|
||||
This command depends on the server supporting the CIFS
|
||||
UNIX extensions and will fail if the server does not. The client requests that the server
|
||||
change the UNIX user and group ownership to the given decimal values. Note there is
|
||||
currently no way to remotely look up the UNIX uid and gid values for a given name.
|
||||
This may be addressed in future versions of the CIFS UNIX extensions.
|
||||
.TP
|
||||
\fBcd [directory name]\fR
|
||||
If "directory name" is specified, the current
|
||||
working directory on the server will be changed to the directory
|
||||
@ -555,6 +575,12 @@ reason the specified directory is inaccessible.
|
||||
If no directory name is specified, the name of the
|
||||
current working directory on the local machine will be reported.
|
||||
.TP
|
||||
\fBlink source destination\fR
|
||||
This command depends on the server supporting the CIFS
|
||||
UNIX extensions and will fail if the server does not. The client requests that the server
|
||||
create a hard link between the source and destination files. The source file
|
||||
must not exist.
|
||||
.TP
|
||||
\fBlowercase\fR
|
||||
Toggle lowercasing of filenames for the get and
|
||||
mget commands.
|
||||
@ -674,6 +700,21 @@ working directory on the server.
|
||||
Remove the specified directory (user access
|
||||
privileges permitting) from the server.
|
||||
.TP
|
||||
\fBsetmode <filename> <perm=[+|\\-]rsha>\fR
|
||||
A version of the DOS attrib command to set
|
||||
file permissions. For example:
|
||||
|
||||
\fBsetmode myfile +r \fR
|
||||
|
||||
would make myfile read only.
|
||||
.TP
|
||||
\fBsymlink source destination\fR
|
||||
This command depends on the server supporting the CIFS
|
||||
UNIX extensions and will fail if the server does not. The client requests that the server
|
||||
create a symbolic hard link between the source and destination files. The source file
|
||||
must not exist. Note that the server will not create a link to any path that lies
|
||||
outside the currently connected share. This is enforced by the Samba server.
|
||||
.TP
|
||||
\fBtar <c|x>[IXbgNa]\fR
|
||||
Performs a tar operation - see the \fI-T
|
||||
\fRcommand line option above. Behavior may be affected
|
||||
@ -693,14 +734,6 @@ archive bit setting (this is the default mode). In incremental mode,
|
||||
tar will only back up files with the archive bit set. In reset mode,
|
||||
tar will reset the archive bit on all files it backs up (implies
|
||||
read/write share).
|
||||
.TP
|
||||
\fBsetmode <filename> <perm=[+|\\-]rsha>\fR
|
||||
A version of the DOS attrib command to set
|
||||
file permissions. For example:
|
||||
|
||||
\fBsetmode myfile +r \fR
|
||||
|
||||
would make myfile read only.
|
||||
.SH "NOTES"
|
||||
.PP
|
||||
Some servers are fussy about the case of supplied usernames,
|
||||
|
@ -3,9 +3,9 @@
|
||||
.\" <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 January 2002" "" ""
|
||||
.TH "SMBCONTROL" "1" "08 May 2002" "" ""
|
||||
.SH NAME
|
||||
smbcontrol \- send messages to smbd or nmbd processes
|
||||
smbcontrol \- send messages to smbd, nmbd or winbindd processes
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBsmbcontrol\fR [ \fB-i\fR ]
|
||||
@ -16,9 +16,10 @@ smbcontrol \- send messages to smbd or nmbd processes
|
||||
This tool is part of the Sambasuite.
|
||||
.PP
|
||||
\fBsmbcontrol\fR is a very small program, which
|
||||
sends messages to an smbd(8)or
|
||||
an nmbd(8)daemon running on the
|
||||
system.
|
||||
sends messages to an smbd(8),
|
||||
an nmbd(8)
|
||||
or a winbindd(8)
|
||||
daemon running on the system.
|
||||
.SH "OPTIONS"
|
||||
.TP
|
||||
\fB-i\fR
|
||||
@ -52,8 +53,9 @@ The close-share message-type sends a
|
||||
message to smbd which will then close the client connections to
|
||||
the named share. Note that this doesn't affect client connections
|
||||
to any other shares. This message-type takes an argument of the
|
||||
share name for which client connections will be close, or the
|
||||
share name for which client connections will be closed, or the
|
||||
"*" character which will close all currently open shares.
|
||||
This may be useful if you made changes to the access controls on the share.
|
||||
This message can only be sent to smbd.
|
||||
|
||||
The debug message-type allows
|
||||
@ -76,7 +78,7 @@ parameter. The parameter can be "on" to turn on profile stats
|
||||
collection, "off" to turn off profile stats collection, "count"
|
||||
to enable only collection of count stats (time stats are
|
||||
disabled), and "flush" to zero the current profile stats. This can
|
||||
be sent to any of the destinations.
|
||||
be sent to any smbd or nmbd destinations.
|
||||
|
||||
The debuglevel message-type sends
|
||||
a "request debug level" message. The current debug level setting
|
||||
@ -86,18 +88,13 @@ sent to any of the destinations.
|
||||
The profilelevel message-type sends
|
||||
a "request profile level" message. The current profile level
|
||||
setting is returned by a "profilelevel" message. This can be sent
|
||||
to any of the destinations.
|
||||
to any smbd or nmbd destinations.
|
||||
|
||||
The printer-notify message-type sends a
|
||||
message to smbd which in turn sends a printer notify message to
|
||||
any Windows NT clients connected to a printer. This message-type
|
||||
takes an argument of the printer name to send notify messages to.
|
||||
This message can only be sent to smbd.
|
||||
|
||||
The close-share message-type sends a
|
||||
message to smbd which forces smbd to close the share that was
|
||||
specified as an argument. This may be useful if you made changes
|
||||
to the access controls on the share.
|
||||
.TP
|
||||
\fBparameters\fR
|
||||
any parameters required for the message-type
|
||||
|
@ -3,7 +3,7 @@
|
||||
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
|
||||
.\" Please send any bug reports, improvements, comments, patches,
|
||||
.\" etc. to Steve Cheng <steve@ggi-project.org>.
|
||||
.TH "SMBD" "8" "28 January 2002" "" ""
|
||||
.TH "SMBD" "8" "08 May 2002" "" ""
|
||||
.SH NAME
|
||||
smbd \- server to provide SMB/CIFS services to clients
|
||||
.SH SYNOPSIS
|
||||
@ -124,7 +124,9 @@ file will be created for informational and debug
|
||||
messages from the running server. The log
|
||||
file generated is never removed by the server although
|
||||
its size may be controlled by the max log size
|
||||
option in the \fI smb.conf(5)\fRfile.
|
||||
option in the \fI smb.conf(5)\fRfile. \fBBeware:\fR
|
||||
If the directory specified does not exist, \fBsmbd\fR
|
||||
will log to the default debug log location defined at compile time.
|
||||
|
||||
The default log directory is specified at
|
||||
compile time.
|
||||
|
@ -3,12 +3,12 @@
|
||||
.\" <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 January 2002" "" ""
|
||||
.TH "SMBMOUNT" "8" "08 May 2002" "" ""
|
||||
.SH NAME
|
||||
smbmount \- mount an smbfs filesystem
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBsmbumount\fR \fBservice\fR \fBmount-point\fR [ \fB-o options\fR ]
|
||||
\fBsmbmount\fR \fBservice\fR \fBmount-point\fR [ \fB-o options\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBsmbmount\fR mounts a Linux SMB filesystem. It
|
||||
|
@ -3,12 +3,12 @@
|
||||
.\" <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 January 2002" "" ""
|
||||
.TH "SMBSH" "1" "08 May 2002" "" ""
|
||||
.SH NAME
|
||||
smbsh \- Allows access to Windows NT filesystem using UNIX commands
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBsmbsh\fR
|
||||
\fBsmbsh\fR [ \fB-W workgroup\fR ] [ \fB-U username\fR ] [ \fB-P prefix\fR ] [ \fB-R <name resolve order>\fR ] [ \fB-d <debug level>\fR ] [ \fB-l logfile\fR ] [ \fB-L libdir\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
This tool is part of the Sambasuite.
|
||||
@ -17,6 +17,104 @@ This tool is part of the Sambasuite.
|
||||
using UNIX commands such as \fBls\fR, \fB egrep\fR, and \fBrcp\fR. You must use a
|
||||
shell that is dynamically linked in order for \fBsmbsh\fR
|
||||
to work correctly.
|
||||
.SH "OPTIONS"
|
||||
.TP
|
||||
\fB-W WORKGROUP\fR
|
||||
Override the default workgroup specified in the
|
||||
workgroup parameter of the \fIsmb.conf\fR file
|
||||
for this session. This may be needed to connect to some
|
||||
servers.
|
||||
.TP
|
||||
\fB-U username[%pass]\fR
|
||||
Sets the SMB username or username and password.
|
||||
If this option is not specified, the user will be prompted for
|
||||
both the username and the password. If %pass is not specified,
|
||||
the user will be prompted for the password.
|
||||
.TP
|
||||
\fB-P prefix\fR
|
||||
This option allows
|
||||
the user to set the directory prefix for SMB access. The
|
||||
default value if this option is not specified is
|
||||
\fBsmb\fR.
|
||||
.TP
|
||||
\fB-R <name resolve order>\fR
|
||||
This option is used to determine what naming
|
||||
services and in what order to resolve
|
||||
host names to IP addresses. The option takes a space-separated
|
||||
string of different name resolution options.
|
||||
|
||||
The options are :"lmhosts", "host", "wins" and "bcast".
|
||||
They cause names to be resolved as follows :
|
||||
.RS
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
lmhosts :
|
||||
Lookup an IP address in the Samba lmhosts file. If the
|
||||
line in lmhosts has no name type attached to the
|
||||
NetBIOS name
|
||||
(see the lmhosts(5)
|
||||
for details) then any name type matches for lookup.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
host :
|
||||
Do a standard host name to IP address resolution, using
|
||||
the system \fI/etc/hosts\fR, NIS, or DNS
|
||||
lookups. This method of name resolution is operating
|
||||
system dependent, for instance on IRIX or Solaris this
|
||||
may be controlled by the \fI/etc/nsswitch.conf
|
||||
\fRfile). Note that this method is only used
|
||||
if the NetBIOS name type being queried is the 0x20
|
||||
(server) name type, otherwise it is ignored.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
wins :
|
||||
Query a name with the IP address listed in the
|
||||
\fIwins server\fR parameter. If no
|
||||
WINS server has been specified this method will be
|
||||
ignored.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
bcast :
|
||||
Do a broadcast on each of the known local interfaces
|
||||
listed in the \fIinterfaces\fR
|
||||
parameter. This is the least reliable of the name
|
||||
resolution methods as it depends on the target host
|
||||
being on a locally connected subnet.
|
||||
.RE
|
||||
.PP
|
||||
If this parameter is not set then the name resolve order
|
||||
defined in the \fIsmb.conf\fR file parameter
|
||||
(name resolve order) will be used.
|
||||
.PP
|
||||
.PP
|
||||
The default order is lmhosts, host, wins, bcast. Without
|
||||
this parameter or any entry in the \fIname resolve order
|
||||
\fRparameter of the \fIsmb.conf\fR
|
||||
file, the name resolution methods will be attempted in this
|
||||
order.
|
||||
.PP
|
||||
.TP
|
||||
\fB-d <debug level>\fR
|
||||
debug level is an integer from 0 to 10.
|
||||
|
||||
The default value if this parameter is not specified
|
||||
is zero.
|
||||
|
||||
The higher this value, the more detail will be logged
|
||||
about the activities of \fBnmblookup\fR. At level
|
||||
0, only critical errors and serious warnings will be logged.
|
||||
.TP
|
||||
\fB-l logfilename\fR
|
||||
If specified causes all debug messages to be
|
||||
written to the file specified by \fIlogfilename
|
||||
\fR\&. If not specified then all messages will be
|
||||
written to\fIstderr\fR.
|
||||
.TP
|
||||
\fB-L libdir\fR
|
||||
This parameter specifies the location of the
|
||||
shared libraries used by \fBsmbsh\fR. The default
|
||||
value is specified at compile time.
|
||||
.SH "EXAMPLES"
|
||||
.PP
|
||||
To use the \fBsmbsh\fR command, execute \fB smbsh\fR from the prompt and enter the username and password
|
||||
that authenticates you to the machine running the Windows NT
|
||||
|
@ -3,12 +3,12 @@
|
||||
.\" <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 January 2002" "" ""
|
||||
.TH "WBINFO" "1" "08 May 2002" "" ""
|
||||
.SH NAME
|
||||
wbinfo \- Query information from winbind daemon
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBwbinfo\fR [ \fB-u\fR ] [ \fB-g\fR ] [ \fB-n name\fR ] [ \fB-s sid\fR ] [ \fB-U uid\fR ] [ \fB-G gid\fR ] [ \fB-S sid\fR ] [ \fB-Y sid\fR ] [ \fB-t\fR ] [ \fB-m\fR ] [ \fB-a user%password\fR ] [ \fB-p\fR ]
|
||||
\fBwbinfo\fR [ \fB-u\fR ] [ \fB-g\fR ] [ \fB-h name\fR ] [ \fB-i ip\fR ] [ \fB-n name\fR ] [ \fB-s sid\fR ] [ \fB-U uid\fR ] [ \fB-G gid\fR ] [ \fB-S sid\fR ] [ \fB-Y sid\fR ] [ \fB-t\fR ] [ \fB-m\fR ] [ \fB-r user\fR ] [ \fB-a user%password\fR ] [ \fB-A user%password\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
This tool is part of the Sambasuite.
|
||||
@ -37,6 +37,18 @@ will also be listed. Note that this operation does not assign
|
||||
group ids to any groups that have not already been seen by
|
||||
\fBwinbindd(8)\fR.
|
||||
.TP
|
||||
\fB-h name\fR
|
||||
The \fI-h\fR option
|
||||
queries \fBwinbindd(8)\fR to query the WINS
|
||||
server for the IP address associated with the NetBIOS name
|
||||
specified by the \fIname\fR parameter.
|
||||
.TP
|
||||
\fB-i ip\fR
|
||||
The \fI-i\fR option
|
||||
queries \fBwinbindd(8)\fR to send a node status
|
||||
request to get the NetBIOS name associated with the IP address
|
||||
specified by the \fIip\fR parameter.
|
||||
.TP
|
||||
\fB-n name\fR
|
||||
The \fI-n\fR option
|
||||
queries \fBwinbindd(8)\fR for the SID
|
||||
@ -83,13 +95,21 @@ Windows NT server \fBwinbindd(8)\fR contacts
|
||||
when resolving names. This list does not include the Windows
|
||||
NT domain the server is a Primary Domain Controller for.
|
||||
.TP
|
||||
\fB-r username\fR
|
||||
Try to obtain the list of UNIX group ids
|
||||
to which the user belongs. This only works for users
|
||||
defined on a Domain Controller.
|
||||
.TP
|
||||
\fB-a username%password\fR
|
||||
Attempt to authenticate a user via winbindd.
|
||||
This checks both authenticaion methods and reports its results.
|
||||
.TP
|
||||
\fB-p\fR
|
||||
Attempt a simple 'ping' check that the winbindd
|
||||
is indeed alive.
|
||||
\fB-A username%password\fR
|
||||
Store username and password used by winbindd
|
||||
during session setup to a domain controller. This enables
|
||||
winbindd to operate in a Windows 2000 domain with Restrict
|
||||
Anonymous turned on (a.k.a. Permissions compatiable with
|
||||
Windows 2000 servers only).
|
||||
.SH "EXIT STATUS"
|
||||
.PP
|
||||
The wbinfo program returns 0 if the operation
|
||||
|
@ -3,7 +3,7 @@
|
||||
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
|
||||
.\" Please send any bug reports, improvements, comments, patches,
|
||||
.\" etc. to Steve Cheng <steve@ggi-project.org>.
|
||||
.TH "WINBINDD" "8" "28 January 2002" "" ""
|
||||
.TH "WINBINDD" "8" "08 May 2002" "" ""
|
||||
.SH NAME
|
||||
winbindd \- Name Service Switch daemon for resolving names from NT servers
|
||||
.SH SYNOPSIS
|
||||
@ -38,6 +38,12 @@ installed, this should always suceed.
|
||||
The following nsswitch databases are implemented by
|
||||
the winbindd service:
|
||||
.TP
|
||||
\fBhosts\fR
|
||||
User information traditionally stored in
|
||||
the \fIhosts(5)\fR file and used by
|
||||
\fBgethostbyname(3)\fR functions. Names are
|
||||
resolved through the WINS server or by broadcast.
|
||||
.TP
|
||||
\fBpasswd\fR
|
||||
User information traditionally stored in
|
||||
the \fIpasswd(5)\fR file and used by
|
||||
@ -63,6 +69,12 @@ group: files winbind
|
||||
.sp
|
||||
.fi
|
||||
.PP
|
||||
.PP
|
||||
The following simple configuration in the
|
||||
\fI/etc/nsswitch.conf\fR file can be used to initially
|
||||
resolve hostnames from \fI/etc/hosts\fR and then from the
|
||||
WINS server.
|
||||
.PP
|
||||
.SH "OPTIONS"
|
||||
.TP
|
||||
\fB-d debuglevel\fR
|
||||
|
@ -7,10 +7,14 @@ Summary: This describes how to configure Samba for improved browsing.
|
||||
|
||||
OVERVIEW:
|
||||
=========
|
||||
|
||||
SMB networking provides a mechanism by which clients can access a list
|
||||
of machines that are available within the network. This list is called
|
||||
the browse list and is heavily used by all SMB clients. Configuration
|
||||
of SMB browsing has been problematic for some Samba users, hence this
|
||||
of machines in a network, a so-called "browse list". This list
|
||||
contains machines that are ready to offer file and/or print services
|
||||
to other machines within the network. Thus it does not include
|
||||
machines which aren't currently able to do server tasks. The browse
|
||||
list is heavily used by all SMB clients. Configuration of SMB
|
||||
browsing has been problematic for some Samba users, hence this
|
||||
document.
|
||||
|
||||
Browsing will NOT work if name resolution from NetBIOS names to IP
|
||||
@ -59,9 +63,10 @@ browsing on another subnet. It is recommended that this option is only
|
||||
used for 'unusual' purposes: announcements over the internet, for
|
||||
example. See "remote announce" in the smb.conf man page.
|
||||
|
||||
If something doesn't work then hopefully the log.nmb file will
|
||||
help you track down the problem. Try a debug level of 2 or 3 for
|
||||
finding problems.
|
||||
If something doesn't work then hopefully the log.nmb file will help
|
||||
you track down the problem. Try a debug level of 2 or 3 for finding
|
||||
problems. Also note that the current browse list usually gets stored
|
||||
in text form in a file called browse.dat.
|
||||
|
||||
Note that if it doesn't work for you, then you should still be able to
|
||||
type the server name as \\SERVER in filemanager then hit enter and
|
||||
|
@ -49,6 +49,9 @@ windows. Just drag your file onto the icon and it converts the file.
|
||||
Get it from
|
||||
ftp://samba.org/pub/samba/contributed/fixcrlf.zip
|
||||
|
||||
The utilities unix2dos and dos2unix(in the mtools package) should do
|
||||
the job under unix.
|
||||
|
||||
----------------------
|
||||
HINT: Use the "username map" option
|
||||
|
||||
|
@ -3,7 +3,7 @@ Revised by: Patrick Powell <papowell@lprng.org>
|
||||
Date: August 11, 2000
|
||||
Status: Current
|
||||
|
||||
Subject: Dubugging Printing Problems
|
||||
Subject: Debugging Printing Problems
|
||||
=============================================================================
|
||||
|
||||
This is a short description of how to debug printing problems with
|
||||
|
@ -70,7 +70,7 @@ Once you are attached you then can do whatever it is on the client
|
||||
that is causing problems and you will capture all the system calls
|
||||
that smbd makes.
|
||||
|
||||
So how do you interpret the results? Generally I search thorugh the
|
||||
So how do you interpret the results? Generally I search through the
|
||||
output for strings that I know will appear when the problem
|
||||
happens. For example, if I am having touble with permissions on a file
|
||||
I would search for that files name in the strace output and look at
|
||||
|
@ -32,7 +32,7 @@ directory and do an ls, the UNIX security solution is to
|
||||
change the UNIX file permissions on the users home directories
|
||||
such that the cd and ls would be denied.
|
||||
|
||||
Samba tries very had not to second guess the UNIX administrators
|
||||
Samba tries very hard not to second guess the UNIX administrators
|
||||
security policies, and trusts the UNIX admin to set
|
||||
the policies and permissions he or she desires.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Copyright(C) Samba-Team 1993-1997
|
||||
Copyright(C) Samba-Team 1993-2001
|
||||
|
||||
This directory contains example config files and related material for
|
||||
Samba.
|
||||
@ -6,6 +6,6 @@ Samba.
|
||||
At a minimum please refer to the smb.conf.default file for current
|
||||
information regarding global and share parameter settings.
|
||||
|
||||
Send additions to: samba-bugs@samba.org
|
||||
Send additions to: samba@samba.org
|
||||
|
||||
|
||||
|
@ -10,10 +10,11 @@ LIBTOOL = libtool
|
||||
|
||||
SAMBA_SRC = ../../source
|
||||
SAMBA_INCL = ../../source/include
|
||||
POPT_INCL = ../../source/popt
|
||||
UBIQX_SRC = ../../source/ubiqx
|
||||
SMBWR_SRC = ../../source/smbwrapper
|
||||
KRB5_SRC = /usr/kerberos/include
|
||||
CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(KRB5_SRC) -Wall -g
|
||||
CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(POPT_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(KRB5_SRC) -Wall -g
|
||||
VFS_OBJS = audit.so skel.so recycle.so
|
||||
|
||||
# Default target
|
||||
|
@ -8,7 +8,7 @@
|
||||
CC = gcc
|
||||
LIBTOOL = libtool
|
||||
|
||||
SAMBA_SRC = /usr/local/src/samba/samba-2.2.0-ron/source
|
||||
SAMBA_SRC = ../../../source
|
||||
SAMBA_INCL = ${SAMBA_SRC}/include
|
||||
UBIQX_SRC = ${SAMBA_SRC}/ubiqx
|
||||
SMBWR_SRC = ${SAMBA_SRC}/smbwrapper
|
||||
|
@ -238,15 +238,18 @@ static int recycle_unlink(connection_struct *conn, const char *inname)
|
||||
return default_vfs_ops.unlink(conn,fname);
|
||||
}
|
||||
|
||||
base = strrchr(fname, '/') + 1;
|
||||
if(base == (char*)1)
|
||||
ext = strrchr(fname, '.');
|
||||
else
|
||||
ext = strrchr(base, '.');
|
||||
|
||||
base = strrchr(fname, '/');
|
||||
pstrcpy(bin, recycle_bin);
|
||||
pstrcat(bin, "/");
|
||||
pstrcat(bin, base);
|
||||
|
||||
if(base == NULL) {
|
||||
ext = strrchr(fname, '.');
|
||||
pstrcat(bin, fname);
|
||||
} else {
|
||||
ext = strrchr(base, '.');
|
||||
pstrcat(bin, base+1);
|
||||
}
|
||||
DEBUG(3, ("recycle bin: base %s, ext %s, fname %s, bin %s\n", base, ext, fname, bin));
|
||||
|
||||
if(strcmp(fname,bin) == 0) {
|
||||
DEBUG(3, ("recycle bin: file %s exists, purging...\n", fname));
|
||||
@ -254,6 +257,9 @@ static int recycle_unlink(connection_struct *conn, const char *inname)
|
||||
}
|
||||
|
||||
len = strlen(bin);
|
||||
if ( ext != NULL)
|
||||
len = len - strlen(ext);
|
||||
|
||||
addlen = sizeof(pstring)-len-1;
|
||||
while(recycle_file_exist(conn,bin)) {
|
||||
slprintf(bin+len, addlen, " (Copy #%d)", i++);
|
||||
|
@ -1,5 +1,41 @@
|
||||
README for Samba Password Database (PDB) examples
|
||||
====================================================
|
||||
21-6-2002 Stefan (metze) Metzmacher <metze@metzemix.de>
|
||||
|
||||
I have added an interface versioning.
|
||||
|
||||
Every module MUST have a pdb_version() function.
|
||||
|
||||
this is defined in include/passdb.h:
|
||||
#define PDB_MODULE_VERSIONING_MAGIC \
|
||||
int pdb_version(void)\
|
||||
{\
|
||||
return PASSDB_INTERFACE_VERSION;\
|
||||
}
|
||||
|
||||
You MUST add this line inside a module:
|
||||
PDB_MODULE_VERSIONING_MAGIC
|
||||
|
||||
21-6-2002 Stefan (metze) Metzmacher <metze@metzemix.de>
|
||||
|
||||
The pdb_interface was changed:
|
||||
|
||||
this function are deleted:
|
||||
static BOOL testsam_getsampwrid (struct pdb_methods *methods, SAM_ACCOUNT *user, uint32 rid)
|
||||
|
||||
this function are added:
|
||||
static BOOL testsam_getsampwsid (struct pdb_methods *methods, SAM_ACCOUNT *user, DOM_SID sid)
|
||||
|
||||
In the SAM_ACCOUNT struct:
|
||||
|
||||
this fields are deleted:
|
||||
uint32 user_rid;
|
||||
uint32 group_rid;
|
||||
|
||||
this fields are added:
|
||||
DOM_SID user_sid;
|
||||
DOM_SID group_sid;
|
||||
|
||||
15-2-2002 Jelmer Vernooij <jelmer@nl.linux.org>
|
||||
|
||||
The pdb_test.c file in this directory contains a very basic example of
|
||||
@ -7,3 +43,9 @@ a pdb plugin. It just prints the name of the function that is executed using
|
||||
DEBUG. Maybe it's nice to include some of the arguments to the function in the
|
||||
future too..
|
||||
|
||||
To debug passdb backends, try to run gdb on the 'pdbedit' executable. That's really much easier than restarting smbd constantly and attaching with your debugger.
|
||||
|
||||
New passdb plugins should go into the samba lib directory, (/usr/lib/samba/ for
|
||||
most distributions) and should be prefixed with 'pdb_'. An example would be:
|
||||
/usr/lib/samba/pdb_test.so
|
||||
|
||||
|
@ -17,11 +17,24 @@
|
||||
* Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
static BOOL testsam_setsampwent(struct pdb_context *context, BOOL update)
|
||||
static int testsam_debug_level = DBGC_ALL;
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS testsam_debug_level
|
||||
|
||||
/* define the version of the passdb interface */
|
||||
PDB_MODULE_VERSIONING_MAGIC
|
||||
|
||||
/***************************************************************
|
||||
Start enumeration of the passwd list.
|
||||
****************************************************************/
|
||||
|
||||
static BOOL testsam_setsampwent(struct pdb_methods *methods, BOOL update)
|
||||
{
|
||||
DEBUG(0, ("testsam_setsampwent called\n"));
|
||||
DEBUG(10, ("testsam_setsampwent called\n"));
|
||||
return True;
|
||||
}
|
||||
|
||||
@ -29,18 +42,18 @@ static BOOL testsam_setsampwent(struct pdb_context *context, BOOL update)
|
||||
End enumeration of the passwd list.
|
||||
****************************************************************/
|
||||
|
||||
static void testsam_endsampwent(struct pdb_context *context)
|
||||
static void testsam_endsampwent(struct pdb_methods *methods)
|
||||
{
|
||||
DEBUG(0, ("testsam_endsampwent called\n"));
|
||||
DEBUG(10, ("testsam_endsampwent called\n"));
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
Get one SAM_ACCOUNT from the list (next in line)
|
||||
*****************************************************************/
|
||||
|
||||
static BOOL testsam_getsampwent(struct pdb_context *context, SAM_ACCOUNT *user)
|
||||
static BOOL testsam_getsampwent(struct pdb_methods *methods, SAM_ACCOUNT *user)
|
||||
{
|
||||
DEBUG(0, ("testsam_getsampwent called\n"));
|
||||
DEBUG(10, ("testsam_getsampwent called\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
@ -48,19 +61,19 @@ static BOOL testsam_getsampwent(struct pdb_context *context, SAM_ACCOUNT *user)
|
||||
Lookup a name in the SAM database
|
||||
******************************************************************/
|
||||
|
||||
static BOOL testsam_getsampwnam (struct pdb_context *context, SAM_ACCOUNT *user, const char *sname)
|
||||
static BOOL testsam_getsampwnam (struct pdb_methods *methods, SAM_ACCOUNT *user, const char *sname)
|
||||
{
|
||||
DEBUG(0, ("testsam_getsampwnam called\n"));
|
||||
DEBUG(10, ("testsam_getsampwnam called\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
Search by rid
|
||||
Search by sid
|
||||
**************************************************************************/
|
||||
|
||||
static BOOL testsam_getsampwrid (struct pdb_context *context, SAM_ACCOUNT *user, uint32 rid)
|
||||
static BOOL testsam_getsampwsid (struct pdb_methods *methods, SAM_ACCOUNT *user, DOM_SID sid)
|
||||
{
|
||||
DEBUG(0, ("testsam_getsampwrid called\n"));
|
||||
DEBUG(10, ("testsam_getsampwsid called\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
@ -68,9 +81,9 @@ static BOOL testsam_getsampwrid (struct pdb_context *context, SAM_ACCOUNT *user,
|
||||
Delete a SAM_ACCOUNT
|
||||
****************************************************************************/
|
||||
|
||||
static BOOL testsam_delete_sam_account(struct pdb_context *context, const SAM_ACCOUNT *sam_pass)
|
||||
static BOOL testsam_delete_sam_account(struct pdb_methods *methods, const SAM_ACCOUNT *sam_pass)
|
||||
{
|
||||
DEBUG(0, ("testsam_delete_sam_account called\n"));
|
||||
DEBUG(10, ("testsam_delete_sam_account called\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
@ -78,9 +91,9 @@ static BOOL testsam_delete_sam_account(struct pdb_context *context, const SAM_AC
|
||||
Modifies an existing SAM_ACCOUNT
|
||||
****************************************************************************/
|
||||
|
||||
static BOOL testsam_update_sam_account (struct pdb_context *context, const SAM_ACCOUNT *newpwd)
|
||||
static BOOL testsam_update_sam_account (struct pdb_methods *methods, const SAM_ACCOUNT *newpwd)
|
||||
{
|
||||
DEBUG(0, ("testsam_update_sam_account called\n"));
|
||||
DEBUG(10, ("testsam_update_sam_account called\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
@ -88,9 +101,9 @@ static BOOL testsam_update_sam_account (struct pdb_context *context, const SAM_A
|
||||
Adds an existing SAM_ACCOUNT
|
||||
****************************************************************************/
|
||||
|
||||
static BOOL testsam_add_sam_account (struct pdb_context *context, const SAM_ACCOUNT *newpwd)
|
||||
static BOOL testsam_add_sam_account (struct pdb_methods *methods, const SAM_ACCOUNT *newpwd)
|
||||
{
|
||||
DEBUG(0, ("testsam_add_sam_account called\n"));
|
||||
DEBUG(10, ("testsam_add_sam_account called\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
@ -104,18 +117,27 @@ NTSTATUS pdb_init(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, const char
|
||||
|
||||
(*pdb_method)->name = "testsam";
|
||||
|
||||
/* Functions your pdb module doesn't provide should be set
|
||||
* to NULL */
|
||||
|
||||
(*pdb_method)->setsampwent = testsam_setsampwent;
|
||||
(*pdb_method)->endsampwent = testsam_endsampwent;
|
||||
(*pdb_method)->getsampwent = testsam_getsampwent;
|
||||
(*pdb_method)->getsampwnam = testsam_getsampwnam;
|
||||
(*pdb_method)->getsampwrid = testsam_getsampwrid;
|
||||
(*pdb_method)->getsampwsid = testsam_getsampwsid;
|
||||
(*pdb_method)->add_sam_account = testsam_add_sam_account;
|
||||
(*pdb_method)->update_sam_account = testsam_update_sam_account;
|
||||
(*pdb_method)->delete_sam_account = testsam_delete_sam_account;
|
||||
|
||||
testsam_debug_level = debug_add_class("testsam");
|
||||
if (testsam_debug_level == -1) {
|
||||
testsam_debug_level = DBGC_ALL;
|
||||
DEBUG(0, ("testsam: Couldn't register custom debugging class!\n"));
|
||||
} else DEBUG(0, ("testsam: Debug class number of 'testsam': %d\n", testsam_debug_level));
|
||||
|
||||
DEBUG(0, ("Initializing testsam\n"));
|
||||
if (location)
|
||||
DEBUG(0, ("Location: %s\n", location));
|
||||
DEBUG(10, ("Location: %s\n", location));
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
@ -58,9 +58,17 @@
|
||||
# Security mode. Most people will want user level security. See
|
||||
# security_level.txt for details.
|
||||
security = user
|
||||
|
||||
# Use password server option only with security = server
|
||||
# The argument list may include:
|
||||
# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
|
||||
# or to auto-locate the domain controller/s
|
||||
# password server = *
|
||||
; password server = <NT-Server-Name>
|
||||
|
||||
# Note: Do NOT use the now deprecated option of "domain controller"
|
||||
# This option is no longer implemented.
|
||||
|
||||
# You may wish to use password encryption. Please read
|
||||
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
|
||||
# Do not enable this option unless you have read those documents
|
||||
@ -102,10 +110,6 @@
|
||||
# and gives it a slightly higher chance of winning the election
|
||||
; preferred master = yes
|
||||
|
||||
# Use only if you have an NT server on your network that has been
|
||||
# configured at install time to be a primary domain controller.
|
||||
; domain controller = <NT-Domain-Controller-SMBName>
|
||||
|
||||
# Enable this if you want Samba to be a domain logon server for
|
||||
# Windows95 workstations.
|
||||
; domain logons = yes
|
||||
|
@ -73,7 +73,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
$name = "unknown nis name";
|
||||
}
|
||||
} else {
|
||||
/(\S+)/;
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$name = $1;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
@name = grep(/<00> - <GROUP>/,@nmblookup);
|
||||
$_ = @name[0];
|
||||
if ($_) {
|
||||
/(\S+)/;
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$_ = "[$1]";
|
||||
} else {
|
||||
$_ = "Unknown Workgroup";
|
||||
|
@ -254,6 +254,15 @@ CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
|
||||
make all nsswitch/libnss_wins.so nsswitch/libnss_winbind.so torture nsswitch/pam_winbind.so everything
|
||||
(cd tdb; make tdbdump tdbtest tdbtorture tdbtool)
|
||||
|
||||
cd ../examples/VFS
|
||||
CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
|
||||
--prefix='$(DESTDIR)/usr' \
|
||||
--localstatedir='$(DESTDIR)/var' \
|
||||
--libdir='$(DESTDIR)%{EtcSamba}' \
|
||||
--sbindir='$(DESTDIR)/usr/sbin'
|
||||
make
|
||||
cd block
|
||||
make
|
||||
|
||||
%Install
|
||||
%{mkDESTDIR}
|
||||
@ -264,6 +273,7 @@ mkdir -p $DESTDIR%{EtcSamba}/codepages/src
|
||||
mkdir -p $DESTDIR/etc/skel/Samba
|
||||
mkdir -p $DESTDIR/home/samba
|
||||
mkdir -p $DESTDIR/lib/security
|
||||
mkdir -p $DESTDIR/lib/samba
|
||||
mkdir -p $DESTDIR/%{LSBservedir}/{netlogon,profiles,Public}
|
||||
mkdir -p $DESTDIR%{NKinetdir}
|
||||
mkdir -p $DESTDIR/{sbin,bin,usr/{sbin,bin}}
|
||||
@ -294,6 +304,11 @@ for i in tdbdump tdbtest tdbtorture tdbtool
|
||||
do
|
||||
install -m 755 source/tdb/$i $DESTDIR/usr/sbin
|
||||
done
|
||||
# Add VFS Modules
|
||||
for i in audit.so recycle.so block/block.so
|
||||
do
|
||||
install -m755 $i $DESTDIR/lib/samba
|
||||
done
|
||||
|
||||
#mv $DESTDIR/usr/bin/{make,add,conv}* $DESTDIR/usr/sbin
|
||||
|
||||
|
@ -73,7 +73,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
$name = "unknown nis name";
|
||||
}
|
||||
} else {
|
||||
/(\S+)/;
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$name = $1;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
@name = grep(/<00> - <GROUP>/,@nmblookup);
|
||||
$_ = @name[0];
|
||||
if ($_) {
|
||||
/(\S+)/;
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$_ = "[$1]";
|
||||
} else {
|
||||
$_ = "Unknown Workgroup";
|
||||
|
@ -73,7 +73,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
$name = "unknown nis name";
|
||||
}
|
||||
} else {
|
||||
/(\S+)/;
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$name = $1;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
@name = grep(/<00> - <GROUP>/,@nmblookup);
|
||||
$_ = @name[0];
|
||||
if ($_) {
|
||||
/(\S+)/;
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$_ = "[$1]";
|
||||
} else {
|
||||
$_ = "Unknown Workgroup";
|
||||
|
@ -73,7 +73,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
$name = "unknown nis name";
|
||||
}
|
||||
} else {
|
||||
/(\S+)/;
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$name = $1;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
@name = grep(/<00> - <GROUP>/,@nmblookup);
|
||||
$_ = @name[0];
|
||||
if ($_) {
|
||||
/(\S+)/;
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$_ = "[$1]";
|
||||
} else {
|
||||
$_ = "Unknown Workgroup";
|
||||
|
@ -73,7 +73,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
$name = "unknown nis name";
|
||||
}
|
||||
} else {
|
||||
/(\S+)/;
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$name = $1;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
@name = grep(/<00> - <GROUP>/,@nmblookup);
|
||||
$_ = @name[0];
|
||||
if ($_) {
|
||||
/(\S+)/;
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$_ = "[$1]";
|
||||
} else {
|
||||
$_ = "Unknown Workgroup";
|
||||
|
@ -73,7 +73,10 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
$name = "unknown nis name";
|
||||
}
|
||||
} else {
|
||||
/(\S+)/;
|
||||
# The Netbios name can contain lot of characters also '<' '>'
|
||||
# and spaces. The follwing cure inside name space but not
|
||||
# names starting or ending with spaces
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$name = $1;
|
||||
}
|
||||
|
||||
@ -103,7 +106,8 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
@name = grep(/<00> - <GROUP>/,@nmblookup);
|
||||
$_ = @name[0];
|
||||
if ($_) {
|
||||
/(\S+)/;
|
||||
# Same as before for space and characters
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$_ = "[$1]";
|
||||
} else {
|
||||
$_ = "Unknown Workgroup";
|
||||
|
@ -1,4 +1,4 @@
|
||||
auth required /lib/security/pam_pwdb.so nullok shadow
|
||||
auth required /lib/security/pam_pwdb.so nullok
|
||||
account required /lib/security/pam_pwdb.so
|
||||
session required /lib/security/pam_pwdb.so
|
||||
password required /lib/security/pam_pwdb.so
|
||||
password required /lib/security/pam_pwdb.so # shadow md5 nullok audit
|
||||
|
@ -8,6 +8,7 @@ Source: ftp://samba.org/pub/samba/samba-%{version}.tar.gz
|
||||
Packager: John H Terpstra [Samba-Team] <jht@samba.org>
|
||||
Requires: pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2
|
||||
Prereq: chkconfig fileutils
|
||||
Provides: samba = %{version}, samba-common = %{version}, samba-client = %{version}, samba-swat = %{version}
|
||||
BuildRoot: /var/tmp/samba
|
||||
Prefix: /usr
|
||||
|
||||
@ -43,9 +44,16 @@ for Shadow passwords and quotas. Do NOT recompile with the
|
||||
SHADOW_PWD option enabled
|
||||
|
||||
%changelog
|
||||
* Mon May 6 2002 Gerald Carter <jerry@samba.org>
|
||||
- moved findsmb to a standard component in samba's
|
||||
"make install". Removed from specfile.
|
||||
|
||||
* Sun Oct 14 2001 Andrew Bartlett <abartlet@samba.org>
|
||||
- Set SBINDIR for codepage/manpage install, cope with
|
||||
broken Makefile
|
||||
|
||||
* Mon Aug 1 2001 Tim Potter <tpot@samba.org>
|
||||
- Install winbind daemon, client programs, nss and pam libraries
|
||||
- Removed codepage stuff so spec file works with current HEAD branch
|
||||
|
||||
* Sat Mar 31 2001 Andrew Bartlett <abartlet@pcug.org.au>
|
||||
- Changed prefix/share/man for _mandir/share/man
|
||||
@ -158,11 +166,11 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
|
||||
--with-privatedir=/etc/samba \
|
||||
--with-fhs \
|
||||
--with-quotas \
|
||||
--with-msdfs \
|
||||
--with-smbmount \
|
||||
--with-pam \
|
||||
--with-syslog \
|
||||
--with-utmp \
|
||||
--with-netatalk \
|
||||
--with-sambabook=%{prefix}/share/swat/using_samba \
|
||||
--with-swatdir=%{prefix}/share/swat
|
||||
make -j${NUMCPU} proto
|
||||
@ -182,8 +190,8 @@ mkdir -p $RPM_BUILD_ROOT%{prefix}/{bin,sbin}
|
||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/{images,help,include,using_samba}
|
||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/{figs,gifs}
|
||||
mkdir -p $RPM_BUILD_ROOTMANDIR_MACRO
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lock/samba
|
||||
mkdir -p $RPM_BUILD_ROOT/var/log/samba
|
||||
mkdir -p $RPM_BUILD_ROOT/var/cache/samba
|
||||
mkdir -p $RPM_BUILD_ROOT/var/{log,run}/samba
|
||||
mkdir -p $RPM_BUILD_ROOT/var/spool/samba
|
||||
mkdir -p $RPM_BUILD_ROOT/lib/security
|
||||
|
||||
@ -211,19 +219,21 @@ ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
|
||||
# This allows us to get away without duplicating code that
|
||||
# sombody else can maintain for us.
|
||||
cd source
|
||||
make LIBDIR=$RPM_BUILD_ROOT/etc/samba \
|
||||
make BASEDIR=$RPM_BUILD_ROOT/usr \
|
||||
LIBDIR=$RPM_BUILD_ROOT/etc/samba \
|
||||
SBINDIR=$RPM_BUILD_ROOT%{prefix}/sbin \
|
||||
BINDIR=$RPM_BUILD_ROOT%{prefix}/bin \
|
||||
MANDIR=$RPM_BUILD_ROOTMANDIR_MACRO \
|
||||
SWATDIR=$RPM_BUILD_ROOT/usr/share/swat \
|
||||
SAMBABOOK=$RPM_BUILD_ROOT/usr/share/swat/using_samba \
|
||||
installman installswat
|
||||
installman installcp installswat
|
||||
cd ..
|
||||
|
||||
# Install the nsswitch library extension file
|
||||
install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib
|
||||
|
||||
# Make link for wins resolver
|
||||
( cd $RPM_BUILD_ROOT/lib; ln -s libnss_wins.so libnss_wins.so.2; )
|
||||
( cd $RPM_BUILD_ROOT/lib; ln -sf libnss_wins.so libnss_wins.so.2; )
|
||||
|
||||
# Install winbind shared libraries
|
||||
install -m755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/lib
|
||||
@ -246,7 +256,6 @@ done
|
||||
# Install the miscellany
|
||||
install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
|
||||
install -m755 packaging/RedHat/smbprint $RPM_BUILD_ROOT%{prefix}/bin
|
||||
install -m755 packaging/RedHat/findsmb $RPM_BUILD_ROOT%{prefix}/bin
|
||||
install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
|
||||
install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba
|
||||
install -m644 packaging/RedHat/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
|
||||
@ -265,35 +274,74 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/sbin/chkconfig smb off
|
||||
|
||||
echo "Looking for old /etc/smb.conf..."
|
||||
if [ -f /etc/smb.conf ]; then
|
||||
if [ -f /etc/smb.conf -a ! -f /etc/samba/smb.conf ]; then
|
||||
echo "Moving old /etc/smb.conf to /etc/samba/smb.conf"
|
||||
mv /etc/smb.conf /etc/samba/smb.conf
|
||||
fi
|
||||
|
||||
echo "Looking for old /etc/smbusers..."
|
||||
if [ -f /etc/smbusers ]; then
|
||||
if [ -f /etc/smbusers -a ! -f /etc/samba/smbusers ]; then
|
||||
echo "Moving old /etc/smbusers to /etc/samba/smbusers"
|
||||
mv /etc/smbusers /etc/samba/smbusers
|
||||
fi
|
||||
|
||||
echo "Looking for old /etc/lmhosts..."
|
||||
if [ -f /etc/lmhosts ]; then
|
||||
if [ -f /etc/lmhosts -a ! -f /etc/samba/lmhosts ]; then
|
||||
echo "Moving old /etc/lmhosts to /etc/samba/lmhosts"
|
||||
mv /etc/lmhosts /etc/samba/lmhosts
|
||||
fi
|
||||
|
||||
echo "Looking for old /etc/MACHINE.SID..."
|
||||
if [ -f /etc/MACHINE.SID ]; then
|
||||
if [ -f /etc/MACHINE.SID -a ! -f /etc/samba/MACHINE.SID ]; then
|
||||
echo "Moving old /etc/MACHINE.SID to /etc/samba/MACHINE.SID"
|
||||
mv /etc/MACHINE.SID /etc/samba/MACHINE.SID
|
||||
fi
|
||||
|
||||
echo "Looking for old /etc/smbpasswd..."
|
||||
if [ -f /etc/smbpasswd ]; then
|
||||
if [ -f /etc/smbpasswd -a ! -f /etc/samba/smbpasswd ]; then
|
||||
echo "Moving old /etc/smbpasswd to /etc/samba/smbpasswd"
|
||||
mv /etc/smbpasswd /etc/samba/smbpasswd
|
||||
fi
|
||||
|
||||
#
|
||||
# For 2.2.1 we move the tdb files from /var/lock/samba to /var/cache/samba
|
||||
# to preserve across reboots.
|
||||
#
|
||||
echo "Moving tdb files in /var/lock/samba/*.tdb to /var/cache/samba/*.tdb"
|
||||
for i in /var/lock/samba/*.tdb
|
||||
do
|
||||
if [ -f $i ]; then
|
||||
newname=`echo $i | sed -e's|var\/lock\/samba|var\/cache\/samba|'`
|
||||
echo "Moving $i to $newname"
|
||||
mv $i $newname
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove the transient tdb files.
|
||||
if [ -e /var/cache/samba/brlock.tdb ]; then
|
||||
rm -f /var/cache/samba/brlock.tdb
|
||||
fi
|
||||
|
||||
if [ -e /var/cache/samba/unexpected.tdb ]; then
|
||||
rm -f /var/cache/samba/unexpected.tdb
|
||||
fi
|
||||
|
||||
if [ -e /var/cache/samba/connections.tdb ]; then
|
||||
rm -f /var/cache/samba/connections.tdb
|
||||
fi
|
||||
|
||||
if [ -e /var/cache/samba/locking.tdb ]; then
|
||||
rm -f /var/cache/samba/locking.tdb
|
||||
fi
|
||||
|
||||
if [ -e /var/cache/samba/messages.tdb ]; then
|
||||
rm -f /var/cache/samba/messages.tdb
|
||||
fi
|
||||
|
||||
if [ -d /var/lock/samba ]; then
|
||||
rm -rf /var/lock/samba
|
||||
fi
|
||||
|
||||
# Add swat entry to /etc/services if not already there.
|
||||
if !( grep ^[:space:]*swat /etc/services > /dev/null ) then
|
||||
echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services
|
||||
@ -309,7 +357,7 @@ fi
|
||||
|
||||
# Add swat entry to xinetd.d if needed.
|
||||
if [ -d $RPM_BUILD_ROOT/etc/xinetd.d -a ! -f /etc/xinetd.d/swat ]; then
|
||||
mv /etc/samba/samba.xinetd /etc/xinetd.d/swat
|
||||
mv /etc/samba/samba.xinetd /etc/xinetd.d/swat
|
||||
else
|
||||
rm -f /etc/samba/samba.xinetd
|
||||
fi
|
||||
@ -325,39 +373,41 @@ fi
|
||||
|
||||
# Create winbind nss client symlink
|
||||
|
||||
ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2
|
||||
if [ -e /lib/libnss_winbind.so ]; then
|
||||
ln -sf /lib/libnss_winbind.so /lib/libnss_winbind.so.2
|
||||
fi
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ] ; then
|
||||
/sbin/chkconfig --del smb
|
||||
/sbin/chkconfig --del smb
|
||||
|
||||
# We want to remove the browse.dat and wins.dat files so they can not interfer with a new version of samba!
|
||||
if [ -e /var/lock/samba/browse.dat ]; then
|
||||
rm -f /var/lock/samba/browse.dat
|
||||
fi
|
||||
if [ -e /var/lock/samba/wins.dat ]; then
|
||||
rm -f /var/lock/samba/wins.dat
|
||||
fi
|
||||
# We want to remove the browse.dat and wins.dat files so they can not interfer with a new version of samba!
|
||||
if [ -e /var/cache/samba/browse.dat ]; then
|
||||
rm -f /var/cache/samba/browse.dat
|
||||
fi
|
||||
if [ -e /var/cache/samba/wins.dat ]; then
|
||||
rm -f /var/cache/samba/wins.dat
|
||||
fi
|
||||
|
||||
# Remove the transient tdb files.
|
||||
if [ -e /var/lock/samba/brlock.tdb ]; then
|
||||
rm -f /var/lock/samba/brlock.tdb
|
||||
if [ -e /var/cache/samba/brlock.tdb ]; then
|
||||
rm -f /var/cache/samba/brlock.tdb
|
||||
fi
|
||||
|
||||
if [ -e /var/lock/samba/unexpected.tdb ]; then
|
||||
rm -f /var/lock/samba/unexpected.tdb
|
||||
if [ -e /var/cache/samba/unexpected.tdb ]; then
|
||||
rm -f /var/cache/samba/unexpected.tdb
|
||||
fi
|
||||
|
||||
if [ -e /var/lock/samba/connections.tdb ]; then
|
||||
rm -f /var/lock/samba/connections.tdb
|
||||
if [ -e /var/cache/samba/connections.tdb ]; then
|
||||
rm -f /var/cache/samba/connections.tdb
|
||||
fi
|
||||
|
||||
if [ -e /var/lock/samba/locking.tdb ]; then
|
||||
rm -f /var/lock/samba/locking.tdb
|
||||
if [ -e /var/cache/samba/locking.tdb ]; then
|
||||
rm -f /var/cache/samba/locking.tdb
|
||||
fi
|
||||
|
||||
if [ -e /var/lock/samba/messages.tdb ]; then
|
||||
rm -f /var/lock/samba/messages.tdb
|
||||
if [ -e /var/cache/samba/messages.tdb ]; then
|
||||
rm -f /var/cache/samba/messages.tdb
|
||||
fi
|
||||
|
||||
# Remove winbind nss client symlink
|
||||
@ -376,6 +426,9 @@ if [ $1 = 0 ] ; then
|
||||
if [ -e /var/log/samba ]; then
|
||||
rm -rf /var/log/samba
|
||||
fi
|
||||
if [ -e /var/cache/samba ]; then
|
||||
rm -rf /var/cache/samba
|
||||
fi
|
||||
|
||||
# Remove swat entries from /etc/inetd.conf and /etc/services
|
||||
cd /etc
|
||||
@ -403,56 +456,61 @@ if [ $0 != 0 ]; then
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README COPYING Manifest Read-Manifest-Now
|
||||
%doc WHATSNEW.txt Roadmap
|
||||
%doc docs
|
||||
%doc swat/README
|
||||
%doc examples
|
||||
%attr(-,root,root) %{prefix}/sbin/smbd
|
||||
%attr(-,root,root) %{prefix}/sbin/nmbd
|
||||
%attr(-,root,root) %{prefix}/sbin/swat
|
||||
%attr(-,root,root) %{prefix}/sbin/smbmnt
|
||||
%attr(-,root,root) %{prefix}/sbin/smbmount
|
||||
%attr(-,root,root) %{prefix}/sbin/smbumount
|
||||
%attr(-,root,root) %{prefix}/sbin/winbindd
|
||||
%attr(-,root,root) /sbin/mount.smbfs
|
||||
%attr(-,root,root) /sbin/mount.smb
|
||||
%attr(-,root,root) %{prefix}/bin/mksmbpasswd.sh
|
||||
%attr(-,root,root) %{prefix}/bin/smbclient
|
||||
%attr(-,root,root) %{prefix}/bin/smbspool
|
||||
%attr(-,root,root) %{prefix}/bin/rpcclient
|
||||
%attr(-,root,root) %{prefix}/bin/testparm
|
||||
%attr(-,root,root) %{prefix}/bin/testprns
|
||||
%attr(-,root,root) %{prefix}/bin/findsmb
|
||||
%attr(-,root,root) %{prefix}/bin/smbstatus
|
||||
%attr(-,root,root) %{prefix}/bin/nmblookup
|
||||
%attr(-,root,root) %{prefix}/bin/make_printerdef
|
||||
%attr(-,root,root) %{prefix}/bin/smbpasswd
|
||||
%attr(-,root,root) %{prefix}/bin/smbtar
|
||||
%attr(-,root,root) %{prefix}/bin/smbprint
|
||||
%attr(-,root,root) %{prefix}/bin/smbcontrol
|
||||
%attr(-,root,root) %{prefix}/bin/smbcacls
|
||||
%attr(-,root,root) %{prefix}/bin/wbinfo
|
||||
%{prefix}/sbin/smbd
|
||||
%{prefix}/sbin/nmbd
|
||||
%{prefix}/sbin/swat
|
||||
%{prefix}/sbin/smbmnt
|
||||
%{prefix}/sbin/smbmount
|
||||
%{prefix}/sbin/smbumount
|
||||
%{prefix}/sbin/winbindd
|
||||
/sbin/mount.smbfs
|
||||
/sbin/mount.smb
|
||||
%{prefix}/bin/mksmbpasswd.sh
|
||||
%{prefix}/bin/smbclient
|
||||
%{prefix}/bin/smbspool
|
||||
%{prefix}/bin/rpcclient
|
||||
%{prefix}/bin/testparm
|
||||
%{prefix}/bin/testprns
|
||||
%{prefix}/bin/findsmb
|
||||
%{prefix}/bin/smbstatus
|
||||
%{prefix}/bin/nmblookup
|
||||
%{prefix}/bin/make_smbcodepage
|
||||
%{prefix}/bin/make_unicodemap
|
||||
%{prefix}/bin/make_printerdef
|
||||
%{prefix}/bin/smbpasswd
|
||||
%{prefix}/bin/smbtar
|
||||
%{prefix}/bin/smbprint
|
||||
%{prefix}/bin/smbcontrol
|
||||
%{prefix}/bin/smbcacls
|
||||
%{prefix}/bin/wbinfo
|
||||
%attr(755,root,root) /lib/libnss_wins.s*
|
||||
%attr(-,root,root) %{prefix}/share/swat/help/*
|
||||
%attr(-,root,root) %{prefix}/share/swat/images/*
|
||||
%attr(-,root,root) %{prefix}/share/swat/include/header.html
|
||||
%attr(-,root,root) %{prefix}/share/swat/include/footer.html
|
||||
%attr(-,root,root) %{prefix}/share/swat/using_samba/*
|
||||
%attr(-,root,root) %config(noreplace) /etc/samba/lmhosts
|
||||
%attr(-,root,root) %config(noreplace) /etc/samba/smb.conf
|
||||
%attr(-,root,root) %config(noreplace) /etc/samba/smbusers
|
||||
%attr(-,root,root) /etc/samba/samba.stack
|
||||
%attr(-,root,root) /etc/samba/samba.xinetd
|
||||
%attr(-,root,root) /etc/rc.d/init.d/smb
|
||||
%attr(-,root,root) /etc/logrotate.d/samba
|
||||
%attr(-,root,root) %config(noreplace) /etc/pam.d/samba
|
||||
%attr(-,root,root) MANDIR_MACRO/man1/*
|
||||
%attr(-,root,root) MANDIR_MACRO/man5/*
|
||||
%attr(-,root,root) MANDIR_MACRO/man7/*
|
||||
%attr(-,root,root) MANDIR_MACRO/man8/*
|
||||
%attr(755,root,root) %dir /var/lock/samba
|
||||
%attr(-,root,root) %dir /var/log/samba
|
||||
%{prefix}/share/swat/help/*
|
||||
%{prefix}/share/swat/images/*
|
||||
%{prefix}/share/swat/include/header.html
|
||||
%{prefix}/share/swat/include/footer.html
|
||||
%{prefix}/share/swat/using_samba/*
|
||||
%config(noreplace) /etc/samba/lmhosts
|
||||
%config(noreplace) /etc/samba/smb.conf
|
||||
%config(noreplace) /etc/samba/smbusers
|
||||
/etc/samba/samba.stack
|
||||
/etc/samba/samba.xinetd
|
||||
/etc/rc.d/init.d/smb
|
||||
/etc/logrotate.d/samba
|
||||
%config(noreplace) /etc/pam.d/samba
|
||||
MANDIR_MACRO/man1/*
|
||||
MANDIR_MACRO/man5/*
|
||||
MANDIR_MACRO/man7/*
|
||||
MANDIR_MACRO/man8/*
|
||||
%dir /etc/codepages/*
|
||||
%attr(755,root,root) %dir /var/cache/samba
|
||||
%dir /var/log/samba
|
||||
%dir /var/run/samba
|
||||
%attr(1777,root,root) %dir /var/spool/samba
|
||||
%attr(-,root,root) /lib/libnss_winbind.so
|
||||
%attr(-,root,root) /lib/security/pam_winbind.so
|
||||
|
@ -13,8 +13,10 @@
|
||||
# Check that networking is up.
|
||||
[ ${NETWORKING} = "no" ] && exit 0
|
||||
|
||||
CONFIG=/etc/samba/smb.conf
|
||||
|
||||
# Check that smb.conf exists.
|
||||
[ -f /etc/samba/smb.conf ] || exit 0
|
||||
[ -f $CONFIG ] || exit 0
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
@ -22,19 +24,26 @@ case "$1" in
|
||||
echo -n "Starting SMB services: "
|
||||
daemon smbd -D
|
||||
daemon nmbd -D
|
||||
if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then
|
||||
daemon winbindd
|
||||
fi
|
||||
echo
|
||||
touch /var/lock/subsys/smb
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down SMB services: "
|
||||
killproc smbd
|
||||
killproc nmbd
|
||||
killproc smbd -TERM
|
||||
killproc nmbd -TERM
|
||||
if [ "`ps -ef | grep winbind | grep -v grep`" ]; then
|
||||
killproc winbindd
|
||||
fi
|
||||
rm -f /var/lock/subsys/smb
|
||||
echo ""
|
||||
;;
|
||||
status)
|
||||
status smbd
|
||||
status nmbd
|
||||
status winbindd
|
||||
;;
|
||||
restart)
|
||||
echo -n "Restarting SMB services: "
|
||||
|
@ -73,7 +73,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
$name = "unknown nis name";
|
||||
}
|
||||
} else {
|
||||
/(\S+)/;
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$name = $1;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
@name = grep(/<00> - <GROUP>/,@nmblookup);
|
||||
$_ = @name[0];
|
||||
if ($_) {
|
||||
/(\S+)/;
|
||||
/(.{1,15})\s+<00>\s+/;
|
||||
$_ = "[$1]";
|
||||
} else {
|
||||
$_ = "Unknown Workgroup";
|
||||
|
@ -33,7 +33,7 @@ EOF
|
||||
|
||||
if [ ! -z "$PKG_INSTALL_ROOT" ]
|
||||
then
|
||||
CAT <<EOF
|
||||
cat <<EOF
|
||||
The SWAT settings will not take effect till you send a hangup (HUP) signal
|
||||
to inetd on the target system.
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
*.po
|
||||
*.po32
|
||||
.headers.stamp
|
||||
.proto.stamp
|
||||
.inslog2
|
||||
.ix*
|
||||
.proto.check
|
||||
.proto.stamp
|
||||
ID
|
||||
ID
|
||||
Makefile
|
||||
@ -10,10 +12,16 @@ bin
|
||||
config.cache
|
||||
config.log
|
||||
config.status
|
||||
configure.tridge
|
||||
cvs.log
|
||||
diffs
|
||||
dmalloc.log
|
||||
dmallog.log
|
||||
dox
|
||||
libtool
|
||||
so_locations
|
||||
tca.log
|
||||
testdir
|
||||
testtmp
|
||||
trace.out
|
||||
typescript*
|
||||
|
@ -59,6 +59,11 @@ Here are some other suggestions:
|
||||
6) explicitly add const qualifiers on parm passing in functions where parm
|
||||
is input only (somewhat controversial but const can be #defined away)
|
||||
|
||||
7) when passing a va_list as an arg, or assigning one to another
|
||||
please use the VA_COPY() macro
|
||||
reason: on some platforms, va_list is a struct that must be
|
||||
initialized in each function...can SEGV if you don't.
|
||||
|
||||
8) discourage use of threads
|
||||
reason: portability (also see architecture.doc)
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
# Makefile.in for Samba - rewritten for autoconf support
|
||||
# Copyright Andrew Tridgell 1992-1998
|
||||
# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
|
||||
# Copyright Andrew Barteltt 2002
|
||||
###########################################################################
|
||||
|
||||
prefix=@prefix@
|
||||
@ -67,9 +68,15 @@ SWATDIR = @swatdir@
|
||||
# the directory where lock files go
|
||||
LOCKDIR = @lockdir@
|
||||
|
||||
# the directorty where pid files go
|
||||
PIDDIR = @piddir@
|
||||
# man pages language(s)
|
||||
man_langs = "@manlangs@"
|
||||
|
||||
LIBSMBCLIENT_MAJOR=0
|
||||
LIBSMBCLIENT_MINOR=1
|
||||
|
||||
|
||||
FLAGS1 = $(CFLAGS) @FLAGS1@ -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper -I. $(CPPFLAGS) -I$(srcdir)
|
||||
FLAGS2 =
|
||||
FLAGS3 =
|
||||
@ -82,7 +89,7 @@ PASSWD_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DPRIVATE_DIR=\"$(PRIVAT
|
||||
PATH_FLAGS1 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DSBINDIR=\"$(SBINDIR)\"
|
||||
PATH_FLAGS2 = $(PATH_FLAGS1) -DBINDIR=\"$(BINDIR)\" -DDRIVERFILE=\"$(DRIVERFILE)\"
|
||||
PATH_FLAGS3 = $(PATH_FLAGS2) -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
|
||||
PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\" -DLOCKDIR=\"$(LOCKDIR)\"
|
||||
PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\"
|
||||
PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" -DLOGFILEBASE=\"$(LOGFILEBASE)\"
|
||||
PATH_FLAGS = $(PATH_FLAGS5) $(PASSWD_FLAGS)
|
||||
|
||||
@ -93,16 +100,17 @@ WINBIND_LPROGS = @WINBIND_LTARGETS@
|
||||
|
||||
SPROGS = bin/smbd bin/nmbd bin/swat bin/wrepld @WINBIND_STARGETS@
|
||||
PROGS1 = bin/smbclient bin/net bin/smbspool bin/testparm bin/testprns bin/smbstatus bin/smbcontrol bin/smbtree bin/tdbbackup @RUNPROG@ @WINBIND_TARGETS@
|
||||
PROGS2 = bin/smbpasswd bin/rpcclient bin/smbcacls @WRAP@ @WRAP32@ @PAM_MOD@
|
||||
PROGS2 = bin/smbpasswd bin/rpcclient bin/smbcacls @WRAPPROG@ @WRAP@ @WRAP32@ @PAM_MOD@
|
||||
MPROGS = @MPROGS@
|
||||
LPROGS = $(WINBIND_PAM_PROGS) $(WINBIND_LPROGS)
|
||||
|
||||
PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup bin/pdbedit bin/smbgroupedit
|
||||
TORTURE_PROGS = bin/smbtorture bin/msgtest bin/masktest bin/locktest \
|
||||
bin/locktest2 bin/nsstest
|
||||
SHLIBS = libsmbclient
|
||||
SHLIBS = @LIBSMBCLIENT@
|
||||
|
||||
SCRIPTS = $(srcdir)/script/smbtar $(srcdir)/script/addtosmbpass $(srcdir)/script/convert_smbpasswd
|
||||
SCRIPTS = $(srcdir)/script/smbtar $(srcdir)/script/addtosmbpass $(srcdir)/script/convert_smbpasswd \
|
||||
$(srcdir)/script/findsmb
|
||||
|
||||
QUOTAOBJS=@QUOTAOBJS@
|
||||
|
||||
@ -122,11 +130,11 @@ LIB_OBJ = lib/charcnv.o lib/debug.o lib/fault.o \
|
||||
lib/bitmap.o lib/crc32.o lib/snprintf.o lib/dprintf.o \
|
||||
lib/xfile.o lib/wins_srv.o \
|
||||
lib/util_str.o lib/util_sid.o \
|
||||
lib/util_unistr.o lib/util_file.o \
|
||||
lib/util.o lib/util_sock.o lib/util_sec.o smbd/ssl.o \
|
||||
lib/util_unistr.o lib/util_file.o lib/data_blob.o \
|
||||
lib/util.o lib/util_sock.o lib/util_sec.o \
|
||||
lib/talloc.o lib/hash.o lib/substitute.o lib/fsusage.o \
|
||||
lib/ms_fnmatch.o lib/select.o lib/error.o lib/messages.o \
|
||||
lib/tallocmsg.o lib/dmallocmsg.o \
|
||||
lib/server_mutex.o lib/tallocmsg.o lib/dmallocmsg.o \
|
||||
lib/md5.o lib/hmacmd5.o lib/iconv.o lib/smbpasswd.o \
|
||||
nsswitch/wb_client.o nsswitch/wb_common.o \
|
||||
lib/pam_errors.o intl/lang_tdb.o lib/account_pol.o \
|
||||
@ -141,8 +149,12 @@ PARAM_OBJ = param/loadparm.o param/params.o dynconfig.o
|
||||
|
||||
LIBADS_OBJ = libads/ldap.o libads/ldap_printer.o libads/sasl.o \
|
||||
libads/krb5_setpw.o libads/kerberos.o libads/ldap_user.o \
|
||||
libads/ads_struct.o libads/ads_status.o passdb/secrets.o \
|
||||
libads/util.o libads/disp_sec.o
|
||||
libads/ads_struct.o libads/ads_status.o \
|
||||
libads/disp_sec.o
|
||||
|
||||
LIBADS_SERVER_OBJ = libads/util.o libads/kerberos_verify.o
|
||||
|
||||
SECRETS_OBJ = passdb/secrets.o
|
||||
|
||||
LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
|
||||
libsmb/clikrb5.o libsmb/clispnego.o libsmb/asn1.o \
|
||||
@ -154,19 +166,22 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
|
||||
libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \
|
||||
libsmb/clioplock.o libsmb/errormap.o libsmb/clirap2.o \
|
||||
libsmb/passchange.o libsmb/unexpected.o libsmb/doserr.o \
|
||||
$(RPC_PARSE_OBJ1) $(LIBADS_OBJ)
|
||||
$(RPC_PARSE_OBJ1)
|
||||
|
||||
LIBMSRPC_OBJ = libsmb/cli_lsarpc.o libsmb/cli_samr.o libsmb/cli_spoolss.o \
|
||||
LIBMSRPC_OBJ = libsmb/cli_lsarpc.o libsmb/cli_samr.o \
|
||||
libsmb/cli_netlogon.o libsmb/cli_srvsvc.o libsmb/cli_wkssvc.o \
|
||||
libsmb/cli_dfs.o libsmb/cli_reg.o libsmb/trust_passwd.o\
|
||||
rpc_client/cli_pipe.o libsmb/cli_pipe_util.o
|
||||
libsmb/cli_dfs.o libsmb/cli_reg.o \
|
||||
rpc_client/cli_pipe.o libsmb/cli_spoolss.o libsmb/cli_spoolss_notify.o
|
||||
|
||||
LIBMSRPC_SERVER_OBJ = libsmb/trust_passwd.o
|
||||
|
||||
LIBMSRPC_PICOBJ = $(LIBMSRPC_OBJ:.o=.po)
|
||||
|
||||
RPC_SERVER_OBJ = rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o \
|
||||
rpc_server/srv_lsa_hnd.o rpc_server/srv_netlog.o rpc_server/srv_netlog_nt.o \
|
||||
rpc_server/srv_pipe_hnd.o rpc_server/srv_reg.o rpc_server/srv_reg_nt.o \
|
||||
rpc_server/srv_samr.o rpc_server/srv_samr_nt.o rpc_server/srv_srvsvc.o rpc_server/srv_srvsvc_nt.o \
|
||||
rpc_server/srv_samr.o rpc_server/srv_samr_nt.o rpc_server/srv_samr_util.o \
|
||||
rpc_server/srv_srvsvc.o rpc_server/srv_srvsvc_nt.o \
|
||||
rpc_server/srv_util.o rpc_server/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o \
|
||||
rpc_server/srv_pipe.o rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o \
|
||||
rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o
|
||||
@ -183,16 +198,17 @@ RPC_PARSE_OBJ = rpc_parse/parse_lsa.o rpc_parse/parse_net.o \
|
||||
rpc_parse/parse_spoolss.o rpc_parse/parse_dfs.o
|
||||
|
||||
|
||||
RPC_CLIENT_OBJ = rpc_client/cli_netlogon.o rpc_client/cli_pipe.o \
|
||||
rpc_client/cli_login.o \
|
||||
rpc_client/cli_spoolss_notify.o
|
||||
RPC_CLIENT_OBJ = rpc_client/cli_pipe.o
|
||||
|
||||
LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o
|
||||
|
||||
PASSDB_OBJ = passdb/passdb.o passdb/pdb_interface.o passdb/pdb_get_set.o \
|
||||
PASSDB_GET_SET_OBJ = passdb/pdb_get_set.o
|
||||
|
||||
PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o passdb/pdb_interface.o \
|
||||
passdb/machine_sid.o passdb/pdb_smbpasswd.o \
|
||||
passdb/pdb_tdb.o passdb/pdb_ldap.o passdb/pdb_plugin.o \
|
||||
passdb/pdb_nisplus.o
|
||||
passdb/pdb_nisplus.o passdb/pdb_unix.o passdb/util_sam_sid.o \
|
||||
passdb/pdb_compat.o
|
||||
|
||||
GROUPDB_OBJ = groupdb/mapping.o
|
||||
|
||||
@ -228,7 +244,6 @@ SMBD_OBJ1 = smbd/server.o smbd/files.o smbd/chgpasswd.o smbd/connection.o \
|
||||
printing/printfsp.o lib/util_seaccess.o smbd/srvstr.o \
|
||||
smbd/build_options.o \
|
||||
smbd/change_trust_pw.o \
|
||||
rpc_client/cli_spoolss_notify.o \
|
||||
$(MANGLE_OBJ)
|
||||
|
||||
|
||||
@ -236,15 +251,17 @@ PRINTING_OBJ = printing/pcap.o printing/print_svid.o \
|
||||
printing/print_cups.o printing/print_generic.o \
|
||||
printing/lpq_parse.o printing/load.o
|
||||
|
||||
PRINTBACKEND_OBJ = printing/printing.o printing/nt_printing.o
|
||||
PRINTBACKEND_OBJ = printing/printing.o printing/nt_printing.o printing/notify.o
|
||||
|
||||
MSDFS_OBJ = msdfs/msdfs.o
|
||||
|
||||
SMBD_OBJ = $(SMBD_OBJ1) $(MSDFS_OBJ) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \
|
||||
$(RPC_SERVER_OBJ) $(RPC_PARSE_OBJ) \
|
||||
$(RPC_SERVER_OBJ) $(RPC_PARSE_OBJ) $(SECRETS_OBJ) \
|
||||
$(LOCKING_OBJ) $(PASSDB_OBJ) $(PRINTING_OBJ) $(PROFILE_OBJ) \
|
||||
$(LIB_OBJ) $(PRINTBACKEND_OBJ) $(QUOTAOBJS) $(OPLOCK_OBJ) \
|
||||
$(NOTIFY_OBJ) $(GROUPDB_OBJ) $(AUTH_OBJ) $(LIBMSRPC_OBJ)
|
||||
$(NOTIFY_OBJ) $(GROUPDB_OBJ) $(AUTH_OBJ) \
|
||||
$(LIBMSRPC_OBJ) $(LIBMSRPC_SERVER_OBJ) \
|
||||
$(LIBADS_OBJ) $(LIBADS_SERVER_OBJ)
|
||||
|
||||
|
||||
NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \
|
||||
@ -269,11 +286,12 @@ WREPL_OBJ1 = wrepld/server.o wrepld/process.o wrepld/parser.o wrepld/socket.o \
|
||||
WREPL_OBJ = $(WREPL_OBJ1) $(PARAM_OBJ) $(UBIQX_OBJ) \
|
||||
$(PROFILE_OBJ) $(LIB_OBJ)
|
||||
|
||||
SWAT_OBJ = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \
|
||||
web/swat.o web/neg_lang.o $(PRINTING_OBJ) $(LIBSMB_OBJ) $(LOCKING_OBJ) \
|
||||
$(PARAM_OBJ) $(PASSDB_OBJ) \
|
||||
$(UBIQX_OBJ) $(LIB_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) \
|
||||
smbwrapper/shared.o
|
||||
SWAT_OBJ1 = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \
|
||||
web/swat.o web/neg_lang.o
|
||||
|
||||
SWAT_OBJ = $(SWAT_OBJ1) $(PRINTING_OBJ) $(LIBSMB_OBJ) $(LOCKING_OBJ) \
|
||||
$(PARAM_OBJ) $(PASSDB_OBJ) $(SECRETS_OBJ) \
|
||||
$(UBIQX_OBJ) $(LIB_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ)
|
||||
|
||||
SMBSH_OBJ = smbwrapper/smbsh.o smbwrapper/shared.o \
|
||||
$(PARAM_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
|
||||
@ -285,10 +303,10 @@ STATUS_OBJ = utils/status.o $(LOCKING_OBJ) $(PARAM_OBJ) \
|
||||
$(UBIQX_OBJ) $(PROFILE_OBJ) $(LIB_OBJ)
|
||||
|
||||
SMBCONTROL_OBJ = utils/smbcontrol.o $(LOCKING_OBJ) $(PARAM_OBJ) \
|
||||
$(UBIQX_OBJ) $(PROFILE_OBJ) $(LIB_OBJ)
|
||||
$(UBIQX_OBJ) $(PROFILE_OBJ) $(LIB_OBJ) printing/notify.o
|
||||
|
||||
SMBTREE_OBJ = utils/smbtree.o $(LOCKING_OBJ) $(PARAM_OBJ) \
|
||||
$(UBIQX_OBJ) $(PROFILE_OBJ) $(LIB_OBJ) $(LIBSMB_OBJ)
|
||||
$(UBIQX_OBJ) $(PROFILE_OBJ) $(LIB_OBJ) $(LIBSMB_OBJ)
|
||||
|
||||
TESTPARM_OBJ = utils/testparm.o \
|
||||
$(PARAM_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
|
||||
@ -296,75 +314,85 @@ TESTPARM_OBJ = utils/testparm.o \
|
||||
TESTPRNS_OBJ = utils/testprns.o $(PARAM_OBJ) $(PRINTING_OBJ) $(UBIQX_OBJ) \
|
||||
$(LIB_OBJ)
|
||||
|
||||
SMBPASSWD_OBJ = utils/smbpasswd.o $(PARAM_OBJ) \
|
||||
SMBPASSWD_OBJ = utils/smbpasswd.o $(PARAM_OBJ) $(SECRETS_OBJ) \
|
||||
$(LIBSMB_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ)\
|
||||
$(UBIQX_OBJ) $(LIB_OBJ)
|
||||
|
||||
PDBEDIT_OBJ = utils/pdbedit.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) \
|
||||
$(UBIQX_OBJ) $(LIB_OBJ) $(GROUPDB_OBJ)
|
||||
$(UBIQX_OBJ) $(LIB_OBJ) $(GROUPDB_OBJ) $(SECRETS_OBJ)
|
||||
|
||||
SMBGROUPEDIT_OBJ = utils/smbgroupedit.o $(GROUPDB_OBJ) $(PARAM_OBJ) \
|
||||
$(LIBSMB_OBJ) $(PASSDB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
|
||||
$(LIBSMB_OBJ) $(PASSDB_OBJ) $(SECRETS_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
|
||||
|
||||
RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
|
||||
rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \
|
||||
rpcclient/cmd_netlogon.o rpcclient/cmd_srvsvc.o \
|
||||
rpcclient/cmd_dfs.o rpcclient/cmd_reg.o \
|
||||
rpc_client/cli_login.o rpc_client/cli_netlogon.o \
|
||||
rpcclient/display_sec.o
|
||||
|
||||
RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \
|
||||
$(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \
|
||||
$(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(LIBMSRPC_OBJ) \
|
||||
$(READLINE_OBJ) $(GROUPDB_OBJ)
|
||||
$(READLINE_OBJ) $(GROUPDB_OBJ) \
|
||||
$(LIBADS_OBJ) $(SECRETS_OBJ)
|
||||
|
||||
SAMSYNC_OBJ1 = rpcclient/samsync.o rpcclient/display_sec.o
|
||||
|
||||
SAMSYNC_OBJ = $(SAMSYNC_OBJ1) \
|
||||
$(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \
|
||||
$(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(LIBMSRPC_OBJ) \
|
||||
$(GROUPDB_OBJ)
|
||||
$(GROUPDB_OBJ) $(SECRETS_OBJ)
|
||||
|
||||
PAM_WINBIND_OBJ = nsswitch/pam_winbind.po nsswitch/wb_common.po lib/snprintf.po
|
||||
|
||||
SMBW_OBJ = smbwrapper/smbw.o \
|
||||
SMBW_OBJ1 = smbwrapper/smbw.o \
|
||||
smbwrapper/smbw_dir.o smbwrapper/smbw_stat.o \
|
||||
smbwrapper/realcalls.o smbwrapper/shared.o \
|
||||
smbwrapper/smbw_cache.o \
|
||||
$(LIBSMB_OBJ) $(PARAM_OBJ) \
|
||||
smbwrapper/smbw_cache.o
|
||||
|
||||
SMBW_OBJ = $(SMBW_OBJ1) $(LIBSMB_OBJ) $(PARAM_OBJ) \
|
||||
$(UBIQX_OBJ) $(LIB_OBJ)
|
||||
|
||||
SMBWRAPPER_OBJ = $(SMBW_OBJ) smbwrapper/wrapped.o
|
||||
SMBWRAPPER_OBJ1 = smbwrapper/wrapped.o
|
||||
|
||||
LIBSMBCLIENT_OBJ = libsmb/libsmbclient.o $(LIB_OBJ) $(LIBSMB_OBJ) $(PARAM_OBJ) $(UBIQX_OBJ)
|
||||
SMBWRAPPER_OBJ = $(SMBW_OBJ) $(SMBWRAPPER_OBJ1)
|
||||
|
||||
CLIENT_OBJ = client/client.o client/clitar.o \
|
||||
$(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \
|
||||
$(READLINE_OBJ)
|
||||
LIBSMBCLIENT_OBJ = libsmb/libsmbclient.o libsmb/libsmb_compat.o \
|
||||
libsmb/libsmb_cache.o $(LIB_OBJ) \
|
||||
$(LIBSMB_OBJ) $(PARAM_OBJ) $(UBIQX_OBJ)
|
||||
|
||||
NET_OBJ = utils/net.o utils/net_ads.o utils/net_help.o \
|
||||
utils/net_rap.o utils/net_rpc.o \
|
||||
utils/net_rpc_join.o utils/net_time.o utils/net_lookup.o \
|
||||
$(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ) \
|
||||
$(GROUPDB_OBJ) $(PARAM_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
|
||||
CLIENT_OBJ1 = client/client.o client/clitar.o
|
||||
|
||||
CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \
|
||||
$(READLINE_OBJ)
|
||||
|
||||
CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
|
||||
NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \
|
||||
utils/net_rap.o utils/net_rpc.o \
|
||||
utils/net_rpc_join.o utils/net_time.o utils/net_lookup.o
|
||||
|
||||
NET_OBJ = $(NET_OBJ1) $(SECRETS_OBJ) $(LIBSMB_OBJ) \
|
||||
$(RPC_PARSE_OBJ) $(PASSDB_GET_SET_OBJ) \
|
||||
$(PARAM_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \
|
||||
$(LIBMSRPC_OBJ) $(LIBMSRPC_SERVER_OBJ) \
|
||||
$(LIBADS_OBJ) $(LIBADS_SERVER_OBJ)
|
||||
|
||||
CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
|
||||
|
||||
MOUNT_OBJ = client/smbmount.o \
|
||||
$(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
|
||||
$(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
|
||||
|
||||
MNT_OBJ = client/smbmnt.o \
|
||||
$(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
|
||||
MNT_OBJ = client/smbmnt.o
|
||||
|
||||
UMOUNT_OBJ = client/smbumount.o \
|
||||
$(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
|
||||
$(PARAM_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
|
||||
|
||||
NMBLOOKUP_OBJ = utils/nmblookup.o $(PARAM_OBJ) $(UBIQX_OBJ) \
|
||||
$(LIBSMB_OBJ) $(LIB_OBJ)
|
||||
|
||||
SMBTORTURE_OBJ = torture/torture.o torture/nbio.o torture/scanner.o torture/utable.o \
|
||||
torture/denytest.o torture/mangle_test.o \
|
||||
SMBTORTURE_OBJ1 = torture/torture.o torture/nbio.o torture/scanner.o torture/utable.o \
|
||||
torture/denytest.o torture/mangle_test.o
|
||||
|
||||
SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) \
|
||||
$(LIBSMB_OBJ) $(PARAM_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
|
||||
|
||||
MASKTEST_OBJ = torture/masktest.o $(LIBSMB_OBJ) $(PARAM_OBJ) \
|
||||
@ -383,8 +411,8 @@ LOCKTEST2_OBJ = torture/locktest2.o $(LOCKING_OBJ) $(LIBSMB_OBJ) $(PARAM_OBJ) \
|
||||
$(UBIQX_OBJ) $(LIB_OBJ)
|
||||
|
||||
SMBCACLS_OBJ = utils/smbcacls.o $(LOCKING_OBJ) $(LIBSMB_OBJ) $(PARAM_OBJ) \
|
||||
$(UBIQX_OBJ) $(LIB_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ) \
|
||||
$(LIBMSRPC_OBJ) $(GROUPDB_OBJ)
|
||||
$(UBIQX_OBJ) $(LIB_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_GET_SET_OBJ) \
|
||||
$(LIBMSRPC_OBJ)
|
||||
|
||||
TALLOCTORT_OBJ = lib/talloctort.o $(LIB_OBJ) $(PARAM_OBJ) $(UBIQX_OBJ)
|
||||
|
||||
@ -396,18 +424,25 @@ RPCTORTURE_OBJ = torture/rpctorture.o \
|
||||
rpcclient/cmd_srvsvc.o \
|
||||
rpcclient/cmd_netlogon.o \
|
||||
$(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \
|
||||
$(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ)
|
||||
$(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_GET_SET_OBJ)
|
||||
|
||||
DEBUG2HTML_OBJ = utils/debug2html.o ubiqx/debugparse.o
|
||||
|
||||
SMBFILTER_OBJ = utils/smbfilter.o $(LIBSMB_OBJ) $(PARAM_OBJ) \
|
||||
$(UBIQX_OBJ) $(LIB_OBJ)
|
||||
|
||||
PROTO_OBJ = $(SMBD_OBJ) $(NMBD_OBJ) $(SWAT_OBJ) $(CLIENT_OBJ) \
|
||||
$(SMBWRAPPER_OBJ) $(SMBTORTURE_OBJ) $(RPCCLIENT_OBJ1) \
|
||||
$(LIBMSRPC_OBJ) $(RPC_CLIENT_OBJ) $(AUTH_OBJ) $(NET_OBJ)
|
||||
PROTO_OBJ = $(SMBD_OBJ1) $(NMBD_OBJ1) $(SWAT_OBJ1) $(LIB_OBJ) $(LIBSMB_OBJ) \
|
||||
$(SMBWRAPPER_OBJ1) $(SMBTORTURE_OBJ1) $(RPCCLIENT_OBJ1) \
|
||||
$(LIBMSRPC_OBJ) $(LIBMSRPC_SERVER_OBJ) $(RPC_CLIENT_OBJ) \
|
||||
$(RPC_SERVER_OBJ) $(RPC_PARSE_OBJ) \
|
||||
$(AUTH_OBJ) $(PARAM_OBJ) $(LOCKING_OBJ) $(SECRETS_OBJ) \
|
||||
$(PRINTING_OBJ) $(PRINTBACKEND_OBJ) $(OPLOCK_OBJ) $(NOTIFY_OBJ) \
|
||||
$(QUOTAOBJS) $(PASSDB_OBJ) $(GROUPDB_OBJ) $(MSDFS_OBJ) \
|
||||
$(READLINE_OBJ) $(PROFILE_OBJ) $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ)
|
||||
|
||||
NSS_OBJ_0 = nsswitch/wins.o $(PARAM_OBJ) $(UBIQX_OBJ) $(LIBSMB_OBJ) \
|
||||
$(LIB_OBJ) $(NSSWINS_OBJ)
|
||||
|
||||
NSS_OBJ_0 = nsswitch/wins.o $(PARAM_OBJ) $(UBIQX_OBJ) $(LIBSMB_OBJ) $(LIB_OBJ) $(NSSWINS_OBJ)
|
||||
NSS_OBJ = $(NSS_OBJ_0:.o=.po)
|
||||
|
||||
PICOBJS = $(SMBWRAPPER_OBJ:.o=.po)
|
||||
@ -442,16 +477,17 @@ WINBINDD_OBJ1 = \
|
||||
nsswitch/winbindd_cm.o \
|
||||
nsswitch/winbindd_wins.o \
|
||||
nsswitch/winbindd_rpc.o \
|
||||
nsswitch/winbindd_ads.o
|
||||
nsswitch/winbindd_ads.o \
|
||||
nsswitch/winbindd_dual.o
|
||||
|
||||
WINBINDD_OBJ = \
|
||||
$(WINBINDD_OBJ1) $(NOPROTO_OBJ) $(PASSDB_OBJ) \
|
||||
$(WINBINDD_OBJ1) $(PASSDB_GET_SET_OBJ) \
|
||||
$(LIBNMB_OBJ) $(PARAM_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \
|
||||
$(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) \
|
||||
$(GROUPDB_OBJ) $(PROFILE_OBJ) $(UNIGRP_OBJ)
|
||||
$(PROFILE_OBJ) $(UNIGRP_OBJ) \
|
||||
$(SECRETS_OBJ) $(LIBADS_OBJ)
|
||||
|
||||
WBINFO_OBJ = nsswitch/wbinfo.o libsmb/smbencrypt.o libsmb/smbdes.o \
|
||||
passdb/secrets.o
|
||||
WBINFO_OBJ = nsswitch/wbinfo.o libsmb/smbencrypt.o libsmb/smbdes.o
|
||||
|
||||
WINBIND_NSS_OBJ = nsswitch/winbind_nss.o nsswitch/wb_common.o @WINBIND_NSS_EXTRA_OBJS@
|
||||
|
||||
@ -465,11 +501,11 @@ TDBBACKUP_OBJ = tdb/tdbbackup.o $(TDBBASE_OBJ)
|
||||
######################################################################
|
||||
# now the rules...
|
||||
######################################################################
|
||||
all : SHOWFLAGS include/proto.h include/wrepld_proto.h include/build_env.h $(SPROGS) $(PROGS) $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS) $(SHLIBS)
|
||||
all : SHOWFLAGS proto_exists $(SPROGS) $(PROGS) $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS) $(SHLIBS)
|
||||
|
||||
pam_smbpass : SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@
|
||||
|
||||
smbwrapper : SHOWFLAGS bin/smbsh bin/smbwrapper.@SHLIBEXT@ @WRAP32@
|
||||
smbwrapper : SHOWFLAGS @WRAPPROG@ @WRAP@ @WRAP32@
|
||||
|
||||
torture : SHOWFLAGS $(TORTURE_PROGS)
|
||||
|
||||
@ -616,7 +652,7 @@ bin/smbumount: $(UMOUNT_OBJ) bin/.dummy
|
||||
|
||||
bin/testparm: $(TESTPARM_OBJ) bin/.dummy
|
||||
@echo Linking $@
|
||||
@$(CC) $(FLAGS) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(LIBS)
|
||||
@$(CC) $(FLAGS) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(LIBS) @BUILD_POPT@
|
||||
|
||||
bin/testprns: $(TESTPRNS_OBJ) bin/.dummy
|
||||
@echo Linking $@
|
||||
@ -640,7 +676,7 @@ bin/smbpasswd: $(SMBPASSWD_OBJ) bin/.dummy
|
||||
|
||||
bin/pdbedit: $(PDBEDIT_OBJ) bin/.dummy
|
||||
@echo Linking $@
|
||||
@$(CC) $(FLAGS) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
|
||||
@$(CC) $(FLAGS) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) @BUILD_POPT@
|
||||
|
||||
bin/smbgroupedit: $(SMBGROUPEDIT_OBJ) bin/.dummy
|
||||
@echo Linking $@
|
||||
@ -702,17 +738,24 @@ bin/smbw_sample: $(SMBW_OBJ) utils/smbw_sample.o bin/.dummy
|
||||
@echo Linking $@
|
||||
@$(CC) $(FLAGS) -o $@ $(SMBW_OBJ) utils/smbw_sample.o $(LDFLAGS) $(LIBS)
|
||||
|
||||
bin/smbwrapper.@SHLIBEXT@: $(PICOBJS)
|
||||
bin/smbsh: $(SMBSH_OBJ) bin/.dummy
|
||||
@echo Linking $@
|
||||
@$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS)
|
||||
|
||||
bin/smbwrapper.@SHLIBEXT@: $(PICOBJS) bin/.dummy
|
||||
@echo Linking shared library $@
|
||||
@$(SHLD) $(LDSHFLAGS) -o $@ $(PICOBJS) $(LIBS)
|
||||
@$(SHLD) $(LDSHFLAGS) -o $@ $(PICOBJS) $(LIBS) \
|
||||
@SONAMEFLAG@`basename $@`
|
||||
|
||||
bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32)
|
||||
@echo Linking shared library $@
|
||||
@$(SHLD) -32 $(LDSHFLAGS) -o $@ $(PICOBJS32) $(LIBS)
|
||||
@$(SHLD) -32 $(LDSHFLAGS) -o $@ $(PICOBJS32) $(LIBS) \
|
||||
@SONAMEFLAG@`basename $@`
|
||||
|
||||
bin/libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS)
|
||||
echo Linking libsmbclient shared library $@
|
||||
$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_PICOBJS) $(LIBS)
|
||||
$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) \
|
||||
@SONAMEFLAG@`basename $@`.$(LIBSMBCLIENT_MAJOR)
|
||||
|
||||
bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS)
|
||||
@echo Linking libsmbclient non-shared library $@
|
||||
@ -720,35 +763,40 @@ bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS)
|
||||
|
||||
libsmbclient: bin/libsmbclient.a bin/libsmbclient.@SHLIBEXT@
|
||||
|
||||
bin/smbsh: $(SMBSH_OBJ) bin/.dummy
|
||||
@echo Linking $@
|
||||
@$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS)
|
||||
|
||||
nsswitch/libnss_wins.so: $(NSS_OBJ)
|
||||
@echo "Linking $@"
|
||||
@$(SHLD) $(LDSHFLAGS) -o $@ $(NSS_OBJ) -lc
|
||||
@$(SHLD) $(LDSHFLAGS) -o $@ $(NSS_OBJ) -lc \
|
||||
@SONAMEFLAG@`basename $@`
|
||||
|
||||
bin/winbindd: $(WINBINDD_OBJ) bin/.dummy
|
||||
@echo Linking $@
|
||||
@$(LINK) -o $@ $(WINBINDD_OBJ) $(DYNEXP) $(LIBS)
|
||||
|
||||
nsswitch/libns_winbind.so: $(WINBIND_NSS_PICOBJS)
|
||||
@echo "Linking $@"
|
||||
@$(SHLD) @LDSHFLAGS@ -o $@ $(WINBIND_NSS_PICOBJS) @WINBIND_NSS_EXTRA_LIBS@ \
|
||||
@SONAMEFLAG@`basename $@`
|
||||
|
||||
nsswitch/libnss_winbind.so: $(WINBIND_NSS_PICOBJS)
|
||||
@echo "Linking $@"
|
||||
@$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_NSS_PICOBJS) @WINBIND_NSS_EXTRA_LIBS@
|
||||
@$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_NSS_PICOBJS) @WINBIND_NSS_EXTRA_LIBS@ \
|
||||
@SONAMEFLAG@`basename $@`
|
||||
|
||||
nsswitch/pam_winbind.so: $(PAM_WINBIND_OBJ) bin/.dummy
|
||||
@echo Linking $@
|
||||
@$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ)
|
||||
@$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) \
|
||||
@SONAMEFLAG@`basename $@`
|
||||
|
||||
bin/wbinfo: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) \
|
||||
$(UBIQX_OBJ) @BUILD_POPT@ bin/.dummy
|
||||
bin/wbinfo: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) \
|
||||
$(UBIQX_OBJ) $(SECRETS_OBJ) @BUILD_POPT@ bin/.dummy
|
||||
@echo Linking $@
|
||||
@$(LINK) -o $@ $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) \
|
||||
$(UBIQX_OBJ) $(LIBS) @BUILD_POPT@
|
||||
@$(LINK) -o $@ $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) \
|
||||
$(UBIQX_OBJ) $(SECRETS_OBJ) $(LIBS) @BUILD_POPT@
|
||||
|
||||
bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_PICOOBJ)
|
||||
@echo "Linking shared library $@"
|
||||
$(SHLD) $(LDSHFLAGS) -symbolic -o $@ $(PAM_SMBPASS_PICOOBJ) -lpam $(DYNEXP) $(LIBS) -lc
|
||||
$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_SMBPASS_PICOOBJ) -lpam $(DYNEXP) $(LIBS) -lc
|
||||
|
||||
bin/libmsrpc.a: $(LIBMSRPC_PICOBJ)
|
||||
-$(AR) -rc $@ $(LIBMSRPC_PICOBJ)
|
||||
@ -826,38 +874,73 @@ clean: delheaders
|
||||
-rm -f core */*~ *~ */*.o */*.po */*.po32 */*.@SHLIBEXT@ \
|
||||
$(TOPFILES) $(PROGS) $(SPROGS) .headers.stamp
|
||||
|
||||
winbindd_proto:
|
||||
@cd $(srcdir) && $(SHELL) script/mkproto.sh $(AWK) \
|
||||
-h _WINBINDD_PROTO_H_ nsswitch/winbindd_proto.h \
|
||||
$(WINBINDD_OBJ1)
|
||||
# Making this target will just make sure that the prototype files
|
||||
# exist, not necessarily that they are up to date. Since they're
|
||||
# removed by "make clean" this will always be run when you do anything
|
||||
# afterwards.
|
||||
proto_exists: include/proto.h include/wrepld_proto.h include/build_env.h \
|
||||
nsswitch/winbindd_proto.h web/swat_proto.h \
|
||||
client/client_proto.h utils/net_proto.h
|
||||
|
||||
delheaders:
|
||||
@/bin/rm -f $(srcdir)/include/proto.h $(srcdir)/include/build_env.h
|
||||
@/bin/rm -f include/proto.h include/build_env.h
|
||||
@echo Removing prototype headers
|
||||
@/bin/rm -f $(srcdir)/include/proto.h $(srcdir)/include/build_env.h
|
||||
@/bin/rm -f $(srcdir)/include/wrepld_proto.h $(srcdir)/nsswitch/winbindd_proto.h
|
||||
@/bin/rm -f $(srcdir)/web/swat_proto.h
|
||||
@/bin/rm -f $(srcdir)/client/client_proto.h $(srcdir)/utils/net_proto.h
|
||||
|
||||
# we want our generated headers to be rebuilt if they don't exist, but not rebuilt every time
|
||||
.headers.stamp:
|
||||
@[ -f $@ ] || touch $@
|
||||
|
||||
$(PROTO_OBJ) : .headers.stamp
|
||||
@/bin/rm -f include/proto.h include/build_env.h include/wrepld_proto.h \
|
||||
nsswitch/winbindd_proto.h web/swat_proto.h \
|
||||
client/client_proto.h utils/net_proto.h
|
||||
|
||||
include/proto.h:
|
||||
@echo rebuilding include/proto.h
|
||||
@cd $(srcdir) && $(AWK) -f script/mkproto.awk `echo $(PROTO_OBJ) | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort -u | egrep -v 'ubiqx/|wrapped'` > $(builddir)/include/proto.h
|
||||
@echo Building include/proto.h
|
||||
@cd $(srcdir) && $(SHELL) script/mkproto.sh $(AWK) \
|
||||
-h _PROTO_H_ $(builddir)/include/proto.h \
|
||||
$(PROTO_OBJ)
|
||||
|
||||
include/build_env.h:
|
||||
@echo rebuilding include/build_env.h
|
||||
@echo Building include/build_env.h
|
||||
@cd $(srcdir) && $(SHELL) script/build_env.sh $(srcdir) $(builddir) $(CC) > $(builddir)/include/build_env.h
|
||||
|
||||
include/wrepld_proto.h:
|
||||
@echo rebuilding include/wrepld_proto.h
|
||||
@echo Building include/wrepld_proto.h
|
||||
@cd $(srcdir) && $(SHELL) script/mkproto.sh $(AWK) \
|
||||
-h _WREPLD_PROTO_H_ $(builddir)/include/wrepld_proto.h \
|
||||
$(WREPL_OBJ1)
|
||||
|
||||
headers: delheaders include/proto.h include/build_env.h include/wrepld_proto.h .headers.stamp
|
||||
nsswitch/winbindd_proto.h:
|
||||
@cd $(srcdir) && $(SHELL) script/mkproto.sh $(AWK) \
|
||||
-h _WINBINDD_PROTO_H_ nsswitch/winbindd_proto.h \
|
||||
$(WINBINDD_OBJ1)
|
||||
|
||||
proto: headers winbindd_proto
|
||||
web/swat_proto.h:
|
||||
@cd $(srcdir) && $(SHELL) script/mkproto.sh $(AWK) \
|
||||
-h _SWAT_PROTO_H_ web/swat_proto.h \
|
||||
$(SWAT_OBJ1)
|
||||
|
||||
client/client_proto.h:
|
||||
@cd $(srcdir) && $(SHELL) script/mkproto.sh $(AWK) \
|
||||
-h _CLIENT_PROTO_H_ client/client_proto.h \
|
||||
$(CLIENT_OBJ1)
|
||||
|
||||
utils/net_proto.h:
|
||||
@cd $(srcdir) && $(SHELL) script/mkproto.sh $(AWK) \
|
||||
-h _CLIENT_PROTO_H_ utils/net_proto.h \
|
||||
$(NET_OBJ1)
|
||||
|
||||
# "make headers" or "make proto" calls a subshell because we need to
|
||||
# make sure these commands are executed in sequence even for a
|
||||
# parallel make.
|
||||
headers:
|
||||
$(MAKE) delheaders include/proto.h include/build_env.h \
|
||||
include/wrepld_proto.h nsswitch/winbindd_proto.h \
|
||||
web/swat_proto.h client/client_proto.h \
|
||||
utils/net_proto.h
|
||||
|
||||
proto: headers
|
||||
|
||||
.PHONY: headers proto
|
||||
|
||||
etags:
|
||||
etags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/`
|
||||
|
@ -58,8 +58,6 @@
|
||||
#undef HAVE_SET_AUTH_PARAMETERS
|
||||
#undef WITH_SYSLOG
|
||||
#undef WITH_PROFILE
|
||||
#undef WITH_SSL
|
||||
#undef SSL_DIR
|
||||
#undef WITH_PAM
|
||||
#undef WITH_NISPLUS_HOME
|
||||
#undef WITH_AUTOMOUNT
|
||||
@ -71,6 +69,7 @@
|
||||
#undef REPLACE_INET_NTOA
|
||||
#undef HAVE_FILE_MACRO
|
||||
#undef HAVE_FUNCTION_MACRO
|
||||
#undef HAVE_VA_COPY
|
||||
#undef HAVE_SETRESUID_DECL
|
||||
#undef HAVE_SETRESUID
|
||||
#undef WITH_NETATALK
|
||||
@ -124,7 +123,10 @@
|
||||
#undef USE_SETRESUID
|
||||
#undef USE_SETREUID
|
||||
#undef USE_SETUIDX
|
||||
#undef HAVE_LIBDL
|
||||
#undef HAVE_DLOPEN
|
||||
#undef HAVE_DLCLOSE
|
||||
#undef HAVE_DLSYM
|
||||
#undef HAVE_DLERROR
|
||||
#undef SYSCONF_SC_NGROUPS_MAX
|
||||
#undef HAVE_UT_UT_NAME
|
||||
#undef HAVE_UT_UT_USER
|
||||
|
829
source3/aclocal.m4
vendored
829
source3/aclocal.m4
vendored
@ -93,723 +93,7 @@ define(AC_ADD_INCLUDE,
|
||||
EOF
|
||||
])
|
||||
|
||||
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
|
||||
## Copyright (C) 1996-1999 Free Software Foundation, Inc.
|
||||
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful, but
|
||||
## WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
##
|
||||
## As a special exception to the GNU General Public License, if you
|
||||
## distribute this file as part of a program that contains a
|
||||
## configuration script generated by Autoconf, you may include it under
|
||||
## the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# serial 40 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||
|
||||
# Save cache, so that ltconfig can load it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
AC_CACHE_LOAD
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
# serial 5
|
||||
|
||||
AC_DEFUN(AM_WITH_NLS,
|
||||
[AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
|
||||
USE_INCLUDED_LIBINTL=no
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS)
|
||||
# AC_MSG_CHECKING([whether included gettext is requested])
|
||||
# AC_ARG_WITH(included-gettext,
|
||||
# [ --with-included-gettext use the GNU gettext library included here],
|
||||
# nls_cv_force_use_gnu_gettext=$withval,
|
||||
# nls_cv_force_use_gnu_gettext=no)
|
||||
# AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
|
||||
|
||||
dnl ad-hoc fix to prevent configure from detecting
|
||||
dnl gettext on the system. use included-gettext as default.(rkawa)
|
||||
nls_cv_force_use_gnu_gettext="yes"
|
||||
|
||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||
dnl User does not insist on using GNU NLS library. Figure out what
|
||||
dnl to use. If gettext or catgets are available (in this order) we
|
||||
dnl use this. Else we have to fall back to GNU NLS library.
|
||||
dnl catgets is only used if permitted by option --with-catgets.
|
||||
nls_cv_header_intl=
|
||||
nls_cv_header_libgt=
|
||||
CATOBJEXT=NONE
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
|
||||
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
|
||||
|
||||
if test "$gt_cv_func_gettext_libc" != "yes"; then
|
||||
AC_CHECK_LIB(intl, bindtextdomain,
|
||||
[AC_CACHE_CHECK([for gettext in libintl],
|
||||
gt_cv_func_gettext_libintl,
|
||||
[AC_CHECK_LIB(intl, gettext,
|
||||
gt_cv_func_gettext_libintl=yes,
|
||||
gt_cv_func_gettext_libintl=no)],
|
||||
gt_cv_func_gettext_libintl=no)])
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_gettext_libc" = "yes" \
|
||||
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
|
||||
AC_DEFINE(HAVE_GETTEXT)
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||
if test "$MSGFMT" != "no"; then
|
||||
AC_CHECK_FUNCS(dcgettext)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
||||
return _nl_msg_cat_cntr],
|
||||
[CATOBJEXT=.gmo
|
||||
DATADIRNAME=share],
|
||||
[CATOBJEXT=.mo
|
||||
DATADIRNAME=lib])
|
||||
INSTOBJEXT=.mo
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
# AC_MSG_CHECKING([whether catgets can be used])
|
||||
# AC_ARG_WITH(catgets,
|
||||
# [ --with-catgets use catgets functions if available],
|
||||
# nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
|
||||
# AC_MSG_RESULT($nls_cv_use_catgets)
|
||||
|
||||
dnl ad-hoc fix to prevent configure to detect catgets library.
|
||||
dnl (rkawa)
|
||||
nls_cv_use_catgets="no"
|
||||
|
||||
if test "$nls_cv_use_catgets" = "yes"; then
|
||||
dnl No gettext in C library. Try catgets next.
|
||||
AC_CHECK_LIB(i, main)
|
||||
AC_CHECK_FUNC(catgets,
|
||||
[AC_DEFINE(HAVE_CATGETS)
|
||||
INTLOBJS="\$(CATOBJS)"
|
||||
AC_PATH_PROG(GENCAT, gencat, no)dnl
|
||||
if test "$GENCAT" != "no"; then
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
|
||||
if test "$GMSGFMT" = "no"; then
|
||||
AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
|
||||
fi
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
CATOBJEXT=.cat
|
||||
INSTOBJEXT=.cat
|
||||
DATADIRNAME=lib
|
||||
INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
INTLLIBS=$INTLDEPS
|
||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
nls_cv_header_intl=intl/libintl.h
|
||||
nls_cv_header_libgt=intl/libgettext.h
|
||||
fi])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
dnl Neither gettext nor catgets in included in the C library.
|
||||
dnl Fall back on GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions used to generate GNU NLS library.
|
||||
INTLOBJS="\$(GETTOBJS)"
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
AC_SUBST(MSGFMT)
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
CATOBJEXT=.gmo
|
||||
INSTOBJEXT=.mo
|
||||
DATADIRNAME=share
|
||||
INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
INTLLIBS=$INTLDEPS
|
||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
nls_cv_header_intl=intl/libintl.h
|
||||
nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
# We need to process the po/ directory.
|
||||
POSUB=po
|
||||
else
|
||||
DATADIRNAME=share
|
||||
nls_cv_header_intl=intl/libintl.h
|
||||
nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
|
||||
dnl the next line has been modified by rkawa to avoid
|
||||
dnl misconfiguration of intl/libintl.h symlink.
|
||||
rm -f intl/libintl.h
|
||||
|
||||
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
||||
AC_OUTPUT_COMMANDS(
|
||||
[case "$CONFIG_FILES" in *po/Makefile.in*)
|
||||
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
||||
esac])
|
||||
|
||||
|
||||
# If this is used in GNU gettext we have to set USE_NLS to `yes'
|
||||
# because some of the sources are only built for this goal.
|
||||
if test "$PACKAGE" = gettext; then
|
||||
USE_NLS=yes
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
fi
|
||||
|
||||
dnl These rules are solely for the distribution goal. While doing this
|
||||
dnl we only have to keep exactly one list of the available catalogs
|
||||
dnl in configure.in.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
GMOFILES="$GMOFILES $lang.gmo"
|
||||
POFILES="$POFILES $lang.po"
|
||||
done
|
||||
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||
AC_SUBST(CATALOGS)
|
||||
AC_SUBST(CATOBJEXT)
|
||||
AC_SUBST(DATADIRNAME)
|
||||
AC_SUBST(GMOFILES)
|
||||
AC_SUBST(INSTOBJEXT)
|
||||
AC_SUBST(INTLDEPS)
|
||||
AC_SUBST(INTLLIBS)
|
||||
AC_SUBST(INTLOBJS)
|
||||
AC_SUBST(POFILES)
|
||||
AC_SUBST(POSUB)
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_GNU_GETTEXT,
|
||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
|
||||
unistd.h sys/param.h])
|
||||
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
||||
strdup __argz_count __argz_stringify __argz_next])
|
||||
|
||||
if test "${ac_cv_func_stpcpy+set}" != "set"; then
|
||||
AC_CHECK_FUNCS(stpcpy)
|
||||
fi
|
||||
if test "${ac_cv_func_stpcpy}" = "yes"; then
|
||||
AC_DEFINE(HAVE_STPCPY)
|
||||
fi
|
||||
|
||||
AM_LC_MESSAGES
|
||||
AM_WITH_NLS
|
||||
|
||||
|
||||
if test "x$CATOBJEXT" != "x"; then
|
||||
if test "x$ALL_LINGUAS" = "x"; then
|
||||
LINGUAS=
|
||||
else
|
||||
AC_MSG_CHECKING(for catalogs to be installed)
|
||||
NEW_LINGUAS=
|
||||
for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
||||
case "$ALL_LINGUAS" in
|
||||
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
|
||||
esac
|
||||
done
|
||||
LINGUAS=$NEW_LINGUAS
|
||||
AC_MSG_RESULT($LINGUAS)
|
||||
fi
|
||||
|
||||
dnl Construct list of names of catalog files to be constructed.
|
||||
if test -n "$LINGUAS"; then
|
||||
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl The reference to <locale.h> in the installed <libintl.h> file
|
||||
dnl must be resolved because we cannot expect the users of this
|
||||
dnl to define HAVE_LOCALE_H.
|
||||
if test $ac_cv_header_locale_h = yes; then
|
||||
INCLUDE_LOCALE_H="#include <locale.h>"
|
||||
else
|
||||
INCLUDE_LOCALE_H="\
|
||||
/* The system does not provide the header <locale.h>. Take care yourself. */"
|
||||
fi
|
||||
AC_SUBST(INCLUDE_LOCALE_H)
|
||||
dnl Determine which catalog format we have (if any is needed)
|
||||
dnl For now we know about two different formats:
|
||||
dnl Linux libc-5 and the normal X/Open format
|
||||
test -d intl || mkdir intl
|
||||
if test "$CATOBJEXT" = ".cat"; then
|
||||
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
|
||||
|
||||
dnl Transform the SED scripts while copying because some dumb SEDs
|
||||
dnl cannot handle comments.
|
||||
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
|
||||
|
||||
dnl To avoid XPG incompatible SED to be used, .msg files of
|
||||
dnl x/open format are included to the archive, rather than
|
||||
dnl compiled in the installation. If the system uses linux libc5
|
||||
dnl format, then x/open files are removed and the sed script
|
||||
dnl creates the files of the correct format. (rkawa)
|
||||
if test "$msgformat" = "linux"; then
|
||||
rm -f $srcdir/po/*.msg
|
||||
fi
|
||||
fi
|
||||
dnl po2tbl.sed is always needed.
|
||||
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
|
||||
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
|
||||
|
||||
dnl In the intl/Makefile.in we have a special dependency which makes
|
||||
dnl only sense for gettext. We comment this out for non-gettext
|
||||
dnl packages.
|
||||
if test "$PACKAGE" = "gettext"; then
|
||||
GT_NO="#NO#"
|
||||
GT_YES=
|
||||
else
|
||||
GT_NO=
|
||||
GT_YES="#YES#"
|
||||
fi
|
||||
AC_SUBST(GT_NO)
|
||||
AC_SUBST(GT_YES)
|
||||
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
|
||||
dnl *** For now the libtool support in intl/Makefile is not for real.
|
||||
l=
|
||||
AC_SUBST(l)
|
||||
|
||||
dnl Generate list of files to be processed by xgettext which will
|
||||
dnl be included in po/Makefile.
|
||||
test -d po || mkdir po
|
||||
if test "x$srcdir" != "x."; then
|
||||
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
|
||||
posrcprefix="$srcdir/"
|
||||
else
|
||||
posrcprefix="../$srcdir/"
|
||||
fi
|
||||
else
|
||||
posrcprefix="../"
|
||||
fi
|
||||
rm -f po/POTFILES
|
||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||
< $srcdir/po/POTFILES.in > po/POTFILES
|
||||
])
|
||||
|
||||
# Check whether LC_MESSAGES is available in <locale.h>.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_LC_MESSAGES,
|
||||
[if test $ac_cv_header_locale_h = yes; then
|
||||
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
||||
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
||||
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
||||
if test $am_cv_val_LC_MESSAGES = yes; then
|
||||
AC_DEFINE(HAVE_LC_MESSAGES)
|
||||
fi
|
||||
fi])
|
||||
|
||||
# Search path for a program which passes the given test.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
||||
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
||||
AC_DEFUN(AM_PATH_PROG_WITH_TEST,
|
||||
[# Extract the first word of "$2", so it can be a program name with args.
|
||||
set dummy $2; ac_word=[$]2
|
||||
AC_MSG_CHECKING([for $ac_word])
|
||||
AC_CACHE_VAL(ac_cv_path_$1,
|
||||
[case "[$]$1" in
|
||||
/*)
|
||||
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in ifelse([$5], , $PATH, [$5]); do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
if [$3]; then
|
||||
ac_cv_path_$1="$ac_dir/$ac_word"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
dnl If no 4th arg is given, leave the cache variable unset,
|
||||
dnl so AC_PATH_PROGS will keep looking.
|
||||
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
|
||||
])dnl
|
||||
;;
|
||||
esac])dnl
|
||||
$1="$ac_cv_path_$1"
|
||||
if test -n "[$]$1"; then
|
||||
AC_MSG_RESULT([$]$1)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_SUBST($1)dnl
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||
[AC_PREREQ(2.13)dnl
|
||||
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
|
||||
case "$target" in
|
||||
NONE) lt_target="$host" ;;
|
||||
*) lt_target="$target" ;;
|
||||
esac
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags="--cache-file=$cache_file"
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
||||
[libtool_flags="$libtool_flags --enable-dlopen"])
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
||||
AC_ARG_ENABLE(libtool-lock,
|
||||
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
||||
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
||||
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||
|
||||
# Some flags need to be propagated to the compiler or linker for good
|
||||
# libtool support.
|
||||
case "$lt_target" in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case "`/usr/bin/file conftest.o`" in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
*N32*)
|
||||
LD="${LD-ld} -n32"
|
||||
;;
|
||||
*64-bit*)
|
||||
LD="${LD-ld} -64"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
*-*-sco3.2v5*)
|
||||
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -belf"
|
||||
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
||||
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
|
||||
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
||||
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[*-*-cygwin* | *-*-mingw*)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
])
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
||||
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
||||
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_SHARED(no)])
|
||||
|
||||
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
||||
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_STATIC(no)])
|
||||
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
||||
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(fast-install,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_FAST_INSTALL(no)])
|
||||
|
||||
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AC_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
ac_prog=ld
|
||||
if test "$ac_cv_prog_gcc" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5`
|
||||
case "$ac_prog" in
|
||||
# Accept absolute paths.
|
||||
changequote(,)dnl
|
||||
[\\/]* | [A-Za-z]:[\\/]*)
|
||||
re_direlt='/[^/][^/]*/\.\./'
|
||||
changequote([,])dnl
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(ac_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$ac_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
dnl Copied from libtool.m4
|
||||
AC_DEFUN(AC_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
@ -819,114 +103,3 @@ else
|
||||
ac_cv_prog_gnu_ld=no
|
||||
fi])
|
||||
])
|
||||
|
||||
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AC_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[if test -n "$NM"; then
|
||||
# Let the user override the test.
|
||||
ac_cv_path_NM="$NM"
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
|
||||
# Check to see if the nm accepts a BSD-compat flag.
|
||||
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||
# nm: unknown option "B" ignored
|
||||
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
break
|
||||
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
break
|
||||
else
|
||||
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
|
||||
continue # so that we can try to find one that supports BSD flags
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
||||
fi])
|
||||
NM="$ac_cv_path_NM"
|
||||
AC_MSG_RESULT([$NM])
|
||||
])
|
||||
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
LIBM=
|
||||
case "$lt_target" in
|
||||
*-*-beos* | *-*-cygwin*)
|
||||
# These system don't have libm
|
||||
;;
|
||||
*-ncr-sysv4.3*)
|
||||
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
||||
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(m, main, LIBM="-lm")
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl convenience library, adds --enable-ltdl-convenience to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
case "$enable_ltdl_convenience" in
|
||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||
"") enable_ltdl_convenience=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl installable library, and adds --enable-ltdl-install to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_CHECK_LIB(ltdl, main,
|
||||
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
||||
[if test x"$enable_ltdl_install" = xno; then
|
||||
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||
else
|
||||
enable_ltdl_install=yes
|
||||
fi
|
||||
])
|
||||
if test x"$enable_ltdl_install" = x"yes"; then
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
else
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||
LIBLTDL="-lltdl"
|
||||
INCLTDL=
|
||||
fi
|
||||
])
|
||||
|
||||
dnl old names
|
||||
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||
|
||||
dnl This is just to silence aclocal about the macro not being used
|
||||
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
||||
|
@ -20,9 +20,12 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
/** List of various built-in authenticaion modules */
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_AUTH
|
||||
|
||||
const struct auth_init_function builtin_auth_init_functions[] = {
|
||||
/** List of various built-in authentication modules */
|
||||
|
||||
const struct auth_init_function_entry builtin_auth_init_functions[] = {
|
||||
{ "guest", auth_init_guest },
|
||||
{ "rhosts", auth_init_rhosts },
|
||||
{ "hostsequiv", auth_init_hostsequiv },
|
||||
@ -35,12 +38,14 @@ const struct auth_init_function builtin_auth_init_functions[] = {
|
||||
{ "winbind", auth_init_winbind },
|
||||
#ifdef DEVELOPER
|
||||
{ "name_to_ntstatus", auth_init_name_to_ntstatus },
|
||||
{ "fixed_challenge", auth_init_fixed_challenge },
|
||||
#endif
|
||||
{ "plugin", auth_init_plugin },
|
||||
{ NULL, NULL}
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
Try to get a challenge out of the various authenticaion modules.
|
||||
Try to get a challenge out of the various authentication modules.
|
||||
Returns a const char of length 8 bytes.
|
||||
****************************************************************************/
|
||||
|
||||
@ -65,7 +70,7 @@ static const uint8 *get_ntlm_challenge(struct auth_context *auth_context)
|
||||
|
||||
DEBUG(5, ("auth_get_challenge: getting challenge from module %s\n", auth_method->name));
|
||||
if (challenge_set_by != NULL) {
|
||||
DEBUG(1, ("auth_get_challenge: CONFIGURATION ERROR: authenticaion method %s has already specified a challenge. Challenge by %s ignored.\n",
|
||||
DEBUG(1, ("auth_get_challenge: CONFIGURATION ERROR: authentication method %s has already specified a challenge. Challenge by %s ignored.\n",
|
||||
challenge_set_by, auth_method->name));
|
||||
continue;
|
||||
}
|
||||
@ -77,7 +82,7 @@ static const uint8 *get_ntlm_challenge(struct auth_context *auth_context)
|
||||
|
||||
challenge = auth_method->get_chal(auth_context, &auth_method->private_data, mem_ctx);
|
||||
if (!challenge.length) {
|
||||
DEBUG(3, ("auth_get_challenge: getting challenge from authenticaion method %s FAILED.\n",
|
||||
DEBUG(3, ("auth_get_challenge: getting challenge from authentication method %s FAILED.\n",
|
||||
auth_method->name));
|
||||
} else {
|
||||
DEBUG(5, ("auth_get_challenge: sucessfully got challenge from module %s\n", auth_method->name));
|
||||
@ -161,7 +166,7 @@ static BOOL check_domain_match(const char *user, const char *domain)
|
||||
* filled in, either at creation or by calling the challenge geneation
|
||||
* function auth_get_challenge().
|
||||
*
|
||||
* @param server_info If successful, contains information about the authenticaion,
|
||||
* @param server_info If successful, contains information about the authentication,
|
||||
* including a SAM_ACCOUNT struct describing the user.
|
||||
*
|
||||
* @return An NTSTATUS with NT_STATUS_OK or an appropriate error.
|
||||
@ -254,7 +259,7 @@ static NTSTATUS check_ntlm_password(const struct auth_context *auth_context,
|
||||
|
||||
if (NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG((*server_info)->guest ? 5 : 2,
|
||||
("check_password: %sauthenticaion for user [%s] -> [%s] -> [%s] suceeded\n",
|
||||
("check_password: %sauthentication for user [%s] -> [%s] -> [%s] suceeded\n",
|
||||
(*server_info)->guest ? "guest " : "",
|
||||
user_info->smb_name.str,
|
||||
user_info->internal_username.str,
|
||||
@ -263,7 +268,7 @@ static NTSTATUS check_ntlm_password(const struct auth_context *auth_context,
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG(2, ("check_password: Authenticaion for user [%s] -> [%s] FAILED with error %s\n",
|
||||
DEBUG(2, ("check_password: Authentication for user [%s] -> [%s] FAILED with error %s\n",
|
||||
user_info->smb_name.str, user_info->internal_username.str,
|
||||
nt_errstr(nt_status)));
|
||||
ZERO_STRUCTP(server_info);
|
||||
@ -337,14 +342,31 @@ static NTSTATUS make_auth_context_text_list(struct auth_context **auth_context,
|
||||
{
|
||||
if (strequal(builtin_auth_init_functions[i].name, *text_list))
|
||||
{
|
||||
|
||||
char *module_name = smb_xstrdup(*text_list);
|
||||
char *module_params = NULL;
|
||||
char *p;
|
||||
|
||||
p = strchr(module_name, ':');
|
||||
|
||||
if (p) {
|
||||
*p = 0;
|
||||
|
||||
module_params = p+1;
|
||||
|
||||
trim_string(module_params, " ", " ");
|
||||
}
|
||||
|
||||
trim_string(module_name, " ", " ");
|
||||
|
||||
DEBUG(5,("Found auth method %s (at pos %d)\n", *text_list, i));
|
||||
if (builtin_auth_init_functions[i].init(*auth_context, &t)) {
|
||||
if (NT_STATUS_IS_OK(builtin_auth_init_functions[i].init(*auth_context, module_params, &t))) {
|
||||
DEBUG(5,("auth method %s has a valid init\n", *text_list));
|
||||
t->name = builtin_auth_init_functions[i].name;
|
||||
DLIST_ADD_END(list, t, tmp);
|
||||
} else {
|
||||
DEBUG(0,("auth method %s did not correctly init\n", *text_list));
|
||||
}
|
||||
SAFE_FREE(module_name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -364,7 +386,7 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context)
|
||||
char **auth_method_list = NULL;
|
||||
NTSTATUS nt_status;
|
||||
|
||||
if (lp_auth_methods() && !lp_list_copy(&auth_method_list, lp_auth_methods())) {
|
||||
if (lp_auth_methods() && !str_list_copy(&auth_method_list, lp_auth_methods())) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
@ -373,33 +395,33 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context)
|
||||
{
|
||||
case SEC_DOMAIN:
|
||||
DEBUG(5,("Making default auth method list for security=domain\n"));
|
||||
auth_method_list = lp_list_make("guest samstrict ntdomain");
|
||||
auth_method_list = str_list_make("guest sam ntdomain");
|
||||
break;
|
||||
case SEC_SERVER:
|
||||
DEBUG(5,("Making default auth method list for security=server\n"));
|
||||
auth_method_list = lp_list_make("guest samstrict smbserver");
|
||||
auth_method_list = str_list_make("guest sam smbserver");
|
||||
break;
|
||||
case SEC_USER:
|
||||
if (lp_encrypted_passwords()) {
|
||||
DEBUG(5,("Making default auth method list for security=user, encrypt passwords = yes\n"));
|
||||
auth_method_list = lp_list_make("guest sam");
|
||||
auth_method_list = str_list_make("guest sam");
|
||||
} else {
|
||||
DEBUG(5,("Making default auth method list for security=user, encrypt passwords = no\n"));
|
||||
auth_method_list = lp_list_make("guest unix");
|
||||
auth_method_list = str_list_make("guest unix");
|
||||
}
|
||||
break;
|
||||
case SEC_SHARE:
|
||||
if (lp_encrypted_passwords()) {
|
||||
DEBUG(5,("Making default auth method list for security=share, encrypt passwords = yes\n"));
|
||||
auth_method_list = lp_list_make("guest sam");
|
||||
auth_method_list = str_list_make("guest sam");
|
||||
} else {
|
||||
DEBUG(5,("Making default auth method list for security=share, encrypt passwords = no\n"));
|
||||
auth_method_list = lp_list_make("guest unix");
|
||||
auth_method_list = str_list_make("guest unix");
|
||||
}
|
||||
break;
|
||||
case SEC_ADS:
|
||||
DEBUG(5,("Making default auth method list for security=ADS\n"));
|
||||
auth_method_list = lp_list_make("guest samstrict ads ntdomain");
|
||||
auth_method_list = str_list_make("guest sam ads ntdomain");
|
||||
break;
|
||||
default:
|
||||
DEBUG(5,("Unknown auth method!\n"));
|
||||
@ -410,31 +432,11 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context)
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(nt_status = make_auth_context_text_list(auth_context, auth_method_list))) {
|
||||
lp_list_free(&auth_method_list);
|
||||
str_list_free(&auth_method_list);
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
lp_list_free(&auth_method_list);
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
Make a auth_info struct with a random challenge
|
||||
***************************************************************************/
|
||||
|
||||
NTSTATUS make_auth_context_random(struct auth_context **auth_context)
|
||||
{
|
||||
uchar chal[8];
|
||||
NTSTATUS nt_status;
|
||||
if (!NT_STATUS_IS_OK(nt_status = make_auth_context_subsystem(auth_context))) {
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
generate_random_buffer(chal, sizeof(chal), False);
|
||||
(*auth_context)->challenge = data_blob(chal, sizeof(chal));
|
||||
|
||||
(*auth_context)->challenge_set_by = "random";
|
||||
|
||||
str_list_free(&auth_method_list);
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Generic authenticaion types
|
||||
Copyright (C) Andrew Bartlett 2001
|
||||
Copyright (C) Andrew Bartlett 2001-2002
|
||||
Copyright (C) Jelmer Vernooij 2002
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -20,11 +21,14 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_AUTH
|
||||
|
||||
/**
|
||||
* Return a guest logon for guest users (username = "")
|
||||
*
|
||||
* Typically used as the first module in the auth chain, this allows
|
||||
* guest logons to be delt with in one place. Non-gust logons 'fail'
|
||||
* guest logons to be dealt with in one place. Non-guest logons 'fail'
|
||||
* and pass onto the next module.
|
||||
**/
|
||||
|
||||
@ -49,14 +53,15 @@ static NTSTATUS check_guest_security(const struct auth_context *auth_context,
|
||||
}
|
||||
|
||||
/* Guest modules initialisation */
|
||||
BOOL auth_init_guest(struct auth_context *auth_context, auth_methods **auth_method)
|
||||
NTSTATUS auth_init_guest(struct auth_context *auth_context, const char *options, auth_methods **auth_method)
|
||||
{
|
||||
if (!make_auth_methods(auth_context, auth_method)) {
|
||||
return False;
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
(*auth_method)->auth = check_guest_security;
|
||||
return True;
|
||||
(*auth_method)->name = "guest";
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,13 +104,110 @@ static NTSTATUS check_name_to_ntstatus_security(const struct auth_context *auth_
|
||||
}
|
||||
|
||||
/** Module initailisation function */
|
||||
BOOL auth_init_name_to_ntstatus(struct auth_context *auth_context, auth_methods **auth_method)
|
||||
NTSTATUS auth_init_name_to_ntstatus(struct auth_context *auth_context, const char *param, auth_methods **auth_method)
|
||||
{
|
||||
if (!make_auth_methods(auth_context, auth_method)) {
|
||||
return False;
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
(*auth_method)->auth = check_name_to_ntstatus_security;
|
||||
return True;
|
||||
(*auth_method)->name = "name_to_ntstatus";
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a 'fixed' challenge instead of a varaible one.
|
||||
*
|
||||
* The idea of this function is to make packet snifs consistant
|
||||
* with a fixed challenge, so as to aid debugging.
|
||||
*
|
||||
* This module is of no value to end-users.
|
||||
*
|
||||
* This module does not actually authenticate the user, but
|
||||
* just pretenteds to need a specified challenge.
|
||||
* This module removes *all* security from the challenge-response system
|
||||
*
|
||||
* @return NT_STATUS_UNSUCCESSFUL
|
||||
**/
|
||||
|
||||
static NTSTATUS check_fixed_challenge_security(const struct auth_context *auth_context,
|
||||
void *my_private_data,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const auth_usersupplied_info *user_info,
|
||||
auth_serversupplied_info **server_info)
|
||||
{
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Get the challenge out of a password server.
|
||||
****************************************************************************/
|
||||
|
||||
static DATA_BLOB auth_get_fixed_challenge(const struct auth_context *auth_context,
|
||||
void **my_private_data,
|
||||
TALLOC_CTX *mem_ctx)
|
||||
{
|
||||
const char *challenge = "I am a teapot";
|
||||
return data_blob(challenge, 8);
|
||||
}
|
||||
|
||||
|
||||
/** Module initailisation function */
|
||||
NTSTATUS auth_init_fixed_challenge(struct auth_context *auth_context, const char *param, auth_methods **auth_method)
|
||||
{
|
||||
if (!make_auth_methods(auth_context, auth_method)) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
(*auth_method)->auth = check_fixed_challenge_security;
|
||||
(*auth_method)->get_chal = auth_get_fixed_challenge;
|
||||
(*auth_method)->name = "fixed_challenge";
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Outsorce an auth module to an external loadable .so
|
||||
*
|
||||
* Only works on systems with dlopen() etc.
|
||||
**/
|
||||
|
||||
/* Plugin modules initialisation */
|
||||
NTSTATUS auth_init_plugin(struct auth_context *auth_context, const char *param, auth_methods **auth_method)
|
||||
{
|
||||
void * dl_handle;
|
||||
char *plugin_param, *plugin_name, *p;
|
||||
auth_init_function plugin_init;
|
||||
|
||||
if (param == NULL) {
|
||||
DEBUG(0, ("The plugin module needs an argument!\n"));
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
plugin_name = smb_xstrdup(param);
|
||||
p = strchr(plugin_name, ':');
|
||||
if (p) {
|
||||
*p = 0;
|
||||
plugin_param = p+1;
|
||||
trim_string(plugin_param, " ", " ");
|
||||
} else plugin_param = NULL;
|
||||
|
||||
trim_string(plugin_name, " ", " ");
|
||||
|
||||
DEBUG(5, ("Trying to load auth plugin %s\n", plugin_name));
|
||||
dl_handle = sys_dlopen(plugin_name, RTLD_NOW | RTLD_GLOBAL );
|
||||
if (!dl_handle) {
|
||||
DEBUG(0, ("Failed to load auth plugin %s using sys_dlopen (%s)\n", plugin_name, sys_dlerror()));
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
plugin_init = sys_dlsym(dl_handle, "auth_init");
|
||||
if (!plugin_init){
|
||||
DEBUG(0, ("Failed to find function 'pdb_init' using sys_dlsym in sam plugin %s (%s)\n", plugin_name, sys_dlerror()));
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
DEBUG(5, ("Starting sam plugin %s with paramater %s\n", plugin_name, plugin_param?plugin_param:"(null)"));
|
||||
return plugin_init(auth_context, plugin_param, auth_method);
|
||||
}
|
||||
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_AUTH
|
||||
|
||||
/****************************************************************************
|
||||
COMPATIBILITY INTERFACES:
|
||||
***************************************************************************/
|
||||
|
@ -21,6 +21,9 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_AUTH
|
||||
|
||||
BOOL global_machine_password_needs_changing = False;
|
||||
|
||||
extern pstring global_myname;
|
||||
@ -66,7 +69,7 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli,
|
||||
fstrcpy(remote_machine, server);
|
||||
}
|
||||
|
||||
standard_sub_basic(current_user_info.smb_name, remote_machine);
|
||||
standard_sub_basic(current_user_info.smb_name, remote_machine, sizeof(remote_machine));
|
||||
strupper(remote_machine);
|
||||
|
||||
if(!resolve_name( remote_machine, &dest_ip, 0x20)) {
|
||||
@ -84,21 +87,25 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli,
|
||||
logonserver. We can avoid a 30-second timeout if the DC is down
|
||||
if the SAMLOGON request fails as it is only over UDP. */
|
||||
|
||||
/* we use a mutex to prevent two connections at once - when a NT PDC gets
|
||||
two connections where one hasn't completed a negprot yet it will send a
|
||||
TCP reset to the first connection (tridge) */
|
||||
if (!message_named_mutex(server, 20)) {
|
||||
DEBUG(1,("connect_to_domain_password_server: domain mutex failed for %s\n", server));
|
||||
/* we use a mutex to prevent two connections at once - when a
|
||||
Win2k PDC get two connections where one hasn't completed a
|
||||
session setup yet it will send a TCP reset to the first
|
||||
connection (tridge) */
|
||||
|
||||
/*
|
||||
* With NT4.x DC's *all* authentication must be serialized to avoid
|
||||
* ACCESS_DENIED errors if 2 auths are done from the same machine. JRA.
|
||||
*/
|
||||
|
||||
if (!grab_server_mutex(server))
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
/* Attempt connection */
|
||||
result = cli_full_connection(cli, global_myname, server,
|
||||
&dest_ip, 0, "IPC$", "IPC", "", "", "", 0);
|
||||
|
||||
message_named_mutex_release(server);
|
||||
|
||||
if (!NT_STATUS_IS_OK(result)) {
|
||||
release_server_mutex();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -121,12 +128,14 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(*cli)));
|
||||
cli_nt_session_close(*cli);
|
||||
cli_ulogoff(*cli);
|
||||
cli_shutdown(*cli);
|
||||
release_server_mutex();
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
snprintf((*cli)->mach_acct, sizeof((*cli)->mach_acct) - 1, "%s$", setup_creds_as);
|
||||
|
||||
if (!(*cli)->mach_acct) {
|
||||
release_server_mutex();
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
@ -138,9 +147,12 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(*cli)));
|
||||
cli_nt_session_close(*cli);
|
||||
cli_ulogoff(*cli);
|
||||
cli_shutdown(*cli);
|
||||
release_server_mutex();
|
||||
return result;
|
||||
}
|
||||
|
||||
/* We exit here with the mutex *locked*. JRA */
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
@ -270,14 +282,13 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
|
||||
auth_serversupplied_info **server_info,
|
||||
char *server, char *setup_creds_as,
|
||||
uint16 sec_chan,
|
||||
unsigned char *trust_passwd,
|
||||
unsigned char trust_passwd[16],
|
||||
time_t last_change_time)
|
||||
{
|
||||
fstring remote_machine;
|
||||
NET_USER_INFO_3 info3;
|
||||
struct cli_state *cli = NULL;
|
||||
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
|
||||
struct passwd *pass;
|
||||
|
||||
/*
|
||||
* At this point, smb_apasswd points to the lanman response to
|
||||
@ -321,63 +332,15 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
|
||||
user_info->domain.str, cli->srv_name_slash,
|
||||
nt_errstr(nt_status)));
|
||||
} else {
|
||||
char *dom_user;
|
||||
nt_status = make_server_info_info3(mem_ctx, user_info->internal_username.str,
|
||||
user_info->smb_name.str, domain, server_info, &info3);
|
||||
#if 0
|
||||
/* The stuff doesn't work right yet */
|
||||
SMB_ASSERT(sizeof((*server_info)->session_key) == sizeof(info3.user_sess_key));
|
||||
memcpy((*server_info)->session_key, info3.user_sess_key, sizeof((*server_info)->session_key)/* 16 */);
|
||||
SamOEMhash((*server_info)->session_key, trust_passwd, sizeof((*server_info)->session_key));
|
||||
#endif
|
||||
|
||||
/* Check DOMAIN\username first to catch winbind users, then
|
||||
just the username for local users. */
|
||||
|
||||
dom_user = talloc_asprintf(mem_ctx, "%s%s%s", user_info->domain.str,
|
||||
lp_winbind_separator(),
|
||||
user_info->internal_username.str);
|
||||
|
||||
if (!dom_user) {
|
||||
DEBUG(0, ("talloc_asprintf failed!\n"));
|
||||
nt_status = NT_STATUS_NO_MEMORY;
|
||||
} else {
|
||||
|
||||
if (!(pass = Get_Pwnam(dom_user)))
|
||||
pass = Get_Pwnam(user_info->internal_username.str);
|
||||
|
||||
if (pass) {
|
||||
make_server_info_pw(server_info, pass);
|
||||
if (!server_info) {
|
||||
nt_status = NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
} else {
|
||||
nt_status = NT_STATUS_NO_SUCH_USER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Store the user group information in the server_info returned to the caller. */
|
||||
|
||||
if (NT_STATUS_IS_OK(nt_status) && (info3.num_groups2 != 0)) {
|
||||
int i;
|
||||
NT_USER_TOKEN *ptok;
|
||||
auth_serversupplied_info *pserver_info = *server_info;
|
||||
|
||||
if ((pserver_info->ptok = malloc( sizeof(NT_USER_TOKEN) ) ) == NULL) {
|
||||
DEBUG(0, ("domain_client_validate: out of memory allocating rid group membership\n"));
|
||||
nt_status = NT_STATUS_NO_MEMORY;
|
||||
free_server_info(server_info);
|
||||
goto done;
|
||||
}
|
||||
|
||||
ptok = pserver_info->ptok;
|
||||
ptok->num_sids = (size_t)info3.num_groups2;
|
||||
|
||||
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"));
|
||||
nt_status = NT_STATUS_NO_MEMORY;
|
||||
free_server_info(server_info);
|
||||
goto done;
|
||||
}
|
||||
|
||||
for (i = 0; i < ptok->num_sids; i++) {
|
||||
sid_copy(&ptok->user_sids[i], &info3.dom_sid.sid);
|
||||
sid_append_rid(&ptok->user_sids[i], info3.gids[i].g_rid);
|
||||
}
|
||||
|
||||
uni_group_cache_store_netlogon(mem_ctx, &info3);
|
||||
}
|
||||
|
||||
@ -397,8 +360,6 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
done:
|
||||
|
||||
/* Note - once the cli stream is shutdown the mem_ctx used
|
||||
to allocate the other_sids and gids structures has been deleted - so
|
||||
these pointers are no longer valid..... */
|
||||
@ -406,6 +367,7 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
|
||||
cli_nt_session_close(cli);
|
||||
cli_ulogoff(cli);
|
||||
cli_shutdown(cli);
|
||||
release_server_mutex();
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
@ -448,7 +410,7 @@ static NTSTATUS check_ntdomain_security(const struct auth_context *auth_context,
|
||||
|
||||
if (!secrets_fetch_trust_account_password(domain, trust_passwd, &last_change_time))
|
||||
{
|
||||
DEBUG(0, ("check_ntdomain_security: could not fetch trust account password for domain %s\n", lp_workgroup()));
|
||||
DEBUG(0, ("check_ntdomain_security: could not fetch trust account password for domain '%s'\n", domain));
|
||||
return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
|
||||
}
|
||||
|
||||
@ -473,14 +435,15 @@ static NTSTATUS check_ntdomain_security(const struct auth_context *auth_context,
|
||||
}
|
||||
|
||||
/* module initialisation */
|
||||
BOOL auth_init_ntdomain(struct auth_context *auth_context, auth_methods **auth_method)
|
||||
NTSTATUS auth_init_ntdomain(struct auth_context *auth_context, const char* param, auth_methods **auth_method)
|
||||
{
|
||||
if (!make_auth_methods(auth_context, auth_method)) {
|
||||
return False;
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
(*auth_method)->name = "ntdomain";
|
||||
(*auth_method)->auth = check_ntdomain_security;
|
||||
return True;
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -527,7 +490,7 @@ static NTSTATUS check_trustdomain_security(const struct auth_context *auth_conte
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the machine account password for the trusted domain
|
||||
* Get the trusted account password for the trusted domain
|
||||
* No need to become_root() as secrets_init() is done at startup.
|
||||
*/
|
||||
|
||||
@ -560,12 +523,13 @@ static NTSTATUS check_trustdomain_security(const struct auth_context *auth_conte
|
||||
}
|
||||
|
||||
/* module initialisation */
|
||||
BOOL auth_init_trustdomain(struct auth_context *auth_context, auth_methods **auth_method)
|
||||
NTSTATUS auth_init_trustdomain(struct auth_context *auth_context, const char* param, auth_methods **auth_method)
|
||||
{
|
||||
if (!make_auth_methods(auth_context, auth_method)) {
|
||||
return False;
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
(*auth_method)->name = "trustdomain";
|
||||
(*auth_method)->auth = check_trustdomain_security;
|
||||
return True;
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
@ -20,6 +20,9 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_AUTH
|
||||
|
||||
/****************************************************************************
|
||||
Read the a hosts.equiv or .rhosts file and check if it
|
||||
allows this user from this machine.
|
||||
@ -176,14 +179,14 @@ static NTSTATUS check_hostsequiv_security(const struct auth_context *auth_contex
|
||||
}
|
||||
|
||||
/* module initialisation */
|
||||
BOOL auth_init_hostsequiv(struct auth_context *auth_context, auth_methods **auth_method)
|
||||
NTSTATUS auth_init_hostsequiv(struct auth_context *auth_context, const char* param, auth_methods **auth_method)
|
||||
{
|
||||
if (!make_auth_methods(auth_context, auth_method)) {
|
||||
return False;
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
(*auth_method)->auth = check_hostsequiv_security;
|
||||
return True;
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -220,12 +223,12 @@ static NTSTATUS check_rhosts_security(const struct auth_context *auth_context,
|
||||
}
|
||||
|
||||
/* module initialisation */
|
||||
BOOL auth_init_rhosts(struct auth_context *auth_context, auth_methods **auth_method)
|
||||
NTSTATUS auth_init_rhosts(struct auth_context *auth_context, const char *param, auth_methods **auth_method)
|
||||
{
|
||||
if (!make_auth_methods(auth_context, auth_method)) {
|
||||
return False;
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
(*auth_method)->auth = check_rhosts_security;
|
||||
return True;
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
@ -22,6 +22,9 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_AUTH
|
||||
|
||||
/****************************************************************************
|
||||
core of smb password checking routine.
|
||||
****************************************************************************/
|
||||
@ -401,14 +404,15 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
|
||||
}
|
||||
|
||||
/* module initialisation */
|
||||
BOOL auth_init_sam(struct auth_context *auth_context, auth_methods **auth_method)
|
||||
NTSTATUS auth_init_sam(struct auth_context *auth_context, const char *param, auth_methods **auth_method)
|
||||
{
|
||||
if (!make_auth_methods(auth_context, auth_method)) {
|
||||
return False;
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
(*auth_method)->auth = check_sam_security;
|
||||
return True;
|
||||
(*auth_method)->auth = check_sam_security;
|
||||
(*auth_method)->name = "sam";
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -439,14 +443,15 @@ static NTSTATUS check_samstrict_security(const struct auth_context *auth_context
|
||||
}
|
||||
|
||||
/* module initialisation */
|
||||
BOOL auth_init_samstrict(struct auth_context *auth_context, auth_methods **auth_method)
|
||||
NTSTATUS auth_init_samstrict(struct auth_context *auth_context, const char *param, auth_methods **auth_method)
|
||||
{
|
||||
if (!make_auth_methods(auth_context, auth_method)) {
|
||||
return False;
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
(*auth_method)->auth = check_samstrict_security;
|
||||
return True;
|
||||
(*auth_method)->name = "samstrict";
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,6 +21,9 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_AUTH
|
||||
|
||||
extern pstring global_myname;
|
||||
extern userdom_struct current_user_info;
|
||||
|
||||
@ -46,7 +49,7 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
|
||||
p = pserver;
|
||||
|
||||
while(next_token( &p, desthost, LIST_SEP, sizeof(desthost))) {
|
||||
standard_sub_basic(current_user_info.smb_name, desthost);
|
||||
standard_sub_basic(current_user_info.smb_name, desthost, sizeof(desthost));
|
||||
strupper(desthost);
|
||||
|
||||
if(!resolve_name( desthost, &dest_ip, 0x20)) {
|
||||
@ -59,6 +62,15 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* we use a mutex to prevent two connections at once - when a
|
||||
Win2k PDC get two connections where one hasn't completed a
|
||||
session setup yet it will send a TCP reset to the first
|
||||
connection (tridge) */
|
||||
|
||||
if (!grab_server_mutex(desthost)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (cli_connect(cli, desthost, &dest_ip)) {
|
||||
DEBUG(3,("connected to password server %s\n",desthost));
|
||||
connected_ok = True;
|
||||
@ -67,13 +79,19 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
|
||||
}
|
||||
|
||||
if (!connected_ok) {
|
||||
release_server_mutex();
|
||||
DEBUG(0,("password server not available\n"));
|
||||
cli_shutdown(cli);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!attempt_netbios_session_request(cli, global_myname, desthost, &dest_ip))
|
||||
|
||||
if (!attempt_netbios_session_request(cli, global_myname,
|
||||
desthost, &dest_ip)) {
|
||||
release_server_mutex();
|
||||
DEBUG(1,("password server fails session request\n"));
|
||||
cli_shutdown(cli);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (strequal(desthost,myhostname())) {
|
||||
exit_server("Password server loop!");
|
||||
@ -83,19 +101,37 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
|
||||
|
||||
if (!cli_negprot(cli)) {
|
||||
DEBUG(1,("%s rejected the negprot\n",desthost));
|
||||
release_server_mutex();
|
||||
cli_shutdown(cli);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (cli->protocol < PROTOCOL_LANMAN2 ||
|
||||
!(cli->sec_mode & 1)) {
|
||||
!(cli->sec_mode & NEGOTIATE_SECURITY_USER_LEVEL)) {
|
||||
DEBUG(1,("%s isn't in user level security mode\n",desthost));
|
||||
release_server_mutex();
|
||||
cli_shutdown(cli);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
DEBUG(3,("password server OK\n"));
|
||||
/* Get the first session setup done quickly, to avoid silly
|
||||
Win2k bugs. (The next connection to the server will kill
|
||||
this one...
|
||||
*/
|
||||
|
||||
if (!cli_session_setup(cli, "", "", 0, "", 0,
|
||||
"")) {
|
||||
DEBUG(0,("%s rejected the initial session setup (%s)\n",
|
||||
desthost, cli_errstr(cli)));
|
||||
release_server_mutex();
|
||||
cli_shutdown(cli);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
release_server_mutex();
|
||||
|
||||
DEBUG(3,("password server OK\n"));
|
||||
|
||||
return cli;
|
||||
}
|
||||
|
||||
@ -142,7 +178,7 @@ static DATA_BLOB auth_get_challenge_server(const struct auth_context *auth_conte
|
||||
if (cli) {
|
||||
DEBUG(3,("using password server validation\n"));
|
||||
|
||||
if ((cli->sec_mode & 2) == 0) {
|
||||
if ((cli->sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE) == 0) {
|
||||
/* We can't work with unencrypted password servers
|
||||
unless 'encrypt passwords = no' */
|
||||
DEBUG(5,("make_auth_info_server: Server is unencrypted, no challenge available..\n"));
|
||||
@ -213,7 +249,7 @@ static NTSTATUS check_smbserver_security(const struct auth_context *auth_context
|
||||
return NT_STATUS_LOGON_FAILURE;
|
||||
}
|
||||
|
||||
if ((cli->sec_mode & 2) == 0) {
|
||||
if ((cli->sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE) == 0) {
|
||||
if (user_info->encrypted) {
|
||||
DEBUG(1,("password server %s is plaintext, but we are encrypted. This just can't work :-(\n", cli->desthost));
|
||||
return NT_STATUS_LOGON_FAILURE;
|
||||
@ -354,14 +390,15 @@ use this machine as the password server.\n"));
|
||||
return(nt_status);
|
||||
}
|
||||
|
||||
BOOL auth_init_smbserver(struct auth_context *auth_context, auth_methods **auth_method)
|
||||
NTSTATUS auth_init_smbserver(struct auth_context *auth_context, const char* param, auth_methods **auth_method)
|
||||
{
|
||||
if (!make_auth_methods(auth_context, auth_method)) {
|
||||
return False;
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
(*auth_method)->name = "smbserver";
|
||||
(*auth_method)->auth = check_smbserver_security;
|
||||
(*auth_method)->get_chal = auth_get_challenge_server;
|
||||
(*auth_method)->send_keepalive = send_server_keepalive;
|
||||
(*auth_method)->free_private_data = free_server_private_data;
|
||||
return True;
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
@ -20,12 +20,15 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_AUTH
|
||||
|
||||
/**
|
||||
* update the encrypted smbpasswd file from the plaintext username and password
|
||||
*
|
||||
* this ugly hack needs to die, but not quite yet, I think people still use it...
|
||||
**/
|
||||
static BOOL update_smbpassword_file(char *user, char *password)
|
||||
static BOOL update_smbpassword_file(const char *user, const char *password)
|
||||
{
|
||||
SAM_ACCOUNT *sampass = NULL;
|
||||
BOOL ret;
|
||||
@ -67,8 +70,6 @@ static BOOL update_smbpassword_file(char *user, char *password)
|
||||
DEBUG(3,("pdb_update_sam_account returned %d\n",ret));
|
||||
}
|
||||
|
||||
memset(password, '\0', strlen(password));
|
||||
|
||||
pdb_free_sam(&sampass);
|
||||
return ret;
|
||||
}
|
||||
@ -118,12 +119,14 @@ static NTSTATUS check_unix_security(const struct auth_context *auth_context,
|
||||
}
|
||||
|
||||
/* module initialisation */
|
||||
BOOL auth_init_unix(struct auth_context *auth_context, auth_methods **auth_method)
|
||||
NTSTATUS auth_init_unix(struct auth_context *auth_context, const char* param, auth_methods **auth_method)
|
||||
{
|
||||
if (!make_auth_methods(auth_context, auth_method)) {
|
||||
return False;
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
(*auth_method)->name = "unix";
|
||||
(*auth_method)->auth = check_unix_security;
|
||||
return True;
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,9 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_AUTH
|
||||
|
||||
extern fstring remote_machine;
|
||||
extern pstring global_myname;
|
||||
|
||||
@ -45,24 +48,6 @@ static int smb_create_user(const char *unix_user, const char *homedir)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Delete a UNIX user on demand.
|
||||
****************************************************************************/
|
||||
|
||||
int smb_delete_user(const char *unix_user)
|
||||
{
|
||||
pstring del_script;
|
||||
int ret;
|
||||
|
||||
pstrcpy(del_script, lp_deluser_script());
|
||||
if (! *del_script)
|
||||
return -1;
|
||||
all_string_sub(del_script, "%u", unix_user, sizeof(pstring));
|
||||
ret = smbrun(del_script,NULL);
|
||||
DEBUG(3,("smb_delete_user: Running the command `%s' gave %d\n",del_script,ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Add and Delete UNIX users on demand, based on NTSTATUS codes.
|
||||
****************************************************************************/
|
||||
@ -85,16 +70,6 @@ void smb_user_control(const auth_usersupplied_info *user_info, auth_serversuppli
|
||||
smb_create_user(user_info->internal_username.str, NULL);
|
||||
}
|
||||
}
|
||||
} else if (NT_STATUS_EQUAL(nt_status, NT_STATUS_NO_SUCH_USER)) {
|
||||
/*
|
||||
* User failed to validate ok against Domain controller.
|
||||
* If the failure was "user doesn't exist" and admin
|
||||
* wants us to try and delete that UNIX user on the fly,
|
||||
* do so.
|
||||
*/
|
||||
if (lp_deluser_script()) {
|
||||
smb_delete_user(user_info->internal_username.str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,7 +140,7 @@ static BOOL make_user_info(auth_usersupplied_info **user_info,
|
||||
return False;
|
||||
}
|
||||
|
||||
DEBUG(5,("makeing blobs for %s's user_info struct\n", internal_username));
|
||||
DEBUG(5,("making blobs for %s's user_info struct\n", internal_username));
|
||||
|
||||
(*user_info)->lm_resp = data_blob(lm_pwd.data, lm_pwd.length);
|
||||
(*user_info)->nt_resp = data_blob(nt_pwd.data, nt_pwd.length);
|
||||
@ -485,7 +460,7 @@ BOOL make_user_info_guest(auth_usersupplied_info **user_info)
|
||||
Make a user_info struct
|
||||
***************************************************************************/
|
||||
|
||||
BOOL make_server_info(auth_serversupplied_info **server_info)
|
||||
static BOOL make_server_info(auth_serversupplied_info **server_info)
|
||||
{
|
||||
*server_info = malloc(sizeof(**server_info));
|
||||
if (!*server_info) {
|
||||
@ -590,6 +565,183 @@ BOOL make_server_info_guest(auth_serversupplied_info **server_info)
|
||||
return False;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
Make a server_info struct from the info3 returned by a domain logon
|
||||
***************************************************************************/
|
||||
|
||||
NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
|
||||
const char *internal_username,
|
||||
const char *sent_nt_username,
|
||||
const char *domain,
|
||||
auth_serversupplied_info **server_info,
|
||||
NET_USER_INFO_3 *info3)
|
||||
{
|
||||
NTSTATUS nt_status = NT_STATUS_OK;
|
||||
|
||||
const char *nt_domain;
|
||||
const char *nt_username;
|
||||
|
||||
SAM_ACCOUNT *sam_account = NULL;
|
||||
DOM_SID user_sid;
|
||||
DOM_SID group_sid;
|
||||
|
||||
struct passwd *passwd;
|
||||
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
|
||||
/*
|
||||
Here is where we should check the list of
|
||||
trusted domains, and verify that the SID
|
||||
matches.
|
||||
*/
|
||||
|
||||
sid_copy(&user_sid, &info3->dom_sid.sid);
|
||||
if (!sid_append_rid(&user_sid, info3->user_rid)) {
|
||||
return NT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
sid_copy(&group_sid, &info3->dom_sid.sid);
|
||||
if (!sid_append_rid(&group_sid, info3->group_rid)) {
|
||||
return NT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (!(nt_username = unistr2_tdup(mem_ctx, &(info3->uni_user_name)))) {
|
||||
/* If the server didn't give us one, just use the one we sent them */
|
||||
nt_username = sent_nt_username;
|
||||
}
|
||||
|
||||
if (!(nt_domain = unistr2_tdup(mem_ctx, &(info3->uni_logon_dom)))) {
|
||||
/* If the server didn't give us one, just use the one we sent them */
|
||||
domain = domain;
|
||||
}
|
||||
|
||||
if (winbind_sid_to_uid(&uid, &user_sid)
|
||||
&& winbind_sid_to_gid(&gid, &group_sid)
|
||||
&& ((passwd = getpwuid_alloc(uid)))) {
|
||||
nt_status = pdb_init_sam_pw(&sam_account, passwd);
|
||||
passwd_free(&passwd);
|
||||
} else {
|
||||
char *dom_user;
|
||||
dom_user = talloc_asprintf(mem_ctx, "%s%s%s",
|
||||
nt_domain,
|
||||
lp_winbind_separator(),
|
||||
internal_username);
|
||||
|
||||
if (!dom_user) {
|
||||
DEBUG(0, ("talloc_asprintf failed!\n"));
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
} else {
|
||||
|
||||
if (!(passwd = Get_Pwnam(dom_user))
|
||||
/* Only lookup local for the local
|
||||
domain, we don't want this for
|
||||
trusted domains */
|
||||
&& strequal(nt_domain, lp_workgroup())) {
|
||||
passwd = Get_Pwnam(internal_username);
|
||||
}
|
||||
|
||||
if (!passwd) {
|
||||
return NT_STATUS_NO_SUCH_USER;
|
||||
} else {
|
||||
nt_status = pdb_init_sam_pw(&sam_account, passwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG(0, ("make_server_info_info3: pdb_init_sam failed!\n"));
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
if (!pdb_set_user_sid(sam_account, &user_sid)) {
|
||||
pdb_free_sam(&sam_account);
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
if (!pdb_set_group_sid(sam_account, &group_sid)) {
|
||||
pdb_free_sam(&sam_account);
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
if (!pdb_set_nt_username(sam_account, nt_username)) {
|
||||
pdb_free_sam(&sam_account);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (!pdb_set_domain(sam_account, nt_domain)) {
|
||||
pdb_free_sam(&sam_account);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (!pdb_set_fullname(sam_account, pdb_unistr2_convert(&(info3->uni_full_name)))) {
|
||||
pdb_free_sam(&sam_account);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (!pdb_set_logon_script(sam_account, pdb_unistr2_convert(&(info3->uni_logon_script)), True)) {
|
||||
pdb_free_sam(&sam_account);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (!pdb_set_profile_path(sam_account, pdb_unistr2_convert(&(info3->uni_profile_path)), True)) {
|
||||
pdb_free_sam(&sam_account);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (!pdb_set_homedir(sam_account, pdb_unistr2_convert(&(info3->uni_home_dir)), True)) {
|
||||
pdb_free_sam(&sam_account);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (!pdb_set_dir_drive(sam_account, pdb_unistr2_convert(&(info3->uni_dir_drive)), True)) {
|
||||
pdb_free_sam(&sam_account);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (!make_server_info_sam(server_info, sam_account)) {
|
||||
DEBUG(0, ("make_server_info_info3: make_server_info_sam failed!\n"));
|
||||
pdb_free_sam(&sam_account);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
/* Store the user group information in the server_info
|
||||
returned to the caller. */
|
||||
|
||||
if (info3->num_groups2 != 0) {
|
||||
int i;
|
||||
NT_USER_TOKEN *ptok;
|
||||
auth_serversupplied_info *pserver_info = *server_info;
|
||||
|
||||
if ((pserver_info->ptok = malloc( sizeof(NT_USER_TOKEN) ) ) == NULL) {
|
||||
DEBUG(0, ("domain_client_validate: out of memory allocating rid group membership\n"));
|
||||
nt_status = NT_STATUS_NO_MEMORY;
|
||||
free_server_info(server_info);
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
ptok = pserver_info->ptok;
|
||||
ptok->num_sids = (size_t)info3->num_groups2;
|
||||
|
||||
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"));
|
||||
nt_status = NT_STATUS_NO_MEMORY;
|
||||
free_server_info(server_info);
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
for (i = 0; i < ptok->num_sids; i++) {
|
||||
sid_copy(&ptok->user_sids[i], &(info3->dom_sid.sid));
|
||||
if (!sid_append_rid(&ptok->user_sids[i], info3->gids[i].g_rid)) {
|
||||
nt_status = NT_STATUS_INVALID_PARAMETER;
|
||||
free_server_info(server_info);
|
||||
return nt_status;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
Make an auth_methods struct
|
||||
***************************************************************************/
|
||||
@ -621,9 +773,9 @@ BOOL make_auth_methods(struct auth_context *auth_context, auth_methods **auth_me
|
||||
void delete_nt_token(NT_USER_TOKEN **pptoken)
|
||||
{
|
||||
if (*pptoken) {
|
||||
NT_USER_TOKEN *ptoken = *pptoken;
|
||||
SAFE_FREE( ptoken->user_sids );
|
||||
ZERO_STRUCTP(ptoken);
|
||||
NT_USER_TOKEN *ptoken = *pptoken;
|
||||
SAFE_FREE( ptoken->user_sids );
|
||||
ZERO_STRUCTP(ptoken);
|
||||
}
|
||||
SAFE_FREE(*pptoken);
|
||||
}
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_AUTH
|
||||
|
||||
/* Prototypes from common.h */
|
||||
|
||||
NSS_STATUS winbindd_request(int req_type,
|
||||
@ -100,12 +103,13 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context,
|
||||
}
|
||||
|
||||
/* module initialisation */
|
||||
BOOL auth_init_winbind(struct auth_context *auth_context, auth_methods **auth_method)
|
||||
NTSTATUS auth_init_winbind(struct auth_context *auth_context, const char *param, auth_methods **auth_method)
|
||||
{
|
||||
if (!make_auth_methods(auth_context, auth_method)) {
|
||||
return False;
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
(*auth_method)->name = "winbind";
|
||||
(*auth_method)->auth = check_winbind_security;
|
||||
return True;
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
@ -29,6 +29,9 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_AUTH
|
||||
|
||||
#ifdef WITH_PAM
|
||||
|
||||
/*******************************************************************
|
||||
@ -183,7 +186,7 @@ static void special_char_sub(char *buf)
|
||||
|
||||
static void pwd_sub(char *buf, const char *username, const char *oldpass, const char *newpass)
|
||||
{
|
||||
pstring_sub(buf, "%u", username);
|
||||
fstring_sub(buf, "%u", username);
|
||||
all_string_sub(buf, "%o", oldpass, sizeof(fstring));
|
||||
all_string_sub(buf, "%n", newpass, sizeof(fstring));
|
||||
}
|
||||
@ -494,7 +497,7 @@ static BOOL smb_pam_start(pam_handle_t **pamh, const char *user, const char *rho
|
||||
/*
|
||||
* PAM Authentication Handler
|
||||
*/
|
||||
static NTSTATUS smb_pam_auth(pam_handle_t *pamh, char *user)
|
||||
static NTSTATUS smb_pam_auth(pam_handle_t *pamh, const char *user)
|
||||
{
|
||||
int pam_error;
|
||||
NTSTATUS nt_status = NT_STATUS_LOGON_FAILURE;
|
||||
@ -579,7 +582,7 @@ static NTSTATUS smb_pam_account(pam_handle_t *pamh, const char * user)
|
||||
* PAM Credential Setting
|
||||
*/
|
||||
|
||||
static NTSTATUS smb_pam_setcred(pam_handle_t *pamh, char * user)
|
||||
static NTSTATUS smb_pam_setcred(pam_handle_t *pamh, const char * user)
|
||||
{
|
||||
int pam_error;
|
||||
NTSTATUS nt_status = NT_STATUS_NO_TOKEN;
|
||||
@ -619,7 +622,7 @@ static NTSTATUS smb_pam_setcred(pam_handle_t *pamh, char * user)
|
||||
/*
|
||||
* PAM Internal Session Handler
|
||||
*/
|
||||
static BOOL smb_internal_pam_session(pam_handle_t *pamh, char *user, char *tty, BOOL flag)
|
||||
static BOOL smb_internal_pam_session(pam_handle_t *pamh, const char *user, const char *tty, BOOL flag)
|
||||
{
|
||||
int pam_error;
|
||||
|
||||
@ -785,7 +788,7 @@ NTSTATUS smb_pam_accountcheck(const char * user)
|
||||
* PAM Password Validation Suite
|
||||
*/
|
||||
|
||||
NTSTATUS smb_pam_passcheck(char * user, char * password)
|
||||
NTSTATUS smb_pam_passcheck(const char * user, const char * password)
|
||||
{
|
||||
pam_handle_t *pamh = NULL;
|
||||
NTSTATUS nt_status = NT_STATUS_LOGON_FAILURE;
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_AUTH
|
||||
|
||||
/* these are kept here to keep the string_combinations function simple */
|
||||
static fstring this_user;
|
||||
#if !defined(WITH_PAM)
|
||||
@ -433,7 +436,7 @@ try all combinations with N uppercase letters.
|
||||
offset is the first char to try and change (start with 0)
|
||||
it assumes the string starts lowercased
|
||||
****************************************************************************/
|
||||
static NTSTATUS string_combinations2(char *s, int offset, NTSTATUS (*fn) (char *),
|
||||
static NTSTATUS string_combinations2(char *s, int offset, NTSTATUS (*fn) (const char *),
|
||||
int N)
|
||||
{
|
||||
int len = strlen(s);
|
||||
@ -467,7 +470,7 @@ try all combinations with up to N uppercase letters.
|
||||
offset is the first char to try and change (start with 0)
|
||||
it assumes the string starts lowercased
|
||||
****************************************************************************/
|
||||
static NTSTATUS string_combinations(char *s, NTSTATUS (*fn) (char *), int N)
|
||||
static NTSTATUS string_combinations(char *s, NTSTATUS (*fn) (const char *), int N)
|
||||
{
|
||||
int n;
|
||||
NTSTATUS nt_status;
|
||||
@ -481,7 +484,7 @@ static NTSTATUS string_combinations(char *s, NTSTATUS (*fn) (char *), int N)
|
||||
/****************************************************************************
|
||||
core of password checking routine
|
||||
****************************************************************************/
|
||||
static NTSTATUS password_check(char *password)
|
||||
static NTSTATUS password_check(const char *password)
|
||||
{
|
||||
#ifdef WITH_PAM
|
||||
return smb_pam_passcheck(this_user, password);
|
||||
@ -588,16 +591,13 @@ match is found and is used to update the encrypted password file
|
||||
return NT_STATUS_OK on correct match, appropriate error otherwise
|
||||
****************************************************************************/
|
||||
|
||||
NTSTATUS pass_check(const struct passwd *input_pass, char *user, char *password,
|
||||
int pwlen, BOOL (*fn) (char *, char *), BOOL run_cracker)
|
||||
NTSTATUS pass_check(const struct passwd *pass, const char *user, const char *password,
|
||||
int pwlen, BOOL (*fn) (const char *, const char *), BOOL run_cracker)
|
||||
{
|
||||
struct passwd *pass;
|
||||
pstring pass2;
|
||||
int level = lp_passwordlevel();
|
||||
|
||||
NTSTATUS nt_status;
|
||||
if (password)
|
||||
password[pwlen] = 0;
|
||||
|
||||
#if DEBUG_PASSWORD
|
||||
DEBUG(100, ("checking user=[%s] pass=[%s]\n", user, password));
|
||||
@ -624,12 +624,16 @@ NTSTATUS pass_check(const struct passwd *input_pass, char *user, char *password,
|
||||
|
||||
DEBUG(4, ("pass_check: Checking password for user %s (l=%d)\n", user, pwlen));
|
||||
|
||||
if (!input_pass) {
|
||||
if (!pass) {
|
||||
DEBUG(3, ("Couldn't find user %s\n", user));
|
||||
return NT_STATUS_NO_SUCH_USER;
|
||||
}
|
||||
|
||||
pass = make_modifyable_passwd(input_pass);
|
||||
|
||||
/* Copy into global for the convenience of looping code */
|
||||
/* Also the place to keep the 'password' no matter what
|
||||
crazy struct it started in... */
|
||||
fstrcpy(this_crypted, pass->pw_passwd);
|
||||
|
||||
#ifdef HAVE_GETSPNAM
|
||||
{
|
||||
@ -642,7 +646,7 @@ NTSTATUS pass_check(const struct passwd *input_pass, char *user, char *password,
|
||||
|
||||
spass = getspnam(pass->pw_name);
|
||||
if (spass && spass->sp_pwdp)
|
||||
pstrcpy(pass->pw_passwd, spass->sp_pwdp);
|
||||
fstrcpy(this_crypted, spass->sp_pwdp);
|
||||
}
|
||||
#elif defined(IA_UINFO)
|
||||
{
|
||||
@ -660,7 +664,7 @@ NTSTATUS pass_check(const struct passwd *input_pass, char *user, char *password,
|
||||
{
|
||||
struct pr_passwd *pr_pw = getprpwnam(pass->pw_name);
|
||||
if (pr_pw && pr_pw->ufld.fd_encrypt)
|
||||
pstrcpy(pass->pw_passwd, pr_pw->ufld.fd_encrypt);
|
||||
fstrcpy(this_crypted, pr_pw->ufld.fd_encrypt);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -669,7 +673,7 @@ NTSTATUS pass_check(const struct passwd *input_pass, char *user, char *password,
|
||||
struct passwd_adjunct *pwret;
|
||||
pwret = getpwanam(s);
|
||||
if (pwret && pwret->pwa_passwd)
|
||||
pstrcpy(pass->pw_passwd,pwret->pwa_passwd);
|
||||
fstrcpy(this_crypted, pwret->pwa_passwd);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -680,8 +684,8 @@ NTSTATUS pass_check(const struct passwd *input_pass, char *user, char *password,
|
||||
user));
|
||||
mypasswd = getprpwnam(user);
|
||||
if (mypasswd) {
|
||||
fstrcpy(pass->pw_name, mypasswd->ufld.fd_name);
|
||||
fstrcpy(pass->pw_passwd, mypasswd->ufld.fd_encrypt);
|
||||
fstrcpy(this_user, mypasswd->ufld.fd_name);
|
||||
fstrcpy(this_crypted, mypasswd->ufld.fd_encrypt);
|
||||
} else {
|
||||
DEBUG(5,
|
||||
("OSF1_ENH_SEC: No entry for user %s in protected database !\n",
|
||||
@ -694,7 +698,7 @@ NTSTATUS pass_check(const struct passwd *input_pass, char *user, char *password,
|
||||
{
|
||||
AUTHORIZATION *ap = getauthuid(pass->pw_uid);
|
||||
if (ap) {
|
||||
fstrcpy(pass->pw_passwd, ap->a_password);
|
||||
fstrcpy(this_crypted, ap->a_password);
|
||||
endauthent();
|
||||
}
|
||||
}
|
||||
@ -709,27 +713,20 @@ NTSTATUS pass_check(const struct passwd *input_pass, char *user, char *password,
|
||||
this_salt[2] = 0;
|
||||
#endif
|
||||
|
||||
/* Copy into global for the convenience of looping code */
|
||||
fstrcpy(this_crypted, pass->pw_passwd);
|
||||
|
||||
if (!*this_crypted) {
|
||||
if (!lp_null_passwords()) {
|
||||
DEBUG(2, ("Disallowing %s with null password\n",
|
||||
this_user));
|
||||
passwd_free(&pass);
|
||||
return NT_STATUS_LOGON_FAILURE;
|
||||
}
|
||||
if (!*password) {
|
||||
DEBUG(3,
|
||||
("Allowing access to %s with null password\n",
|
||||
this_user));
|
||||
passwd_free(&pass);
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
passwd_free(&pass);
|
||||
|
||||
#endif /* defined(WITH_PAM) */
|
||||
|
||||
/* try it as it came to us */
|
||||
@ -752,42 +749,36 @@ NTSTATUS pass_check(const struct passwd *input_pass, char *user, char *password,
|
||||
* need to proceed as we know it hasn't been case modified by the
|
||||
* client */
|
||||
if (strhasupper(password) && strhaslower(password)) {
|
||||
passwd_free(&pass);
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
/* make a copy of it */
|
||||
StrnCpy(pass2, password, sizeof(pstring) - 1);
|
||||
pstrcpy(pass2, password);
|
||||
|
||||
/* try all lowercase if it's currently all uppercase */
|
||||
if (strhasupper(password)) {
|
||||
strlower(password);
|
||||
if NT_STATUS_IS_OK(nt_status = password_check(password)) {
|
||||
if (strhasupper(pass2)) {
|
||||
strlower(pass2);
|
||||
if NT_STATUS_IS_OK(nt_status = password_check(pass2)) {
|
||||
if (fn)
|
||||
fn(user, password);
|
||||
fn(user, pass2);
|
||||
return (nt_status);
|
||||
}
|
||||
}
|
||||
|
||||
/* give up? */
|
||||
if (level < 1) {
|
||||
/* restore it */
|
||||
fstrcpy(password, pass2);
|
||||
return NT_STATUS_WRONG_PASSWORD;
|
||||
}
|
||||
|
||||
/* last chance - all combinations of up to level chars upper! */
|
||||
strlower(password);
|
||||
strlower(pass2);
|
||||
|
||||
|
||||
if NT_STATUS_IS_OK(nt_status = string_combinations(password, password_check, level)) {
|
||||
if (NT_STATUS_IS_OK(nt_status = string_combinations(pass2, password_check, level))) {
|
||||
if (fn)
|
||||
fn(user, password);
|
||||
fn(user, pass2);
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
/* restore it */
|
||||
fstrcpy(password, pass2);
|
||||
|
||||
return NT_STATUS_WRONG_PASSWORD;
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
client_proto.h
|
@ -22,7 +22,7 @@
|
||||
#define NO_SYSLOG
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#include "../client/client_proto.h"
|
||||
#ifndef REGISTER
|
||||
#define REGISTER 0
|
||||
#endif
|
||||
@ -34,7 +34,7 @@ extern BOOL in_client;
|
||||
extern BOOL AllowDebugChange;
|
||||
static int port = 0;
|
||||
pstring cur_dir = "\\";
|
||||
pstring cd_path = "";
|
||||
static pstring cd_path = "";
|
||||
static pstring service;
|
||||
static pstring desthost;
|
||||
extern pstring global_myname;
|
||||
@ -61,9 +61,9 @@ static int cmd_help(void);
|
||||
#define FID_UNUSED (0xFFFF)
|
||||
|
||||
time_t newer_than = 0;
|
||||
int archive_level = 0;
|
||||
static int archive_level = 0;
|
||||
|
||||
BOOL translation = False;
|
||||
static BOOL translation = False;
|
||||
|
||||
static BOOL have_ip;
|
||||
|
||||
@ -74,36 +74,39 @@ extern BOOL tar_reset;
|
||||
/* clitar bits end */
|
||||
|
||||
|
||||
mode_t myumask = 0755;
|
||||
static mode_t myumask = 0755;
|
||||
|
||||
BOOL prompt = True;
|
||||
static BOOL prompt = True;
|
||||
|
||||
int printmode = 1;
|
||||
static int printmode = 1;
|
||||
|
||||
static BOOL recurse = False;
|
||||
BOOL lowercase = False;
|
||||
|
||||
struct in_addr dest_ip;
|
||||
static struct in_addr dest_ip;
|
||||
|
||||
#define SEPARATORS " \t\n\r"
|
||||
|
||||
BOOL abort_mget = True;
|
||||
static BOOL abort_mget = True;
|
||||
|
||||
pstring fileselection = "";
|
||||
static pstring fileselection = "";
|
||||
|
||||
extern file_info def_finfo;
|
||||
|
||||
/* timing globals */
|
||||
int get_total_size = 0;
|
||||
int get_total_time_ms = 0;
|
||||
int put_total_size = 0;
|
||||
int put_total_time_ms = 0;
|
||||
static int put_total_size = 0;
|
||||
static int put_total_time_ms = 0;
|
||||
|
||||
/* totals globals */
|
||||
static double dir_total;
|
||||
|
||||
#define USENMB
|
||||
|
||||
/* some forward declarations */
|
||||
static struct cli_state *do_connect(const char *server, const char *share);
|
||||
|
||||
/****************************************************************************
|
||||
write to a local file with CR/LF->LF translation if appropriate. return the
|
||||
number taken from the buffer. This may not equal the number written.
|
||||
@ -1120,7 +1123,10 @@ static int do_put(char *rname,char *lname)
|
||||
}
|
||||
|
||||
|
||||
x_fclose(f);
|
||||
if (f != x_stdin) {
|
||||
x_fclose(f);
|
||||
}
|
||||
|
||||
SAFE_FREE(buf);
|
||||
|
||||
{
|
||||
@ -1958,7 +1964,7 @@ static BOOL list_servers(char *wk_grp)
|
||||
* field is NULL, and NULL in that field is used in process_tok()
|
||||
* (below) to indicate the end of the list. crh
|
||||
*/
|
||||
struct
|
||||
static struct
|
||||
{
|
||||
char *name;
|
||||
int (*fn)(void);
|
||||
@ -2080,6 +2086,14 @@ static int process_command_string(char *cmd)
|
||||
char *ptr;
|
||||
int rc = 0;
|
||||
|
||||
/* establish the connection if not already */
|
||||
|
||||
if (!cli) {
|
||||
cli = do_connect(desthost, service);
|
||||
if (!cli)
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (cmd[0] != '\0') {
|
||||
char *p;
|
||||
fstring tok;
|
||||
@ -2230,7 +2244,7 @@ static void process_stdin(void)
|
||||
/*****************************************************
|
||||
return a connection to a server
|
||||
*******************************************************/
|
||||
struct cli_state *do_connect(const char *server, const char *share)
|
||||
static struct cli_state *do_connect(const char *server, const char *share)
|
||||
{
|
||||
struct cli_state *c;
|
||||
struct nmb_name called, calling;
|
||||
@ -2484,9 +2498,13 @@ handle a tar operation
|
||||
static int do_tar_op(char *base_directory)
|
||||
{
|
||||
int ret;
|
||||
cli = do_connect(desthost, service);
|
||||
if (!cli)
|
||||
return 1;
|
||||
|
||||
/* do we already have a connection? */
|
||||
if (!cli) {
|
||||
cli = do_connect(desthost, service);
|
||||
if (!cli)
|
||||
return 1;
|
||||
}
|
||||
|
||||
recurse=True;
|
||||
|
||||
@ -2623,10 +2641,6 @@ static void remember_query_host(const char *arg,
|
||||
}
|
||||
DEBUGLEVEL = old_debug;
|
||||
|
||||
#ifdef WITH_SSL
|
||||
sslutil_init(0);
|
||||
#endif
|
||||
|
||||
pstrcpy(workgroup,lp_workgroup());
|
||||
|
||||
load_interfaces();
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "clitar.h"
|
||||
#include "../client/client_proto.h"
|
||||
|
||||
static int clipfind(char **aret, int ret, char *tok);
|
||||
|
||||
@ -65,8 +66,6 @@ typedef struct
|
||||
|
||||
} stack;
|
||||
|
||||
stack dir_stack = {NULL, 0}; /* Want an empty stack */
|
||||
|
||||
#define SEPARATORS " \t\n\r"
|
||||
extern struct cli_state *cli;
|
||||
|
||||
@ -85,25 +84,25 @@ static char *tarbuf, *buffer_p;
|
||||
static int tp, ntarf, tbufsiz;
|
||||
static double ttarf;
|
||||
/* Incremental mode */
|
||||
BOOL tar_inc=False;
|
||||
static BOOL tar_inc=False;
|
||||
/* Reset archive bit */
|
||||
BOOL tar_reset=False;
|
||||
static BOOL tar_reset=False;
|
||||
/* Include / exclude mode (true=include, false=exclude) */
|
||||
BOOL tar_excl=True;
|
||||
static BOOL tar_excl=True;
|
||||
/* use regular expressions for search on file names */
|
||||
BOOL tar_re_search=False;
|
||||
static BOOL tar_re_search=False;
|
||||
#ifdef HAVE_REGEX_H
|
||||
regex_t *preg;
|
||||
#endif
|
||||
/* Do not dump anything, just calculate sizes */
|
||||
BOOL dry_run=False;
|
||||
static BOOL dry_run=False;
|
||||
/* Dump files with System attribute */
|
||||
BOOL tar_system=True;
|
||||
static BOOL tar_system=True;
|
||||
/* Dump files with Hidden attribute */
|
||||
BOOL tar_hidden=True;
|
||||
static BOOL tar_hidden=True;
|
||||
/* Be noisy - make a catalogue */
|
||||
BOOL tar_noisy=True;
|
||||
BOOL tar_real_noisy=False; /* Don't want to be really noisy by default */
|
||||
static BOOL tar_noisy=True;
|
||||
static BOOL tar_real_noisy=False; /* Don't want to be really noisy by default */
|
||||
|
||||
char tar_type='\0';
|
||||
static char **cliplist=NULL;
|
||||
@ -119,8 +118,8 @@ extern pstring cur_dir;
|
||||
extern int get_total_time_ms;
|
||||
extern int get_total_size;
|
||||
|
||||
int blocksize=20;
|
||||
int tarhandle;
|
||||
static int blocksize=20;
|
||||
static int tarhandle;
|
||||
|
||||
static void writetarheader(int f, char *aname, int size, time_t mtime,
|
||||
char *amode, unsigned char ftype);
|
||||
|
@ -111,13 +111,13 @@ fullpath(const char *p)
|
||||
OK then we change into that directory - this prevents race conditions */
|
||||
static int mount_ok(char *mount_point)
|
||||
{
|
||||
SMB_STRUCT_STAT st;
|
||||
struct stat st;
|
||||
|
||||
if (chdir(mount_point) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (sys_stat(".", &st) != 0) {
|
||||
if (stat(".", &st) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
SMB backend for the Common UNIX Printing System ("CUPS")
|
||||
Copyright 1999 by Easy Software Products
|
||||
Copyright Andrew Tridgell 1994-1998
|
||||
Copyright Andrew Bartlett 2002
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -271,72 +272,25 @@ smb_connect(char *workgroup, /* I - Workgroup */
|
||||
char *password) /* I - Password */
|
||||
{
|
||||
struct cli_state *c; /* New connection */
|
||||
struct nmb_name called, /* NMB name of server */
|
||||
calling; /* NMB name of client */
|
||||
struct in_addr ip; /* IP address of server */
|
||||
pstring myname; /* Client name */
|
||||
|
||||
NTSTATUS nt_status;
|
||||
|
||||
/*
|
||||
* Get the names and addresses of the client and server...
|
||||
*/
|
||||
|
||||
get_myname(myname);
|
||||
|
||||
zero_ip(&ip);
|
||||
|
||||
make_nmb_name(&calling, myname, 0x0);
|
||||
make_nmb_name(&called, server, 0x20);
|
||||
|
||||
/*
|
||||
* Open a new connection to the SMB server...
|
||||
*/
|
||||
|
||||
if ((c = cli_initialise(NULL)) == NULL)
|
||||
{
|
||||
fputs("ERROR: cli_initialize() failed...\n", stderr);
|
||||
return (NULL);
|
||||
|
||||
nt_status = cli_full_connection(&c, myname, server, NULL, 0, share, "?????",
|
||||
username, lp_workgroup(), password, 0);
|
||||
|
||||
if (NT_STATUS_IS_OK(nt_status)) {
|
||||
return c;
|
||||
} else {
|
||||
fprintf(stderr, "ERROR: Connection failed with error %s\n", nt_errstr(nt_status));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!cli_connect(c, server, &ip))
|
||||
{
|
||||
fputs("ERROR: cli_connect() failed...\n", stderr);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (!cli_session_request(c, &calling, &called))
|
||||
{
|
||||
fputs("ERROR: cli_session_request() failed...\n", stderr);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (!cli_negprot(c))
|
||||
{
|
||||
fputs("ERROR: SMB protocol negotiation failed\n", stderr);
|
||||
cli_shutdown(c);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Do password stuff...
|
||||
*/
|
||||
|
||||
if (!cli_session_setup(c, username,
|
||||
password, strlen(password),
|
||||
password, strlen(password),
|
||||
workgroup))
|
||||
{
|
||||
fprintf(stderr, "ERROR: SMB session setup failed: %s\n", cli_errstr(c));
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (!cli_send_tconX(c, share, "?????",
|
||||
password, strlen(password)+1))
|
||||
{
|
||||
fprintf(stderr, "ERROR: SMB tree connect failed: %s\n", cli_errstr(c));
|
||||
cli_shutdown(c);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the new connection...
|
||||
|
2442
source3/configure
vendored
2442
source3/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -2,44 +2,172 @@ dnl -*- mode: m4-mode -*-
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(include/includes.h)
|
||||
AC_CONFIG_HEADER(include/config.h)
|
||||
# we want to be compatible with older versions of Samba
|
||||
|
||||
#################################################
|
||||
# Directory handling stuff to support both the
|
||||
# legacy SAMBA directories and FHS compliant
|
||||
# ones...
|
||||
AC_PREFIX_DEFAULT(/usr/local/samba)
|
||||
|
||||
AC_ARG_WITH(fhs,
|
||||
[ --with-fhs Use FHS-compliant paths (default=no)],
|
||||
configdir="${sysconfdir}/samba"
|
||||
lockdir="\${VARDIR}/cache/samba"
|
||||
piddir="\$(VARDIR)/run/samba"
|
||||
logfilebase="\${VARDIR}/log/samba"
|
||||
privatedir="\${CONFIGDIR}/private"
|
||||
swatdir="\${DATADIR}/samba/swat",
|
||||
configdir="\$(LIBDIR)"
|
||||
logfilebase="\$(VARDIR)"
|
||||
lockdir="\${VARDIR}/locks"
|
||||
piddir="\$(VARDIR)/locks"
|
||||
privatedir="\${prefix}/private"
|
||||
swatdir="\${prefix}/swat")
|
||||
|
||||
#################################################
|
||||
# set private directory location
|
||||
AC_ARG_WITH(privatedir,
|
||||
[ --with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)],
|
||||
[ case "$withval" in
|
||||
yes|no)
|
||||
#
|
||||
# Just in case anybody calls it without argument
|
||||
#
|
||||
AC_MSG_WARN([--with-privatedir called without argument - will use default])
|
||||
;;
|
||||
* )
|
||||
privatedir="$withval"
|
||||
;;
|
||||
esac])
|
||||
|
||||
#################################################
|
||||
# set lock directory location
|
||||
AC_ARG_WITH(lockdir,
|
||||
[ --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)],
|
||||
[ case "$withval" in
|
||||
yes|no)
|
||||
#
|
||||
# Just in case anybody calls it without argument
|
||||
#
|
||||
AC_MSG_WARN([--with-lockdir called without argument - will use default])
|
||||
;;
|
||||
* )
|
||||
lockdir="$withval"
|
||||
;;
|
||||
esac])
|
||||
|
||||
#################################################
|
||||
# set pid directory location
|
||||
AC_ARG_WITH(piddir,
|
||||
[ --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)],
|
||||
[ case "$withval" in
|
||||
yes|no)
|
||||
#
|
||||
# Just in case anybody calls it without argument
|
||||
#
|
||||
AC_MSG_WARN([--with-piddir called without argument - will use default])
|
||||
;;
|
||||
* )
|
||||
piddir="$withval"
|
||||
;;
|
||||
esac])
|
||||
|
||||
#################################################
|
||||
# set SWAT directory location
|
||||
AC_ARG_WITH(swatdir,
|
||||
[ --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)],
|
||||
[ case "$withval" in
|
||||
yes|no)
|
||||
#
|
||||
# Just in case anybody does it
|
||||
#
|
||||
AC_MSG_WARN([--with-swatdir called without argument - will use default])
|
||||
;;
|
||||
* )
|
||||
swatdir="$withval"
|
||||
;;
|
||||
esac])
|
||||
|
||||
#################################################
|
||||
# set configuration directory location
|
||||
AC_ARG_WITH(configdir,
|
||||
[ --with-configdir=DIR Where to put configuration files (\$libdir)],
|
||||
[ case "$withval" in
|
||||
yes|no)
|
||||
#
|
||||
# Just in case anybody does it
|
||||
#
|
||||
AC_MSG_WARN([--with-configdir called without argument - will use default])
|
||||
;;
|
||||
* )
|
||||
configdir="$withval"
|
||||
;;
|
||||
esac])
|
||||
|
||||
#################################################
|
||||
# set log directory location
|
||||
AC_ARG_WITH(logfilebase,
|
||||
[ --with-logfilebase=DIR Where to put log files (\$(VARDIR))],
|
||||
[ case "$withval" in
|
||||
yes|no)
|
||||
#
|
||||
# Just in case anybody does it
|
||||
#
|
||||
AC_MSG_WARN([--with-logfilebase called without argument - will use default])
|
||||
;;
|
||||
* )
|
||||
logfilebase="$withval"
|
||||
;;
|
||||
esac])
|
||||
|
||||
AC_SUBST(configdir)
|
||||
AC_SUBST(lockdir)
|
||||
AC_SUBST(piddir)
|
||||
AC_SUBST(logfilebase)
|
||||
AC_SUBST(privatedir)
|
||||
AC_SUBST(swatdir)
|
||||
AC_SUBST(bindir)
|
||||
AC_SUBST(sbindir)
|
||||
|
||||
dnl Unique-to-Samba variables we'll be playing with.
|
||||
AC_SUBST(SHELL)
|
||||
AC_SUBST(RUNPROG)
|
||||
AC_SUBST(MPROGS)
|
||||
AC_SUBST(LDSHFLAGS)
|
||||
AC_SUBST(SONAMEFLAG)
|
||||
AC_SUBST(SHLD)
|
||||
AC_SUBST(HOST_OS)
|
||||
AC_SUBST(PAM_MOD)
|
||||
AC_SUBST(WRAP)
|
||||
AC_SUBST(WRAP32)
|
||||
AC_SUBST(WRAPPROG)
|
||||
AC_SUBST(PICFLAG)
|
||||
AC_SUBST(PICSUFFIX)
|
||||
AC_SUBST(POBAD_CC)
|
||||
AC_SUBST(SHLIBEXT)
|
||||
AC_SUBST(LIBSMBCLIENT_SHARED)
|
||||
AC_SUBST(LIBSMBCLIENT)
|
||||
|
||||
# compile with optimisation and without debugging by default
|
||||
# compile with optimization and without debugging by default
|
||||
CFLAGS="-O ${CFLAGS}"
|
||||
|
||||
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug Turn on compiler debugging information (default=no)],
|
||||
[if eval "test x$enable_debug = xyes"; then
|
||||
CFLAGS="${CFLAGS} -g"
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(developer, [ --enable-developer turn on developer warnings and debugging [default=no]],
|
||||
AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings and debugging (default=no)],
|
||||
[if eval "test x$enable_developer = xyes"; then
|
||||
CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(krb5developer, [ --enable-krb5developer turn on developer warnings and debugging, except -Wstrict-prototypes [default=no]],
|
||||
AC_ARG_ENABLE(krb5developer, [ --enable-krb5developer Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)],
|
||||
[if eval "test x$enable_krb5developer = xyes"; then
|
||||
CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc enable heap debugging [default=no]])
|
||||
AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc Enable heap debugging [default=no]])
|
||||
|
||||
if test "x$enable_dmalloc" = xyes
|
||||
then
|
||||
@ -54,6 +182,10 @@ AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_AWK
|
||||
|
||||
dnl Check if we use GNU ld
|
||||
LD=ld
|
||||
AC_PROG_LD_GNU
|
||||
|
||||
dnl needed before AC_TRY_COMPILE
|
||||
AC_ISC_POSIX
|
||||
|
||||
@ -175,7 +307,6 @@ case "$host_os" in
|
||||
;;
|
||||
esac
|
||||
else
|
||||
DYNEXP="-dc -dp"
|
||||
CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||
AC_DEFINE(_LARGEFILE64_SOURCE)
|
||||
AC_DEFINE(_FILE_OFFSET_BITS,64)
|
||||
@ -299,7 +430,7 @@ AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/i
|
||||
AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h)
|
||||
AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
|
||||
AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h)
|
||||
AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h ldap.h lber.h)
|
||||
AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h)
|
||||
|
||||
#
|
||||
# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
|
||||
@ -355,23 +486,28 @@ AC_CHECK_TYPE(wchar_t, unsigned short)
|
||||
############################################
|
||||
# for cups support we need libcups, and a handful of header files
|
||||
|
||||
AC_CHECK_LIB(cups,httpConnect)
|
||||
AC_ARG_ENABLE(cups,
|
||||
[ --enable-cups Turn on CUPS support (default=auto)])
|
||||
|
||||
# I wonder if there is a nicer way of doing this?
|
||||
if test x$enable_cups != xno; then
|
||||
AC_PATH_PROG(CUPS_CONFIG, cups-config)
|
||||
|
||||
if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
|
||||
AC_CHECK_HEADERS(cups/cups.h cups/language.h)
|
||||
if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
|
||||
if test x"$ac_cv_header_cups_language_h" = x"yes"; then
|
||||
if test "x$CUPS_CONFIG" != x; then
|
||||
AC_DEFINE(HAVE_CUPS)
|
||||
fi
|
||||
CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
|
||||
LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
|
||||
LIBS="$LIBS `$CUPS_CONFIG --libs`"
|
||||
fi
|
||||
fi
|
||||
|
||||
############################################
|
||||
# we need libdl for PAM, the password database plugins and the new VFS code
|
||||
AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
|
||||
AC_DEFINE(HAVE_LIBDL)])
|
||||
# we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
|
||||
AC_CHECK_FUNCS(dlopen)
|
||||
if test x"$ac_cv_func_dlopen" = x"no"; then
|
||||
AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
|
||||
AC_DEFINE(HAVE_DLOPEN)])
|
||||
fi
|
||||
# dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
|
||||
|
||||
############################################
|
||||
# check if the compiler can do immediate structures
|
||||
@ -601,7 +737,7 @@ else
|
||||
RUNPROG=""
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
|
||||
AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
|
||||
AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid)
|
||||
AC_CHECK_FUNCS(memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid)
|
||||
AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent)
|
||||
@ -713,6 +849,7 @@ AC_LIBTESTFUNC(sec, getprpwnam)
|
||||
# these are the defaults, good for lots of systems
|
||||
HOST_OS="$host_os"
|
||||
LDSHFLAGS="-shared"
|
||||
SONAMEFLAG="#"
|
||||
SHLD="\${CC}"
|
||||
PICFLAG=""
|
||||
PICSUFFIX="po"
|
||||
@ -729,16 +866,23 @@ case "$host_os" in
|
||||
LDSHFLAGS="-shared"
|
||||
DYNEXP="-Wl,--export-dynamic"
|
||||
PICFLAG="-fPIC"
|
||||
SONAMEFLAG="-Wl,-soname="
|
||||
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
|
||||
;;
|
||||
*solaris*)
|
||||
AC_DEFINE(SUNOS5)
|
||||
*solaris*) AC_DEFINE(SUNOS5)
|
||||
BLDSHARED="true"
|
||||
LDSHFLAGS="-h \$@ -G"
|
||||
if test "${ac_cv_prog_CC}" = "gcc"; then
|
||||
LDSHFLAGS="-G"
|
||||
SONAMEFLAG="-h "
|
||||
if test "${GCC}" = "yes"; then
|
||||
PICFLAG="-fPIC"
|
||||
if test "${ac_cv_prog_gnu_ld}" = "yes"; then
|
||||
DYNEXP="-Wl,-E"
|
||||
fi
|
||||
else
|
||||
PICFLAG="-KPIC"
|
||||
## ${CFLAGS} added for building 64-bit shared
|
||||
## libs using Sun's Compiler
|
||||
LDSHFLAGS="-G \${CFLAGS}"
|
||||
POBAD_CC=""
|
||||
PICSUFFIX="po.o"
|
||||
fi
|
||||
@ -746,11 +890,14 @@ case "$host_os" in
|
||||
;;
|
||||
*sunos*) AC_DEFINE(SUNOS4)
|
||||
BLDSHARED="true"
|
||||
LDSHFLAGS="-Wl,-h,\$@ -G"
|
||||
LDSHFLAGS="-G"
|
||||
SONAMEFLAG="-Wl,-h,"
|
||||
PICFLAG="-KPIC" # Is this correct for SunOS
|
||||
;;
|
||||
*bsd*) BLDSHARED="true"
|
||||
LDSHFLAGS="-Wl,-soname,\$@ -shared"
|
||||
LDSHFLAGS="-shared"
|
||||
DYNEXP="-Wl,-Bdynamic"
|
||||
SONAMEFLAG="-Wl,-soname,"
|
||||
PICFLAG="-fPIC"
|
||||
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
|
||||
;;
|
||||
@ -761,9 +908,10 @@ case "$host_os" in
|
||||
esac
|
||||
ATTEMPT_WRAP32_BUILD=yes
|
||||
BLDSHARED="true"
|
||||
LDSHFLAGS="-soname \$@ -shared"
|
||||
LDSHFLAGS="-set_version sgi1.0 -shared"
|
||||
SONAMEFLAG="-soname "
|
||||
SHLD="\${LD}"
|
||||
if test "${ac_cv_prog_CC}" = "gcc"; then
|
||||
if test "${GCC}" = "yes"; then
|
||||
PICFLAG="-fPIC"
|
||||
else
|
||||
PICFLAG="-KPIC"
|
||||
@ -773,16 +921,25 @@ case "$host_os" in
|
||||
*aix*) AC_DEFINE(AIX)
|
||||
BLDSHARED="true"
|
||||
LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
|
||||
DYNEXP="-Wl,-brtl,-bexpall"
|
||||
if test "${GCC}" = "yes"; then
|
||||
PICFLAG="-O2"
|
||||
else
|
||||
PICFLAG="-O2 -qmaxmem=6000"
|
||||
## for funky AIX compiler using strncpy()
|
||||
CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
|
||||
fi
|
||||
|
||||
AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE)
|
||||
;;
|
||||
*hpux*) AC_DEFINE(HPUX)
|
||||
SHLIBEXT="sl"
|
||||
# Use special PIC flags for the native HP-UX compiler.
|
||||
if test $ac_cv_prog_cc_Ae = yes; then
|
||||
SHLD="/usr/bin/ld"
|
||||
BLDSHARED="true"
|
||||
LDSHFLAGS="-B symbolic -b -z +h \$@"
|
||||
SHLD="/usr/bin/ld"
|
||||
LDSHFLAGS="-B symbolic -b -z"
|
||||
SONAMEFLAG="+h "
|
||||
PICFLAG="+z"
|
||||
fi
|
||||
DYNEXP="-Wl,-E"
|
||||
@ -791,31 +948,28 @@ case "$host_os" in
|
||||
*qnx*) AC_DEFINE(QNX);;
|
||||
*osf*) AC_DEFINE(OSF1)
|
||||
BLDSHARED="true"
|
||||
LDSHFLAGS="-Wl,-soname,\$@ -shared"
|
||||
LDSHFLAGS="-shared"
|
||||
SONAMEFLAG="-Wl,-soname,"
|
||||
PICFLAG="-fPIC"
|
||||
;;
|
||||
*sco*)
|
||||
AC_DEFINE(SCO)
|
||||
;;
|
||||
*sco*) AC_DEFINE(SCO);;
|
||||
*unixware*) AC_DEFINE(UNIXWARE)
|
||||
BLDSHARED="true"
|
||||
LDSHFLAGS="-Wl,-soname,\$@ -shared"
|
||||
LDSHFLAGS="-shared"
|
||||
SONAMEFLAG="-Wl,-soname,"
|
||||
PICFLAG="-KPIC"
|
||||
;;
|
||||
*next2*) AC_DEFINE(NEXT2);;
|
||||
*dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man]);;
|
||||
*sysv4*)
|
||||
case "$host" in
|
||||
*-univel-*)
|
||||
if [ test "$GCC" != yes ]; then
|
||||
*-univel-*) if [ test "$GCC" != yes ]; then
|
||||
AC_DEFINE(HAVE_MEMSET)
|
||||
fi
|
||||
LDSHFLAGS="-G"
|
||||
DYNEXP="-Bexport"
|
||||
;;
|
||||
*mips-sni-sysv4*)
|
||||
AC_DEFINE(RELIANTUNIX)
|
||||
;;
|
||||
*mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX);;
|
||||
esac
|
||||
;;
|
||||
|
||||
@ -946,7 +1100,7 @@ AC_TRY_COMPILE([
|
||||
#include <dirent.h>],
|
||||
[struct dirent64 de;],
|
||||
samba_cv_HAVE_STRUCT_DIRENT64=yes,samba_cv_HAVE_STRUCT_DIRENT64=no)])
|
||||
if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
|
||||
if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
|
||||
AC_DEFINE(HAVE_STRUCT_DIRENT64)
|
||||
fi
|
||||
|
||||
@ -1025,6 +1179,14 @@ if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
|
||||
AC_DEFINE(HAVE_GETTIMEOFDAY_TZ)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for __va_copy],samba_cv_HAVE_VA_COPY,[
|
||||
AC_TRY_LINK([#include <stdarg.h>
|
||||
va_list ap1,ap2;], [__va_copy(ap1,ap2);],
|
||||
samba_cv_HAVE_VA_COPY=yes,samba_cv_HAVE_VA_COPY=no)])
|
||||
if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
|
||||
AC_DEFINE(HAVE_VA_COPY)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for C99 vsnprintf],samba_cv_HAVE_C99_VSNPRINTF,[
|
||||
AC_TRY_RUN([
|
||||
#include <sys/types.h>
|
||||
@ -1417,7 +1579,7 @@ fi
|
||||
|
||||
AC_CACHE_CHECK([whether getpass should be replaced],samba_cv_REPLACE_GETPASS,[
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
|
||||
CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/smbwrapper"
|
||||
AC_TRY_COMPILE([
|
||||
#define REPLACE_GETPASS 1
|
||||
#define NO_CONFIG_H 1
|
||||
@ -1697,7 +1859,8 @@ AC_ARG_WITH(smbwrapper,
|
||||
yes)
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(WITH_SMBWRAPPER)
|
||||
WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
|
||||
WRAPPROG="bin/smbsh"
|
||||
WRAP="bin/smbwrapper.$SHLIBEXT"
|
||||
|
||||
if test x$ATTEMPT_WRAP32_BUILD = x; then
|
||||
WRAP32=""
|
||||
@ -1709,10 +1872,12 @@ AC_ARG_WITH(smbwrapper,
|
||||
|
||||
if test x$PICFLAG = x; then
|
||||
echo No support for PIC code - disabling smbwrapper and smbsh
|
||||
WRAPPROG=""
|
||||
WRAP=""
|
||||
WRAP32=""
|
||||
elif test x$ac_cv_func_syscall = xno; then
|
||||
AC_MSG_RESULT([No syscall() -- disabling smbwrapper and smbsh])
|
||||
WRAPPROG=""
|
||||
WRAP=""
|
||||
WRAP32=""
|
||||
fi
|
||||
@ -1827,6 +1992,16 @@ AC_CHECK_LIB(lber, ber_scanf, [LIBS="$LIBS -llber"])
|
||||
if test x$have_ldap != xyes; then
|
||||
AC_CHECK_LIB(ldap, ldap_domain2hostlist, [LIBS="$LIBS -lldap";
|
||||
AC_DEFINE(HAVE_LDAP)])
|
||||
|
||||
########################################################
|
||||
# If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
|
||||
# Check found in pam_ldap 145.
|
||||
AC_CHECK_FUNCS(ldap_set_rebind_proc)
|
||||
AC_CACHE_CHECK(whether ldap_set_rebind_proc takes 3 arguments, pam_ldap_cv_ldap_set_rebind_proc, [
|
||||
AC_TRY_COMPILE([
|
||||
#include <lber.h>
|
||||
#include <ldap.h>], [ldap_set_rebind_proc(0, 0, 0);], [pam_ldap_cv_ldap_set_rebind_proc=3], [pam_ldap_cv_ldap_set_rebind_proc=2]) ])
|
||||
AC_DEFINE_UNQUOTED(LDAP_SET_REBIND_PROC_ARGS, $pam_ldap_cv_ldap_set_rebind_proc)
|
||||
fi
|
||||
|
||||
#################################################
|
||||
@ -1977,24 +2152,6 @@ AC_ARG_WITH(tdbsam,
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
#################################################
|
||||
# check for a LDAP password database
|
||||
AC_MSG_CHECKING(whether to use LDAP SAM database)
|
||||
AC_ARG_WITH(ldapsam,
|
||||
[ --with-ldapsam Include experimental LDAP SAM support (default=no)],
|
||||
[ case "$withval" in
|
||||
yes)
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(WITH_LDAP_SAM)
|
||||
LIBS="-lldap -llber $LIBS"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
esac ],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
#################################################
|
||||
# check for a NISPLUS password database
|
||||
AC_MSG_CHECKING(whether to use NISPLUS SAM database)
|
||||
@ -2035,74 +2192,6 @@ AC_ARG_WITH(nisplus-home,
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
#################################################
|
||||
# check for the secure socket layer
|
||||
AC_MSG_CHECKING(whether to use SSL)
|
||||
AC_ARG_WITH(ssl,
|
||||
[ --with-ssl Include SSL support (default=no)
|
||||
--with-sslinc=DIR Where the SSL includes are (defaults to /usr/local/ssl/include)
|
||||
--with-ssllib=DIR Where the SSL libraries are (defaults to /usr/local/ssl/lib)],
|
||||
[ case "$withval" in
|
||||
yes)
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(WITH_SSL)
|
||||
withval="/usr/local/ssl" # default
|
||||
|
||||
if test "${with_sslinc+set}" = set; then
|
||||
|
||||
withval="$with_sslinc"
|
||||
case "$withval" in
|
||||
yes|no)
|
||||
echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
|
||||
CFLAGS="-I/usr/local/ssl/include $CFLAGS"
|
||||
;;
|
||||
* )
|
||||
CFLAGS="-I${withval} $CFLAGS"
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
CFLAGS="-I/usr/local/ssl/include $CFLAGS"
|
||||
|
||||
fi
|
||||
|
||||
if test "${with_ssllib+set}" = set; then
|
||||
|
||||
withval="$with_ssllib"
|
||||
case "$withval" in
|
||||
yes|no)
|
||||
echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
|
||||
LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
|
||||
;;
|
||||
* )
|
||||
LDFLAGS="-L${withval}/lib $LDFLAGS"
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
|
||||
|
||||
fi
|
||||
|
||||
LIBS="-lssl -lcrypto $LIBS"
|
||||
|
||||
# if test ! -d ${withval}; then
|
||||
# echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS" # Damn, SSLeay defines its own
|
||||
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
esac ],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
#################################################
|
||||
# check for syslog logging
|
||||
AC_MSG_CHECKING(whether to use syslog logging)
|
||||
@ -2197,69 +2286,6 @@ AC_ARG_WITH(utmp,
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
#################################################
|
||||
# set private directory location
|
||||
AC_ARG_WITH(privatedir,
|
||||
[ --with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)],
|
||||
[ case "$withval" in
|
||||
yes|no)
|
||||
#
|
||||
# Just in case anybody calls it without argument
|
||||
#
|
||||
AC_MSG_WARN([--with-privatedir called without argument - will use default])
|
||||
privatedir='${prefix}/private'
|
||||
;;
|
||||
* )
|
||||
privatedir="$withval"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(privatedir)],
|
||||
[privatedir='${prefix}/private'
|
||||
AC_SUBST(privatedir)]
|
||||
)
|
||||
|
||||
#################################################
|
||||
# set lock directory location
|
||||
AC_ARG_WITH(lockdir,
|
||||
[ --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)],
|
||||
[ case "$withval" in
|
||||
yes|no)
|
||||
#
|
||||
# Just in case anybody calls it without argument
|
||||
#
|
||||
AC_MSG_WARN([--with-lockdir called without argument - will use default])
|
||||
lockdir='$(VARDIR)/locks'
|
||||
;;
|
||||
* )
|
||||
lockdir="$withval"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(lockdir)],
|
||||
[lockdir='$(VARDIR)/locks'
|
||||
AC_SUBST(lockdir)]
|
||||
)
|
||||
|
||||
#################################################
|
||||
# set SWAT directory location
|
||||
AC_ARG_WITH(swatdir,
|
||||
[ --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)],
|
||||
[ case "$withval" in
|
||||
yes|no)
|
||||
#
|
||||
# Just in case anybody does it
|
||||
#
|
||||
AC_MSG_WARN([--with-swatdir called without argument - will use default])
|
||||
swatdir='${prefix}/swat'
|
||||
;;
|
||||
* )
|
||||
swatdir="$withval"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(swatdir)],
|
||||
[swatdir='${prefix}/swat'
|
||||
AC_SUBST(swatdir)]
|
||||
)
|
||||
|
||||
#################################################
|
||||
# choose native language(s) of man pages
|
||||
AC_MSG_CHECKING(chosen man pages' language(s))
|
||||
@ -2284,6 +2310,32 @@ AC_ARG_WITH(manpages-langs,
|
||||
AC_SUBST(manlangs)]
|
||||
)
|
||||
|
||||
#################################################
|
||||
# should we build libsmbclient?
|
||||
|
||||
LIBSMBCLIENT_SHARED=
|
||||
LIBSMBCLIENT=
|
||||
AC_MSG_CHECKING(whether to build the libsmbclient shared library)
|
||||
AC_ARG_WITH(libsmbclient,
|
||||
[ --with-libsmbclient Build the libsmbclient shared library (default=yes)],
|
||||
[ case "$withval" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
*)
|
||||
if test $BLDSHARED = true; then
|
||||
LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
|
||||
LIBSMBCLIENT=libsmbclient
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no shared library support)
|
||||
fi
|
||||
;;
|
||||
esac ],
|
||||
AC_MSG_RESULT(yes)
|
||||
)
|
||||
|
||||
|
||||
#################################################
|
||||
# these tests are taken from the GNU fileutils package
|
||||
AC_CHECKING(how to get filesystem space usage)
|
||||
@ -2656,6 +2708,31 @@ else
|
||||
AC_MSG_RESULT(no$winbind_no_reason)
|
||||
fi
|
||||
|
||||
|
||||
# Check for FreeBSD problem with getgroups
|
||||
# It returns EGID too many times in the list of groups
|
||||
# and causes a security problem
|
||||
AC_CACHE_CHECK([whether or not getgroups returns EGID too many times],
|
||||
samba_cv_have_getgroups_too_many_egids,[AC_TRY_RUN([
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
gid_t groups[10];
|
||||
int n = 10;
|
||||
|
||||
n = getgroups(n, &groups);
|
||||
/* Could actually pass back the number of EGIDs there ... */
|
||||
exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0);
|
||||
}],
|
||||
samba_cv_have_getgroups_too_many_egids=no,samba_cv_have_getgroups_too_many_egids=yes, samba_cv_have_getgroups_too_many_egids=cross)])
|
||||
if test x"$samba_cv_have_getgroups_too_many_egids" = x"yes"; then
|
||||
AC_DEFINE(HAVE_GETGROUPS_TOO_MANY_EGIDS)
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Substitution time!
|
||||
|
||||
AC_SUBST(WINBIND_TARGETS)
|
||||
@ -2743,7 +2820,7 @@ AC_TRY_RUN([#include "${srcdir-.}/tests/summary.c"],
|
||||
builddir=`pwd`
|
||||
AC_SUBST(builddir)
|
||||
|
||||
AC_OUTPUT(include/stamp-h Makefile)
|
||||
AC_OUTPUT(include/stamp-h Makefile script/findsmb)
|
||||
|
||||
#################################################
|
||||
# Print very concise instructions on building/use
|
||||
|
@ -64,6 +64,7 @@ pstring dyn_LIBDIR = LIBDIR;
|
||||
* Not writable, but used to set a default in the parameter table.
|
||||
**/
|
||||
const pstring dyn_LOCKDIR = LOCKDIR;
|
||||
const pstring dyn_PIDDIR = PIDDIR;
|
||||
|
||||
const pstring dyn_DRIVERFILE = DRIVERFILE;
|
||||
|
||||
|
@ -21,8 +21,6 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
extern DOM_SID global_sam_sid;
|
||||
|
||||
static TDB_CONTEXT *tdb; /* used for driver files */
|
||||
|
||||
#define DATABASE_VERSION_V1 1 /* native byte format. */
|
||||
@ -186,17 +184,17 @@ static BOOL default_group_mapping(void)
|
||||
|
||||
/* Add the defaults domain groups */
|
||||
|
||||
sid_copy(&sid_admins, &global_sam_sid);
|
||||
sid_copy(&sid_admins, get_global_sam_sid());
|
||||
sid_append_rid(&sid_admins, DOMAIN_GROUP_RID_ADMINS);
|
||||
sid_to_string(str_admins, &sid_admins);
|
||||
add_initial_entry(-1, str_admins, SID_NAME_DOM_GRP, "Domain Admins", "", privilege_all, PR_ACCESS_FROM_NETWORK|PR_LOG_ON_LOCALLY);
|
||||
|
||||
sid_copy(&sid_users, &global_sam_sid);
|
||||
sid_copy(&sid_users, get_global_sam_sid());
|
||||
sid_append_rid(&sid_users, DOMAIN_GROUP_RID_USERS);
|
||||
sid_to_string(str_users, &sid_users);
|
||||
add_initial_entry(-1, str_users, SID_NAME_DOM_GRP, "Domain Users", "", privilege_none, PR_ACCESS_FROM_NETWORK|PR_LOG_ON_LOCALLY);
|
||||
|
||||
sid_copy(&sid_guests, &global_sam_sid);
|
||||
sid_copy(&sid_guests, get_global_sam_sid());
|
||||
sid_append_rid(&sid_guests, DOMAIN_GROUP_RID_GUESTS);
|
||||
sid_to_string(str_guests, &sid_guests);
|
||||
add_initial_entry(-1, str_guests, SID_NAME_DOM_GRP, "Domain Guests", "", privilege_none, PR_ACCESS_FROM_NETWORK);
|
||||
@ -637,7 +635,7 @@ BOOL get_group_map_from_ntname(char *name, GROUP_MAP *map, BOOL with_priv)
|
||||
PRIVILEGE_SET *set;
|
||||
|
||||
if(!init_group_mapping()) {
|
||||
DEBUG(0,("failed to initialize group mapping"));
|
||||
DEBUG(0,("get_group_map_from_ntname:failed to initialize group mapping"));
|
||||
return(False);
|
||||
}
|
||||
|
||||
@ -1070,7 +1068,7 @@ BOOL get_group_from_gid(gid_t gid, GROUP_MAP *map, BOOL with_priv)
|
||||
|
||||
/* interim solution until we have a last RID allocated */
|
||||
|
||||
sid_copy(&map->sid, &global_sam_sid);
|
||||
sid_copy(&map->sid, get_global_sam_sid());
|
||||
sid_append_rid(&map->sid, pdb_gid_to_group_rid(gid));
|
||||
|
||||
fstrcpy(map->nt_name, grp->gr_name);
|
||||
|
@ -7,6 +7,7 @@
|
||||
typedef struct {
|
||||
void *ld;
|
||||
char *realm;
|
||||
char *workgroup;
|
||||
char *ldap_server;
|
||||
char *ldap_server_name;
|
||||
char *kdc_server;
|
||||
|
@ -141,11 +141,12 @@ typedef struct auth_methods
|
||||
|
||||
} auth_methods;
|
||||
|
||||
struct auth_init_function {
|
||||
typedef NTSTATUS (*auth_init_function)(struct auth_context *, const char *, struct auth_methods **);
|
||||
|
||||
struct auth_init_function_entry {
|
||||
char *name;
|
||||
/* Function to create a member of the authmethods list */
|
||||
BOOL (*init)(struct auth_context *auth_context, struct auth_methods **auth_method);
|
||||
|
||||
auth_init_function init;
|
||||
};
|
||||
|
||||
|
||||
#endif /* _SMBAUTH_H_ */
|
||||
|
@ -107,8 +107,7 @@ it also defines lots of intermediate macros, just ignore those :-)
|
||||
|
||||
#define CVAL(buf,pos) (((const unsigned char *)(buf))[pos])
|
||||
#define CVAL_NC(buf,pos) (((unsigned char *)(buf))[pos]) /* Non-const version of CVAL */
|
||||
#define PVAL(buf,pos) ((const unsigned)CVAL(buf,pos))
|
||||
#define PVAL_NC(buf,pos) ((unsigned)CVAL(buf,pos)) /* Non const version of PVAL */
|
||||
#define PVAL(buf,pos) (CVAL(buf,pos))
|
||||
#define SCVAL(buf,pos,val) (CVAL_NC(buf,pos) = (val))
|
||||
|
||||
|
||||
@ -118,12 +117,12 @@ it also defines lots of intermediate macros, just ignore those :-)
|
||||
#define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16)
|
||||
#define SSVALX(buf,pos,val) (CVAL_NC(buf,pos)=(unsigned char)((val)&0xFF),CVAL_NC(buf,pos+1)=(unsigned char)((val)>>8))
|
||||
#define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16))
|
||||
#define SVALS(buf,pos) ((const int16)SVAL(buf,pos))
|
||||
#define IVALS(buf,pos) ((const int32)IVAL(buf,pos))
|
||||
#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((const uint16)(val)))
|
||||
#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((const uint32)(val)))
|
||||
#define SSVALS(buf,pos,val) SSVALX((buf),(pos),((const int16)(val)))
|
||||
#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((const int32)(val)))
|
||||
#define SVALS(buf,pos) ((int16)SVAL(buf,pos))
|
||||
#define IVALS(buf,pos) ((int32)IVAL(buf,pos))
|
||||
#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16)(val)))
|
||||
#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32)(val)))
|
||||
#define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val)))
|
||||
#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32)(val)))
|
||||
|
||||
#else /* CAREFUL_ALIGNMENT */
|
||||
|
||||
@ -145,10 +144,10 @@ it also defines lots of intermediate macros, just ignore those :-)
|
||||
#define IVALS_NC(buf,pos) (*(int32 *)((char *)(buf) + (pos))) /* Non const version of above. */
|
||||
|
||||
/* store single value in an SMB buffer */
|
||||
#define SSVAL(buf,pos,val) SVAL_NC(buf,pos)=((const uint16)(val))
|
||||
#define SIVAL(buf,pos,val) IVAL_NC(buf,pos)=((const uint32)(val))
|
||||
#define SSVALS(buf,pos,val) SVALS_NC(buf,pos)=((const int16)(val))
|
||||
#define SIVALS(buf,pos,val) IVALS_NC(buf,pos)=((const int32)(val))
|
||||
#define SSVAL(buf,pos,val) SVAL_NC(buf,pos)=((uint16)(val))
|
||||
#define SIVAL(buf,pos,val) IVAL_NC(buf,pos)=((uint32)(val))
|
||||
#define SSVALS(buf,pos,val) SVALS_NC(buf,pos)=((int16)(val))
|
||||
#define SIVALS(buf,pos,val) IVALS_NC(buf,pos)=((int32)(val))
|
||||
|
||||
#endif /* CAREFUL_ALIGNMENT */
|
||||
|
||||
|
@ -57,6 +57,15 @@ struct print_job_info
|
||||
time_t t;
|
||||
};
|
||||
|
||||
typedef struct smb_sign_info {
|
||||
BOOL use_smb_signing;
|
||||
BOOL negotiated_smb_signing;
|
||||
size_t mac_key_len;
|
||||
uint8 mac_key[44];
|
||||
uint32 send_seq_num;
|
||||
uint32 reply_seq_num;
|
||||
} smb_sign_info;
|
||||
|
||||
struct cli_state {
|
||||
int port;
|
||||
int fd;
|
||||
@ -69,7 +78,6 @@ struct cli_state {
|
||||
int rap_error;
|
||||
int privileges;
|
||||
|
||||
fstring eff_name;
|
||||
fstring desthost;
|
||||
fstring user_name;
|
||||
fstring domain;
|
||||
@ -109,6 +117,8 @@ struct cli_state {
|
||||
|
||||
TALLOC_CTX *mem_ctx;
|
||||
|
||||
smb_sign_info sign_info;
|
||||
|
||||
/*
|
||||
* Only used in NT domain calls.
|
||||
*/
|
||||
@ -145,4 +155,8 @@ struct cli_state {
|
||||
fstring pipe_name;
|
||||
};
|
||||
|
||||
#define CLI_FULL_CONNECTION_DONT_SPNEGO 0x0001
|
||||
#define CLI_FULL_CONNECTION_USE_KERBEROS 0x0002
|
||||
#define CLI_FULL_CONNECTION_ANNONYMOUS_FALLBACK 0x0004
|
||||
|
||||
#endif /* _CLIENT_H */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* include/config.h.in. Generated automatically from configure.in by autoheader 2.13. */
|
||||
/* include/config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
@ -124,8 +124,6 @@
|
||||
#undef HAVE_SET_AUTH_PARAMETERS
|
||||
#undef WITH_SYSLOG
|
||||
#undef WITH_PROFILE
|
||||
#undef WITH_SSL
|
||||
#undef SSL_DIR
|
||||
#undef WITH_PAM
|
||||
#undef WITH_NISPLUS_HOME
|
||||
#undef WITH_AUTOMOUNT
|
||||
@ -137,6 +135,7 @@
|
||||
#undef REPLACE_INET_NTOA
|
||||
#undef HAVE_FILE_MACRO
|
||||
#undef HAVE_FUNCTION_MACRO
|
||||
#undef HAVE_VA_COPY
|
||||
#undef HAVE_SETRESUID_DECL
|
||||
#undef HAVE_SETRESUID
|
||||
#undef WITH_NETATALK
|
||||
@ -190,7 +189,10 @@
|
||||
#undef USE_SETRESUID
|
||||
#undef USE_SETREUID
|
||||
#undef USE_SETUIDX
|
||||
#undef HAVE_LIBDL
|
||||
#undef HAVE_DLOPEN
|
||||
#undef HAVE_DLCLOSE
|
||||
#undef HAVE_DLSYM
|
||||
#undef HAVE_DLERROR
|
||||
#undef SYSCONF_SC_NGROUPS_MAX
|
||||
#undef HAVE_UT_UT_NAME
|
||||
#undef HAVE_UT_UT_USER
|
||||
@ -811,6 +813,9 @@
|
||||
/* Define if you have the strndup function. */
|
||||
#undef HAVE_STRNDUP
|
||||
|
||||
/* Define if you have the strnlen function. */
|
||||
#undef HAVE_STRNLEN
|
||||
|
||||
/* Define if you have the strpbrk function. */
|
||||
#undef HAVE_STRPBRK
|
||||
|
||||
@ -877,6 +882,9 @@
|
||||
/* Define if you have the <dirent.h> header file. */
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
|
@ -38,8 +38,10 @@
|
||||
*/
|
||||
int Debug1( char *, ... ) PRINTF_ATTRIBUTE(1,2);
|
||||
BOOL dbgtext( char *, ... ) PRINTF_ATTRIBUTE(1,2);
|
||||
BOOL dbghdr( int level, char *file, char *func, int line );
|
||||
|
||||
extern XFILE *dbf;
|
||||
extern pstring debugf;
|
||||
|
||||
/* If we have these macros, we can add additional info to the header. */
|
||||
#ifdef HAVE_FILE_MACRO
|
||||
@ -64,7 +66,7 @@ extern XFILE *dbf;
|
||||
* because some references would expand incorrectly.
|
||||
*/
|
||||
#define DEBUGLEVEL *debug_level
|
||||
|
||||
extern int DEBUGLEVEL;
|
||||
|
||||
/*
|
||||
* Define all new debug classes here. A class is represented by an entry in
|
||||
@ -77,26 +79,27 @@ extern XFILE *dbf;
|
||||
* at the start of the file (after #include "includes.h") will default to
|
||||
* using index zero, so it will behaive just like it always has.
|
||||
*/
|
||||
#define DBGC_ALL 0 /* index equivalent to DEBUGLEVEL */
|
||||
|
||||
#define DBGC_TDB 1
|
||||
#define DBGC_PRINTDRIVERS 2
|
||||
#define DBGC_LANMAN 3
|
||||
#define DBGC_SMB 4
|
||||
#define DBGC_RPC_PARSE 5
|
||||
#define DBGC_RPC_SRV 6
|
||||
#define DBGC_RPC_CLI 7
|
||||
#define DBGC_PASSDB 8
|
||||
#define DBGC_AUTH 9
|
||||
#define DBGC_WINBIND 10
|
||||
|
||||
|
||||
/* So you can define DBGC_CLASS before including debug.h */
|
||||
#ifndef DBGC_CLASS
|
||||
#define DBGC_CLASS 0 /* override as shown above */
|
||||
#define DBGC_ALL 0 /* index equivalent to DEBUGLEVEL */
|
||||
#endif
|
||||
|
||||
#define DBGC_TDB 1
|
||||
#define DBGC_PRINTDRIVERS 2
|
||||
#define DBGC_LANMAN 3
|
||||
#define DBGC_SMB 4
|
||||
#define DBGC_RPC 5
|
||||
#define DBGC_RPC_HDR 6
|
||||
#define DBGC_BDC 7
|
||||
|
||||
#define DBGC_LAST 8 /* MUST be last class value + 1 */
|
||||
|
||||
extern int DEBUGLEVEL_CLASS[DBGC_LAST];
|
||||
extern BOOL DEBUGLEVEL_CLASS_ISSET[DBGC_LAST];
|
||||
|
||||
struct debuglevel_message {
|
||||
int debuglevel_class[DBGC_LAST];
|
||||
BOOL debuglevel_class_isset[DBGC_LAST];
|
||||
};
|
||||
extern int *DEBUGLEVEL_CLASS;
|
||||
extern BOOL *DEBUGLEVEL_CLASS_ISSET;
|
||||
|
||||
/* Debugging macros
|
||||
*
|
||||
@ -151,7 +154,7 @@ struct debuglevel_message {
|
||||
#define DEBUGLVL( level ) \
|
||||
( ((level) <= MAX_DEBUG_LEVEL) && \
|
||||
((DEBUGLEVEL_CLASS[ DBGC_CLASS ] >= (level))|| \
|
||||
(!DEBUGLEVEL_CLASS[ DBGC_CLASS ] && \
|
||||
(!DEBUGLEVEL_CLASS_ISSET[ DBGC_CLASS ] && \
|
||||
DEBUGLEVEL_CLASS[ DBGC_ALL ] >= (level)) ) \
|
||||
&& dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) )
|
||||
|
||||
|
@ -165,7 +165,9 @@
|
||||
#define WERR_NO_MORE_ITEMS W_ERROR(259)
|
||||
#define WERR_MORE_DATA W_ERROR(234)
|
||||
#define WERR_INVALID_OWNER W_ERROR(1307)
|
||||
#define WERR_CAN_NOT_COMPLETE W_ERROR(1003)
|
||||
#define WERR_INVALID_SECURITY_DESCRIPTOR W_ERROR(1338)
|
||||
#define WERR_SERVER_UNAVAILABLE W_ERROR(1722)
|
||||
#define WERR_UNKNOWN_PRINTER_DRIVER W_ERROR(1797)
|
||||
#define WERR_INVALID_PRINTER_NAME W_ERROR(1801)
|
||||
#define WERR_PRINTER_ALREADY_EXISTS W_ERROR(1802)
|
||||
|
@ -31,6 +31,7 @@ extern pstring dyn_CONFIGFILE;
|
||||
extern pstring dyn_LOGFILEBASE, dyn_LMHOSTSFILE;
|
||||
extern pstring dyn_LIBDIR;
|
||||
extern const pstring dyn_LOCKDIR;
|
||||
extern const pstring dyn_PIDDIR;
|
||||
extern const pstring dyn_DRIVERFILE;
|
||||
extern const pstring dyn_SMB_PASSWD_FILE;
|
||||
extern const pstring dyn_PRIVATE_DIR;
|
||||
|
@ -434,8 +434,12 @@
|
||||
/*
|
||||
* Define additional missing types
|
||||
*/
|
||||
#ifndef HAVE_SIG_ATOMIC_T_TYPE
|
||||
typedef int sig_atomic_t;
|
||||
#if defined(HAVE_SIG_ATOMIC_T_TYPE) && defined(AIX)
|
||||
typedef sig_atomic_t SIG_ATOMIC_T;
|
||||
#elif defined(HAVE_SIG_ATOMIC_T_TYPE) && !defined(AIX)
|
||||
typedef sig_atomic_t VOLATILE SIG_ATOMIC_T;
|
||||
#else
|
||||
typedef int VOLATILE SIG_ATOMIC_T;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SOCKLEN_T_TYPE
|
||||
@ -696,6 +700,7 @@ extern int errno;
|
||||
#include "dlinklist.h"
|
||||
#include "../tdb/tdb.h"
|
||||
#include "../tdb/spinlock.h"
|
||||
#include "../tdb/tdbutil.h"
|
||||
#include "talloc.h"
|
||||
#include "ads.h"
|
||||
#include "interfaces.h"
|
||||
@ -748,10 +753,6 @@ extern int errno;
|
||||
|
||||
#include "mangle.h"
|
||||
|
||||
#ifndef MAXCODEPAGELINES
|
||||
#define MAXCODEPAGELINES 256
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Type for wide character dirent structure.
|
||||
* Only d_name is defined by POSIX.
|
||||
@ -942,6 +943,14 @@ size_t strlcat(char *d, const char *s, size_t bufsize);
|
||||
int ftruncate(int f,long l);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNDUP
|
||||
char *strndup(const char *s, size_t n);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNLEN
|
||||
size_t strnlen(const char *s, size_t n);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRTOUL
|
||||
unsigned long strtoul(const char *nptr, char **endptr, int base);
|
||||
#endif
|
||||
@ -993,9 +1002,9 @@ int vasprintf(char **ptr, const char *format, va_list ap);
|
||||
#define DEFAULT_SOCKET_OPTIONS ""
|
||||
#endif
|
||||
|
||||
/* Load header file for libdl stuff */
|
||||
/* Load header file for dynamic linking stuff */
|
||||
|
||||
#ifdef HAVE_LIBDL
|
||||
#ifdef HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
@ -1155,5 +1164,13 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
|
||||
#define slprintf snprintf
|
||||
#define vslprintf vsnprintf
|
||||
|
||||
|
||||
/* we need to use __va_copy() on some platforms */
|
||||
#ifdef HAVE_VA_COPY
|
||||
#define VA_COPY(dest, src) __va_copy(dest, src)
|
||||
#else
|
||||
#define VA_COPY(dest, src) (dest) = (src)
|
||||
#endif
|
||||
|
||||
#endif /* _INCLUDES_H */
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
/*=====================================================================
|
||||
Unix SMB/CIFS implementation.
|
||||
Unix SMB/Netbios implementation.
|
||||
SMB client library API definitions
|
||||
Copyright (C) Andrew Tridgell 1998
|
||||
Copyright (C) Richard Sharpe 2000
|
||||
Copyright (C) John Terpsra 2000
|
||||
Copyright (C) Tom Jansen (Ninja ISD) 2002
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -93,30 +95,28 @@ struct smbc_dirent
|
||||
SMBC_DIR=7,
|
||||
SMBC_FILE=8,
|
||||
SMBC_LINK=9,*/
|
||||
uint smbc_type;
|
||||
unsigned int smbc_type;
|
||||
|
||||
/** Length of this smbc_dirent in bytes
|
||||
*/
|
||||
uint dirlen;
|
||||
unsigned int dirlen;
|
||||
/** The length of the comment string in bytes (includes null
|
||||
* terminator)
|
||||
*/
|
||||
uint commentlen;
|
||||
unsigned int commentlen;
|
||||
/** Points to the null terminated comment string
|
||||
*/
|
||||
char *comment;
|
||||
/** The length of the name string in bytes (includes null
|
||||
* terminator)
|
||||
*/
|
||||
uint namelen;
|
||||
unsigned int namelen;
|
||||
/** Points to the null terminated name string
|
||||
*/
|
||||
char name[1];
|
||||
};
|
||||
|
||||
|
||||
#ifndef _CLIENT_H
|
||||
typedef unsigned short uint16;
|
||||
|
||||
/**@ingroup structure
|
||||
* Structure that represents a print job.
|
||||
@ -126,11 +126,11 @@ struct print_job_info
|
||||
{
|
||||
/** numeric ID of the print job
|
||||
*/
|
||||
uint16 id;
|
||||
unsigned short id;
|
||||
|
||||
/** represents print job priority (lower numbers mean higher priority)
|
||||
*/
|
||||
uint16 priority;
|
||||
unsigned short priority;
|
||||
|
||||
/** Size of the print job
|
||||
*/
|
||||
@ -149,8 +149,7 @@ struct print_job_info
|
||||
*/
|
||||
time_t t;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* ifndef _CLIENT_H */
|
||||
|
||||
/**@ingroup structure
|
||||
* Authentication callback function type.
|
||||
@ -196,6 +195,227 @@ typedef void (*smbc_get_auth_data_fn)(const char *srv,
|
||||
*/
|
||||
typedef void (*smbc_get_print_job_info)(struct print_job_info *i);
|
||||
|
||||
typedef struct _SMBCSRV {
|
||||
struct cli_state cli;
|
||||
dev_t dev;
|
||||
BOOL no_pathinfo2;
|
||||
int server_fd;
|
||||
|
||||
struct _SMBCSRV *next, *prev;
|
||||
|
||||
} SMBCSRV;
|
||||
|
||||
/*
|
||||
* Keep directory entries in a list
|
||||
*/
|
||||
struct smbc_dir_list {
|
||||
struct smbc_dir_list *next;
|
||||
struct smbc_dirent *dirent;
|
||||
};
|
||||
|
||||
/*
|
||||
* Structure for open file management
|
||||
*/
|
||||
typedef struct _SMBCFILE {
|
||||
int cli_fd;
|
||||
char *fname;
|
||||
off_t offset;
|
||||
SMBCSRV *srv;
|
||||
BOOL file;
|
||||
struct smbc_dir_list *dir_list, *dir_end, *dir_next;
|
||||
int dir_type, dir_error;
|
||||
|
||||
struct _SMBCFILE *next, *prev;
|
||||
} SMBCFILE;
|
||||
|
||||
/**@ingroup structure
|
||||
* Structure that contains a client context information
|
||||
*/
|
||||
typedef struct _SMBCCTX {
|
||||
/** debug level
|
||||
*/
|
||||
int debug;
|
||||
|
||||
/** netbios name used for making connections
|
||||
*/
|
||||
char * netbios_name;
|
||||
|
||||
/** workgroup name used for making connections
|
||||
*/
|
||||
char * workgroup;
|
||||
|
||||
/** username used for making connections
|
||||
*/
|
||||
char * user;
|
||||
|
||||
/** timeout used for waiting on connections / response data (in milliseconds)
|
||||
*/
|
||||
int timeout;
|
||||
|
||||
/** callable functions for files:
|
||||
* For usage and return values see the smbc_* functions
|
||||
*/
|
||||
SMBCFILE * (*open) (struct _SMBCCTX *c, const char *fname, int flags, mode_t mode);
|
||||
SMBCFILE * (*creat) (struct _SMBCCTX *c, const char *path, mode_t mode);
|
||||
ssize_t (*read) (struct _SMBCCTX *c, SMBCFILE *file, void *buf, size_t count);
|
||||
ssize_t (*write) (struct _SMBCCTX *c, SMBCFILE *file, void *buf, size_t count);
|
||||
int (*unlink) (struct _SMBCCTX *c, const char *fname);
|
||||
int (*rename) (struct _SMBCCTX *ocontext, const char *oname,
|
||||
struct _SMBCCTX *ncontext, const char *nname);
|
||||
off_t (*lseek) (struct _SMBCCTX *c, SMBCFILE * file, off_t offset, int whence);
|
||||
int (*stat) (struct _SMBCCTX *c, const char *fname, struct stat *st);
|
||||
int (*fstat) (struct _SMBCCTX *c, SMBCFILE *file, struct stat *st);
|
||||
int (*close) (struct _SMBCCTX *c, SMBCFILE *file);
|
||||
|
||||
/** callable functions for dirs
|
||||
*/
|
||||
SMBCFILE * (*opendir) (struct _SMBCCTX *c, const char *fname);
|
||||
int (*closedir)(struct _SMBCCTX *c, SMBCFILE *dir);
|
||||
struct smbc_dirent * (*readdir)(struct _SMBCCTX *c, SMBCFILE *dir);
|
||||
int (*getdents)(struct _SMBCCTX *c, SMBCFILE *dir,
|
||||
struct smbc_dirent *dirp, int count);
|
||||
int (*mkdir) (struct _SMBCCTX *c, const char *fname, mode_t mode);
|
||||
int (*rmdir) (struct _SMBCCTX *c, const char *fname);
|
||||
off_t (*telldir) (struct _SMBCCTX *c, SMBCFILE *dir);
|
||||
int (*lseekdir)(struct _SMBCCTX *c, SMBCFILE *dir, off_t offset);
|
||||
int (*fstatdir)(struct _SMBCCTX *c, SMBCFILE *dir, struct stat *st);
|
||||
|
||||
/** callable functions for printing
|
||||
*/
|
||||
int (*print_file)(struct _SMBCCTX *c_file, const char *fname,
|
||||
struct _SMBCCTX *c_print, const char *printq);
|
||||
SMBCFILE * (*open_print_job)(struct _SMBCCTX *c, const char *fname);
|
||||
int (*list_print_jobs)(struct _SMBCCTX *c, const char *fname, void (*fn)(struct print_job_info *));
|
||||
int (*unlink_print_job)(struct _SMBCCTX *c, const char *fname, int id);
|
||||
|
||||
|
||||
/** Callbacks
|
||||
* These callbacks _always_ have to be intialized because they will not be checked
|
||||
* at dereference for increased speed.
|
||||
*/
|
||||
struct _smbc_callbacks {
|
||||
/** authentication function callback: called upon auth requests
|
||||
*/
|
||||
smbc_get_auth_data_fn auth_fn;
|
||||
|
||||
/** check if a server is still good
|
||||
*/
|
||||
int (*check_server_fn)(struct _SMBCCTX * c, SMBCSRV *srv);
|
||||
|
||||
/** remove a server if unused
|
||||
*/
|
||||
int (*remove_unused_server_fn)(struct _SMBCCTX * c, SMBCSRV *srv);
|
||||
|
||||
/** Cache subsystem
|
||||
* For an example cache system see samba/source/libsmb/libsmb_cache.c
|
||||
* Cache subsystem functions follow.
|
||||
*/
|
||||
|
||||
/** server cache addition
|
||||
*/
|
||||
int (*add_cached_srv_fn) (struct _SMBCCTX * c, SMBCSRV *srv,
|
||||
char * server, char * share,
|
||||
char * workgroup, char * username);
|
||||
/** server cache lookup
|
||||
*/
|
||||
SMBCSRV * (*get_cached_srv_fn) (struct _SMBCCTX * c, char * server,
|
||||
char * share, char * workgroup, char * username);
|
||||
/** server cache removal
|
||||
*/
|
||||
int (*remove_cached_srv_fn)(struct _SMBCCTX * c, SMBCSRV *srv);
|
||||
|
||||
/** server cache purging, try to remove all cached servers (disconnect)
|
||||
*/
|
||||
int (*purge_cached_fn) (struct _SMBCCTX * c);
|
||||
|
||||
} callbacks;
|
||||
|
||||
|
||||
/** Space to store private data of the server cache.
|
||||
*/
|
||||
void * server_cache;
|
||||
|
||||
/** INTERNAL functions
|
||||
* do _NOT_ touch these from your program !
|
||||
*/
|
||||
|
||||
/** INTERNAL: is this handle initialized ?
|
||||
*/
|
||||
int _initialized;
|
||||
|
||||
/** INTERNAL: dirent pointer location
|
||||
*/
|
||||
char _dirent[512];
|
||||
|
||||
/** INTERNAL: server connection list
|
||||
*/
|
||||
SMBCSRV * _servers;
|
||||
|
||||
/** INTERNAL: open file/dir list
|
||||
*/
|
||||
SMBCFILE * _files;
|
||||
|
||||
} SMBCCTX;
|
||||
|
||||
|
||||
/**@ingroup misc
|
||||
* Create a new SBMCCTX (a context).
|
||||
*
|
||||
* Must be called before the context is passed to smbc_context_init()
|
||||
*
|
||||
* @return The given SMBCCTX pointer on success, NULL on error with errno set:
|
||||
* - ENOMEM Out of memory
|
||||
*
|
||||
* @see smbc_free_context(), smbc_init_context()
|
||||
*
|
||||
* @note Do not forget to smbc_init_context() the returned SMBCCTX pointer !
|
||||
*/
|
||||
SMBCCTX * smbc_new_context(void);
|
||||
|
||||
/**@ingroup misc
|
||||
* Delete a SBMCCTX (a context) acquired from smbc_new_context().
|
||||
*
|
||||
* The context will be deleted if possible.
|
||||
*
|
||||
* @param context A pointer to a SMBCCTX obtained from smbc_new_context()
|
||||
*
|
||||
* @param shutdown_ctx If 1, all connections and files will be closed even if they are busy.
|
||||
*
|
||||
*
|
||||
* @return Returns 0 on succes. Returns 1 on failure with errno set:
|
||||
* - EBUSY Server connections are still used, Files are open or cache
|
||||
* could not be purged
|
||||
* - EBADF context == NULL
|
||||
*
|
||||
* @see smbc_new_context()
|
||||
*
|
||||
* @note It is advised to clean up all the contexts with shutdown_ctx set to 1
|
||||
* just before exit()'ing. When shutdown_ctx is 0, this function can be
|
||||
* use in periodical cleanup functions for example.
|
||||
*/
|
||||
int smbc_free_context(SMBCCTX * context, int shutdown_ctx);
|
||||
|
||||
|
||||
/**@ingroup misc
|
||||
* Initialize a SBMCCTX (a context).
|
||||
*
|
||||
* Must be called before using any SMBCCTX API function
|
||||
*
|
||||
* @param context A pointer to a SMBCCTX obtained from smbc_new_context()
|
||||
*
|
||||
* @return A pointer to the given SMBCCTX on success, NULL on error with errno set:
|
||||
* - EBADF NULL context given
|
||||
* - ENOMEM Out of memory
|
||||
* - ENOENT The smb.conf file would not load
|
||||
*
|
||||
* @see smbc_new_context()
|
||||
*
|
||||
* @note my_context = smbc_init_context(smbc_new_context()) is perfectly safe,
|
||||
* but it might leak memory on smbc_context_init() failure. Avoid this.
|
||||
* You'll have to call smbc_free_context() yourself on failure.
|
||||
*/
|
||||
|
||||
SMBCCTX * smbc_init_context(SMBCCTX * context);
|
||||
|
||||
/**@ingroup misc
|
||||
* Initialize the samba client library.
|
||||
@ -214,8 +434,8 @@ typedef void (*smbc_get_print_job_info)(struct print_job_info *i);
|
||||
* - ENOENT The smb.conf file would not load
|
||||
*
|
||||
*/
|
||||
int smbc_init(smbc_get_auth_data_fn fn, int debug);
|
||||
|
||||
int smbc_init(smbc_get_auth_data_fn fn, int debug);
|
||||
|
||||
/**@ingroup file
|
||||
* Open a file on an SMB server.
|
||||
@ -268,8 +488,8 @@ int smbc_init(smbc_get_auth_data_fn fn, int debug);
|
||||
* try again with an empty username and password. This
|
||||
* often gets mapped to the guest account on some machines.
|
||||
*/
|
||||
int smbc_open(const char *furl, int flags, mode_t mode);
|
||||
|
||||
int smbc_open(const char *furl, int flags, mode_t mode);
|
||||
|
||||
/**@ingroup file
|
||||
* Create a file on an SMB server.
|
||||
@ -302,8 +522,8 @@ int smbc_open(const char *furl, int flags, mode_t mode);
|
||||
* @see smbc_open()
|
||||
*
|
||||
*/
|
||||
int smbc_creat(const char *furl, mode_t mode);
|
||||
|
||||
int smbc_creat(const char *furl, mode_t mode);
|
||||
|
||||
/**@ingroup file
|
||||
* Read from a file using an opened file handle.
|
||||
|
@ -77,7 +77,7 @@
|
||||
#define MAX_PASS_LEN 200
|
||||
|
||||
/* separators for lists */
|
||||
#define LIST_SEP " \t,;:\n\r"
|
||||
#define LIST_SEP " \t,;\n\r"
|
||||
|
||||
/* wchar separators for lists */
|
||||
#define LIST_SEP_W wchar_list_sep
|
||||
|
@ -1,11 +1,14 @@
|
||||
#ifndef _MANGLE_H_
|
||||
#define _MANGLE_H_
|
||||
/*
|
||||
header for 8.3 name mangling interface
|
||||
*/
|
||||
|
||||
struct mangle_fns {
|
||||
BOOL (*is_mangled)(const char *s);
|
||||
BOOL (*is_8_3)(const char *fname, BOOL check_case);
|
||||
BOOL (*is_8_3)(const char *fname, BOOL check_case, BOOL allow_wildcards);
|
||||
void (*reset)(void);
|
||||
BOOL (*check_cache)(char *s);
|
||||
BOOL (*name_map)(char *OutName, BOOL need83, BOOL cache83);
|
||||
void (*name_map)(char *OutName, BOOL need83, BOOL cache83);
|
||||
};
|
||||
#endif /* _MANGLE_H_ */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user