EXAMPLES
To use the VERSION
BUGS
SEE ALSO
AUTHOR
wbinfo [-u] [-g] [-n name] [-s sid] [-U uid] [-G gid] [-S sid] [-Y sid] [-t] [-m] [-a user%password] [-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]
DESCRIPTION
OPTIONS
.
-h nameThe -h option
+ queries winbindd(8) to query the WINS
+ server for the IP address associated with the NetBIOS name
+ specified by the name parameter.
+
-i ipThe -i option
+ queries winbindd(8) to send a node status
+ request to get the NetBIOS name associated with the IP address
+ specified by the ip parameter.
+
-n name-r usernameTry to obtain the list of UNIX group ids
+ to which the user belongs. This only works for users
+ defined on a Domain Controller.
+
-a username%password-p-A username%password
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).
EXIT STATUS
VERSION
SEE ALSO
AUTHOR
- hosts
User information traditionally stored in
+ the hosts(5) file and used by
+ gethostbyname(3) functions. Names are
+ resolved through the WINS server or by broadcast.
+
- passwd
The following simple configuration in the
+ /etc/nsswitch.conf file can be used to initially
+ resolve hostnames from /etc/hosts and then from the
+ WINS server.
OPTIONS
NAME AND ID RESOLUTION
CONFIGURATION
EXAMPLE SETUP
NOTES
SIGNALS
FILES
VERSION
SEE ALSO
AUTHOR
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng
.
-.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 \fR
This option allows you to override
@@ -142,58 +142,57 @@ line setting will take precedence over settings in
.TP
\fB-p \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 \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
diff --git a/docs/manpages/pdbedit.8 b/docs/manpages/pdbedit.8
index 7a8661c30bd..e2f5531d5d4 100644
--- a/docs/manpages/pdbedit.8
+++ b/docs/manpages/pdbedit.8
@@ -3,12 +3,12 @@
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
-.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.
diff --git a/docs/manpages/smb.conf.5 b/docs/manpages/smb.conf.5
index d19f9ef6f9e..692530334be 100644
--- a/docs/manpages/smb.conf.5
+++ b/docs/manpages/smb.conf.5
@@ -3,7 +3,7 @@
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
-.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 = \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 =
\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
diff --git a/docs/manpages/smbclient.1 b/docs/manpages/smbclient.1
index 8b969ce4d1a..641f2d4a9f1 100644
--- a/docs/manpages/smbclient.1
+++ b/docs/manpages/smbclient.1
@@ -3,7 +3,7 @@
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
-.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 \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 [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 \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,
diff --git a/docs/manpages/smbcontrol.1 b/docs/manpages/smbcontrol.1
index f341b563e15..f3e6c843b59 100644
--- a/docs/manpages/smbcontrol.1
+++ b/docs/manpages/smbcontrol.1
@@ -3,9 +3,9 @@
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
-.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
diff --git a/docs/manpages/smbd.8 b/docs/manpages/smbd.8
index f534a59bf3b..83483c88350 100644
--- a/docs/manpages/smbd.8
+++ b/docs/manpages/smbd.8
@@ -3,7 +3,7 @@
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
-.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.
diff --git a/docs/manpages/smbmount.8 b/docs/manpages/smbmount.8
index 1cef431e47b..0d4a7fc8708 100644
--- a/docs/manpages/smbmount.8
+++ b/docs/manpages/smbmount.8
@@ -3,12 +3,12 @@
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
-.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
diff --git a/docs/manpages/smbsh.1 b/docs/manpages/smbsh.1
index 130df3582b0..774607c3a29 100644
--- a/docs/manpages/smbsh.1
+++ b/docs/manpages/smbsh.1
@@ -3,12 +3,12 @@
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
-.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 \fR ] [ \fB-d \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 \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 \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
diff --git a/docs/manpages/wbinfo.1 b/docs/manpages/wbinfo.1
index 9537af287b8..57aaf98b626 100644
--- a/docs/manpages/wbinfo.1
+++ b/docs/manpages/wbinfo.1
@@ -3,12 +3,12 @@
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
-.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
diff --git a/docs/manpages/winbindd.8 b/docs/manpages/winbindd.8
index cca62f25e4e..ca0c87bd08c 100644
--- a/docs/manpages/winbindd.8
+++ b/docs/manpages/winbindd.8
@@ -3,7 +3,7 @@
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
-.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
diff --git a/docs/textdocs/BROWSING.txt b/docs/textdocs/BROWSING.txt
index ad12d4c7220..2ca41e5624e 100644
--- a/docs/textdocs/BROWSING.txt
+++ b/docs/textdocs/BROWSING.txt
@@ -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
diff --git a/docs/textdocs/HINTS.txt b/docs/textdocs/HINTS.txt
index 75114557fe8..877640108ce 100644
--- a/docs/textdocs/HINTS.txt
+++ b/docs/textdocs/HINTS.txt
@@ -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
diff --git a/docs/textdocs/Printing.txt b/docs/textdocs/Printing.txt
index b47120eaba9..2c50e5f4fe6 100644
--- a/docs/textdocs/Printing.txt
+++ b/docs/textdocs/Printing.txt
@@ -3,7 +3,7 @@ Revised by: Patrick Powell
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
diff --git a/docs/textdocs/Tracing.txt b/docs/textdocs/Tracing.txt
index fd65045abdb..6cc1d69258d 100644
--- a/docs/textdocs/Tracing.txt
+++ b/docs/textdocs/Tracing.txt
@@ -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
diff --git a/docs/textdocs/UNIX_SECURITY.txt b/docs/textdocs/UNIX_SECURITY.txt
index d6a0a01acc5..38705f018ac 100644
--- a/docs/textdocs/UNIX_SECURITY.txt
+++ b/docs/textdocs/UNIX_SECURITY.txt
@@ -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.
diff --git a/examples/README b/examples/README
index ba47cf912f7..22226067140 100644
--- a/examples/README
+++ b/examples/README
@@ -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
diff --git a/examples/VFS/Makefile b/examples/VFS/Makefile
index 716e48da88d..f93cd0cb2df 100644
--- a/examples/VFS/Makefile
+++ b/examples/VFS/Makefile
@@ -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
diff --git a/examples/VFS/block/Makefile b/examples/VFS/block/Makefile
index dcc7c077936..44b08681d6d 100644
--- a/examples/VFS/block/Makefile
+++ b/examples/VFS/block/Makefile
@@ -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
diff --git a/examples/VFS/recycle.c b/examples/VFS/recycle.c
index 74d3657895a..6a1c98ce54e 100644
--- a/examples/VFS/recycle.c
+++ b/examples/VFS/recycle.c
@@ -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++);
diff --git a/examples/pdb/README b/examples/pdb/README
index ccc39248aac..a2126047925 100644
--- a/examples/pdb/README
+++ b/examples/pdb/README
@@ -1,5 +1,41 @@
README for Samba Password Database (PDB) examples
====================================================
+21-6-2002 Stefan (metze) Metzmacher
+
+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
+
+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
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
+
diff --git a/examples/pdb/pdb_test.c b/examples/pdb/pdb_test.c
index 4b4189e9d57..d2722d2e036 100644
--- a/examples/pdb/pdb_test.c
+++ b/examples/pdb/pdb_test.c
@@ -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;
}
diff --git a/examples/smb.conf.default b/examples/smb.conf.default
index f0c86cc6eed..417417d256f 100644
--- a/examples/smb.conf.default
+++ b/examples/smb.conf.default
@@ -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 =
+# 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 =
-
# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
; domain logons = yes
diff --git a/packaging/Caldera/OpenLinux/findsmb b/packaging/Caldera/OpenLinux/findsmb
index 986c2481779..f70d18dcbdc 100755
--- a/packaging/Caldera/OpenLinux/findsmb
+++ b/packaging/Caldera/OpenLinux/findsmb
@@ -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> - /,@nmblookup);
$_ = @name[0];
if ($_) {
- /(\S+)/;
+ /(.{1,15})\s+<00>\s+/;
$_ = "[$1]";
} else {
$_ = "Unknown Workgroup";
diff --git a/packaging/Caldera/OpenLinux/samba3.spec.tmpl b/packaging/Caldera/OpenLinux/samba3.spec.tmpl
index d48d860e0be..23ebcd879ec 100644
--- a/packaging/Caldera/OpenLinux/samba3.spec.tmpl
+++ b/packaging/Caldera/OpenLinux/samba3.spec.tmpl
@@ -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
diff --git a/packaging/Caldera/OpenServer/findsmb b/packaging/Caldera/OpenServer/findsmb
index bb91c784b89..c87fdb5190a 100755
--- a/packaging/Caldera/OpenServer/findsmb
+++ b/packaging/Caldera/OpenServer/findsmb
@@ -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> - /,@nmblookup);
$_ = @name[0];
if ($_) {
- /(\S+)/;
+ /(.{1,15})\s+<00>\s+/;
$_ = "[$1]";
} else {
$_ = "Unknown Workgroup";
diff --git a/packaging/Caldera/UnixWare/findsmb b/packaging/Caldera/UnixWare/findsmb
index bb91c784b89..c87fdb5190a 100755
--- a/packaging/Caldera/UnixWare/findsmb
+++ b/packaging/Caldera/UnixWare/findsmb
@@ -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> - /,@nmblookup);
$_ = @name[0];
if ($_) {
- /(\S+)/;
+ /(.{1,15})\s+<00>\s+/;
$_ = "[$1]";
} else {
$_ = "Unknown Workgroup";
diff --git a/packaging/Mandrake/findsmb b/packaging/Mandrake/findsmb
index 986c2481779..f70d18dcbdc 100755
--- a/packaging/Mandrake/findsmb
+++ b/packaging/Mandrake/findsmb
@@ -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> - /,@nmblookup);
$_ = @name[0];
if ($_) {
- /(\S+)/;
+ /(.{1,15})\s+<00>\s+/;
$_ = "[$1]";
} else {
$_ = "Unknown Workgroup";
diff --git a/packaging/PHT/TurboLinux/findsmb b/packaging/PHT/TurboLinux/findsmb
index 986c2481779..f70d18dcbdc 100755
--- a/packaging/PHT/TurboLinux/findsmb
+++ b/packaging/PHT/TurboLinux/findsmb
@@ -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> - /,@nmblookup);
$_ = @name[0];
if ($_) {
- /(\S+)/;
+ /(.{1,15})\s+<00>\s+/;
$_ = "[$1]";
} else {
$_ = "Unknown Workgroup";
diff --git a/packaging/RedHat/findsmb b/packaging/RedHat/findsmb
index 986c2481779..04bc6080508 100755
--- a/packaging/RedHat/findsmb
+++ b/packaging/RedHat/findsmb
@@ -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> - /,@nmblookup);
$_ = @name[0];
if ($_) {
- /(\S+)/;
+# Same as before for space and characters
+ /(.{1,15})\s+<00>\s+/;
$_ = "[$1]";
} else {
$_ = "Unknown Workgroup";
diff --git a/packaging/RedHat/samba.pamd b/packaging/RedHat/samba.pamd
index 1b4a93fb19e..bf7a5b392ca 100644
--- a/packaging/RedHat/samba.pamd
+++ b/packaging/RedHat/samba.pamd
@@ -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
diff --git a/packaging/RedHat/samba2.spec.tmpl b/packaging/RedHat/samba2.spec.tmpl
index c99b9123825..0766653c234 100644
--- a/packaging/RedHat/samba2.spec.tmpl
+++ b/packaging/RedHat/samba2.spec.tmpl
@@ -8,6 +8,7 @@ Source: ftp://samba.org/pub/samba/samba-%{version}.tar.gz
Packager: John H Terpstra [Samba-Team]
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
+ - moved findsmb to a standard component in samba's
+ "make install". Removed from specfile.
+
+* Sun Oct 14 2001 Andrew Bartlett
+ - Set SBINDIR for codepage/manpage install, cope with
+ broken Makefile
+
* Mon Aug 1 2001 Tim Potter
- 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
- 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
diff --git a/packaging/RedHat/smb.init b/packaging/RedHat/smb.init
index 260439281a3..5419b2b9c6e 100755
--- a/packaging/RedHat/smb.init
+++ b/packaging/RedHat/smb.init
@@ -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: "
diff --git a/packaging/SGI/findsmb b/packaging/SGI/findsmb
index a48ec592e80..336ff07c16f 100755
--- a/packaging/SGI/findsmb
+++ b/packaging/SGI/findsmb
@@ -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> - /,@nmblookup);
$_ = @name[0];
if ($_) {
- /(\S+)/;
+ /(.{1,15})\s+<00>\s+/;
$_ = "[$1]";
} else {
$_ = "Unknown Workgroup";
diff --git a/packaging/Solaris/i.swat b/packaging/Solaris/i.swat
index 047f0e17200..d07d2798d85 100644
--- a/packaging/Solaris/i.swat
+++ b/packaging/Solaris/i.swat
@@ -33,7 +33,7 @@ EOF
if [ ! -z "$PKG_INSTALL_ROOT" ]
then
- CAT <
+# 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
-
-# we want our generated headers to be rebuilt if they don't exist, but not rebuilt every time
-.headers.stamp:
- @[ -f $@ ] || touch $@
+ @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
-$(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)
+
+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
-proto: headers winbindd_proto
+.PHONY: headers proto
etags:
etags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/`
diff --git a/source3/acconfig.h b/source3/acconfig.h
index eb49d436972..3962b185548 100644
--- a/source3/acconfig.h
+++ b/source3/acconfig.h
@@ -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
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4
index caf5ab461b9..4ae5336a4bf 100644
--- a/source3/aclocal.m4
+++ b/source3/aclocal.m4
@@ -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 , 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 , 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 ], [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 in the installed 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 "
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header . 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 .
-# Ulrich Drepper , 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 ], [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 , 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
diff --git a/source3/auth/auth.c b/source3/auth/auth.c
index c7b9fcc1d8b..4f7a5c24a00 100644
--- a/source3/auth/auth.c
+++ b/source3/auth/auth.c
@@ -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;
}
diff --git a/source3/auth/auth_builtin.c b/source3/auth/auth_builtin.c
index 6e999b0d14f..5ce7075ab9f 100644
--- a/source3/auth/auth_builtin.c
+++ b/source3/auth/auth_builtin.c
@@ -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);
}
+
diff --git a/source3/auth/auth_compat.c b/source3/auth/auth_compat.c
index 857cf2b7d9f..a70f1e98b72 100644
--- a/source3/auth/auth_compat.c
+++ b/source3/auth/auth_compat.c
@@ -20,6 +20,9 @@
#include "includes.h"
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_AUTH
+
/****************************************************************************
COMPATIBILITY INTERFACES:
***************************************************************************/
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index af353ef812c..3352c5f9c89 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -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;
-
- /* 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;
- }
- }
- }
+ 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
- /* 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;
}
diff --git a/source3/auth/auth_rhosts.c b/source3/auth/auth_rhosts.c
index 9586d1d65ec..4ed0e6bbc43 100644
--- a/source3/auth/auth_rhosts.c
+++ b/source3/auth/auth_rhosts.c
@@ -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;
}
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 6753951c898..76579150ce9 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -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;
}
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c
index 5190d45c203..23faedc0bac 100644
--- a/source3/auth/auth_server.c
+++ b/source3/auth/auth_server.c
@@ -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;
}
diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c
index 05646f554e2..6f4b3f8b15b 100644
--- a/source3/auth/auth_unix.c
+++ b/source3/auth/auth_unix.c
@@ -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;
}
+
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index d80c927c19e..3ade220c0f0 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -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);
}
diff --git a/source3/auth/auth_winbind.c b/source3/auth/auth_winbind.c
index bc19b36b541..671e198bf59 100644
--- a/source3/auth/auth_winbind.c
+++ b/source3/auth/auth_winbind.c
@@ -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;
}
diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c
index 1428e929f16..1a3e55dd44f 100644
--- a/source3/auth/pampass.c
+++ b/source3/auth/pampass.c
@@ -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;
diff --git a/source3/auth/pass_check.c b/source3/auth/pass_check.c
index 47c9664a74c..63918796efb 100644
--- a/source3/auth/pass_check.c
+++ b/source3/auth/pass_check.c
@@ -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;
}
diff --git a/source3/client/.cvsignore b/source3/client/.cvsignore
index e69de29bb2d..49a52f7616d 100644
--- a/source3/client/.cvsignore
+++ b/source3/client/.cvsignore
@@ -0,0 +1 @@
+client_proto.h
\ No newline at end of file
diff --git a/source3/client/client.c b/source3/client/client.c
index 1daba28b98e..a421f36d809 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -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();
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 9fa3750b0c2..43b0ef44bc7 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -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);
diff --git a/source3/client/smbmnt.c b/source3/client/smbmnt.c
index 36248987b1e..ba2b1e9435d 100644
--- a/source3/client/smbmnt.c
+++ b/source3/client/smbmnt.c
@@ -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;
}
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c
index 2a2d5cbaf59..b78d9d22a80 100644
--- a/source3/client/smbspool.c
+++ b/source3/client/smbspool.c
@@ -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);
- }
-
- if (!cli_connect(c, server, &ip))
- {
- fputs("ERROR: cli_connect() 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_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...
diff --git a/source3/configure b/source3/configure
index f088d6cb79d..be0e78133a7 100755
--- a/source3/configure
+++ b/source3/configure
@@ -13,13 +13,29 @@ ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_default_prefix=/usr/local/samba
ac_help="$ac_help
- --enable-debug turn on debugging [default=no]"
+ --with-fhs Use FHS-compliant paths (default=no)"
ac_help="$ac_help
- --enable-developer turn on developer warnings and debugging [default=no]"
+ --with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)"
+ac_help="$ac_help
+ --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)"
+ac_help="$ac_help
+ --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)"
+ac_help="$ac_help
+ --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)"
+ac_help="$ac_help
+ --with-configdir=DIR Where to put configuration files (\$libdir)"
+ac_help="$ac_help
+ --with-logfilebase=DIR Where to put log files (\$(VARDIR))"
+ac_help="$ac_help
+ --enable-debug Turn on compiler debugging information (default=no)"
+ac_help="$ac_help
+ --enable-developer Turn on developer warnings and debugging (default=no)"
ac_help="$ac_help
- --enable-krb5developer turn on developer warnings and debugging, except -Wstrict-prototypes [default=no]"
+ --enable-krb5developer Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)"
ac_help="$ac_help
- --enable-dmalloc enable heap debugging [default=no]"
+ --enable-dmalloc Enable heap debugging [default=no]"
+ac_help="$ac_help
+ --enable-cups Turn on CUPS support (default=auto)"
ac_help="$ac_help
--with-readline[=DIR] Look for readline include/libs in DIR (default=auto) "
ac_help="$ac_help
@@ -42,16 +58,10 @@ ac_help="$ac_help
--with-pam_smbpass Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
ac_help="$ac_help
--with-tdbsam Include experimental TDB SAM support (default=no)"
-ac_help="$ac_help
- --with-ldapsam Include experimental LDAP SAM support (default=no)"
ac_help="$ac_help
--with-nisplussam Include NISPLUS SAM support (default=no)"
ac_help="$ac_help
--with-nisplus-home Include NISPLUS_HOME support (default=no)"
-ac_help="$ac_help
- --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)"
ac_help="$ac_help
--with-syslog Include experimental SYSLOG support (default=no)"
ac_help="$ac_help
@@ -60,14 +70,10 @@ ac_help="$ac_help
--with-quotas Include experimental disk-quota support (default=no)"
ac_help="$ac_help
--with-utmp Include experimental utmp accounting (default=no)"
-ac_help="$ac_help
- --with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)"
-ac_help="$ac_help
- --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)"
-ac_help="$ac_help
- --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)"
ac_help="$ac_help
--with-manpages-langs={en,ja,pl} Choose man pages' language(s). (en)"
+ac_help="$ac_help
+ --with-libsmbclient Build the libsmbclient shared library (default=yes)"
ac_help="$ac_help
--with-spinlocks Use spin locks instead of fcntl locks (default=no) "
ac_help="$ac_help
@@ -587,16 +593,145 @@ fi
-# we want to be compatible with older versions of Samba
+#################################################
+# Directory handling stuff to support both the
+# legacy SAMBA directories and FHS compliant
+# ones...
+# Check whether --with-fhs or --without-fhs was given.
+if test "${with_fhs+set}" = set; then
+ withval="$with_fhs"
+ configdir="${sysconfdir}/samba"
+ lockdir="\${VARDIR}/cache/samba"
+ piddir="\$(VARDIR)/run/samba"
+ logfilebase="\${VARDIR}/log/samba"
+ privatedir="\${CONFIGDIR}/private"
+ swatdir="\${DATADIR}/samba/swat"
+else
+ configdir="\$(LIBDIR)"
+ logfilebase="\$(VARDIR)"
+ lockdir="\${VARDIR}/locks"
+ piddir="\$(VARDIR)/locks"
+ privatedir="\${prefix}/private"
+ swatdir="\${prefix}/swat"
+fi
+#################################################
+# set private directory location
+# Check whether --with-privatedir or --without-privatedir was given.
+if test "${with_privatedir+set}" = set; then
+ withval="$with_privatedir"
+ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody calls it without argument
+ #
+ echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
+ ;;
+ * )
+ privatedir="$withval"
+ ;;
+ esac
+fi
+#################################################
+# set lock directory location
+# Check whether --with-lockdir or --without-lockdir was given.
+if test "${with_lockdir+set}" = set; then
+ withval="$with_lockdir"
+ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody calls it without argument
+ #
+ echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
+ ;;
+ * )
+ lockdir="$withval"
+ ;;
+ esac
+fi
+#################################################
+# set pid directory location
+# Check whether --with-piddir or --without-piddir was given.
+if test "${with_piddir+set}" = set; then
+ withval="$with_piddir"
+ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody calls it without argument
+ #
+ echo "configure: warning: --with-piddir called without argument - will use default" 1>&2
+ ;;
+ * )
+ piddir="$withval"
+ ;;
+ esac
+fi
+
+
+#################################################
+# set SWAT directory location
+# Check whether --with-swatdir or --without-swatdir was given.
+if test "${with_swatdir+set}" = set; then
+ withval="$with_swatdir"
+ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody does it
+ #
+ echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
+ ;;
+ * )
+ swatdir="$withval"
+ ;;
+ esac
+fi
+
+
+#################################################
+# set configuration directory location
+# Check whether --with-configdir or --without-configdir was given.
+if test "${with_configdir+set}" = set; then
+ withval="$with_configdir"
+ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody does it
+ #
+ echo "configure: warning: --with-configdir called without argument - will use default" 1>&2
+ ;;
+ * )
+ configdir="$withval"
+ ;;
+ esac
+fi
+
+
+#################################################
+# set log directory location
+# Check whether --with-logfilebase or --without-logfilebase was given.
+if test "${with_logfilebase+set}" = set; then
+ withval="$with_logfilebase"
+ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody does it
+ #
+ echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
+ ;;
+ * )
+ logfilebase="$withval"
+ ;;
+ esac
+fi
+
@@ -605,7 +740,27 @@ fi
-# compile with optimisation and without debugging by default
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# compile with optimization and without debugging by default
CFLAGS="-O ${CFLAGS}"
# Check whether --enable-debug or --disable-debug was given.
@@ -658,7 +813,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:662: checking for $ac_word" >&5
+echo "configure:817: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -688,7 +843,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:692: checking for $ac_word" >&5
+echo "configure:847: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -739,7 +894,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:743: checking for $ac_word" >&5
+echo "configure:898: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -771,7 +926,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:775: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:930: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -782,12 +937,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 786 "configure"
+#line 941 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -813,12 +968,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:817: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:972: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:822: checking whether we are using GNU C" >&5
+echo "configure:977: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -827,7 +982,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -846,7 +1001,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:850: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1005: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -908,7 +1063,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:912: checking for a BSD compatible install" >&5
+echo "configure:1067: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -960,12 +1115,12 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-for ac_prog in mawk gawk nawk awk
+for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:969: checking for $ac_word" >&5
+echo "configure:1124: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -995,8 +1150,25 @@ test -n "$AWK" && break
done
+LD=ld
+echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
+echo "configure:1156: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 &5; then
+ ac_cv_prog_gnu_ld=yes
+else
+ ac_cv_prog_gnu_ld=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+
+
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1000: checking for POSIXized ISC" >&5
+echo "configure:1172: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -1019,10 +1191,10 @@ fi
if test "x$CC" != xcc; then
echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
-echo "configure:1023: checking whether $CC and cc understand -c and -o together" >&5
+echo "configure:1195: checking whether $CC and cc understand -c and -o together" >&5
else
echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:1026: checking whether cc understands -c and -o together" >&5
+echo "configure:1198: checking whether cc understands -c and -o together" >&5
fi
set dummy $CC; ac_cc="`echo $2 |
sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
@@ -1034,16 +1206,16 @@ else
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
-if { (eval echo configure:1038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+if { (eval echo configure:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+ test -f conftest.o && { (eval echo configure:1211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
if test "x$CC" != xcc; then
# Test first that cc exists at all.
- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
ac_try='cc -c conftest.c -o conftest.o 1>&5'
- if { (eval echo configure:1046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ if { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+ test -f conftest.o && { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
# cc works too.
:
@@ -1077,20 +1249,20 @@ fi
echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
-echo "configure:1081: checking that the C compiler understands volatile" >&5
+echo "configure:1253: checking that the C compiler understands volatile" >&5
if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
volatile int i = 0
; return 0; }
EOF
-if { (eval echo configure:1094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_volatile=yes
else
@@ -1139,7 +1311,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1143: checking host system type" >&5
+echo "configure:1315: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1160,7 +1332,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1164: checking target system type" >&5
+echo "configure:1336: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1178,7 +1350,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1182: checking build system type" >&5
+echo "configure:1354: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1212,7 +1384,7 @@ esac
echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
-echo "configure:1216: checking config.cache system type" >&5
+echo "configure:1388: checking config.cache system type" >&5
if { test x"${ac_cv_host_system_type+set}" = x"set" &&
test x"$ac_cv_host_system_type" != x"$host"; } ||
{ test x"${ac_cv_build_system_type+set}" = x"set" &&
@@ -1240,7 +1412,7 @@ case "$host_os" in
*hpux*)
echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
-echo "configure:1244: checking whether ${CC-cc} accepts -Ae" >&5
+echo "configure:1416: checking whether ${CC-cc} accepts -Ae" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1382,7 +1554,6 @@ EOF
;;
esac
else
- DYNEXP="-dc -dp"
CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
cat >> confdefs.h <<\EOF
#define _LARGEFILE64_SOURCE 1
@@ -1402,14 +1573,14 @@ EOF
*sysv4*)
if test $host = mips-sni-sysv4 ; then
echo $ac_n "checking for LFS support""... $ac_c" 1>&6
-echo "configure:1406: checking for LFS support" >&5
+echo "configure:1577: checking for LFS support" >&5
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
if test "$cross_compiling" = yes; then
SINIX_LFS_SUPPORT=cross
else
cat > conftest.$ac_ext <
@@ -1421,7 +1592,7 @@ exit(1);
#endif
}
EOF
-if { (eval echo configure:1425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
SINIX_LFS_SUPPORT=yes
else
@@ -1452,14 +1623,14 @@ EOF
#
*linux*)
echo $ac_n "checking for LFS support""... $ac_c" 1>&6
-echo "configure:1456: checking for LFS support" >&5
+echo "configure:1627: checking for LFS support" >&5
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
if test "$cross_compiling" = yes; then
LINUX_LFS_SUPPORT=cross
else
cat > conftest.$ac_ext <
@@ -1497,7 +1668,7 @@ main() {
}
EOF
-if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LINUX_LFS_SUPPORT=yes
else
@@ -1530,14 +1701,14 @@ EOF
*hurd*)
echo $ac_n "checking for LFS support""... $ac_c" 1>&6
-echo "configure:1534: checking for LFS support" >&5
+echo "configure:1705: checking for LFS support" >&5
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
if test "$cross_compiling" = yes; then
GLIBC_LFS_SUPPORT=cross
else
cat > conftest.$ac_ext <
@@ -1549,7 +1720,7 @@ exit(1);
#endif
}
EOF
-if { (eval echo configure:1553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
GLIBC_LFS_SUPPORT=yes
else
@@ -1579,21 +1750,21 @@ EOF
esac
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1583: checking for inline" >&5
+echo "configure:1754: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1619,7 +1790,7 @@ EOF
esac
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1623: checking how to run the C preprocessor" >&5
+echo "configure:1794: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1634,13 +1805,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1651,13 +1822,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1668,13 +1839,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1699,12 +1870,12 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1703: checking for ANSI C header files" >&5
+echo "configure:1874: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -1712,7 +1883,7 @@ else
#include
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1729,7 +1900,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
@@ -1747,7 +1918,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
@@ -1768,7 +1939,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1779,7 +1950,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1807,12 +1978,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1811: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1982: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include <$ac_hdr>
@@ -1820,7 +1991,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -1845,7 +2016,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1849: checking for opendir in -ldir" >&5
+echo "configure:2020: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1853,7 +2024,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1886,7 +2057,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1890: checking for opendir in -lx" >&5
+echo "configure:2061: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1894,7 +2065,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1928,12 +2099,12 @@ fi
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1932: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2103: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -1942,7 +2113,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -1963,12 +2134,12 @@ EOF
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1967: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:2138: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -1984,7 +2155,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:1988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -2008,17 +2179,17 @@ for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2012: checking for $ac_hdr" >&5
+echo "configure:2183: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2048,17 +2219,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2052: checking for $ac_hdr" >&5
+echo "configure:2223: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2088,17 +2259,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2092: checking for $ac_hdr" >&5
+echo "configure:2263: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2128,17 +2299,17 @@ for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2132: checking for $ac_hdr" >&5
+echo "configure:2303: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2168,17 +2339,17 @@ for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h std
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2172: checking for $ac_hdr" >&5
+echo "configure:2343: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2208,17 +2379,17 @@ for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h term
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2212: checking for $ac_hdr" >&5
+echo "configure:2383: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2248,17 +2419,17 @@ for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2252: checking for $ac_hdr" >&5
+echo "configure:2423: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2284,21 +2455,21 @@ else
fi
done
-for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h
+for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2292: checking for $ac_hdr" >&5
+echo "configure:2463: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2332,14 +2503,14 @@ done
case "$host_os" in
*hpux*)
cat > conftest.$ac_ext <
int main() {
struct spwd testme
; return 0; }
EOF
-if { (eval echo configure:2343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_shadow_h=yes
else
@@ -2361,17 +2532,17 @@ for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2365: checking for $ac_hdr" >&5
+echo "configure:2536: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2401,17 +2572,17 @@ for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h sec
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2405: checking for $ac_hdr" >&5
+echo "configure:2576: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2441,17 +2612,17 @@ for ac_hdr in stropts.h poll.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2445: checking for $ac_hdr" >&5
+echo "configure:2616: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2481,17 +2652,17 @@ for ac_hdr in sys/capability.h syscall.h sys/syscall.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2485: checking for $ac_hdr" >&5
+echo "configure:2656: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2521,17 +2692,17 @@ for ac_hdr in sys/acl.h sys/cdefs.h glob.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2525: checking for $ac_hdr" >&5
+echo "configure:2696: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2563,17 +2734,17 @@ for ac_hdr in utmp.h utmpx.h lastlog.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2567: checking for $ac_hdr" >&5
+echo "configure:2738: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2605,17 +2776,17 @@ for ac_hdr in sys/fs/vx_quota.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2609: checking for $ac_hdr" >&5
+echo "configure:2780: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2647,17 +2818,17 @@ for ac_hdr in linux/xqm.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2651: checking for $ac_hdr" >&5
+echo "configure:2822: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2685,7 +2856,7 @@ done
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:2689: checking size of int" >&5
+echo "configure:2860: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2693,19 +2864,18 @@ else
ac_cv_sizeof_int=cross
else
cat > conftest.$ac_ext <
-#include
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
+ if (!f) return(1);
fprintf(f, "%d\n", sizeof(int));
- exit(0);
+ return(0);
}
EOF
-if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
@@ -2725,7 +2895,7 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2729: checking size of long" >&5
+echo "configure:2899: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2733,19 +2903,18 @@ else
ac_cv_sizeof_long=cross
else
cat > conftest.$ac_ext <
-#include
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
+ if (!f) return(1);
fprintf(f, "%d\n", sizeof(long));
- exit(0);
+ return(0);
}
EOF
-if { (eval echo configure:2749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
@@ -2765,7 +2934,7 @@ EOF
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:2769: checking size of short" >&5
+echo "configure:2938: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2773,19 +2942,18 @@ else
ac_cv_sizeof_short=cross
else
cat > conftest.$ac_ext <
-#include
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
+ if (!f) return(1);
fprintf(f, "%d\n", sizeof(short));
- exit(0);
+ return(0);
}
EOF
-if { (eval echo configure:2789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
@@ -2806,12 +2974,12 @@ EOF
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2810: checking for working const" >&5
+echo "configure:2978: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2881,21 +3049,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2885: checking for inline" >&5
+echo "configure:3053: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2921,14 +3089,14 @@ EOF
esac
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:2925: checking whether byte ordering is bigendian" >&5
+echo "configure:3093: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <
#include
@@ -2939,11 +3107,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:2943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <
#include
@@ -2954,7 +3122,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:2958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -2974,7 +3142,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -3011,14 +3179,14 @@ EOF
fi
echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:3015: checking whether char is unsigned" >&5
+echo "configure:3183: checking whether char is unsigned" >&5
if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$GCC" = yes; then
# GCC predefines this symbol on systems where it applies.
cat > conftest.$ac_ext <&2; exit 1; }
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_char_unsigned=yes
else
@@ -3075,12 +3243,12 @@ fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3079: checking return type of signal handlers" >&5
+echo "configure:3247: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -3097,7 +3265,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:3101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -3116,12 +3284,12 @@ EOF
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3120: checking for uid_t in sys/types.h" >&5
+echo "configure:3288: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
@@ -3150,12 +3318,12 @@ EOF
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3154: checking for mode_t" >&5
+echo "configure:3322: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
@@ -3183,12 +3351,12 @@ EOF
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3187: checking for off_t" >&5
+echo "configure:3355: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
@@ -3216,12 +3384,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3220: checking for size_t" >&5
+echo "configure:3388: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
@@ -3249,12 +3417,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3253: checking for pid_t" >&5
+echo "configure:3421: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
@@ -3282,12 +3450,12 @@ EOF
fi
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:3286: checking for st_rdev in struct stat" >&5
+echo "configure:3454: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -3295,7 +3463,7 @@ int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
-if { (eval echo configure:3299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
@@ -3316,12 +3484,12 @@ EOF
fi
echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
-echo "configure:3320: checking for d_off in dirent" >&5
+echo "configure:3488: checking for d_off in dirent" >&5
if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
@@ -3331,7 +3499,7 @@ int main() {
struct dirent d; d.d_off;
; return 0; }
EOF
-if { (eval echo configure:3335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_dirent_d_off=yes
else
@@ -3352,12 +3520,12 @@ EOF
fi
echo $ac_n "checking for ino_t""... $ac_c" 1>&6
-echo "configure:3356: checking for ino_t" >&5
+echo "configure:3524: checking for ino_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
@@ -3385,12 +3553,12 @@ EOF
fi
echo $ac_n "checking for loff_t""... $ac_c" 1>&6
-echo "configure:3389: checking for loff_t" >&5
+echo "configure:3557: checking for loff_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
@@ -3418,12 +3586,12 @@ EOF
fi
echo $ac_n "checking for offset_t""... $ac_c" 1>&6
-echo "configure:3422: checking for offset_t" >&5
+echo "configure:3590: checking for offset_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
@@ -3451,12 +3619,12 @@ EOF
fi
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:3455: checking for ssize_t" >&5
+echo "configure:3623: checking for ssize_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
@@ -3484,12 +3652,12 @@ EOF
fi
echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
-echo "configure:3488: checking for wchar_t" >&5
+echo "configure:3656: checking for wchar_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
@@ -3520,90 +3688,111 @@ fi
############################################
# for cups support we need libcups, and a handful of header files
-echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
-echo "configure:3525: checking for httpConnect in -lcups" >&5
-ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lcups $LIBS"
-cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+# Check whether --enable-cups or --disable-cups was given.
+if test "${enable_cups+set}" = set; then
+ enableval="$enable_cups"
+ :
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <&6
+echo "configure:3703: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$CUPS_CONFIG" in
+ /*)
+ ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
+if test -n "$CUPS_CONFIG"; then
+ echo "$ac_t""$CUPS_CONFIG" 1>&6
else
echo "$ac_t""no" 1>&6
fi
-# I wonder if there is a nicer way of doing this?
+ if test "x$CUPS_CONFIG" != x; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_CUPS 1
+EOF
-if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
- for ac_hdr in cups/cups.h cups/language.h
+ CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
+ LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
+ LIBS="$LIBS `$CUPS_CONFIG --libs`"
+ fi
+fi
+
+############################################
+# we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
+for ac_func in dlopen
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3579: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3752: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
+if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
+ eval "ac_cv_func_$ac_func=yes"
else
- echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <> confdefs.h <<\EOF
-#define HAVE_CUPS 1
-EOF
-
- fi
- fi
-fi
-
-############################################
-# we need libdl for PAM, the password database plugins and the new VFS code
-echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:3628: checking for dlopen in -ldl" >&5
+if test x"$ac_cv_func_dlopen" = x"no"; then
+ echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "configure:3806: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3632,7 +3810,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3660,24 +3838,26 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
LIBS="$LIBS -ldl";
cat >> confdefs.h <<\EOF
-#define HAVE_LIBDL 1
+#define HAVE_DLOPEN 1
EOF
else
echo "$ac_t""no" 1>&6
fi
+fi
+# dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
############################################
# check if the compiler can do immediate structures
echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
-echo "configure:3675: checking for immediate structures" >&5
+echo "configure:3855: checking for immediate structures" >&5
if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
@@ -3695,7 +3875,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:3699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_immediate_structures=yes
else
@@ -3718,13 +3898,13 @@ fi
############################################
# check for unix domain sockets
echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
-echo "configure:3722: checking for unix domain sockets" >&5
+echo "configure:3902: checking for unix domain sockets" >&5
if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
@@ -3739,7 +3919,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:3743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_unixsocket=yes
else
@@ -3761,13 +3941,13 @@ fi
echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
-echo "configure:3765: checking for socklen_t type" >&5
+echo "configure:3945: checking for socklen_t type" >&5
if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
@@ -3780,7 +3960,7 @@ int main() {
socklen_t i = 0
; return 0; }
EOF
-if { (eval echo configure:3784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_socklen_t=yes
else
@@ -3801,13 +3981,13 @@ EOF
fi
echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
-echo "configure:3805: checking for sig_atomic_t type" >&5
+echo "configure:3985: checking for sig_atomic_t type" >&5
if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
@@ -3820,7 +4000,7 @@ int main() {
sig_atomic_t i = 0
; return 0; }
EOF
-if { (eval echo configure:3824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_sig_atomic_t=yes
else
@@ -3843,20 +4023,20 @@ fi
# stupid headers have the functions but no declaration. grrrr.
echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
-echo "configure:3847: checking for errno declaration" >&5
+echo "configure:4027: checking for errno declaration" >&5
if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
int i = (int)errno
; return 0; }
EOF
-if { (eval echo configure:3860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_errno_decl=yes
else
@@ -3878,20 +4058,20 @@ EOF
echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
-echo "configure:3882: checking for setresuid declaration" >&5
+echo "configure:4062: checking for setresuid declaration" >&5
if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
int i = (int)setresuid
; return 0; }
EOF
-if { (eval echo configure:3895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_setresuid_decl=yes
else
@@ -3913,20 +4093,20 @@ EOF
echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
-echo "configure:3917: checking for setresgid declaration" >&5
+echo "configure:4097: checking for setresgid declaration" >&5
if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
int i = (int)setresgid
; return 0; }
EOF
-if { (eval echo configure:3930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_setresgid_decl=yes
else
@@ -3948,20 +4128,20 @@ EOF
echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
-echo "configure:3952: checking for asprintf declaration" >&5
+echo "configure:4132: checking for asprintf declaration" >&5
if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
int i = (int)asprintf
; return 0; }
EOF
-if { (eval echo configure:3965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_asprintf_decl=yes
else
@@ -3983,20 +4163,20 @@ EOF
echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
-echo "configure:3987: checking for vasprintf declaration" >&5
+echo "configure:4167: checking for vasprintf declaration" >&5
if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
int i = (int)vasprintf
; return 0; }
EOF
-if { (eval echo configure:4000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_vasprintf_decl=yes
else
@@ -4018,20 +4198,20 @@ EOF
echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
-echo "configure:4022: checking for vsnprintf declaration" >&5
+echo "configure:4202: checking for vsnprintf declaration" >&5
if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
int i = (int)vsnprintf
; return 0; }
EOF
-if { (eval echo configure:4035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_vsnprintf_decl=yes
else
@@ -4053,20 +4233,20 @@ EOF
echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
-echo "configure:4057: checking for snprintf declaration" >&5
+echo "configure:4237: checking for snprintf declaration" >&5
if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
int i = (int)snprintf
; return 0; }
EOF
-if { (eval echo configure:4070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_snprintf_decl=yes
else
@@ -4090,7 +4270,7 @@ EOF
# and glibc has setresuid under linux but the function does
# nothing until kernel 2.1.44! very dumb.
echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
-echo "configure:4094: checking for real setresuid" >&5
+echo "configure:4274: checking for real setresuid" >&5
if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4099,12 +4279,12 @@ else
samba_cv_have_setresuid=cross
else
cat > conftest.$ac_ext <
main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
EOF
-if { (eval echo configure:4108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_have_setresuid=yes
else
@@ -4129,7 +4309,7 @@ fi
# Do the same check for setresguid...
#
echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
-echo "configure:4133: checking for real setresgid" >&5
+echo "configure:4313: checking for real setresgid" >&5
if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4138,13 +4318,13 @@ else
samba_cv_have_setresgid=cross
else
cat > conftest.$ac_ext <
#include
main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
EOF
-if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_have_setresgid=yes
else
@@ -4167,7 +4347,7 @@ EOF
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:4171: checking for 8-bit clean memcmp" >&5
+echo "configure:4351: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4175,7 +4355,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@@ -4208,12 +4388,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
for ac_func in crypt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4212: checking for $ac_func" >&5
+echo "configure:4392: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4262,7 +4442,7 @@ done
if test x"$ac_cv_func_crypt" = x"no"; then
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:4266: checking for crypt in -lcrypt" >&5
+echo "configure:4446: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4270,7 +4450,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4314,7 +4494,7 @@ test "${with_readline+set}" != "set" && with_readline=yes
# test for where we get readline() from
echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
-echo "configure:4318: checking whether to use readline" >&5
+echo "configure:4498: checking whether to use readline" >&5
# Check whether --with-readline or --without-readline was given.
if test "${with_readline+set}" = set; then
withval="$with_readline"
@@ -4326,17 +4506,17 @@ if test "${with_readline+set}" = set; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4330: checking for $ac_hdr" >&5
+echo "configure:4510: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4366,17 +4546,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4370: checking for $ac_hdr" >&5
+echo "configure:4550: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4407,17 +4587,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4411: checking for $ac_hdr" >&5
+echo "configure:4591: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4440,7 +4620,7 @@ EOF
for termlib in ncurses curses termcap terminfo termlib; do
echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
-echo "configure:4444: checking for tgetent in -l${termlib}" >&5
+echo "configure:4624: checking for tgetent in -l${termlib}" >&5
ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4448,7 +4628,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l${termlib} $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4481,7 +4661,7 @@ fi
done
echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
-echo "configure:4485: checking for rl_callback_handler_install in -lreadline" >&5
+echo "configure:4665: checking for rl_callback_handler_install in -lreadline" >&5
ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4489,7 +4669,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lreadline $TERMLIBS $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4551,17 +4731,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4555: checking for $ac_hdr" >&5
+echo "configure:4735: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4591,17 +4771,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4595: checking for $ac_hdr" >&5
+echo "configure:4775: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4632,17 +4812,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4636: checking for $ac_hdr" >&5
+echo "configure:4816: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4665,7 +4845,7 @@ EOF
for termlib in ncurses curses termcap terminfo termlib; do
echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
-echo "configure:4669: checking for tgetent in -l${termlib}" >&5
+echo "configure:4849: checking for tgetent in -l${termlib}" >&5
ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4673,7 +4853,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l${termlib} $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4706,7 +4886,7 @@ fi
done
echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
-echo "configure:4710: checking for rl_callback_handler_install in -lreadline" >&5
+echo "configure:4890: checking for rl_callback_handler_install in -lreadline" >&5
ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4714,7 +4894,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lreadline $TERMLIBS $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4775,7 +4955,7 @@ fi
# code will generate warnings on one of them unless we have a few
# special cases.
echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
-echo "configure:4779: checking for rl_completion_matches in -lreadline" >&5
+echo "configure:4959: checking for rl_completion_matches in -lreadline" >&5
ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4783,7 +4963,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lreadline $TERMLIBS $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4827,12 +5007,12 @@ fi
for ac_func in connect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4831: checking for $ac_func" >&5
+echo "configure:5011: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4883,7 +5063,7 @@ if test x"$ac_cv_func_connect" = x"no"; then
case "$LIBS" in
*-lnsl*) ;;
*) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
-echo "configure:4887: checking for printf in -lnsl_s" >&5
+echo "configure:5067: checking for printf in -lnsl_s" >&5
ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4891,7 +5071,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl_s $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4933,7 +5113,7 @@ fi
case "$LIBS" in
*-lnsl*) ;;
*) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
-echo "configure:4937: checking for printf in -lnsl" >&5
+echo "configure:5117: checking for printf in -lnsl" >&5
ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4941,7 +5121,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <